0001 // SPDX-License-Identifier: GPL-2.0+
0002 /* Device tree file for the Zyxel NSA 320 NAS box.
0003 *
0004 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
0005 *
0006 *
0007 * Based upon the board setup file created by Peter Schildmann */
0008
0009 /dts-v1/;
0010
0011 #include "kirkwood-nsa3x0-common.dtsi"
0012
0013 / {
0014 model = "Zyxel NSA320";
0015 compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood";
0016
0017 memory {
0018 device_type = "memory";
0019 reg = <0x00000000 0x20000000>;
0020 };
0021
0022 chosen {
0023 bootargs = "console=ttyS0,115200";
0024 stdout-path = &uart0;
0025 };
0026
0027 ocp@f1000000 {
0028 pinctrl: pin-controller@10000 {
0029 pinctrl-names = "default";
0030
0031 /* SATA Activity and Present pins are not connected */
0032 pmx_sata0: pmx-sata0 {
0033 marvell,pins ;
0034 marvell,function = "sata0";
0035 };
0036
0037 pmx_sata1: pmx-sata1 {
0038 marvell,pins ;
0039 marvell,function = "sata1";
0040 };
0041
0042 pmx_led_hdd2_green: pmx-led-hdd2-green {
0043 marvell,pins = "mpp12";
0044 marvell,function = "gpio";
0045 };
0046
0047 pmx_led_hdd2_red: pmx-led-hdd2-red {
0048 marvell,pins = "mpp13";
0049 marvell,function = "gpio";
0050 };
0051
0052 pmx_mcu_data: pmx-mcu-data {
0053 marvell,pins = "mpp14";
0054 marvell,function = "gpio";
0055 };
0056
0057 pmx_led_usb_green: pmx-led-usb-green {
0058 marvell,pins = "mpp15";
0059 marvell,function = "gpio";
0060 };
0061
0062 pmx_mcu_clk: pmx-mcu-clk {
0063 marvell,pins = "mpp16";
0064 marvell,function = "gpio";
0065 };
0066
0067 pmx_mcu_act: pmx-mcu-act {
0068 marvell,pins = "mpp17";
0069 marvell,function = "gpio";
0070 };
0071
0072 pmx_led_sys_green: pmx-led-sys-green {
0073 marvell,pins = "mpp28";
0074 marvell,function = "gpio";
0075 };
0076
0077 pmx_led_sys_orange: pmx-led-sys-orange {
0078 marvell,pins = "mpp29";
0079 marvell,function = "gpio";
0080 };
0081
0082 pmx_led_hdd1_green: pmx-led-hdd1-green {
0083 marvell,pins = "mpp41";
0084 marvell,function = "gpio";
0085 };
0086
0087 pmx_led_hdd1_red: pmx-led-hdd1-red {
0088 marvell,pins = "mpp42";
0089 marvell,function = "gpio";
0090 };
0091
0092 pmx_htp: pmx-htp {
0093 marvell,pins = "mpp43";
0094 marvell,function = "gpio";
0095 };
0096
0097 /* Buzzer needs to be switched at around 1kHz so is
0098 not compatible with the gpio-beeper driver. */
0099 pmx_buzzer: pmx-buzzer {
0100 marvell,pins = "mpp44";
0101 marvell,function = "gpio";
0102 };
0103
0104 pmx_vid_b1: pmx-vid-b1 {
0105 marvell,pins = "mpp45";
0106 marvell,function = "gpio";
0107 };
0108
0109 pmx_power_resume_data: pmx-power-resume-data {
0110 marvell,pins = "mpp47";
0111 marvell,function = "gpio";
0112 };
0113
0114 pmx_power_resume_clk: pmx-power-resume-clk {
0115 marvell,pins = "mpp49";
0116 marvell,function = "gpio";
0117 };
0118 };
0119
0120 i2c@11000 {
0121 status = "okay";
0122
0123 pcf8563: pcf8563@51 {
0124 compatible = "nxp,pcf8563";
0125 reg = <0x51>;
0126 };
0127 };
0128 };
0129
0130 regulators {
0131 usb0_power: regulator@1 {
0132 enable-active-high;
0133 };
0134 };
0135
0136 gpio-leds {
0137 compatible = "gpio-leds";
0138 pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
0139 &pmx_led_usb_green
0140 &pmx_led_sys_green &pmx_led_sys_orange
0141 &pmx_led_copy_green &pmx_led_copy_red
0142 &pmx_led_hdd1_green &pmx_led_hdd1_red>;
0143 pinctrl-names = "default";
0144
0145 green-sys {
0146 label = "nsa320:green:sys";
0147 gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
0148 };
0149 orange-sys {
0150 label = "nsa320:orange:sys";
0151 gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
0152 };
0153 green-hdd1 {
0154 label = "nsa320:green:hdd1";
0155 gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
0156 };
0157 red-hdd1 {
0158 label = "nsa320:red:hdd1";
0159 gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
0160 };
0161 green-hdd2 {
0162 label = "nsa320:green:hdd2";
0163 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
0164 };
0165 red-hdd2 {
0166 label = "nsa320:red:hdd2";
0167 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
0168 };
0169 green-usb {
0170 label = "nsa320:green:usb";
0171 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
0172 };
0173 green-copy {
0174 label = "nsa320:green:copy";
0175 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
0176 };
0177 red-copy {
0178 label = "nsa320:red:copy";
0179 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
0180 };
0181 };
0182
0183 hwmon {
0184 compatible = "zyxel,nsa320-mcu";
0185 pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>;
0186 pinctrl-names = "default";
0187
0188 data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
0189 clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
0190 act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
0191 };
0192
0193 /* The following pins are currently not assigned to a driver,
0194 some of them should be configured as inputs.
0195 pinctrl-0 = <&pmx_htp &pmx_vid_b1
0196 &pmx_power_resume_data &pmx_power_resume_clk>; */
0197 };
0198
0199 &mdio {
0200 status = "okay";
0201 ethphy0: ethernet-phy@1 {
0202 reg = <1>;
0203 };
0204 };
0205
0206 ð0 {
0207 status = "okay";
0208 ethernet0-port@0 {
0209 phy-handle = <ðphy0>;
0210 };
0211 };
0212
0213 &pciec {
0214 status = "okay";
0215 };
0216
0217 &pcie0 {
0218 status = "okay";
0219 };