armada-xp-lenovo-ix4-300d.dts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Device Tree file for Lenovo Iomega ix4-300d
  4. *
  5. * Copyright (C) 2014, Benoit Masson <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include <dt-bindings/input/input.h>
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include "armada-xp-mv78230.dtsi"
  11. / {
  12. model = "Lenovo Iomega ix4-300d";
  13. compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230",
  14. "marvell,armadaxp", "marvell,armada-370-xp";
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. memory@0 {
  19. device_type = "memory";
  20. reg = <0 0x00000000 0 0x20000000>; /* 512MB */
  21. };
  22. soc {
  23. ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
  24. MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
  25. MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
  26. MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
  27. internal-regs {
  28. serial@12000 {
  29. status = "okay";
  30. };
  31. ethernet@70000 {
  32. pinctrl-0 = <&ge0_rgmii_pins>;
  33. pinctrl-names = "default";
  34. status = "okay";
  35. phy = <&phy0>;
  36. phy-mode = "rgmii-id";
  37. };
  38. ethernet@74000 {
  39. pinctrl-0 = <&ge1_rgmii_pins>;
  40. pinctrl-names = "default";
  41. status = "okay";
  42. phy = <&phy1>;
  43. phy-mode = "rgmii-id";
  44. };
  45. usb@50000 {
  46. status = "okay";
  47. };
  48. usb@51000 {
  49. status = "okay";
  50. };
  51. i2c@11000 {
  52. clock-frequency = <400000>;
  53. status = "okay";
  54. adt7473@2e {
  55. compatible = "adi,adt7473";
  56. reg = <0x2e>;
  57. };
  58. eeprom@50 {
  59. compatible = "atmel,24c64";
  60. reg = <0x50>;
  61. };
  62. pcf8563@51 {
  63. compatible = "nxp,pcf8563";
  64. reg = <0x51>;
  65. };
  66. };
  67. nand-controller@d0000 {
  68. status = "okay";
  69. nand@0 {
  70. reg = <0>;
  71. label = "pxa3xx_nand-0";
  72. nand-rb = <0>;
  73. nand-on-flash-bbt;
  74. partitions {
  75. compatible = "fixed-partitions";
  76. #address-cells = <1>;
  77. #size-cells = <1>;
  78. partition@0 {
  79. label = "u-boot";
  80. reg = <0x00000000 0x000e0000>;
  81. read-only;
  82. };
  83. partition@e0000 {
  84. label = "u-boot-env";
  85. reg = <0x000e0000 0x00020000>;
  86. read-only;
  87. };
  88. partition@100000 {
  89. label = "u-boot-env2";
  90. reg = <0x00100000 0x00020000>;
  91. read-only;
  92. };
  93. partition@120000 {
  94. label = "zImage";
  95. reg = <0x00120000 0x00400000>;
  96. };
  97. partition@520000 {
  98. label = "initrd";
  99. reg = <0x00520000 0x00400000>;
  100. };
  101. partition@e00000 {
  102. label = "boot";
  103. reg = <0x00e00000 0x3f200000>;
  104. };
  105. };
  106. };
  107. };
  108. };
  109. };
  110. gpio-keys {
  111. compatible = "gpio-keys";
  112. pinctrl-0 = <&power_button_pin &reset_button_pin
  113. &select_button_pin &scroll_button_pin>;
  114. pinctrl-names = "default";
  115. power-button {
  116. label = "Power Button";
  117. linux,code = <KEY_POWER>;
  118. gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
  119. };
  120. reset-button {
  121. label = "Reset Button";
  122. linux,code = <KEY_RESTART>;
  123. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  124. };
  125. select-button {
  126. label = "Select Button";
  127. linux,code = <BTN_SELECT>;
  128. gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
  129. };
  130. scroll-button {
  131. label = "Scroll Button";
  132. linux,code = <KEY_SCROLLDOWN>;
  133. gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
  134. };
  135. };
  136. spi-3 {
  137. compatible = "spi-gpio";
  138. status = "okay";
  139. gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
  140. gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
  141. cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
  142. num-chipselects = <1>;
  143. #address-cells = <1>;
  144. #size-cells = <0>;
  145. gpio_spi: gpio_spi@0 {
  146. compatible = "fairchild,74hc595";
  147. gpio-controller;
  148. #gpio-cells = <2>;
  149. reg = <0>;
  150. registers-number = <1>;
  151. spi-max-frequency = <100000>;
  152. };
  153. };
  154. gpio-leds {
  155. compatible = "gpio-leds";
  156. pinctrl-0 = <&hdd_led_pin>;
  157. pinctrl-names = "default";
  158. hdd-led {
  159. label = "ix4-300d:hdd:blue";
  160. gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  161. default-state = "off";
  162. };
  163. power-led {
  164. label = "ix4-300d:power:white";
  165. gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
  166. /* init blinking while booting */
  167. linux,default-trigger = "timer";
  168. default-state = "on";
  169. };
  170. sysfail-led {
  171. label = "ix4-300d:sysfail:red";
  172. gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
  173. default-state = "off";
  174. };
  175. sys-led {
  176. label = "ix4-300d:sys:blue";
  177. gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
  178. default-state = "off";
  179. };
  180. hddfail-led {
  181. label = "ix4-300d:hddfail:red";
  182. gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
  183. default-state = "off";
  184. };
  185. };
  186. /*
  187. * Warning: you need both eth1 & 0 PHY initialized (i.e having
  188. * them up does the tweak) for poweroff to shutdown otherwise it
  189. * reboots
  190. */
  191. gpio-poweroff {
  192. compatible = "gpio-poweroff";
  193. pinctrl-0 = <&poweroff_pin>;
  194. pinctrl-names = "default";
  195. gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
  196. };
  197. };
  198. &pciec {
  199. status = "okay";
  200. /* Quad port sata: Marvell 88SX7042 */
  201. pcie@1,0 {
  202. /* Port 0, Lane 0 */
  203. status = "okay";
  204. };
  205. /* USB 3.0 xHCI controller: NEC D720200F1 */
  206. pcie@5,0 {
  207. /* Port 1, Lane 0 */
  208. status = "okay";
  209. };
  210. };
  211. &mdio {
  212. phy0: ethernet-phy@0 { /* Marvell 88E1318 */
  213. reg = <0>;
  214. };
  215. phy1: ethernet-phy@1 { /* Marvell 88E1318 */
  216. reg = <1>;
  217. };
  218. };
  219. &pinctrl {
  220. poweroff_pin: poweroff-pin {
  221. marvell,pins = "mpp24";
  222. marvell,function = "gpio";
  223. };
  224. power_button_pin: power-button-pin {
  225. marvell,pins = "mpp44";
  226. marvell,function = "gpio";
  227. };
  228. reset_button_pin: reset-button-pin {
  229. marvell,pins = "mpp45";
  230. marvell,function = "gpio";
  231. };
  232. select_button_pin: select-button-pin {
  233. marvell,pins = "mpp41";
  234. marvell,function = "gpio";
  235. };
  236. scroll_button_pin: scroll-button-pin {
  237. marvell,pins = "mpp42";
  238. marvell,function = "gpio";
  239. };
  240. hdd_led_pin: hdd-led-pin {
  241. marvell,pins = "mpp26";
  242. marvell,function = "gpio";
  243. };
  244. };