// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd * Copyright (c) 2024 Radxa Limited * Copyright (c) 2024 Yao Zi */ /dts-v1/; #include #include #include "rk3528.dtsi" / { model = "Radxa E20C"; compatible = "radxa,e20c", "rockchip,rk3528"; aliases { mmc0 = &sdhci; }; 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 = ; press-threshold-microvolt = <0>; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&user_key>; button-user { gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; label = "USER"; linux,code = ; wakeup-source; }; }; leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&lan_led_g>, <&sys_led_g>, <&wan_led_g>; led-lan { color = ; default-state = "off"; function = LED_FUNCTION_LAN; gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev"; }; led-sys { color = ; default-state = "on"; function = LED_FUNCTION_HEARTBEAT; gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; }; led-wan { color = ; default-state = "off"; function = LED_FUNCTION_WAN; gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev"; }; }; vcc_1v8: regulator-1v8-vcc { compatible = "regulator-fixed"; regulator-name = "vcc_1v8"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; vin-supply = <&vcc_3v3>; }; vcc_3v3: regulator-3v3-vcc { compatible = "regulator-fixed"; regulator-name = "vcc_3v3"; regulator-always-on; regulator-boot-on; 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>; }; }; &pinctrl { gpio-keys { user_key: user-key { rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; }; }; leds { lan_led_g: lan-led-g { rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; }; sys_led_g: sys-led-g { rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; }; wan_led_g: wan-led-g { rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; }; &saradc { vref-supply = <&vcc_1v8>; status = "okay"; }; &sdhci { bus-width = <8>; cap-mmc-highspeed; no-sd; no-sdio; non-removable; vmmc-supply = <&vcc_3v3>; vqmmc-supply = <&vcc_1v8>; status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0m0_xfer>; status = "okay"; };