2
0

DCH-M225.dts 2.9 KB

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