WBMR300.dts 5.7 KB

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