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

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