| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* ZyXEL NSA310S Board Description |
| 4 |
* Copyright 2020-2022 Pawel Dembicki <[email protected]> |
| 5 |
* Copyright (c) 2015-2021, Tony Dinh <[email protected]> |
| 6 |
* Copyright (c) 2014, Adam Baker <[email protected]> |
| 7 |
* Based upon the board setup file created by Peter Schildmann |
| 8 |
*/ |
| 9 |
/dts-v1/; |
| 10 |
|
| 11 |
#include "kirkwood.dtsi" |
| 12 |
#include "kirkwood-6281.dtsi" |
| 13 |
#include <dt-bindings/leds/common.h> |
| 14 |
|
| 15 |
/ { |
| 16 |
model = "ZyXEL NSA310S"; |
| 17 |
compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood"; |
| 18 |
|
| 19 |
memory { |
| 20 |
device_type = "memory"; |
| 21 |
reg = <0x00000000 0x10000000>; |
| 22 |
}; |
| 23 |
|
| 24 |
chosen { |
| 25 |
bootargs = "console=ttyS0,115200n8 earlyprintk"; |
| 26 |
stdout-path = &uart0; |
| 27 |
}; |
| 28 |
|
| 29 |
gpio_poweroff { |
| 30 |
compatible = "gpio-poweroff"; |
| 31 |
pinctrl-0 = <&pmx_pwr_off>; |
| 32 |
pinctrl-names = "default"; |
| 33 |
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; |
| 34 |
}; |
| 35 |
|
| 36 |
keys { |
| 37 |
compatible = "gpio-keys"; |
| 38 |
pinctrl-0 = <&pmx_buttons>; |
| 39 |
pinctrl-names = "default"; |
| 40 |
|
| 41 |
button-power { |
| 42 |
label = "Power Button"; |
| 43 |
linux,code = <KEY_POWER>; |
| 44 |
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; |
| 45 |
}; |
| 46 |
|
| 47 |
button-copy { |
| 48 |
label = "Copy Button"; |
| 49 |
linux,code = <KEY_COPY>; |
| 50 |
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; |
| 51 |
}; |
| 52 |
|
| 53 |
button-reset { |
| 54 |
label = "Reset Button"; |
| 55 |
linux,code = <KEY_RESTART>; |
| 56 |
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; |
| 57 |
}; |
| 58 |
}; |
| 59 |
|
| 60 |
leds { |
| 61 |
compatible = "gpio-leds"; |
| 62 |
pinctrl-0 = <&pmx_leds>; |
| 63 |
pinctrl-names = "default"; |
| 64 |
|
| 65 |
led-1 { |
| 66 |
function = LED_FUNCTION_DISK_ERR; |
| 67 |
color = <LED_COLOR_ID_RED>; |
| 68 |
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; |
| 69 |
}; |
| 70 |
|
| 71 |
led-2 { |
| 72 |
function = LED_FUNCTION_USB; |
| 73 |
color = <LED_COLOR_ID_GREEN>; |
| 74 |
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
| 75 |
linux,default-trigger = "usb-host"; |
| 76 |
}; |
| 77 |
|
| 78 |
led-3 { |
| 79 |
function = LED_FUNCTION_DISK; |
| 80 |
color = <LED_COLOR_ID_GREEN>; |
| 81 |
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
| 82 |
linux,default-trigger = "ata1"; |
| 83 |
}; |
| 84 |
|
| 85 |
led-4 { |
| 86 |
function = LED_FUNCTION_INDICATOR; |
| 87 |
color = <LED_COLOR_ID_GREEN>; |
| 88 |
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; |
| 89 |
}; |
| 90 |
|
| 91 |
led-5 { |
| 92 |
function = LED_FUNCTION_INDICATOR; |
| 93 |
color = <LED_COLOR_ID_RED>; |
| 94 |
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; |
| 95 |
}; |
| 96 |
|
| 97 |
led-6 { |
| 98 |
function = LED_FUNCTION_STATUS; |
| 99 |
color = <LED_COLOR_ID_GREEN>; |
| 100 |
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; |
| 101 |
linux,default-trigger = "default-on"; |
| 102 |
}; |
| 103 |
|
| 104 |
led-7 { |
| 105 |
function = LED_FUNCTION_STATUS; |
| 106 |
color = <LED_COLOR_ID_RED>; |
| 107 |
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
| 108 |
}; |
| 109 |
}; |
| 110 |
|
| 111 |
usb0_power: regulator@1 { |
| 112 |
compatible = "regulator-fixed"; |
| 113 |
regulator-name = "USB Power"; |
| 114 |
|
| 115 |
regulator-min-microvolt = <5000000>; |
| 116 |
regulator-max-microvolt = <5000000>; |
| 117 |
regulator-always-on; |
| 118 |
regulator-boot-on; |
| 119 |
gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>; |
| 120 |
}; |
| 121 |
|
| 122 |
sata1_power: regulator@2 { |
| 123 |
compatible = "regulator-fixed"; |
| 124 |
regulator-name = "SATA1 Power"; |
| 125 |
|
| 126 |
regulator-min-microvolt = <5000000>; |
| 127 |
regulator-max-microvolt = <5000000>; |
| 128 |
regulator-always-on; |
| 129 |
regulator-boot-on; |
| 130 |
gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>; |
| 131 |
}; |
| 132 |
|
| 133 |
thermal-zones { |
| 134 |
disk-thermal { |
| 135 |
polling-delay = <20000>; |
| 136 |
polling-delay-passive = <2000>; |
| 137 |
|
| 138 |
thermal-sensors = <&hdd_temp>; |
| 139 |
|
| 140 |
trips { |
| 141 |
disk_alert: disk-alert { |
| 142 |
temperature = <40000>; |
| 143 |
hysteresis = <5000>; |
| 144 |
type = "active"; |
| 145 |
}; |
| 146 |
disk_crit: disk-crit { |
| 147 |
temperature = <60000>; |
| 148 |
hysteresis = <2000>; |
| 149 |
type = "critical"; |
| 150 |
}; |
| 151 |
}; |
| 152 |
}; |
| 153 |
}; |
| 154 |
}; |
| 155 |
|
| 156 |
|
| 157 |
ð0 { |
| 158 |
status = "okay"; |
| 159 |
|
| 160 |
ethernet0-port@0 { |
| 161 |
phy-handle = <ðphy0>; |
| 162 |
}; |
| 163 |
}; |
| 164 |
|
| 165 |
&i2c0 { |
| 166 |
status = "okay"; |
| 167 |
|
| 168 |
rtc@68 { |
| 169 |
compatible = "htk,ht1382"; |
| 170 |
reg = <0x68>; |
| 171 |
}; |
| 172 |
}; |
| 173 |
|
| 174 |
&mdio { |
| 175 |
status = "okay"; |
| 176 |
|
| 177 |
ethphy0: ethernet-phy@1 { |
| 178 |
reg = <1>; |
| 179 |
phy-mode = "rgmii-id"; |
| 180 |
marvell,reg-init = <0x1 0x16 0x0 0x3>, |
| 181 |
<0x1 0x10 0x0 0x1017>, |
| 182 |
<0x1 0x11 0x0 0x4408>, |
| 183 |
<0x1 0x16 0x0 0x0>; |
| 184 |
}; |
| 185 |
}; |
| 186 |
|
| 187 |
&nand { |
| 188 |
status = "okay"; |
| 189 |
chip-delay = <35>; |
| 190 |
|
| 191 |
partition@0 { |
| 192 |
label = "uboot"; |
| 193 |
reg = <0x0000000 0x00c0000>; |
| 194 |
read-only; |
| 195 |
}; |
| 196 |
partition@c0000 { |
| 197 |
label = "uboot_env"; |
| 198 |
reg = <0x00c0000 0x0080000>; |
| 199 |
}; |
| 200 |
partition@140000 { |
| 201 |
label = "ubi"; |
| 202 |
reg = <0x0140000 0x7ec0000>; |
| 203 |
}; |
| 204 |
}; |
| 205 |
|
| 206 |
&pciec { |
| 207 |
status = "okay"; |
| 208 |
}; |
| 209 |
|
| 210 |
&pcie0 { |
| 211 |
status = "okay"; |
| 212 |
}; |
| 213 |
|
| 214 |
&pinctrl { |
| 215 |
pinctrl-names = "default"; |
| 216 |
|
| 217 |
pmx_buttons: pmx-buttons { |
| 218 |
marvell,pins = "mpp24", "mpp25", "mpp26"; |
| 219 |
marvell,function = "gpio"; |
| 220 |
}; |
| 221 |
|
| 222 |
pmx_leds: pmx-leds { |
| 223 |
marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23", |
| 224 |
"mpp28", "mpp29"; |
| 225 |
marvell,function = "gpio"; |
| 226 |
}; |
| 227 |
|
| 228 |
pmx_power: pmx-power { |
| 229 |
marvell,pins = "mpp21", "mpp33"; |
| 230 |
marvell,function = "gpio"; |
| 231 |
}; |
| 232 |
|
| 233 |
pmx_pwr_off: pmx-pwr-off { |
| 234 |
marvell,pins = "mpp27"; |
| 235 |
marvell,function = "gpio"; |
| 236 |
}; |
| 237 |
}; |
| 238 |
|
| 239 |
&rtc { |
| 240 |
status = "disabled"; |
| 241 |
}; |
| 242 |
|
| 243 |
&sata { |
| 244 |
status = "okay"; |
| 245 |
nr-ports = <1>; |
| 246 |
#address-cells = <1>; |
| 247 |
#size-cells = <0>; |
| 248 |
|
| 249 |
hdd_temp: sata-port@0 { |
| 250 |
reg = <0>; |
| 251 |
#thermal-sensor-cells = <0>; |
| 252 |
}; |
| 253 |
}; |
| 254 |
|
| 255 |
&uart0 { |
| 256 |
status = "okay"; |
| 257 |
}; |