575 lines
11 KiB
Devicetree
575 lines
11 KiB
Devicetree
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
|
|
/dts-v1/;
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
#include "rk3528.dtsi"
|
|
|
|
/ {
|
|
model = "Radxa E24C";
|
|
compatible = "radxa,e24c", "rockchip,rk3528";
|
|
|
|
aliases {
|
|
ethernet0 = &gmac1;
|
|
i2c0 = &i2c0;
|
|
i2c1 = &i2c1;
|
|
i2c5 = &i2c5;
|
|
mmc0 = &sdhci;
|
|
mmc1 = &sdmmc;
|
|
rtc0 = &hym8563;
|
|
rtc1 = &rk805;
|
|
serial0 = &uart0;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:1500000n8";
|
|
};
|
|
|
|
adc-keys {
|
|
compatible = "adc-keys";
|
|
io-channels = <&saradc 0>;
|
|
io-channel-names = "buttons";
|
|
keyup-threshold-microvolt = <1800000>;
|
|
poll-interval = <100>;
|
|
|
|
button-maskrom {
|
|
label = "MASKROM";
|
|
linux,code = <KEY_SETUP>;
|
|
press-threshold-microvolt = <0>;
|
|
};
|
|
};
|
|
|
|
gpio-keys {
|
|
compatible = "gpio-keys";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&gpio0_a0_user>;
|
|
|
|
button-user {
|
|
gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
|
|
label = "USER";
|
|
linux,code = <BTN_1>;
|
|
wakeup-source;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led-0 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "on";
|
|
function = LED_FUNCTION_HEARTBEAT;
|
|
gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>;
|
|
label = "SYS";
|
|
linux,default-trigger = "heartbeat";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sys_led_g>;
|
|
};
|
|
|
|
led-1 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "off";
|
|
function = LED_FUNCTION_WAN;
|
|
gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
|
|
label = "WAN";
|
|
linux,default-trigger = "stmmac-0:1d:user_mii:00:link";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&wan_led_g>;
|
|
};
|
|
|
|
led-2 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "off";
|
|
function = LED_FUNCTION_LAN;
|
|
gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
|
|
label = "LAN1";
|
|
linux,default-trigger = "stmmac-0:1d:user_mii:01:link";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&lan1_led_g>;
|
|
};
|
|
|
|
led-3 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "off";
|
|
function = LED_FUNCTION_LAN;
|
|
gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
|
|
label = "LAN2";
|
|
linux,default-trigger = "stmmac-0:1d:user_mii:02:link";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&lan2_led_g>;
|
|
};
|
|
|
|
led-4 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "off";
|
|
function = LED_FUNCTION_LAN;
|
|
gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
|
|
label = "LAN3";
|
|
linux,default-trigger = "stmmac-0:1d:user_mii:03:link";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&lan3_led_g>;
|
|
};
|
|
};
|
|
|
|
vcc3v3_mkey: regulator-3v3-vcc-mkey {
|
|
compatible = "regulator-fixed";
|
|
enable-active-high;
|
|
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&mkey_pwr_en>;
|
|
regulator-name = "vcc3v3_mkey";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
|
|
vcc5v0_sys: regulator-5v0-vcc-sys {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc5v0_sys";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
vin-supply = <&vcc_12v>;
|
|
};
|
|
|
|
vcc5v0_usb20: regulator-5v0-vcc-usb20 {
|
|
compatible = "regulator-fixed";
|
|
enable-active-high;
|
|
gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&usb_host_en>;
|
|
regulator-name = "vcc5v0_usb20";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
|
|
vcc_12v: regulator-12v0-vcc {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc_12v";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <12000000>;
|
|
regulator-max-microvolt = <12000000>;
|
|
};
|
|
|
|
vccio_sd: regulator-vccio-sd {
|
|
compatible = "regulator-gpio";
|
|
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sdmmc_vol_ctrl_h>;
|
|
regulator-name = "vccio_sd";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
states = <1800000 0x0>, <3300000 0x1>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
|
|
/* Common enable line for the avdd rails mentioned in the labels */
|
|
vdd_switch: avddl_1v1: avddh_3v3: regulator-vdd-switch {
|
|
compatible = "regulator-fixed";
|
|
enable-active-high;
|
|
gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&gpio_8367_en>;
|
|
regulator-name = "vdd_switch";
|
|
startup-delay-us = <10000>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
};
|
|
|
|
&combphy {
|
|
status = "okay";
|
|
};
|
|
|
|
&cpu0 {
|
|
cpu-supply = <&vdd_arm>;
|
|
};
|
|
|
|
&cpu1 {
|
|
cpu-supply = <&vdd_arm>;
|
|
};
|
|
|
|
&cpu2 {
|
|
cpu-supply = <&vdd_arm>;
|
|
};
|
|
|
|
&cpu3 {
|
|
cpu-supply = <&vdd_arm>;
|
|
};
|
|
|
|
&gmac1 {
|
|
/delete-property/ snps,tso;
|
|
clock_in_out = "output";
|
|
phy-mode = "rgmii-id";
|
|
phy-supply = <&vdd_switch>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
|
|
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
|
|
status = "okay";
|
|
|
|
fixed-link {
|
|
full-duplex;
|
|
pause;
|
|
speed = <1000>;
|
|
};
|
|
};
|
|
|
|
&gpu {
|
|
mali-supply = <&vdd_logic>;
|
|
status = "okay";
|
|
};
|
|
|
|
&i2c0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&i2c0m0_xfer>;
|
|
status = "okay";
|
|
|
|
rk805: pmic@18 {
|
|
compatible = "rockchip,rk805";
|
|
reg = <0x18>;
|
|
#clock-cells = <0>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
interrupt-parent = <&gpio4>;
|
|
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&pmic_int>;
|
|
system-power-controller;
|
|
wakeup-source;
|
|
|
|
vcc1-supply = <&vcc5v0_sys>;
|
|
vcc2-supply = <&vcc5v0_sys>;
|
|
vcc3-supply = <&vcc5v0_sys>;
|
|
vcc4-supply = <&vcc5v0_sys>;
|
|
vcc5-supply = <&vcc5v0_sys>;
|
|
vcc6-supply = <&vcc5v0_sys>;
|
|
|
|
regulators {
|
|
vdd_arm: DCDC_REG1 {
|
|
regulator-name = "vdd_arm";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <712500>;
|
|
regulator-max-microvolt = <1450000>;
|
|
regulator-ramp-delay = <12500>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
};
|
|
};
|
|
|
|
vdd_logic: DCDC_REG2 {
|
|
regulator-name = "vdd_logic";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <712500>;
|
|
regulator-max-microvolt = <1450000>;
|
|
regulator-ramp-delay = <12500>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
};
|
|
};
|
|
|
|
vcc_ddr: DCDC_REG3 {
|
|
regulator-name = "vcc_ddr";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
};
|
|
};
|
|
|
|
vcc_3v3: DCDC_REG4 {
|
|
regulator-name = "vcc_3v3";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <3300000>;
|
|
};
|
|
};
|
|
|
|
vcc_1v8: LDO_REG1 {
|
|
regulator-name = "vcc_1v8";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1800000>;
|
|
};
|
|
};
|
|
|
|
vcc1v8_emmc: LDO_REG2 {
|
|
regulator-name = "vcc1v8_emmc";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1800000>;
|
|
};
|
|
};
|
|
|
|
vdd_0v9_p: LDO_REG3 {
|
|
regulator-name = "vdd_0v9_p";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <900000>;
|
|
regulator-max-microvolt = <900000>;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <900000>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&i2c1m0_xfer>;
|
|
status = "okay";
|
|
|
|
eeprom@50 {
|
|
compatible = "belling,bl24c16a", "atmel,24c16";
|
|
reg = <0x50>;
|
|
pagesize = <16>;
|
|
read-only;
|
|
vcc-supply = <&vcc_3v3>;
|
|
};
|
|
};
|
|
|
|
&i2c5 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&i2c5m0_xfer>;
|
|
status = "okay";
|
|
|
|
hym8563: rtc@51 {
|
|
compatible = "haoyu,hym8563";
|
|
reg = <0x51>;
|
|
#clock-cells = <0>;
|
|
interrupt-parent = <&gpio4>;
|
|
interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&rtc_int_l>;
|
|
wakeup-source;
|
|
};
|
|
};
|
|
|
|
&mdio1 {
|
|
ethernet-switch@1d {
|
|
compatible = "realtek,rtl8365mb";
|
|
reg = <0x1d>;
|
|
interrupt-parent = <&switch_intc>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&gmac1_rstn_l>, <&rtl8367rb_eint>;
|
|
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
|
|
|
ethernet-ports {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
ethernet-port@0 {
|
|
reg = <0>;
|
|
label = "wan";
|
|
phy-handle = <&switchphy0>;
|
|
};
|
|
|
|
ethernet-port@1 {
|
|
reg = <1>;
|
|
label = "lan1";
|
|
phy-handle = <&switchphy1>;
|
|
};
|
|
|
|
ethernet-port@2 {
|
|
reg = <2>;
|
|
label = "lan2";
|
|
phy-handle = <&switchphy2>;
|
|
};
|
|
|
|
ethernet-port@3 {
|
|
reg = <3>;
|
|
label = "lan3";
|
|
phy-handle = <&switchphy3>;
|
|
};
|
|
|
|
ethernet-port@6 {
|
|
reg = <6>;
|
|
ethernet = <&gmac1>;
|
|
phy-mode = "rgmii";
|
|
rx-internal-delay-ps = <2100>;
|
|
tx-internal-delay-ps = <2000>;
|
|
|
|
fixed-link {
|
|
full-duplex;
|
|
pause;
|
|
speed = <1000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
switch_intc: interrupt-controller {
|
|
interrupt-parent = <&gpio1>;
|
|
interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
|
|
interrupt-controller;
|
|
#address-cells = <0>;
|
|
#interrupt-cells = <1>;
|
|
};
|
|
|
|
mdio {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
switchphy0: ethernet-phy@0 {
|
|
reg = <0>;
|
|
interrupts = <0>;
|
|
};
|
|
|
|
switchphy1: ethernet-phy@1 {
|
|
reg = <1>;
|
|
interrupts = <1>;
|
|
};
|
|
|
|
switchphy2: ethernet-phy@2 {
|
|
reg = <2>;
|
|
interrupts = <2>;
|
|
};
|
|
|
|
switchphy3: ethernet-phy@3 {
|
|
reg = <3>;
|
|
interrupts = <3>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&pcie {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&pciem1_pins>;
|
|
reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
|
|
vpcie3v3-supply = <&vcc3v3_mkey>;
|
|
status = "okay";
|
|
};
|
|
|
|
&pinctrl {
|
|
ethernet {
|
|
gmac1_rstn_l: gmac1-rstn-l {
|
|
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
gpio_8367_en: gpio-8367-en {
|
|
rockchip,pins = <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
rtl8367rb_eint: rtl8367rb-eint {
|
|
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
gpio-keys {
|
|
gpio0_a0_user: gpio0-a0-user {
|
|
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
lan1_led_g: lan1-led-g {
|
|
rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
lan2_led_g: lan2-led-g {
|
|
rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
lan3_led_g: lan3-led-g {
|
|
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
sys_led_g: sys-led-g {
|
|
rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
|
|
wan_led_g: wan-led-g {
|
|
rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
|
|
pcie {
|
|
mkey_pwr_en: mkey-pwr-en {
|
|
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
|
|
pmic {
|
|
pmic_int: pmic-int {
|
|
rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
rtc {
|
|
rtc_int_l: rtc-int-l {
|
|
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
sdmmc {
|
|
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
|
|
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
|
|
usb {
|
|
usb_host_en: usb-host-en {
|
|
rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&saradc {
|
|
vref-supply = <&vcc_1v8>;
|
|
status = "okay";
|
|
};
|
|
|
|
&sdhci {
|
|
bus-width = <8>;
|
|
cap-mmc-highspeed;
|
|
mmc-hs200-1_8v;
|
|
no-sd;
|
|
no-sdio;
|
|
non-removable;
|
|
vmmc-supply = <&vcc_3v3>;
|
|
vqmmc-supply = <&vcc1v8_emmc>;
|
|
status = "fail";
|
|
};
|
|
|
|
&sdmmc {
|
|
bus-width = <4>;
|
|
cap-mmc-highspeed;
|
|
cap-sd-highspeed;
|
|
disable-wp;
|
|
sd-uhs-sdr104;
|
|
vmmc-supply = <&vcc_3v3>;
|
|
vqmmc-supply = <&vccio_sd>;
|
|
status = "okay";
|
|
};
|
|
|
|
&uart0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart0m0_xfer>;
|
|
status = "okay";
|
|
};
|