kirkwood-nas1.dts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/leds/common.h>
  4. #include "kirkwood.dtsi"
  5. #include "kirkwood-6281.dtsi"
  6. / {
  7. model = "ipTIME NAS1";
  8. compatible = "iptime,nas1", "marvell,kirkwood-88f6281", "marvell,kirkwood";
  9. aliases {
  10. serial0 = &uart0;
  11. led-boot = &led_ready;
  12. led-failsafe = &led_ready;
  13. led-running = &led_ready;
  14. led-upgrade = &led_ready;
  15. };
  16. chosen {
  17. /*
  18. * "root" argument from the stock bootloader should be ignored
  19. * as it'll prevent the kernel from finding the correct rootfs.
  20. */
  21. bootargs-append = " console=ttyS0,115200 root=";
  22. stdout-path = "serial0:115200n8";
  23. };
  24. memory@0 {
  25. device_type = "memory";
  26. reg = <0x00000000 0x10000000>;
  27. };
  28. gpio-leds {
  29. compatible = "gpio-leds";
  30. pinctrl-0 = <&pmx_led>;
  31. pinctrl-names = "default";
  32. hdd {
  33. label = "blue:hdd";
  34. gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
  35. linux,default-trigger = "ata1";
  36. };
  37. usb {
  38. function = LED_FUNCTION_USB;
  39. color = <LED_COLOR_ID_BLUE>;
  40. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  41. trigger-sources = <&ehci_port1>;
  42. linux,default-trigger = "usbport";
  43. };
  44. led_ready: ready {
  45. label = "blue:ready";
  46. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  47. };
  48. };
  49. gpio-keys {
  50. compatible = "gpio-keys";
  51. pinctrl-0 = <&pmx_button>;
  52. pinctrl-names = "default";
  53. reset-copy {
  54. label = "Reset/Copy Button";
  55. linux,code = <KEY_RESTART>;
  56. gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  57. };
  58. power {
  59. label = "Power Button";
  60. linux,code = <KEY_POWER>;
  61. gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
  62. };
  63. };
  64. gpio-fan {
  65. compatible = "gpio-fan";
  66. pinctrl-0 = <&pmx_fan>;
  67. pinctrl-names = "default";
  68. gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>,
  69. <&gpio1 10 GPIO_ACTIVE_HIGH>;
  70. /* We don't know the exact rpm, just use dummy values here. */
  71. gpio-fan,speed-map = <0 0>, <1 1>, <2 2>;
  72. #cooling-cells = <2>;
  73. };
  74. gpio-poweroff {
  75. compatible = "gpio-poweroff";
  76. gpios = <&pca9536 0 GPIO_ACTIVE_LOW>;
  77. };
  78. regulators {
  79. compatible = "simple-bus";
  80. #address-cells = <1>;
  81. #size-cells = <0>;
  82. pinctrl-0 = <&pmx_usb_vbus>;
  83. pinctrl-names = "default";
  84. regulator@1 {
  85. compatible = "regulator-fixed";
  86. reg = <1>;
  87. regulator-name = "USB Power";
  88. regulator-min-microvolt = <5000000>;
  89. regulator-max-microvolt = <5000000>;
  90. enable-active-high;
  91. regulator-always-on;
  92. gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
  93. };
  94. };
  95. };
  96. &pinctrl {
  97. pmx_led: pmx-led {
  98. marvell,pins = "mpp35", "mpp45", "mpp46";
  99. marvell,function = "gpio";
  100. };
  101. pmx_fan: pmx-fan {
  102. marvell,pins = "mpp41", "mpp42";
  103. marvell,function = "gpio";
  104. };
  105. pmx_usb_vbus: pmx-usb-vbus {
  106. marvell,pins = "mpp43";
  107. marvell,function = "gpio";
  108. };
  109. pmx_button: pmx-button {
  110. marvell,pins = "mpp44", "mpp48";
  111. marvell,function = "gpio";
  112. };
  113. };
  114. &spi0 {
  115. status = "okay";
  116. flash@0 {
  117. compatible = "jedec,spi-nor";
  118. reg = <0>;
  119. spi-max-frequency = <20000000>;
  120. partitions {
  121. compatible = "fixed-partitions";
  122. #address-cells = <1>;
  123. #size-cells = <1>;
  124. partition@0 {
  125. label = "u-boot";
  126. reg = <0x0 0x40000>;
  127. read-only;
  128. };
  129. partition@40000 {
  130. compatible = "openwrt,uimage", "denx,uimage";
  131. openwrt,offset = <0x400>;
  132. label = "firmware";
  133. reg = <0x40000 0xf80000>;
  134. };
  135. partition@fc0000 {
  136. label = "config";
  137. reg = <0xfc0000 0x40000>;
  138. read-only;
  139. };
  140. };
  141. };
  142. };
  143. &rtc {
  144. status = "disabled";
  145. };
  146. &i2c0 {
  147. status = "okay";
  148. pca9536: gpio@41 {
  149. compatible = "nxp,pca9536";
  150. reg = <0x41>;
  151. gpio-controller;
  152. #gpio-cells = <2>;
  153. };
  154. };
  155. &uart0 {
  156. status = "okay";
  157. };
  158. &usb0 {
  159. status = "okay";
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. ehci_port1: port@1 {
  163. reg = <1>;
  164. #trigger-source-cells = <0>;
  165. };
  166. };
  167. &mdio {
  168. status = "okay";
  169. ethphyb: ethernet-phy@b {
  170. reg = <0x0b>;
  171. };
  172. };
  173. &eth1 {
  174. status = "okay";
  175. };
  176. &eth1port {
  177. phy-handle = <&ethphyb>;
  178. phy-connection-type = "rgmii-id";
  179. };
  180. &sata {
  181. status = "okay";
  182. #address-cells = <1>;
  183. #size-cells = <0>;
  184. nr-ports = <1>;
  185. sata-port@0 {
  186. reg = <0>;
  187. #thermal-sensor-cells = <0>;
  188. };
  189. };