2
0

WBMR300.dts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /dts-v1/;
  2. #include "vr9.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/mips/lantiq_rcu_gphy.h>
  5. / {
  6. compatible = "buffalo,wbmr-300hpd", "lantiq,xway", "lantiq,vr9";
  7. model = "Buffalo WBMR-300HPD";
  8. chosen {
  9. bootargs = "console=ttyLTQ0,115200";
  10. };
  11. aliases {
  12. led-boot = &power_g;
  13. led-failsafe = &diag_r;
  14. led-running = &power_g;
  15. led-upgrade = &power_g;
  16. led-dsl = &dsl;
  17. led-internet = &router_g;
  18. led-wifi = &wifi_g;
  19. };
  20. memory@0 {
  21. reg = <0x0 0x4000000>;
  22. };
  23. gpio_poweroff {
  24. compatible = "gpio-poweroff";
  25. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  26. };
  27. gpio-keys-polled {
  28. compatible = "gpio-keys-polled";
  29. #address-cells = <1>;
  30. #size-cells = <0>;
  31. poll-interval = <100>;
  32. power {
  33. label = "power";
  34. gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
  35. linux,code = <KEY_POWER>;
  36. };
  37. reset {
  38. label = "reset";
  39. gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
  40. linux,code = <KEY_RESTART>;
  41. };
  42. wps {
  43. label = "wps";
  44. gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_WPS_BUTTON>;
  46. };
  47. auto {
  48. label = "auto";
  49. gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
  50. linux,code = <BTN_0>;
  51. linux,input-type = <EV_SW>;
  52. };
  53. router {
  54. label = "router";
  55. gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
  56. linux,code = <BTN_1>;
  57. linux,input-type = <EV_SW>;
  58. };
  59. };
  60. gpio-leds {
  61. compatible = "gpio-leds";
  62. diag_r: diag_r {
  63. label = "wbmr300:red:diag";
  64. gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  65. default_state = "off";
  66. };
  67. wifi_g: wifi_g {
  68. label = "wbmr300:green:wifi";
  69. gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
  70. };
  71. dsl: dsl {
  72. label = "dsl";
  73. gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
  74. };
  75. router_y: router_y {
  76. label = "wbmr300:yellow:router";
  77. gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
  78. };
  79. wifi_y: wifi_y {
  80. label = "wbmr300:yellow:wifi";
  81. gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
  82. };
  83. lan1: lan1 {
  84. label = "wbmr300:green:lan1";
  85. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  86. };
  87. wan: wan {
  88. label = "wbmr300:green:wan";
  89. gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
  90. };
  91. lan3: lan3 {
  92. label = "wbmr300:green:lan3";
  93. gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
  94. };
  95. lan2: lan2 {
  96. label = "wbmr300:green:lan2";
  97. gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
  98. };
  99. internet_g: internet_g {
  100. label = "wbmr300:green:internet";
  101. gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
  102. };
  103. internet_y: internet_y {
  104. label = "wbmr300:yellow:internet";
  105. gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
  106. };
  107. router_g: router_g {
  108. label = "wbmr300:green:router";
  109. gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
  110. };
  111. power_g: power_g {
  112. label = "wbmr300:green:power";
  113. gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
  114. };
  115. };
  116. usb_vbus: regulator-usb-vbus {
  117. compatible = "regulator-fixed";
  118. regulator-name = "USB_VBUS";
  119. regulator-min-microvolt = <5000000>;
  120. regulator-max-microvolt = <5000000>;
  121. gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
  122. enable-active-high;
  123. };
  124. };
  125. &eth0 {
  126. lan: interface@0 {
  127. compatible = "lantiq,xrx200-pdi";
  128. #address-cells = <1>;
  129. #size-cells = <0>;
  130. reg = <0>;
  131. lantiq,switch;
  132. ethernet@1 {
  133. compatible = "lantiq,xrx200-pdi-port";
  134. reg = <4>;
  135. phy-mode = "mii";
  136. phy-handle = <&phy13>;
  137. };
  138. ethernet@2 {
  139. compatible = "lantiq,xrx200-pdi-port";
  140. reg = <5>;
  141. phy-mode = "mii";
  142. phy-handle = <&phy14>;
  143. };
  144. ethernet@3 {
  145. compatible = "lantiq,xrx200-pdi-port";
  146. reg = <2>;
  147. phy-mode = "mii";
  148. phy-handle = <&phy11>;
  149. };
  150. ethernet@4 {
  151. compatible = "lantiq,xrx200-pdi-port";
  152. reg = <3>;
  153. phy-mode = "mii";
  154. phy-handle = <&phy12>;
  155. };
  156. };
  157. mdio@0 {
  158. #address-cells = <1>;
  159. #size-cells = <0>;
  160. compatible = "lantiq,xrx200-mdio";
  161. reg = <0>;
  162. phy11: ethernet-phy@11 {
  163. reg = <0x11>;
  164. compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  165. };
  166. phy12: ethernet-phy@12 {
  167. reg = <0x12>;
  168. compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  169. };
  170. phy13: ethernet-phy@13 {
  171. reg = <0x13>;
  172. compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  173. };
  174. phy14: ethernet-phy@14 {
  175. reg = <0x14>;
  176. compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  177. };
  178. };
  179. };
  180. &gphy0 {
  181. lantiq,gphy-mode = <GPHY_MODE_FE>;
  182. };
  183. &gphy1 {
  184. lantiq,gphy-mode = <GPHY_MODE_FE>;
  185. };
  186. &gpio {
  187. pinctrl-names = "default";
  188. pinctrl-0 = <&state_default>;
  189. state_default: pinmux {
  190. mdio {
  191. lantiq,groups = "mdio";
  192. lantiq,function = "mdio";
  193. };
  194. phy-rst {
  195. lantiq,pins = "io42";
  196. lantiq,pull = <0>;
  197. lantiq,open-drain = <0>;
  198. lantiq,output = <1>;
  199. };
  200. pcie-rst {
  201. lantiq,pins = "io38";
  202. lantiq,pull = <0>;
  203. lantiq,output = <1>;
  204. };
  205. };
  206. pins_spi_default: pins_spi_default {
  207. spi_in {
  208. lantiq,groups = "spi_di";
  209. lantiq,function = "spi";
  210. };
  211. spi_out {
  212. lantiq,groups = "spi_do", "spi_clk",
  213. "spi_cs4";
  214. lantiq,function = "spi";
  215. lantiq,output = <1>;
  216. };
  217. };
  218. };
  219. &spi {
  220. status = "okay";
  221. pinctrl-names = "default";
  222. pinctrl-0 = <&pins_spi_default>;
  223. m25p80@4 {
  224. #address-cells = <1>;
  225. #size-cells = <1>;
  226. compatible = "jedec,spi-nor";
  227. reg = <4 0>;
  228. spi-max-frequency = <20000000>;
  229. partition@0 {
  230. reg = <0x0 0x10000>;
  231. label = "u-boot";
  232. read-only;
  233. };
  234. partition@10000 {
  235. reg = <0x10000 0x10000>;
  236. label = "gphyfirmware";
  237. read-only;
  238. };
  239. partition@20000 {
  240. reg = <0x20000 0x80000>;
  241. label = "dsl_fw";
  242. };
  243. partition@de0000 {
  244. reg = <0xa0000 0xf40000>;
  245. label = "firmware";
  246. };
  247. partition@fe0000 {
  248. reg = <0xfe0000 0x10000>;
  249. label = "sysconfig";
  250. read-only;
  251. };
  252. partition@ff0000 {
  253. reg = <0xff0000 0x2000>;
  254. label = "ubootconfig";
  255. };
  256. partition@ff3000 {
  257. reg = <0xff3000 0x2000>;
  258. label = "board_config";
  259. read-only;
  260. };
  261. };
  262. };
  263. &usb_phy0 {
  264. status = "okay";
  265. };
  266. &usb_phy1 {
  267. status = "okay";
  268. };
  269. &usb0 {
  270. status = "okay";
  271. vbus-supply = <&usb_vbus>;
  272. };
  273. &usb1 {
  274. status = "okay";
  275. vbus-supply = <&usb_vbus>;
  276. };