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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * Device Tree file for Lenovo Iomega ix4-300d
  3. *
  4. * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This file is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This file is distributed in the hope that it will be useful
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * Or, alternatively
  22. *
  23. * b) Permission is hereby granted, free of charge, to any person
  24. * obtaining a copy of this software and associated documentation
  25. * files (the "Software"), to deal in the Software without
  26. * restriction, including without limitation the rights to use
  27. * copy, modify, merge, publish, distribute, sublicense, and/or
  28. * sell copies of the Software, and to permit persons to whom the
  29. * Software is furnished to do so, subject to the following
  30. * conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be
  33. * included in all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
  36. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  37. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  38. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  39. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
  40. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  41. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. * OTHER DEALINGS IN THE SOFTWARE.
  43. */
  44. /dts-v1/;
  45. #include <dt-bindings/input/input.h>
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include "armada-xp-mv78230.dtsi"
  48. / {
  49. model = "Lenovo Iomega ix4-300d";
  50. compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230",
  51. "marvell,armadaxp", "marvell,armada-370-xp";
  52. chosen {
  53. stdout-path = "serial0:115200n8";
  54. };
  55. memory {
  56. device_type = "memory";
  57. reg = <0 0x00000000 0 0x20000000>; /* 512MB */
  58. };
  59. soc {
  60. ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
  61. MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
  62. MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
  63. MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
  64. pcie-controller {
  65. status = "okay";
  66. /* Quad port sata: Marvell 88SX7042 */
  67. pcie@1,0 {
  68. /* Port 0, Lane 0 */
  69. status = "okay";
  70. };
  71. /* USB 3.0 xHCI controller: NEC D720200F1 */
  72. pcie@5,0 {
  73. /* Port 1, Lane 0 */
  74. status = "okay";
  75. };
  76. };
  77. internal-regs {
  78. serial@12000 {
  79. status = "okay";
  80. };
  81. mdio {
  82. phy0: ethernet-phy@0 { /* Marvell 88E1318 */
  83. reg = <0>;
  84. };
  85. phy1: ethernet-phy@1 { /* Marvell 88E1318 */
  86. reg = <1>;
  87. };
  88. };
  89. ethernet@70000 {
  90. pinctrl-0 = <&ge0_rgmii_pins>;
  91. pinctrl-names = "default";
  92. status = "okay";
  93. phy = <&phy0>;
  94. phy-mode = "rgmii-id";
  95. };
  96. ethernet@74000 {
  97. pinctrl-0 = <&ge1_rgmii_pins>;
  98. pinctrl-names = "default";
  99. status = "okay";
  100. phy = <&phy1>;
  101. phy-mode = "rgmii-id";
  102. };
  103. usb@50000 {
  104. status = "okay";
  105. };
  106. usb@51000 {
  107. status = "okay";
  108. };
  109. i2c@11000 {
  110. clock-frequency = <400000>;
  111. status = "okay";
  112. adt7473@2e {
  113. compatible = "adi,adt7473";
  114. reg = <0x2e>;
  115. };
  116. eeprom@50 {
  117. compatible = "atmel,24c64";
  118. reg = <0x50>;
  119. };
  120. pcf8563@51 {
  121. compatible = "nxp,pcf8563";
  122. reg = <0x51>;
  123. };
  124. };
  125. nand@d0000 {
  126. status = "okay";
  127. num-cs = <1>;
  128. marvell,nand-keep-config;
  129. marvell,nand-enable-arbiter;
  130. nand-on-flash-bbt;
  131. partitions {
  132. compatible = "fixed-partitions";
  133. #address-cells = <1>;
  134. #size-cells = <1>;
  135. partition@0 {
  136. label = "u-boot";
  137. reg = <0x00000000 0x000e0000>;
  138. read-only;
  139. };
  140. partition@e0000 {
  141. label = "u-boot-env";
  142. reg = <0x000e0000 0x00020000>;
  143. read-only;
  144. };
  145. partition@100000 {
  146. label = "u-boot-env2";
  147. reg = <0x00100000 0x00020000>;
  148. read-only;
  149. };
  150. partition@120000 {
  151. label = "zImage";
  152. reg = <0x00120000 0x00400000>;
  153. };
  154. partition@520000 {
  155. label = "initrd";
  156. reg = <0x00520000 0x00400000>;
  157. };
  158. partition@e00000 {
  159. label = "boot";
  160. reg = <0x00e00000 0x3f200000>;
  161. };
  162. };
  163. };
  164. };
  165. };
  166. gpio-keys {
  167. compatible = "gpio-keys";
  168. pinctrl-0 = <&power_button_pin &reset_button_pin
  169. &select_button_pin &scroll_button_pin>;
  170. pinctrl-names = "default";
  171. power-button {
  172. label = "Power Button";
  173. linux,code = <KEY_POWER>;
  174. gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
  175. };
  176. reset-button {
  177. label = "Reset Button";
  178. linux,code = <KEY_RESTART>;
  179. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  180. };
  181. select-button {
  182. label = "Select Button";
  183. linux,code = <BTN_SELECT>;
  184. gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
  185. };
  186. scroll-button {
  187. label = "Scroll Button";
  188. linux,code = <KEY_SCROLLDOWN>;
  189. gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
  190. };
  191. };
  192. spi3 {
  193. compatible = "spi-gpio";
  194. status = "okay";
  195. gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
  196. gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
  197. cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
  198. num-chipselects = <1>;
  199. #address-cells = <1>;
  200. #size-cells = <0>;
  201. gpio_spi: gpio_spi@0 {
  202. compatible = "fairchild,74hc595";
  203. gpio-controller;
  204. #gpio-cells = <2>;
  205. reg = <0>;
  206. registers-number = <1>;
  207. spi-max-frequency = <100000>;
  208. };
  209. };
  210. gpio-leds {
  211. compatible = "gpio-leds";
  212. pinctrl-0 = <&hdd_led_pin>;
  213. pinctrl-names = "default";
  214. hdd-led {
  215. label = "ix4-300d:hdd:blue";
  216. gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  217. default-state = "off";
  218. };
  219. power-led {
  220. label = "ix4-300d:power:white";
  221. gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
  222. /* init blinking while booting */
  223. linux,default-trigger = "timer";
  224. default-state = "on";
  225. };
  226. sysfail-led {
  227. label = "ix4-300d:sysfail:red";
  228. gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
  229. default-state = "off";
  230. };
  231. sys-led {
  232. label = "ix4-300d:sys:blue";
  233. gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
  234. default-state = "off";
  235. };
  236. hddfail-led {
  237. label = "ix4-300d:hddfail:red";
  238. gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
  239. default-state = "off";
  240. };
  241. };
  242. /*
  243. * Warning: you need both eth1 & 0 PHY initialized (i.e having
  244. * them up does the tweak) for poweroff to shutdown otherwise it
  245. * reboots
  246. */
  247. gpio-poweroff {
  248. compatible = "gpio-poweroff";
  249. pinctrl-0 = <&poweroff_pin>;
  250. pinctrl-names = "default";
  251. gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
  252. };
  253. };
  254. &pinctrl {
  255. poweroff_pin: poweroff-pin {
  256. marvell,pins = "mpp24";
  257. marvell,function = "gpio";
  258. };
  259. power_button_pin: power-button-pin {
  260. marvell,pins = "mpp44";
  261. marvell,function = "gpio";
  262. };
  263. reset_button_pin: reset-button-pin {
  264. marvell,pins = "mpp45";
  265. marvell,function = "gpio";
  266. };
  267. select_button_pin: select-button-pin {
  268. marvell,pins = "mpp41";
  269. marvell,function = "gpio";
  270. };
  271. scroll_button_pin: scroll-button-pin {
  272. marvell,pins = "mpp42";
  273. marvell,function = "gpio";
  274. };
  275. hdd_led_pin: hdd-led-pin {
  276. marvell,pins = "mpp26";
  277. marvell,function = "gpio";
  278. };
  279. };