1 From e977a103840c57d72b52cbc8c17f87f86ef9aa8d Mon Sep 17 00:00:00 2001
2 From: Pawel Dembicki <paweldembicki@gmail.com>
3 Date: Sat, 29 Oct 2022 22:57:38 +0200
4 Subject: [PATCH] ARM: dts: kirkwood: Add Zyxel NSA310S board
6 Zyxel NSA310S is a NAS based on Marvell kirkwood SoC.
9 - Processor Marvell 88F6702 1 GHz
12 - 1x GBE LAN port (PHY: Marvell 88E1318)
17 - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC)
19 Tested-by: Tony Dinh <mibodhi@gmail.com>
20 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
21 Acked-by: Adam Baker <linux@baker-net.org.uk>
22 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
23 Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
25 arch/arm/boot/dts/Makefile | 1 +
26 arch/arm/boot/dts/kirkwood-nsa310s.dts | 259 +++++++++++++++++++++++++
27 2 files changed, 260 insertions(+)
28 create mode 100644 arch/arm/boot/dts/kirkwood-nsa310s.dts
30 --- a/arch/arm/boot/dts/Makefile
31 +++ b/arch/arm/boot/dts/Makefile
32 @@ -356,6 +356,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
33 kirkwood-ns2mini.dtb \
35 kirkwood-nsa310a.dtb \
36 + kirkwood-nsa310s.dtb \
39 kirkwood-openblocks_a6.dtb \
41 +++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
43 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
45 + * ZyXEL NSA310S Board Description
46 + * Copyright 2020-2022 Pawel Dembicki <paweldembicki@gmail.com>
47 + * Copyright (c) 2015-2021, Tony Dinh <mibodhi@gmail.com>
48 + * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
49 + * Based upon the board setup file created by Peter Schildmann
53 +#include "kirkwood.dtsi"
54 +#include "kirkwood-6281.dtsi"
55 +#include <dt-bindings/leds/common.h>
58 + model = "ZyXEL NSA310S";
59 + compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
62 + device_type = "memory";
63 + reg = <0x00000000 0x10000000>;
67 + bootargs = "console=ttyS0,115200n8 earlyprintk";
68 + stdout-path = &uart0;
72 + compatible = "gpio-poweroff";
73 + pinctrl-0 = <&pmx_pwr_off>;
74 + pinctrl-names = "default";
75 + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
79 + compatible = "gpio-keys";
80 + #address-cells = <1>;
82 + pinctrl-0 = <&pmx_buttons>;
83 + pinctrl-names = "default";
86 + label = "Power Button";
87 + linux,code = <KEY_POWER>;
88 + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
92 + label = "Copy Button";
93 + linux,code = <KEY_COPY>;
94 + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
98 + label = "Reset Button";
99 + linux,code = <KEY_RESTART>;
100 + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
105 + compatible = "gpio-leds";
106 + pinctrl-0 = <&pmx_leds>;
107 + pinctrl-names = "default";
110 + function = LED_FUNCTION_DISK_ERR;
111 + color = <LED_COLOR_ID_RED>;
112 + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
116 + function = LED_FUNCTION_USB;
117 + color = <LED_COLOR_ID_GREEN>;
118 + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
119 + linux,default-trigger = "usb-host";
123 + function = LED_FUNCTION_DISK;
124 + color = <LED_COLOR_ID_GREEN>;
125 + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
126 + linux,default-trigger = "ata1";
130 + function = LED_FUNCTION_INDICATOR;
131 + color = <LED_COLOR_ID_GREEN>;
132 + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
136 + function = LED_FUNCTION_INDICATOR;
137 + color = <LED_COLOR_ID_RED>;
138 + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
142 + function = LED_FUNCTION_STATUS;
143 + color = <LED_COLOR_ID_GREEN>;
144 + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
145 + linux,default-trigger = "default-on";
149 + function = LED_FUNCTION_STATUS;
150 + color = <LED_COLOR_ID_RED>;
151 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
155 + usb0_power: regulator@1 {
156 + compatible = "regulator-fixed";
157 + regulator-name = "USB Power";
159 + regulator-min-microvolt = <5000000>;
160 + regulator-max-microvolt = <5000000>;
161 + regulator-always-on;
163 + gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
166 + sata1_power: regulator@2 {
167 + compatible = "regulator-fixed";
168 + regulator-name = "SATA1 Power";
170 + regulator-min-microvolt = <5000000>;
171 + regulator-max-microvolt = <5000000>;
172 + regulator-always-on;
174 + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
179 + polling-delay = <20000>;
180 + polling-delay-passive = <2000>;
182 + thermal-sensors = <&hdd_temp>;
185 + disk_alert: disk-alert {
186 + temperature = <40000>;
187 + hysteresis = <5000>;
190 + disk_crit: disk-crit {
191 + temperature = <60000>;
192 + hysteresis = <2000>;
205 + phy-handle = <ðphy0>;
213 + compatible = "htk,ht1382";
221 + ethphy0: ethernet-phy@1 {
223 + phy-mode = "rgmii-id";
224 + marvell,reg-init = <0x1 0x16 0x0 0x3>,
225 + <0x1 0x10 0x0 0x1017>,
226 + <0x1 0x11 0x0 0x4408>,
227 + <0x1 0x16 0x0 0x0>;
237 + reg = <0x0000000 0x00c0000>;
241 + label = "uboot_env";
242 + reg = <0x00c0000 0x0080000>;
246 + reg = <0x0140000 0x7ec0000>;
259 + pinctrl-names = "default";
261 + pmx_buttons: pmx-buttons {
262 + marvell,pins = "mpp24", "mpp25", "mpp26";
263 + marvell,function = "gpio";
266 + pmx_leds: pmx-leds {
267 + marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
269 + marvell,function = "gpio";
272 + pmx_power: pmx-power {
273 + marvell,pins = "mpp21", "mpp33";
274 + marvell,function = "gpio";
277 + pmx_pwr_off: pmx-pwr-off {
278 + marvell,pins = "mpp27";
279 + marvell,function = "gpio";
284 + status = "disabled";
290 + #address-cells = <1>;
293 + hdd_temp: sata-port@0 {
295 + #thermal-sensor-cells = <0>;