xref: /linux/scripts/dtc/include-prefixes/arm/marvell/kirkwood-nsa310s.dts (revision b98a91911d24babe20600ad19697570ea335356f)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2724ba675SRob Herring/*
3724ba675SRob Herring * ZyXEL NSA310S Board Description
4724ba675SRob Herring * Copyright 2020-2022 Pawel Dembicki <paweldembicki@gmail.com>
5724ba675SRob Herring * Copyright (c) 2015-2021, Tony Dinh <mibodhi@gmail.com>
6724ba675SRob Herring * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
7724ba675SRob Herring * Based upon the board setup file created by Peter Schildmann
8724ba675SRob Herring */
9724ba675SRob Herring/dts-v1/;
10724ba675SRob Herring
11724ba675SRob Herring#include "kirkwood.dtsi"
12724ba675SRob Herring#include "kirkwood-6281.dtsi"
13724ba675SRob Herring#include <dt-bindings/leds/common.h>
14724ba675SRob Herring
15724ba675SRob Herring/ {
16724ba675SRob Herring	model = "ZyXEL NSA310S";
17724ba675SRob Herring	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
18724ba675SRob Herring
19724ba675SRob Herring	memory {
20724ba675SRob Herring		device_type = "memory";
21724ba675SRob Herring		reg = <0x00000000 0x10000000>;
22724ba675SRob Herring	};
23724ba675SRob Herring
24724ba675SRob Herring	chosen {
25724ba675SRob Herring		bootargs = "console=ttyS0,115200n8 earlyprintk";
26724ba675SRob Herring		stdout-path = &uart0;
27724ba675SRob Herring	};
28724ba675SRob Herring
29724ba675SRob Herring	gpio_poweroff {
30724ba675SRob Herring		compatible = "gpio-poweroff";
31724ba675SRob Herring		pinctrl-0 = <&pmx_pwr_off>;
32724ba675SRob Herring		pinctrl-names = "default";
33724ba675SRob Herring		gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
34724ba675SRob Herring	};
35724ba675SRob Herring
36724ba675SRob Herring	keys {
37724ba675SRob Herring		compatible = "gpio-keys";
38724ba675SRob Herring		#address-cells = <1>;
39724ba675SRob Herring		#size-cells = <0>;
40724ba675SRob Herring		pinctrl-0 = <&pmx_buttons>;
41724ba675SRob Herring		pinctrl-names = "default";
42724ba675SRob Herring
43*b98a9191SKrzysztof Kozlowski		button-power {
44724ba675SRob Herring			label = "Power Button";
45724ba675SRob Herring			linux,code = <KEY_POWER>;
46724ba675SRob Herring			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
47724ba675SRob Herring		};
48724ba675SRob Herring
49*b98a9191SKrzysztof Kozlowski		button-copy {
50724ba675SRob Herring			label = "Copy Button";
51724ba675SRob Herring			linux,code = <KEY_COPY>;
52724ba675SRob Herring			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
53724ba675SRob Herring		};
54724ba675SRob Herring
55*b98a9191SKrzysztof Kozlowski		button-reset {
56724ba675SRob Herring			label = "Reset Button";
57724ba675SRob Herring			linux,code = <KEY_RESTART>;
58724ba675SRob Herring			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
59724ba675SRob Herring		};
60724ba675SRob Herring	};
61724ba675SRob Herring
62724ba675SRob Herring	leds {
63724ba675SRob Herring		compatible = "gpio-leds";
64724ba675SRob Herring		pinctrl-0 = <&pmx_leds>;
65724ba675SRob Herring		pinctrl-names = "default";
66724ba675SRob Herring
67724ba675SRob Herring		led-1 {
68724ba675SRob Herring			function = LED_FUNCTION_DISK_ERR;
69724ba675SRob Herring			color = <LED_COLOR_ID_RED>;
70724ba675SRob Herring			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
71724ba675SRob Herring		};
72724ba675SRob Herring
73724ba675SRob Herring		led-2 {
74724ba675SRob Herring			function = LED_FUNCTION_USB;
75724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
76724ba675SRob Herring			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
77724ba675SRob Herring			linux,default-trigger = "usb-host";
78724ba675SRob Herring		};
79724ba675SRob Herring
80724ba675SRob Herring		led-3 {
81724ba675SRob Herring			function = LED_FUNCTION_DISK;
82724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
83724ba675SRob Herring			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
84724ba675SRob Herring			linux,default-trigger = "ata1";
85724ba675SRob Herring		};
86724ba675SRob Herring
87724ba675SRob Herring		led-4 {
88724ba675SRob Herring			function = LED_FUNCTION_INDICATOR;
89724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
90724ba675SRob Herring			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
91724ba675SRob Herring		};
92724ba675SRob Herring
93724ba675SRob Herring		led-5 {
94724ba675SRob Herring			function = LED_FUNCTION_INDICATOR;
95724ba675SRob Herring			color = <LED_COLOR_ID_RED>;
96724ba675SRob Herring			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
97724ba675SRob Herring		};
98724ba675SRob Herring
99724ba675SRob Herring		led-6 {
100724ba675SRob Herring			function = LED_FUNCTION_STATUS;
101724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
102724ba675SRob Herring			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
103724ba675SRob Herring			linux,default-trigger = "default-on";
104724ba675SRob Herring		};
105724ba675SRob Herring
106724ba675SRob Herring		led-7 {
107724ba675SRob Herring			function = LED_FUNCTION_STATUS;
108724ba675SRob Herring			color = <LED_COLOR_ID_RED>;
109724ba675SRob Herring			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
110724ba675SRob Herring		};
111724ba675SRob Herring	};
112724ba675SRob Herring
113724ba675SRob Herring	usb0_power: regulator@1 {
114724ba675SRob Herring		compatible = "regulator-fixed";
115724ba675SRob Herring		regulator-name = "USB Power";
116724ba675SRob Herring
117724ba675SRob Herring		regulator-min-microvolt = <5000000>;
118724ba675SRob Herring		regulator-max-microvolt = <5000000>;
119724ba675SRob Herring		regulator-always-on;
120724ba675SRob Herring		regulator-boot-on;
121724ba675SRob Herring		gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
122724ba675SRob Herring	};
123724ba675SRob Herring
124724ba675SRob Herring	sata1_power: regulator@2 {
125724ba675SRob Herring		compatible = "regulator-fixed";
126724ba675SRob Herring		regulator-name = "SATA1 Power";
127724ba675SRob Herring
128724ba675SRob Herring		regulator-min-microvolt = <5000000>;
129724ba675SRob Herring		regulator-max-microvolt = <5000000>;
130724ba675SRob Herring		regulator-always-on;
131724ba675SRob Herring		regulator-boot-on;
132724ba675SRob Herring		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
133724ba675SRob Herring	};
134724ba675SRob Herring
135724ba675SRob Herring	thermal-zones {
136724ba675SRob Herring		disk-thermal {
137724ba675SRob Herring			polling-delay = <20000>;
138724ba675SRob Herring			polling-delay-passive = <2000>;
139724ba675SRob Herring
140724ba675SRob Herring			thermal-sensors = <&hdd_temp>;
141724ba675SRob Herring
142724ba675SRob Herring			trips {
143724ba675SRob Herring				disk_alert: disk-alert {
144724ba675SRob Herring					temperature = <40000>;
145724ba675SRob Herring					hysteresis = <5000>;
146724ba675SRob Herring					type = "active";
147724ba675SRob Herring				};
148724ba675SRob Herring				disk_crit: disk-crit {
149724ba675SRob Herring					temperature = <60000>;
150724ba675SRob Herring					hysteresis = <2000>;
151724ba675SRob Herring					type = "critical";
152724ba675SRob Herring				};
153724ba675SRob Herring			};
154724ba675SRob Herring		};
155724ba675SRob Herring	};
156724ba675SRob Herring};
157724ba675SRob Herring
158724ba675SRob Herring
159724ba675SRob Herring&eth0 {
160724ba675SRob Herring	status = "okay";
161724ba675SRob Herring
162724ba675SRob Herring	ethernet0-port@0 {
163724ba675SRob Herring		phy-handle = <&ethphy0>;
164724ba675SRob Herring	};
165724ba675SRob Herring};
166724ba675SRob Herring
167724ba675SRob Herring&i2c0 {
168724ba675SRob Herring	status = "okay";
169724ba675SRob Herring
170724ba675SRob Herring	rtc@68 {
171724ba675SRob Herring		compatible = "htk,ht1382";
172724ba675SRob Herring		reg = <0x68>;
173724ba675SRob Herring	};
174724ba675SRob Herring};
175724ba675SRob Herring
176724ba675SRob Herring&mdio {
177724ba675SRob Herring	status = "okay";
178724ba675SRob Herring
179724ba675SRob Herring	ethphy0: ethernet-phy@1 {
180724ba675SRob Herring		reg = <1>;
181724ba675SRob Herring		phy-mode = "rgmii-id";
182724ba675SRob Herring		marvell,reg-init = <0x1 0x16 0x0 0x3>,
183724ba675SRob Herring				   <0x1 0x10 0x0 0x1017>,
184724ba675SRob Herring				   <0x1 0x11 0x0 0x4408>,
185724ba675SRob Herring				   <0x1 0x16 0x0 0x0>;
186724ba675SRob Herring	};
187724ba675SRob Herring};
188724ba675SRob Herring
189724ba675SRob Herring&nand {
190724ba675SRob Herring	status = "okay";
191724ba675SRob Herring	chip-delay = <35>;
192724ba675SRob Herring
193724ba675SRob Herring	partition@0 {
194724ba675SRob Herring		label = "uboot";
195724ba675SRob Herring		reg = <0x0000000 0x00c0000>;
196724ba675SRob Herring		read-only;
197724ba675SRob Herring	};
198724ba675SRob Herring	partition@c0000 {
199724ba675SRob Herring		label = "uboot_env";
200724ba675SRob Herring		reg = <0x00c0000 0x0080000>;
201724ba675SRob Herring	};
202724ba675SRob Herring	partition@140000 {
203724ba675SRob Herring		label = "ubi";
204724ba675SRob Herring		reg = <0x0140000 0x7ec0000>;
205724ba675SRob Herring	};
206724ba675SRob Herring};
207724ba675SRob Herring
208724ba675SRob Herring&pciec {
209724ba675SRob Herring	status = "okay";
210724ba675SRob Herring};
211724ba675SRob Herring
212724ba675SRob Herring&pcie0 {
213724ba675SRob Herring	status = "okay";
214724ba675SRob Herring};
215724ba675SRob Herring
216724ba675SRob Herring&pinctrl {
217724ba675SRob Herring	pinctrl-names = "default";
218724ba675SRob Herring
219724ba675SRob Herring	pmx_buttons: pmx-buttons {
220724ba675SRob Herring		marvell,pins = "mpp24", "mpp25", "mpp26";
221724ba675SRob Herring		marvell,function = "gpio";
222724ba675SRob Herring	};
223724ba675SRob Herring
224724ba675SRob Herring	pmx_leds: pmx-leds {
225724ba675SRob Herring		marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
226724ba675SRob Herring						"mpp28", "mpp29";
227724ba675SRob Herring		marvell,function = "gpio";
228724ba675SRob Herring	};
229724ba675SRob Herring
230724ba675SRob Herring	pmx_power: pmx-power {
231724ba675SRob Herring		marvell,pins = "mpp21", "mpp33";
232724ba675SRob Herring		marvell,function = "gpio";
233724ba675SRob Herring	};
234724ba675SRob Herring
235724ba675SRob Herring	pmx_pwr_off: pmx-pwr-off {
236724ba675SRob Herring		marvell,pins = "mpp27";
237724ba675SRob Herring		marvell,function = "gpio";
238724ba675SRob Herring	};
239724ba675SRob Herring};
240724ba675SRob Herring
241724ba675SRob Herring&rtc {
242724ba675SRob Herring	status = "disabled";
243724ba675SRob Herring};
244724ba675SRob Herring
245724ba675SRob Herring&sata {
246724ba675SRob Herring	status = "okay";
247724ba675SRob Herring	nr-ports = <1>;
248724ba675SRob Herring	#address-cells = <1>;
249724ba675SRob Herring	#size-cells = <0>;
250724ba675SRob Herring
251724ba675SRob Herring	hdd_temp: sata-port@0 {
252724ba675SRob Herring		reg = <0>;
253724ba675SRob Herring		#thermal-sensor-cells = <0>;
254724ba675SRob Herring	};
255724ba675SRob Herring};
256724ba675SRob Herring
257724ba675SRob Herring&uart0 {
258724ba675SRob Herring	status = "okay";
259724ba675SRob Herring};
260