190-nsa310s.patch 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. --- /dev/null
  2. +++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
  3. @@ -0,0 +1,287 @@
  4. +/dts-v1/;
  5. +
  6. +#include "kirkwood.dtsi"
  7. +#include "kirkwood-6281.dtsi"
  8. +
  9. +/ {
  10. + model = "ZyXEL NSA310S";
  11. + compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
  12. +
  13. + memory {
  14. + device_type = "memory";
  15. + reg = <0x00000000 0x10000000>;
  16. + };
  17. +
  18. + chosen {
  19. + bootargs = "console=ttyS0,115200n8 earlyprintk";
  20. + stdout-path = &uart0;
  21. + };
  22. +
  23. + mbus {
  24. + pcie-controller {
  25. + status = "okay";
  26. +
  27. + pcie@1,0 {
  28. + status = "okay";
  29. + };
  30. + };
  31. + };
  32. +
  33. + ocp@f1000000 {
  34. + pinctrl: pin-controller@10000 {
  35. + pinctrl-names = "default";
  36. +
  37. + pmx_sata0: pmx-sata0 {
  38. + marvell,pins;
  39. + marvell,function = "sata0";
  40. + };
  41. + pmx_sata1: pmx-sata1 {
  42. + marvell,pins;
  43. + marvell,function = "sata1";
  44. + };
  45. + pmx_usb_power: pmx-usb-power {
  46. + marvell,pins = "mpp21";
  47. + marvell,function = "gpio";
  48. + };
  49. + pmx_pwr_off: pmx-pwr-off {
  50. + marvell,pins = "mpp27";
  51. + marvell,function = "gpio";
  52. + };
  53. + pmx_btn_reset: pmx-btn-reset {
  54. + marvell,pins = "mpp24";
  55. + marvell,function = "gpio";
  56. + };
  57. + pmx_btn_copy: pmx-btn-copy {
  58. + marvell,pins = "mpp25";
  59. + marvell,function = "gpio";
  60. + };
  61. + pmx_btn_power: pmx-btn-power {
  62. + marvell,pins = "mpp26";
  63. + marvell,function = "gpio";
  64. + };
  65. + pmx_led_hdd2_green: pmx-led-hdd2-green {
  66. + marvell,pins = "mpp34";
  67. + marvell,function = "gpio";
  68. + };
  69. + pmx_led_hdd2_red: pmx-led-hdd2-red {
  70. + marvell,pins = "mpp12";
  71. + marvell,function = "gpio";
  72. + };
  73. + pmx_led_usb_green: pmx-led-usb-green {
  74. + marvell,pins = "mpp15";
  75. + marvell,function = "gpio";
  76. + };
  77. + pmx_led_copy_green: pmx-led-copy-green {
  78. + marvell,pins = "mpp22";
  79. + marvell,function = "gpio";
  80. + };
  81. + pmx_led_copy_red: pmx-led-copy-red {
  82. + marvell,pins = "mpp23";
  83. + marvell,function = "gpio";
  84. + };
  85. + pmx_led_sys_green: pmx-led-sys-green {
  86. + marvell,pins = "mpp28";
  87. + marvell,function = "gpio";
  88. + };
  89. + pmx_led_sys_orange: pmx-led-sys-orange {
  90. + marvell,pins = "mpp29";
  91. + marvell,function = "gpio";
  92. + };
  93. + pmx_led_hdd1_green: pmx-led-hdd1-green {
  94. + marvell,pins = "mpp16";
  95. + marvell,function = "gpio";
  96. + };
  97. + pmx_led_hdd1_red: pmx-led-hdd1-red {
  98. + marvell,pins = "mpp13";
  99. + marvell,function = "gpio";
  100. + };
  101. + pmx_pwr_sata1: pmx-pwr-sata1 {
  102. + marvell,pins = "mpp33";
  103. + marvell,function = "gpio";
  104. + };
  105. + };
  106. +
  107. + serial@12000 {
  108. + status = "okay";
  109. + };
  110. +
  111. + sata@80000 {
  112. + status = "okay";
  113. + nr-ports = <2>;
  114. + };
  115. +
  116. + rtc@10300 {
  117. + status = "disabled";
  118. + };
  119. +
  120. + i2c@11000 {
  121. + status = "okay";
  122. + ht1382: rtc@68 {
  123. + compatible = "htk,ht1382";
  124. + reg = <0x68>;
  125. + };
  126. + };
  127. + };
  128. +
  129. + regulators {
  130. + compatible = "simple-bus";
  131. + #address-cells = <1>;
  132. + #size-cells = <0>;
  133. + pinctrl-names = "default";
  134. + pinctrl-0 = <&pmx_usb_power &pmx_pwr_sata1>;
  135. +
  136. + usb0_power: regulator@1 {
  137. + compatible = "regulator-fixed";
  138. + reg = <1>;
  139. + regulator-name = "USB Power";
  140. + regulator-min-microvolt = <5000000>;
  141. + regulator-max-microvolt = <5000000>;
  142. + regulator-always-on;
  143. + regulator-boot-on;
  144. + enable-active-high;
  145. + gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
  146. + };
  147. +
  148. + sata1_power: regulator@2 {
  149. + compatible = "regulator-fixed";
  150. + reg = <2>;
  151. + regulator-name = "SATA1 Power";
  152. + regulator-min-microvolt = <5000000>;
  153. + regulator-max-microvolt = <5000000>;
  154. + regulator-always-on;
  155. + regulator-boot-on;
  156. + enable-active-high;
  157. + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
  158. + };
  159. + };
  160. +
  161. +
  162. + gpio_keys {
  163. + compatible = "gpio-keys";
  164. + #address-cells = <1>;
  165. + #size-cells = <0>;
  166. + pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
  167. + pinctrl-names = "default";
  168. +
  169. + button@1 {
  170. + label = "Power Button";
  171. + linux,code = <KEY_POWER>;
  172. + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  173. + };
  174. + button@2 {
  175. + label = "Copy Button";
  176. + linux,code = <KEY_COPY>;
  177. + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
  178. + };
  179. + button@3 {
  180. + label = "Reset Button";
  181. + linux,code = <KEY_RESTART>;
  182. + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  183. + };
  184. + };
  185. +
  186. + gpio-leds {
  187. + compatible = "gpio-leds";
  188. + pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
  189. + &pmx_led_usb_green
  190. + &pmx_led_sys_green &pmx_led_sys_orange
  191. + &pmx_led_copy_green &pmx_led_copy_red
  192. + &pmx_led_hdd1_green &pmx_led_hdd1_red>;
  193. + pinctrl-names = "default";
  194. +
  195. + green-sys {
  196. + label = "nsa310s:green:sys";
  197. + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
  198. + linux,default-trigger = "timer";
  199. + };
  200. + orange-sys {
  201. + label = "nsa310s:orange:sys";
  202. + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
  203. + };
  204. + green-hdd1 {
  205. + label = "nsa310s:green:hdd1";
  206. + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
  207. + };
  208. + red-hdd1 {
  209. + label = "nsa310s:red:hdd1";
  210. + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
  211. + };
  212. + green-hdd2 {
  213. + label = "nsa310s:green:hdd2";
  214. + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
  215. + };
  216. + red-hdd2 {
  217. + label = "nsa310s:red:hdd2";
  218. + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  219. + };
  220. + green-usb {
  221. + label = "nsa310s:green:usb";
  222. + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
  223. + };
  224. + green-copy {
  225. + label = "nsa310s:green:copy";
  226. + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
  227. + linux,default-trigger = "ide-disk";
  228. + };
  229. + red-copy {
  230. + label = "nsa310s:red:copy";
  231. + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
  232. + };
  233. + };
  234. +
  235. + gpio_poweroff {
  236. + compatible = "gpio-poweroff";
  237. + pinctrl-0 = <&pmx_pwr_off>;
  238. + pinctrl-names = "default";
  239. + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
  240. + };
  241. +};
  242. +
  243. +&nand {
  244. + status = "okay";
  245. + chip-delay = <35>;
  246. +
  247. + partition@0 {
  248. + label = "u-boot";
  249. + reg = <0x0000000 0xe0000>;
  250. + };
  251. +
  252. + partition@e0000 {
  253. + label = "u-boot environment";
  254. + reg = <0xe0000 0x100000>;
  255. + };
  256. +
  257. + partition@100000 {
  258. + label = "second stage u-boot";
  259. + reg = <0x100000 0x200000>;
  260. + };
  261. +
  262. + partition@200000 {
  263. + label = "ubi";
  264. + reg = <0x200000 0x7e00000>;
  265. + };
  266. +};
  267. +
  268. +&mdio {
  269. + status = "okay";
  270. + ethphy0: ethernet-phy@1 {
  271. + compatible = "marvell,88e1318s";
  272. + reg = <1>;
  273. + marvell,reg-init = <0x1 0x16 0x0 0x3>,
  274. + <0x1 0x10 0x0 0x1017>,
  275. + <0x1 0x11 0x0 0x4408>,
  276. + <0x1 0x16 0x0 0x0>,
  277. + <0x1 0x4 0x0 0x1e1>,
  278. + <0x1 0x9 0x0 0x300>,
  279. + <0x1 0x10 0x0 0x3860>,
  280. + <0x1 0x0 0x0 0x9140>;
  281. + };
  282. +};
  283. +
  284. +&eth0 {
  285. + status = "okay";
  286. +
  287. + ethernet0-port@0 {
  288. + phy-handle = <&ethphy0>;
  289. + };
  290. +};
  291. --- a/arch/arm/boot/dts/Makefile
  292. +++ b/arch/arm/boot/dts/Makefile
  293. @@ -203,6 +203,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
  294. kirkwood-ns2mini.dtb \
  295. kirkwood-nsa310.dtb \
  296. kirkwood-nsa310a.dtb \
  297. + kirkwood-nsa310s.dtb \
  298. kirkwood-openblocks_a6.dtb \
  299. kirkwood-openblocks_a7.dtb \
  300. kirkwood-openrd-base.dtb \