1
0

DCH-M225.dts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
  7. model = "D-Link DCH-M225";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. gpio-keys-polled {
  15. compatible = "gpio-keys-polled";
  16. poll-interval = <100>;
  17. wps {
  18. label = "wps";
  19. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  20. linux,code = <KEY_RFKILL>;
  21. };
  22. reset {
  23. label = "reset";
  24. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  25. linux,code = <KEY_RESTART>;
  26. };
  27. };
  28. gpio-leds {
  29. compatible = "gpio-leds";
  30. led_power: power {
  31. label = "dch-m225:green:power";
  32. gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
  33. default-state = "on";
  34. };
  35. status {
  36. label = "dch-m225:red:status";
  37. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  38. default-state = "off";
  39. };
  40. };
  41. sound {
  42. compatible = "simple-audio-card";
  43. simple-audio-card,name = "Audio-I2S";
  44. simple-audio-card,format = "i2s";
  45. simple-audio-card,bitclock-master = <&dailink0_master>;
  46. simple-audio-card,frame-master = <&dailink0_master>;
  47. simple-audio-card,widgets =
  48. "Headphone", "Headphones";
  49. simple-audio-card,routing =
  50. "Headphones", "HP_L",
  51. "Headphones", "HP_R";
  52. simple-audio-card,mclk-fs = <256>;
  53. simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
  54. simple-audio-card,cpu {
  55. sound-dai = <&i2s>;
  56. };
  57. dailink0_master: simple-audio-card,codec {
  58. sound-dai = <&codec>;
  59. };
  60. };
  61. };
  62. &gpio0 {
  63. status = "okay";
  64. };
  65. &gpio1 {
  66. status = "okay";
  67. };
  68. &i2c {
  69. status = "okay";
  70. codec: wm8960@1a {
  71. #sound-dai-cells = <0>;
  72. compatible = "wlf,wm8960";
  73. reg = <0x1a>;
  74. wlf,shared-lrclk;
  75. };
  76. };
  77. &i2s {
  78. #sound-dai-cells = <0>;
  79. status = "okay";
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&mdio_refclk_pins>;
  82. };
  83. &spi0 {
  84. status = "okay";
  85. m25p80@0 {
  86. compatible = "jedec,spi-nor";
  87. reg = <0>;
  88. spi-max-frequency = <80000000>;
  89. m25p,fast-read;
  90. partitions {
  91. compatible = "fixed-partitions";
  92. #address-cells = <1>;
  93. #size-cells = <1>;
  94. partition@0 {
  95. label = "u-boot";
  96. reg = <0x0 0x30000>;
  97. read-only;
  98. };
  99. partition@30000 {
  100. label = "u-boot-env";
  101. reg = <0x30000 0x4000>;
  102. read-only;
  103. };
  104. factory: partition@34000 {
  105. label = "factory";
  106. reg = <0x34000 0x4000>;
  107. read-only;
  108. };
  109. nvram: partition@38000 {
  110. label = "nvram";
  111. reg = <0x38000 0x8000>;
  112. read-only;
  113. };
  114. partition@40000 {
  115. label = "devconf";
  116. reg = <0x40000 0x10000>;
  117. read-only;
  118. };
  119. partition@50000 {
  120. label = "upgrade_rec";
  121. reg = <0x50000 0x100000>;
  122. read-only;
  123. };
  124. partition@150000 {
  125. label = "firmware";
  126. reg = <0x150000 0x6b0000>;
  127. };
  128. };
  129. };
  130. };
  131. &gdma {
  132. status = "okay";
  133. };
  134. &pinctrl {
  135. state_default: pinctrl0 {
  136. gpio {
  137. ralink,group = "wdt", "rgmii1";
  138. ralink,function = "gpio";
  139. };
  140. gpio_i2s {
  141. ralink,group = "uartf";
  142. ralink,function = "gpio i2s";
  143. };
  144. };
  145. };
  146. &ethernet {
  147. mtd-mac-address = <&factory 0x4>;
  148. };
  149. &gsw {
  150. ralink,port4 = "ephy";
  151. };
  152. &wmac {
  153. ralink,mtd-eeprom = <&factory 0>;
  154. pinctrl-names = "default";
  155. pinctrl-0 = <&pa_pins>;
  156. };