kirkwood-dir665.dts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2014 Claudio Leite <[email protected]>
  4. *
  5. */
  6. /dts-v1/;
  7. #include "kirkwood.dtsi"
  8. #include "kirkwood-6281.dtsi"
  9. / {
  10. model = "D-Link DIR-665";
  11. compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood";
  12. memory {
  13. device_type = "memory";
  14. reg = <0x00000000 0x8000000>; /* 128 MB */
  15. };
  16. chosen {
  17. bootargs = "console=ttyS0,115200n8 earlyprintk";
  18. stdout-path = &uart0;
  19. };
  20. ocp@f1000000 {
  21. pinctrl: pin-controller@10000 {
  22. pinctrl-0 =< &pmx_led_usb
  23. &pmx_led_internet_blue
  24. &pmx_led_internet_amber
  25. &pmx_led_5g &pmx_led_status_blue
  26. &pmx_led_wps &pmx_led_status_amber
  27. &pmx_led_24g
  28. &pmx_btn_restart &pmx_btn_wps>;
  29. pinctrl-names = "default";
  30. pmx_led_usb: pmx-led-usb {
  31. marvell,pins = "mpp12";
  32. marvell,function = "gpio";
  33. };
  34. pmx_led_internet_blue: pmx-led-internet-blue {
  35. marvell,pins = "mpp42";
  36. marvell,function = "gpio";
  37. };
  38. pmx_led_internet_amber: pmx-led-internet-amber {
  39. marvell,pins = "mpp43";
  40. marvell,function = "gpio";
  41. };
  42. pmx_led_5g: pmx-led-5g {
  43. marvell,pins = "mpp44";
  44. marvell,function = "gpio";
  45. };
  46. pmx_led_status_blue: pmx-led-status-blue {
  47. marvell,pins = "mpp45";
  48. marvell,function = "gpio";
  49. };
  50. pmx_led_wps: pmx-led-wps {
  51. marvell,pins = "mpp47";
  52. marvell,function = "gpio";
  53. };
  54. pmx_led_status_amber: pmx-led-status-amber {
  55. marvell,pins = "mpp48";
  56. marvell,function = "gpio";
  57. };
  58. pmx_led_24g: pmx-led-24g {
  59. marvell,pins = "mpp49";
  60. marvell,function = "gpio";
  61. };
  62. pmx_btn_restart: pmx-btn-restart {
  63. marvell,pins = "mpp28";
  64. marvell,function = "gpio";
  65. };
  66. pmx_btn_wps: pmx-btn-wps {
  67. marvell,pins = "mpp46";
  68. marvell,function = "gpio";
  69. };
  70. };
  71. spi@10600 {
  72. status = "okay";
  73. flash@0 {
  74. #address-cells = <1>;
  75. #size-cells = <1>;
  76. compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
  77. spi-max-frequency = <50000000>;
  78. reg = <0>;
  79. partition@0 {
  80. label = "uboot";
  81. reg = <0x0 0x30000>;
  82. read-only;
  83. };
  84. partition@30000 {
  85. label = "nvram";
  86. reg = <0x30000 0x10000>;
  87. read-only;
  88. };
  89. partition@40000 {
  90. label = "kernel";
  91. reg = <0x40000 0x180000>;
  92. };
  93. partition@1c0000 {
  94. label = "rootfs";
  95. reg = <0x1c0000 0xe00000>;
  96. };
  97. cal_data: partition@fc0000 {
  98. label = "cal_data";
  99. reg = <0xfc0000 0x10000>;
  100. read-only;
  101. };
  102. partition@fd0000 {
  103. label = "lang_pack";
  104. reg = <0xfd0000 0x30000>;
  105. read-only;
  106. };
  107. };
  108. };
  109. serial@12000 {
  110. status = "okay";
  111. };
  112. i2c@11000 {
  113. status = "okay";
  114. };
  115. ehci@50000 {
  116. status = "okay";
  117. };
  118. };
  119. gpio-leds {
  120. compatible = "gpio-leds";
  121. blue-usb {
  122. label = "dir665:blue:usb";
  123. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  124. };
  125. blue-internet {
  126. /* Can only be turned on if the Internet
  127. * Ethernet port has Link
  128. */
  129. label = "dir665:blue:internet";
  130. gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
  131. };
  132. amber-internet {
  133. label = "dir665:amber:internet";
  134. gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
  135. };
  136. blue-wifi5g {
  137. label = "dir665:blue:5g";
  138. gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  139. };
  140. blue-status {
  141. label = "dir665:blue:status";
  142. gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
  143. };
  144. blue-wps {
  145. label = "dir665:blue:wps";
  146. gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  147. };
  148. amber-status {
  149. label = "dir665:amber:status";
  150. gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
  151. };
  152. blue-24g {
  153. label = "dir665:blue:24g";
  154. gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
  155. };
  156. };
  157. gpio-keys {
  158. compatible = "gpio-keys";
  159. #address-cells = <1>;
  160. #size-cells = <0>;
  161. reset {
  162. label = "reset";
  163. linux,code = <KEY_RESTART>;
  164. gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
  165. };
  166. wps {
  167. label = "wps";
  168. linux,code = <KEY_WPS_BUTTON>;
  169. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  170. };
  171. };
  172. };
  173. &mdio {
  174. status = "okay";
  175. switch@0 {
  176. compatible = "marvell,mv88e6085";
  177. #address-cells = <1>;
  178. #size-cells = <0>;
  179. reg = <0>;
  180. ports {
  181. #address-cells = <1>;
  182. #size-cells = <0>;
  183. port@0 {
  184. reg = <0>;
  185. label = "lan4";
  186. };
  187. port@1 {
  188. reg = <1>;
  189. label = "lan3";
  190. };
  191. port@2 {
  192. reg = <2>;
  193. label = "lan2";
  194. };
  195. port@3 {
  196. reg = <3>;
  197. label = "lan1";
  198. };
  199. port@4 {
  200. reg = <4>;
  201. label = "wan";
  202. };
  203. port@6 {
  204. reg = <6>;
  205. label = "cpu";
  206. ethernet = <&eth0port>;
  207. fixed-link {
  208. speed = <1000>;
  209. full-duplex;
  210. };
  211. };
  212. };
  213. };
  214. };
  215. /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
  216. * fixed speed and duplex. */
  217. &eth0 {
  218. status = "okay";
  219. ethernet0-port@0 {
  220. speed = <1000>;
  221. duplex = <1>;
  222. };
  223. };
  224. /* eth1 is connected to the switch as well. However DSA only supports a
  225. * single CPU port. So leave this port disabled to avoid confusion. */
  226. &eth1 {
  227. status = "disabled";
  228. };
  229. /* There is no battery on the boards, so the RTC does not keep time
  230. * when there is no power, making it useless. */
  231. &rtc {
  232. status = "disabled";
  233. };
  234. &pciec {
  235. status = "okay";
  236. };
  237. &pcie0 {
  238. status = "okay";
  239. };