mt7620n_nexx_wt3020.dtsi 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #include "mt7620n.dtsi"
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "nexx,wt3020", "ralink,mt7620n-soc";
  6. aliases {
  7. led-boot = &led_power;
  8. led-failsafe = &led_power;
  9. led-running = &led_power;
  10. led-upgrade = &led_power;
  11. label-mac-device = &ethernet;
  12. };
  13. keys {
  14. compatible = "gpio-keys";
  15. reset {
  16. label = "reset";
  17. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  18. linux,code = <KEY_RESTART>;
  19. };
  20. };
  21. leds {
  22. compatible = "gpio-leds";
  23. led_power: power {
  24. label = "blue:power";
  25. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  26. };
  27. };
  28. };
  29. &spi0 {
  30. status = "okay";
  31. flash@0 {
  32. compatible = "jedec,spi-nor";
  33. reg = <0>;
  34. spi-max-frequency = <10000000>;
  35. partitions {
  36. compatible = "fixed-partitions";
  37. #address-cells = <1>;
  38. #size-cells = <1>;
  39. partition@0 {
  40. label = "u-boot";
  41. reg = <0x0 0x30000>;
  42. read-only;
  43. };
  44. partition@30000 {
  45. label = "u-boot-env";
  46. reg = <0x30000 0x10000>;
  47. read-only;
  48. };
  49. factory: partition@40000 {
  50. label = "factory";
  51. reg = <0x40000 0x10000>;
  52. read-only;
  53. };
  54. firmware: partition@50000 {
  55. compatible = "denx,uimage";
  56. label = "firmware";
  57. /* reg property is set based on flash size in DTS files */
  58. };
  59. };
  60. };
  61. };
  62. &gpio3 {
  63. status = "okay";
  64. };
  65. &ethernet {
  66. nvmem-cells = <&macaddr_factory_4>;
  67. nvmem-cell-names = "mac-address";
  68. mediatek,portmap = "wllll";
  69. };
  70. &wmac {
  71. ralink,mtd-eeprom = <&factory 0x0>;
  72. };
  73. &state_default {
  74. default {
  75. groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
  76. function = "gpio";
  77. };
  78. };
  79. &factory {
  80. compatible = "nvmem-cells";
  81. #address-cells = <1>;
  82. #size-cells = <1>;
  83. macaddr_factory_4: macaddr@4 {
  84. reg = <0x4 0x6>;
  85. };
  86. };