492 lines
8.3 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
* Copyright (c) 2024 Radxa Limited
*
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/rk-input.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3528.dtsi"
#include "rk3528-linux.dtsi"
/ {
model = "Radxa E20C";
compatible = "radxa,e20c", "radxa,rock-2", "rockchip,rk3528a";
/delete-node/ chosen;
aliases {
mmc0 = &sdmmc;
mmc1 = &sdhci;
mmc2 = &sdio0;
};
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
vdd_0v9_s3: vdd-0v9-s3 {
compatible = "regulator-fixed";
regulator-name = "vdd_0v9_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
vin-supply = <&vcc5v0_sys>;
};
vcc_3v3_s3: vcc-3v3-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc5v0_sys>;
};
vdd_1v8_s3: vdd-1v8-s3 {
compatible = "regulator-fixed";
regulator-name = "vdd_1v8_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_3v3_s3>;
};
vcc_ddr_s3: vcc-ddr-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_ddr_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
vin-supply = <&vcc5v0_sys>;
};
vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_host";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>;
};
vcc5v0_otg: vcc5v0-otg-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_otg";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
vdd_gpu: vdd_logic: vdd-logic {
compatible = "pwm-regulator";
pwms = <&pwm2 0 5000 1>;
regulator-name = "vdd_logic";
regulator-min-microvolt = <705000>;
regulator-max-microvolt = <1006000>;
regulator-init-microvolt = <900000>;
regulator-always-on;
regulator-boot-on;
regulator-settling-time-up-us = <250>;
pwm-supply = <&vcc5v0_sys>;
status = "okay";
};
vdd_cpu: vdd-cpu {
compatible = "pwm-regulator";
pwms = <&pwm1 0 5000 1>;
regulator-name = "vdd_cpu";
regulator-min-microvolt = <746000>;
regulator-max-microvolt = <1201000>;
regulator-init-microvolt = <953000>;
regulator-always-on;
regulator-boot-on;
regulator-settling-time-up-us = <250>;
pwm-supply = <&vcc5v0_sys>;
status = "okay";
};
vccio_sd: vccio-sd {
compatible = "regulator-gpio";
regulator-name = "vccio_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
states = <1800000 0x0
3300000 0x1>;
};
vcc_sd: vcc-sd {
compatible = "regulator-fixed";
regulator-name = "vcc_sd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_3v3_s3>;
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&user_key>;
autorepeat;
user-key {
label = "KEY F15";
linux,code = <KEY_F15>;
gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
debounce-interval = <100>;
};
};
gpio_leds: gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
sys-led {
gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
};
wan-led {
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "netdev";
};
lan-led {
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "netdev";
};
};
};
&pwm1 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
&crypto {
status = "okay";
};
&dfi {
status = "okay";
};
&dmc {
center-supply = <&vdd_logic>;
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&gpu_bus {
bus-supply = <&vdd_logic>;
status = "okay";
};
&display_subsystem {
status = "okay";
};
&iep {
status = "okay";
};
&iep_mmu {
status = "okay";
};
&jpegd {
status = "okay";
};
&jpegd_mmu {
status = "okay";
};
&mpp_srv {
status = "okay";
};
&rga2 {
status = "okay";
};
&rga2_mmu {
status = "okay";
};
&rkvdec {
status = "okay";
};
&rkvdec_mmu {
status = "okay";
};
&rkvenc {
status = "okay";
};
&rkvenc_mmu {
status = "okay";
};
&rkvtunnel {
status = "okay";
};
&rockchip_suspend {
status = "okay";
rockchip,sleep-debug-en = <1>;
rockchip,virtual-poweroff = <1>;
rockchip,sleep-mode-config = <
(0
| RKPM_SLP_ARMPD
)
>;
rockchip,wakeup-config = <
(0
| RKPM_CPU0_WKUP_EN
| RKPM_GPIO_WKUP_EN
)
>;
rockchip,pwm-regulator-config = <
(0
| RKPM_PWM0_M0_REGULATOR_EN
| RKPM_PWM1_M0_REGULATOR_EN
)
>;
};
&vdpp {
status = "okay";
};
&vdpu {
status = "okay";
};
&vdpu_mmu {
status = "okay";
};
&vop {
status = "okay";
};
&vop_mmu {
status = "okay";
};
&tsadc {
status = "okay";
};
&saradc {
status = "okay";
vref-supply = <&vdd_1v8_s3>;
};
&avsd {
status = "okay";
};
&sdhci {
bus-width = <8>;
no-sd;
no-sdio;
non-removable;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
max-frequency = <200000000>;
status = "okay";
};
&sdmmc {
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
max-frequency = <150000000>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
rockchip,default-sample-phase = <90>;
supports-sd;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
vqmmc-supply = <&vccio_sd>;
vmmc-supply = <&vcc_sd>;
status = "okay";
};
&gmac1 {
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
tx_delay = <0x30>;
/* rx_delay = <0x3f>; */
pinctrl-names = "default";
pinctrl-0 = <&rgmii_miim
&rgmii_tx_bus2
&rgmii_rx_bus2
&rgmii_rgmii_clk
&rgmii_rgmii_bus>;
phy-handle = <&rgmii_phy>;
status = "okay";
};
&mdio1 {
rgmii_phy: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
};
};
&combphy_pu {
status = "okay";
};
&u2phy_host {
phy-supply = <&vcc5v0_host>;
status = "okay";
};
&u2phy_otg {
vbus-supply = <&vcc5v0_otg>;
status = "okay";
};
&usb2phy {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usbdrd30 {
status = "okay";
};
&usbdrd_dwc3 {
extcon = <&usb2phy>;
phys = <&u2phy_otg>;
phy-names = "usb2-phy";
maximum-speed = "high-speed";
snps,dis_u2_susphy_quirk;
snps,usb2-lpm-disable;
status = "okay";
};
&pcie2x1 {
reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
status = "okay";
pcie@0,0 {
reg = <0x000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
pcie_eth:pcie-eth@10,0 {
compatible = "pci10ec,8168";
reg = <0x000000 0 0 0 0>;
realtek,led-data = <0x007f>;
};
};
};
&i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0m1_xfer>;
hym8563: hym8563@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "hym8563";
pinctrl-names = "default";
pinctrl-0 = <&hym8563_int>;
interrupt-parent = <&gpio4>;
interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
wakeup-source;
};
};
&i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c1m0_xfer>;
eeprom: bl24c16@50 {
status = "okay";
compatible = "atmel,24c16";
reg = <0x50>;
pagesize = <16>;
};
};
&pinctrl {
usb {
vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
hym8563 {
hym8563_int: hym8563-int {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
keys {
user_key: user-key {
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};