| 1 |
// SPDX-License-Identifier: GPL-2.0+ |
| 2 |
/* |
| 3 |
* Copyright (c) 2020 Rockchip Electronics Co., Ltd |
| 4 |
* Copyright (c) 2024 Radxa Limited |
| 5 |
* Copyright (c) 2024 Yao Zi <[email protected]> |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
|
| 10 |
#include <dt-bindings/input/input.h> |
| 11 |
#include <dt-bindings/leds/common.h> |
| 12 |
#include <dt-bindings/pwm/pwm.h> |
| 13 |
#include "rk3528.dtsi" |
| 14 |
|
| 15 |
/ { |
| 16 |
model = "Radxa E20C"; |
| 17 |
compatible = "radxa,e20c", "rockchip,rk3528"; |
| 18 |
|
| 19 |
aliases { |
| 20 |
ethernet0 = &gmac1; |
| 21 |
i2c1 = &i2c1; |
| 22 |
mmc0 = &sdhci; |
| 23 |
mmc1 = &sdmmc; |
| 24 |
serial0 = &uart0; |
| 25 |
}; |
| 26 |
|
| 27 |
chosen { |
| 28 |
stdout-path = "serial0:1500000n8"; |
| 29 |
}; |
| 30 |
|
| 31 |
adc-keys { |
| 32 |
compatible = "adc-keys"; |
| 33 |
io-channels = <&saradc 0>; |
| 34 |
io-channel-names = "buttons"; |
| 35 |
keyup-threshold-microvolt = <1800000>; |
| 36 |
poll-interval = <100>; |
| 37 |
|
| 38 |
button-maskrom { |
| 39 |
label = "MASKROM"; |
| 40 |
linux,code = <KEY_SETUP>; |
| 41 |
press-threshold-microvolt = <0>; |
| 42 |
}; |
| 43 |
}; |
| 44 |
|
| 45 |
gpio-keys { |
| 46 |
compatible = "gpio-keys"; |
| 47 |
pinctrl-names = "default"; |
| 48 |
pinctrl-0 = <&user_key>; |
| 49 |
|
| 50 |
button-user { |
| 51 |
gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; |
| 52 |
label = "USER"; |
| 53 |
linux,code = <BTN_1>; |
| 54 |
wakeup-source; |
| 55 |
}; |
| 56 |
}; |
| 57 |
|
| 58 |
leds { |
| 59 |
compatible = "gpio-leds"; |
| 60 |
pinctrl-names = "default"; |
| 61 |
pinctrl-0 = <&lan_led_g>, <&sys_led_g>, <&wan_led_g>; |
| 62 |
|
| 63 |
led-lan { |
| 64 |
color = <LED_COLOR_ID_GREEN>; |
| 65 |
default-state = "off"; |
| 66 |
function = LED_FUNCTION_LAN; |
| 67 |
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 68 |
linux,default-trigger = "netdev"; |
| 69 |
}; |
| 70 |
|
| 71 |
led-sys { |
| 72 |
color = <LED_COLOR_ID_GREEN>; |
| 73 |
default-state = "on"; |
| 74 |
function = LED_FUNCTION_HEARTBEAT; |
| 75 |
gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>; |
| 76 |
linux,default-trigger = "heartbeat"; |
| 77 |
}; |
| 78 |
|
| 79 |
led-wan { |
| 80 |
color = <LED_COLOR_ID_GREEN>; |
| 81 |
default-state = "off"; |
| 82 |
function = LED_FUNCTION_WAN; |
| 83 |
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; |
| 84 |
linux,default-trigger = "netdev"; |
| 85 |
}; |
| 86 |
}; |
| 87 |
|
| 88 |
vdd_0v9: regulator-0v9-vdd { |
| 89 |
compatible = "regulator-fixed"; |
| 90 |
regulator-name = "vdd_0v9"; |
| 91 |
regulator-always-on; |
| 92 |
regulator-boot-on; |
| 93 |
regulator-min-microvolt = <900000>; |
| 94 |
regulator-max-microvolt = <900000>; |
| 95 |
vin-supply = <&vcc5v0_sys>; |
| 96 |
}; |
| 97 |
|
| 98 |
vcc_ddr: regulator-1v1-vcc-ddr { |
| 99 |
compatible = "regulator-fixed"; |
| 100 |
regulator-name = "vcc_ddr"; |
| 101 |
regulator-always-on; |
| 102 |
regulator-boot-on; |
| 103 |
regulator-min-microvolt = <1100000>; |
| 104 |
regulator-max-microvolt = <1100000>; |
| 105 |
vin-supply = <&vcc5v0_sys>; |
| 106 |
}; |
| 107 |
|
| 108 |
vcc_1v8: regulator-1v8-vcc { |
| 109 |
compatible = "regulator-fixed"; |
| 110 |
regulator-name = "vcc_1v8"; |
| 111 |
regulator-always-on; |
| 112 |
regulator-boot-on; |
| 113 |
regulator-min-microvolt = <1800000>; |
| 114 |
regulator-max-microvolt = <1800000>; |
| 115 |
vin-supply = <&vcc_3v3>; |
| 116 |
}; |
| 117 |
|
| 118 |
vcc_3v3: regulator-3v3-vcc { |
| 119 |
compatible = "regulator-fixed"; |
| 120 |
regulator-name = "vcc_3v3"; |
| 121 |
regulator-always-on; |
| 122 |
regulator-boot-on; |
| 123 |
regulator-min-microvolt = <3300000>; |
| 124 |
regulator-max-microvolt = <3300000>; |
| 125 |
vin-supply = <&vcc5v0_sys>; |
| 126 |
}; |
| 127 |
|
| 128 |
vcc5v0_sys: regulator-5v0-vcc-sys { |
| 129 |
compatible = "regulator-fixed"; |
| 130 |
regulator-name = "vcc5v0_sys"; |
| 131 |
regulator-always-on; |
| 132 |
regulator-boot-on; |
| 133 |
regulator-min-microvolt = <5000000>; |
| 134 |
regulator-max-microvolt = <5000000>; |
| 135 |
}; |
| 136 |
|
| 137 |
vccio_sd: regulator-vccio-sd { |
| 138 |
compatible = "regulator-gpio"; |
| 139 |
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; |
| 140 |
pinctrl-names = "default"; |
| 141 |
pinctrl-0 = <&sdmmc_vol_ctrl_h>; |
| 142 |
regulator-name = "vccio_sd"; |
| 143 |
regulator-min-microvolt = <1800000>; |
| 144 |
regulator-max-microvolt = <3300000>; |
| 145 |
states = <1800000 0x0>, <3300000 0x1>; |
| 146 |
vin-supply = <&vcc5v0_sys>; |
| 147 |
}; |
| 148 |
|
| 149 |
vdd_arm: regulator-vdd-arm { |
| 150 |
compatible = "pwm-regulator"; |
| 151 |
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>; |
| 152 |
pwm-supply = <&vcc5v0_sys>; |
| 153 |
regulator-name = "vdd_arm"; |
| 154 |
regulator-always-on; |
| 155 |
regulator-boot-on; |
| 156 |
regulator-min-microvolt = <746000>; |
| 157 |
regulator-max-microvolt = <1201000>; |
| 158 |
regulator-settling-time-up-us = <250>; |
| 159 |
}; |
| 160 |
|
| 161 |
vdd_logic: regulator-vdd-logic { |
| 162 |
compatible = "pwm-regulator"; |
| 163 |
pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>; |
| 164 |
pwm-supply = <&vcc5v0_sys>; |
| 165 |
regulator-name = "vdd_logic"; |
| 166 |
regulator-always-on; |
| 167 |
regulator-boot-on; |
| 168 |
regulator-min-microvolt = <705000>; |
| 169 |
regulator-max-microvolt = <1006000>; |
| 170 |
regulator-settling-time-up-us = <250>; |
| 171 |
}; |
| 172 |
}; |
| 173 |
|
| 174 |
&combphy { |
| 175 |
status = "okay"; |
| 176 |
}; |
| 177 |
|
| 178 |
&cpu0 { |
| 179 |
cpu-supply = <&vdd_arm>; |
| 180 |
}; |
| 181 |
|
| 182 |
&cpu1 { |
| 183 |
cpu-supply = <&vdd_arm>; |
| 184 |
}; |
| 185 |
|
| 186 |
&cpu2 { |
| 187 |
cpu-supply = <&vdd_arm>; |
| 188 |
}; |
| 189 |
|
| 190 |
&cpu3 { |
| 191 |
cpu-supply = <&vdd_arm>; |
| 192 |
}; |
| 193 |
|
| 194 |
&gmac1 { |
| 195 |
clock_in_out = "output"; |
| 196 |
phy-handle = <&rgmii_phy>; |
| 197 |
phy-mode = "rgmii-id"; |
| 198 |
phy-supply = <&vcc_3v3>; |
| 199 |
pinctrl-names = "default"; |
| 200 |
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>, |
| 201 |
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>; |
| 202 |
status = "okay"; |
| 203 |
}; |
| 204 |
|
| 205 |
&gpu { |
| 206 |
mali-supply = <&vdd_logic>; |
| 207 |
status = "okay"; |
| 208 |
}; |
| 209 |
|
| 210 |
&i2c1 { |
| 211 |
pinctrl-names = "default"; |
| 212 |
pinctrl-0 = <&i2c1m0_xfer>; |
| 213 |
status = "okay"; |
| 214 |
|
| 215 |
eeprom@50 { |
| 216 |
compatible = "belling,bl24c16a", "atmel,24c16"; |
| 217 |
reg = <0x50>; |
| 218 |
pagesize = <16>; |
| 219 |
read-only; |
| 220 |
vcc-supply = <&vcc_3v3>; |
| 221 |
}; |
| 222 |
}; |
| 223 |
|
| 224 |
&mdio1 { |
| 225 |
rgmii_phy: ethernet-phy@1 { |
| 226 |
compatible = "ethernet-phy-ieee802.3-c22"; |
| 227 |
reg = <0x1>; |
| 228 |
pinctrl-names = "default"; |
| 229 |
pinctrl-0 = <&gmac1_rstn_l>; |
| 230 |
reset-assert-us = <20000>; |
| 231 |
reset-deassert-us = <100000>; |
| 232 |
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>; |
| 233 |
}; |
| 234 |
}; |
| 235 |
|
| 236 |
&pcie { |
| 237 |
pinctrl-names = "default"; |
| 238 |
pinctrl-0 = <&pciem1_pins>; |
| 239 |
reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; |
| 240 |
vpcie3v3-supply = <&vcc_3v3>; |
| 241 |
status = "okay"; |
| 242 |
}; |
| 243 |
|
| 244 |
&pinctrl { |
| 245 |
ethernet { |
| 246 |
gmac1_rstn_l: gmac1-rstn-l { |
| 247 |
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 248 |
}; |
| 249 |
}; |
| 250 |
|
| 251 |
gpio-keys { |
| 252 |
user_key: user-key { |
| 253 |
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 254 |
}; |
| 255 |
}; |
| 256 |
|
| 257 |
leds { |
| 258 |
lan_led_g: lan-led-g { |
| 259 |
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 260 |
}; |
| 261 |
|
| 262 |
sys_led_g: sys-led-g { |
| 263 |
rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 264 |
}; |
| 265 |
|
| 266 |
wan_led_g: wan-led-g { |
| 267 |
rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 268 |
}; |
| 269 |
}; |
| 270 |
|
| 271 |
sdmmc { |
| 272 |
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h { |
| 273 |
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 274 |
}; |
| 275 |
}; |
| 276 |
}; |
| 277 |
|
| 278 |
&pwm1 { |
| 279 |
pinctrl-names = "default"; |
| 280 |
pinctrl-0 = <&pwm1m0_pins>; |
| 281 |
status = "okay"; |
| 282 |
}; |
| 283 |
|
| 284 |
&pwm2 { |
| 285 |
pinctrl-names = "default"; |
| 286 |
pinctrl-0 = <&pwm2m0_pins>; |
| 287 |
status = "okay"; |
| 288 |
}; |
| 289 |
|
| 290 |
&saradc { |
| 291 |
vref-supply = <&vcc_1v8>; |
| 292 |
status = "okay"; |
| 293 |
}; |
| 294 |
|
| 295 |
&sdhci { |
| 296 |
bus-width = <8>; |
| 297 |
cap-mmc-highspeed; |
| 298 |
mmc-hs200-1_8v; |
| 299 |
no-sd; |
| 300 |
no-sdio; |
| 301 |
non-removable; |
| 302 |
vmmc-supply = <&vcc_3v3>; |
| 303 |
vqmmc-supply = <&vcc_1v8>; |
| 304 |
status = "okay"; |
| 305 |
}; |
| 306 |
|
| 307 |
&sdmmc { |
| 308 |
bus-width = <4>; |
| 309 |
cap-mmc-highspeed; |
| 310 |
cap-sd-highspeed; |
| 311 |
disable-wp; |
| 312 |
sd-uhs-sdr104; |
| 313 |
vmmc-supply = <&vcc_3v3>; |
| 314 |
vqmmc-supply = <&vccio_sd>; |
| 315 |
status = "okay"; |
| 316 |
}; |
| 317 |
|
| 318 |
&uart0 { |
| 319 |
pinctrl-names = "default"; |
| 320 |
pinctrl-0 = <&uart0m0_xfer>; |
| 321 |
status = "okay"; |
| 322 |
}; |