Linux Audio

Check our new training course

Loading...
v5.4
  1// SPDX-License-Identifier: GPL-2.0+
  2/* Device tree file for the Zyxel NSA 320 NAS box.
  3 *
  4 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
  5 *
 
 
 
 
  6 *
  7 * Based upon the board setup file created by Peter Schildmann */
  8
  9/dts-v1/;
 10
 11#include "kirkwood-nsa3x0-common.dtsi"
 12
 13/ {
 14	model = "Zyxel NSA320";
 15	compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 16
 17	memory {
 18		device_type = "memory";
 19		reg = <0x00000000 0x20000000>;
 20	};
 21
 22	chosen {
 23		bootargs = "console=ttyS0,115200";
 24		stdout-path = &uart0;
 25	};
 26
 27	ocp@f1000000 {
 28		pinctrl: pin-controller@10000 {
 29			pinctrl-names = "default";
 30
 31			/* SATA Activity and Present pins are not connected */
 32			pmx_sata0: pmx-sata0 {
 33				marvell,pins ;
 34				marvell,function = "sata0";
 35			};
 36
 37			pmx_sata1: pmx-sata1 {
 38				marvell,pins ;
 39				marvell,function = "sata1";
 40			};
 41
 42			pmx_led_hdd2_green: pmx-led-hdd2-green {
 43				marvell,pins = "mpp12";
 44				marvell,function = "gpio";
 45			};
 46
 47			pmx_led_hdd2_red: pmx-led-hdd2-red {
 48				marvell,pins = "mpp13";
 49				marvell,function = "gpio";
 50			};
 51
 52			pmx_mcu_data: pmx-mcu-data {
 53				marvell,pins = "mpp14";
 54				marvell,function = "gpio";
 55			};
 56
 57			pmx_led_usb_green: pmx-led-usb-green {
 58				marvell,pins = "mpp15";
 59				marvell,function = "gpio";
 60			};
 61
 62			pmx_mcu_clk: pmx-mcu-clk {
 63				marvell,pins = "mpp16";
 64				marvell,function = "gpio";
 65			};
 66
 67			pmx_mcu_act: pmx-mcu-act {
 68				marvell,pins = "mpp17";
 69				marvell,function = "gpio";
 70			};
 71
 72			pmx_led_sys_green: pmx-led-sys-green {
 73				marvell,pins = "mpp28";
 74				marvell,function = "gpio";
 75			};
 76
 77			pmx_led_sys_orange: pmx-led-sys-orange {
 78				marvell,pins = "mpp29";
 79				marvell,function = "gpio";
 80			};
 81
 82			pmx_led_hdd1_green: pmx-led-hdd1-green {
 83				marvell,pins = "mpp41";
 84				marvell,function = "gpio";
 85			};
 86
 87			pmx_led_hdd1_red: pmx-led-hdd1-red {
 88				marvell,pins = "mpp42";
 89				marvell,function = "gpio";
 90			};
 91
 92			pmx_htp: pmx-htp {
 93				marvell,pins = "mpp43";
 94				marvell,function = "gpio";
 95			};
 96
 97			/* Buzzer needs to be switched at around 1kHz so is
 98			   not compatible with the gpio-beeper driver. */
 99			pmx_buzzer: pmx-buzzer {
100				marvell,pins = "mpp44";
101				marvell,function = "gpio";
102			};
103
104			pmx_vid_b1: pmx-vid-b1 {
105				marvell,pins = "mpp45";
106				marvell,function = "gpio";
107			};
108
109			pmx_power_resume_data: pmx-power-resume-data {
110				marvell,pins = "mpp47";
111				marvell,function = "gpio";
112			};
113
114			pmx_power_resume_clk: pmx-power-resume-clk {
115				marvell,pins = "mpp49";
116				marvell,function = "gpio";
117			};
118		};
119
120		i2c@11000 {
121			status = "okay";
122
123			pcf8563: pcf8563@51 {
124				compatible = "nxp,pcf8563";
125				reg = <0x51>;
126			};
127		};
128	};
129
130	regulators {
131		usb0_power: regulator@1 {
132			enable-active-high;
133		};
134	};
135
136	gpio-leds {
137		compatible = "gpio-leds";
138		pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
139			     &pmx_led_usb_green
140			     &pmx_led_sys_green &pmx_led_sys_orange
141			     &pmx_led_copy_green &pmx_led_copy_red
142			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
143		pinctrl-names = "default";
144
145		green-sys {
146			label = "nsa320:green:sys";
147			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
148		};
149		orange-sys {
150			label = "nsa320:orange:sys";
151			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
152		};
153		green-hdd1 {
154			label = "nsa320:green:hdd1";
155			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
156		};
157		red-hdd1 {
158			label = "nsa320:red:hdd1";
159			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
160		};
161		green-hdd2 {
162			label = "nsa320:green:hdd2";
163			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
164		};
165		red-hdd2 {
166			label = "nsa320:red:hdd2";
167			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
168		};
169		green-usb {
170			label = "nsa320:green:usb";
171			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
172		};
173		green-copy {
174			label = "nsa320:green:copy";
175			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
176		};
177		red-copy {
178			label = "nsa320:red:copy";
179			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
180		};
181	};
182
183	hwmon {
184		compatible = "zyxel,nsa320-mcu";
185		pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>;
186		pinctrl-names = "default";
187
188		data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
189		clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
190		act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
191	};
192
193	/* The following pins are currently not assigned to a driver,
194	   some of them should be configured as inputs.
195	pinctrl-0 = <&pmx_htp &pmx_vid_b1
196		     &pmx_power_resume_data &pmx_power_resume_clk>; */
197};
198
199&mdio {
200	status = "okay";
201	ethphy0: ethernet-phy@1 {
202		reg = <1>;
203	};
204};
205
206&eth0 {
207	status = "okay";
208	ethernet0-port@0 {
209		phy-handle = <&ethphy0>;
210	};
211};
212
213&pciec {
214        status = "okay";
215};
216
217&pcie0 {
218	status = "okay";
219};
v4.10.11
 
  1/* Device tree file for the Zyxel NSA 320 NAS box.
  2 *
  3 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
  4 *
  5 * This program is free software; you can redistribute it and/or
  6 * modify it under the terms of the GNU General Public License
  7 * as published by the Free Software Foundation; either version
  8 * 2 of the License, or (at your option) any later version.
  9 *
 10 * Based upon the board setup file created by Peter Schildmann */
 11
 12/dts-v1/;
 13
 14#include "kirkwood-nsa3x0-common.dtsi"
 15
 16/ {
 17	model = "Zyxel NSA320";
 18	compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 19
 20	memory {
 21		device_type = "memory";
 22		reg = <0x00000000 0x20000000>;
 23	};
 24
 25	chosen {
 26		bootargs = "console=ttyS0,115200";
 27		stdout-path = &uart0;
 28	};
 29
 30	ocp@f1000000 {
 31		pinctrl: pin-controller@10000 {
 32			pinctrl-names = "default";
 33
 34			/* SATA Activity and Present pins are not connected */
 35			pmx_sata0: pmx-sata0 {
 36				marvell,pins ;
 37				marvell,function = "sata0";
 38			};
 39
 40			pmx_sata1: pmx-sata1 {
 41				marvell,pins ;
 42				marvell,function = "sata1";
 43			};
 44
 45			pmx_led_hdd2_green: pmx-led-hdd2-green {
 46				marvell,pins = "mpp12";
 47				marvell,function = "gpio";
 48			};
 49
 50			pmx_led_hdd2_red: pmx-led-hdd2-red {
 51				marvell,pins = "mpp13";
 52				marvell,function = "gpio";
 53			};
 54
 55			pmx_mcu_data: pmx-mcu-data {
 56				marvell,pins = "mpp14";
 57				marvell,function = "gpio";
 58			};
 59
 60			pmx_led_usb_green: pmx-led-usb-green {
 61				marvell,pins = "mpp15";
 62				marvell,function = "gpio";
 63			};
 64
 65			pmx_mcu_clk: pmx-mcu-clk {
 66				marvell,pins = "mpp16";
 67				marvell,function = "gpio";
 68			};
 69
 70			pmx_mcu_act: pmx-mcu-act {
 71				marvell,pins = "mpp17";
 72				marvell,function = "gpio";
 73			};
 74
 75			pmx_led_sys_green: pmx-led-sys-green {
 76				marvell,pins = "mpp28";
 77				marvell,function = "gpio";
 78			};
 79
 80			pmx_led_sys_orange: pmx-led-sys-orange {
 81				marvell,pins = "mpp29";
 82				marvell,function = "gpio";
 83			};
 84
 85			pmx_led_hdd1_green: pmx-led-hdd1-green {
 86				marvell,pins = "mpp41";
 87				marvell,function = "gpio";
 88			};
 89
 90			pmx_led_hdd1_red: pmx-led-hdd1-red {
 91				marvell,pins = "mpp42";
 92				marvell,function = "gpio";
 93			};
 94
 95			pmx_htp: pmx-htp {
 96				marvell,pins = "mpp43";
 97				marvell,function = "gpio";
 98			};
 99
100			/* Buzzer needs to be switched at around 1kHz so is
101			   not compatible with the gpio-beeper driver. */
102			pmx_buzzer: pmx-buzzer {
103				marvell,pins = "mpp44";
104				marvell,function = "gpio";
105			};
106
107			pmx_vid_b1: pmx-vid-b1 {
108				marvell,pins = "mpp45";
109				marvell,function = "gpio";
110			};
111
112			pmx_power_resume_data: pmx-power-resume-data {
113				marvell,pins = "mpp47";
114				marvell,function = "gpio";
115			};
116
117			pmx_power_resume_clk: pmx-power-resume-clk {
118				marvell,pins = "mpp49";
119				marvell,function = "gpio";
120			};
121		};
122
123		i2c@11000 {
124			status = "okay";
125
126			pcf8563: pcf8563@51 {
127				compatible = "nxp,pcf8563";
128				reg = <0x51>;
129			};
130		};
131	};
132
133	regulators {
134		usb0_power: regulator@1 {
135			enable-active-high;
136		};
137	};
138
139	gpio-leds {
140		compatible = "gpio-leds";
141		pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
142			     &pmx_led_usb_green
143			     &pmx_led_sys_green &pmx_led_sys_orange
144			     &pmx_led_copy_green &pmx_led_copy_red
145			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
146		pinctrl-names = "default";
147
148		green-sys {
149			label = "nsa320:green:sys";
150			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
151		};
152		orange-sys {
153			label = "nsa320:orange:sys";
154			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
155		};
156		green-hdd1 {
157			label = "nsa320:green:hdd1";
158			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
159		};
160		red-hdd1 {
161			label = "nsa320:red:hdd1";
162			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
163		};
164		green-hdd2 {
165			label = "nsa320:green:hdd2";
166			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
167		};
168		red-hdd2 {
169			label = "nsa320:red:hdd2";
170			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
171		};
172		green-usb {
173			label = "nsa320:green:usb";
174			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
175		};
176		green-copy {
177			label = "nsa320:green:copy";
178			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
179		};
180		red-copy {
181			label = "nsa320:red:copy";
182			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
183		};
184	};
185
186	hwmon {
187		compatible = "zyxel,nsa320-mcu";
188		pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>;
189		pinctrl-names = "default";
190
191		data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
192		clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
193		act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
194	};
195
196	/* The following pins are currently not assigned to a driver,
197	   some of them should be configured as inputs.
198	pinctrl-0 = <&pmx_htp &pmx_vid_b1
199		     &pmx_power_resume_data &pmx_power_resume_clk>; */
200};
201
202&mdio {
203	status = "okay";
204	ethphy0: ethernet-phy@1 {
205		reg = <1>;
206	};
207};
208
209&eth0 {
210	status = "okay";
211	ethernet0-port@0 {
212		phy-handle = <&ethphy0>;
213	};
214};
215
216&pciec {
217        status = "okay";
218};
219
220&pcie0 {
221	status = "okay";
222};