OY-0001.dts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
  7. model = "OY-0001";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. gpio-leds {
  18. compatible = "gpio-leds";
  19. led_power: powerled {
  20. label = "oy-0001:green:power";
  21. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  22. };
  23. wifiled {
  24. label = "oy-0001:green:wifi";
  25. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  26. };
  27. };
  28. gpio-keys-polled {
  29. compatible = "gpio-keys-polled";
  30. poll-interval = <20>;
  31. s1 {
  32. label = "reset";
  33. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_RESTART>;
  35. };
  36. };
  37. };
  38. &gpio2 {
  39. status = "okay";
  40. };
  41. &gpio3 {
  42. status = "okay";
  43. };
  44. &spi0 {
  45. status = "okay";
  46. m25p80@0 {
  47. compatible = "jedec,spi-nor";
  48. reg = <0>;
  49. spi-max-frequency = <10000000>;
  50. partitions {
  51. compatible = "fixed-partitions";
  52. #address-cells = <1>;
  53. #size-cells = <1>;
  54. partition@0 {
  55. label = "u-boot";
  56. reg = <0x0 0x30000>;
  57. read-only;
  58. };
  59. partition@30000 {
  60. label = "u-boot-env";
  61. reg = <0x30000 0x10000>;
  62. read-only;
  63. };
  64. factory: partition@40000 {
  65. label = "factory";
  66. reg = <0x40000 0x10000>;
  67. read-only;
  68. };
  69. partition@50000 {
  70. label = "firmware";
  71. reg = <0x50000 0xfb0000>;
  72. };
  73. };
  74. };
  75. };
  76. &pinctrl {
  77. state_default: pinctrl0 {
  78. gpio {
  79. ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled";
  80. ralink,function = "gpio";
  81. };
  82. };
  83. };
  84. &ethernet {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&ephy_pins>;
  87. mediatek,portmap = "llllw";
  88. };
  89. &gsw {
  90. mediatek,port4 = "ephy";
  91. };
  92. &wmac {
  93. ralink,mtd-eeprom = <&factory 0>;
  94. };
  95. &sdhci {
  96. status = "okay";
  97. };
  98. &ehci {
  99. status = "okay";
  100. };
  101. &ohci {
  102. status = "okay";
  103. };
  104. &pcie {
  105. status = "okay";
  106. };