ODROID-M2: Introduce new SBC of Hardkernel based on RK3588S

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: Iff820bee5965eabc0f6354e1e40e094ec3f3e0e0
This commit is contained in:
ckkim
2024-02-27 11:33:19 +09:00
committed by Dongjin Kim
parent f1b684f084
commit d78c47d829
5 changed files with 1506 additions and 0 deletions

View File

@@ -329,4 +329,11 @@ config ARCH_ROCKCHIP_ODROIDM1
This enables support for the board ODROID-M1 of Hardkernel
which is based on ARMv8 SoC of Rockchip, Inc.
config ARCH_ROCKCHIP_ODROIDM2
bool "Hardkernel's ODROID-M2 Single Board Computer"
select ARCH_ROCKCHIP_ODROID_COMMON
help
This enables support for the board ODROID-M2 of Hardkernel
which is based on ARMv8 SoC of Rockchip, Inc.
endmenu

View File

@@ -271,6 +271,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-odroid-m1s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-odroid-m2.dtb
subdir-$(CONFIG_ARCH_ROCKCHIP_ODROIDM1) += overlays/odroidm1
subdir-$(CONFIG_ARCH_ROCKCHIP_ODROIDM1) += overlays/odroidm1s

View File

@@ -0,0 +1,647 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2024 Hardkernel Co., Ltd.
*
*/
#include <dt-bindings/usb/pd.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/input/rk-input.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/sensor-dev.h>
#include "rk3588s.dtsi"
/ {
vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
vcc4v0_sys: vcc4v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc4v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <4800000>;
regulator-max-microvolt = <4800000>;
vin-supply = <&vcc12v_dcin>;
};
vcca: vcca-in {
compatible = "regulator-fixed";
regulator-name = "vcca";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
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>;
enable-active-high;
gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc12v_dcin>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_pwren>;
};
vbus5v0_typec: vbus5v0-typec {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
pinctrl-names = "default";
pinctrl-0 = <&typec5v_pwren>;
};
vcc5v0_u2host: vcc5v0-u2host {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_u2host";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_u2host_en>;
};
vcc5v0_u3host: vcc5v0-u3host {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_u3host";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_u3host_en>;
};
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v1_nldo_s3";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
vin-supply = <&vcc4v0_sys>;
};
vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_sd_s0";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_3v3_s3>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_lcd: vcc3v3-lcd0-n {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_lcd";
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_pwren_en>;
vin-supply = <&vcc_3v3_s3>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
};
vcc3v3_pcie: vcc3v3-pcie20 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
vin-supply = <&vcc_3v3_s3>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_pwren>;
};
combophy_avdd0v85: combophy-avdd0v85 {
compatible = "regulator-fixed";
regulator-name = "combophy_avdd0v85";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <850000>;
vin-supply = <&vdd_0v85_s0>;
};
combophy_avdd1v8: combophy-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "combophy_avdd1v8";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&avcc_1v8_s0>;
};
};
&spi2 {
status = "okay";
assigned-clocks = <&cru CLK_SPI2>;
assigned-clock-rates = <200000000>;
pinctrl-names = "default";
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
num-cs = <1>;
rk806single: rk806single@0 {
compatible = "rockchip,rk806";
spi-max-frequency = <1000000>;
reg = <0x0>;
interrupt-parent = <&gpio0>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default", "pmic-power-off";
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
pinctrl-1 = <&rk806_dvs1_pwrdn>;
/* 2800mv-3500mv */
low_voltage_threshold = <3000>;
/* 2700mv-3400mv */
shutdown_voltage_threshold = <2700>;
/* 140 160 */
shutdown_temperture_threshold = <160>;
hotdie_temperture_threshold = <115>;
/* 0: restart PMU;
* 1: reset all the power off reset registers,
* forcing the state to switch to ACTIVE mode;
* 2: Reset all the power off reset registers,
* forcing the state to switch to ACTIVE mode,
* and simultaneously pull down the RESETB PIN for 5mS before releasing
*/
pmic-reset-func = <1>;
vcc1-supply = <&vcc4v0_sys>;
vcc2-supply = <&vcc4v0_sys>;
vcc3-supply = <&vcc4v0_sys>;
vcc4-supply = <&vcc4v0_sys>;
vcc5-supply = <&vcc4v0_sys>;
vcc6-supply = <&vcc4v0_sys>;
vcc7-supply = <&vcc4v0_sys>;
vcc8-supply = <&vcc4v0_sys>;
vcc9-supply = <&vcc4v0_sys>;
vcc10-supply = <&vcc4v0_sys>;
vcc11-supply = <&vcc_2v0_pldo_s3>;
vcc12-supply = <&vcc4v0_sys>;
vcc13-supply = <&vcc_1v1_nldo_s3>;
vcc14-supply = <&vcc_1v1_nldo_s3>;
vcca-supply = <&vcca>;
pwrkey {
status = "okay";
};
pinctrl_rk806: pinctrl_rk806 {
gpio-controller;
#gpio-cells = <2>;
rk806_dvs1_null: rk806_dvs1_null {
pins = "gpio_pwrctrl2";
function = "pin_fun0";
};
rk806_dvs1_slp: rk806_dvs1_slp {
pins = "gpio_pwrctrl1";
function = "pin_fun1";
};
rk806_dvs1_pwrdn: rk806_dvs1_pwrdn {
pins = "gpio_pwrctrl1";
function = "pin_fun2";
};
rk806_dvs1_rst: rk806_dvs1_rst {
pins = "gpio_pwrctrl1";
function = "pin_fun3";
};
rk806_dvs2_null: rk806_dvs2_null {
pins = "gpio_pwrctrl2";
function = "pin_fun0";
};
rk806_dvs2_slp: rk806_dvs2_slp {
pins = "gpio_pwrctrl2";
function = "pin_fun1";
};
rk806_dvs2_pwrdn: rk806_dvs2_pwrdn {
pins = "gpio_pwrctrl2";
function = "pin_fun2";
};
rk806_dvs2_rst: rk806_dvs2_rst {
pins = "gpio_pwrctrl2";
function = "pin_fun3";
};
rk806_dvs2_dvs: rk806_dvs2_dvs {
pins = "gpio_pwrctrl2";
function = "pin_fun4";
};
rk806_dvs2_gpio: rk806_dvs2_gpio {
pins = "gpio_pwrctrl2";
function = "pin_fun5";
};
rk806_dvs3_null: rk806_dvs3_null {
pins = "gpio_pwrctrl3";
function = "pin_fun0";
};
rk806_dvs3_slp: rk806_dvs3_slp {
pins = "gpio_pwrctrl3";
function = "pin_fun1";
};
rk806_dvs3_pwrdn: rk806_dvs3_pwrdn {
pins = "gpio_pwrctrl3";
function = "pin_fun2";
};
rk806_dvs3_rst: rk806_dvs3_rst {
pins = "gpio_pwrctrl3";
function = "pin_fun3";
};
rk806_dvs3_dvs: rk806_dvs3_dvs {
pins = "gpio_pwrctrl3";
function = "pin_fun4";
};
rk806_dvs3_gpio: rk806_dvs3_gpio {
pins = "gpio_pwrctrl3";
function = "pin_fun5";
};
};
regulators {
vdd_gpu_s0: vdd_gpu_mem_s0: DCDC_REG1 {
regulator-boot-on;
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_gpu_s0";
regulator-enable-ramp-delay = <400>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: DCDC_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_cpu_lit_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_log_s0: DCDC_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <675000>;
regulator-max-microvolt = <750000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_log_s0";
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <750000>;
};
};
vdd_vdenc_s0: vdd_vdenc_mem_s0: DCDC_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-init-microvolt = <750000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_vdenc_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_ddr_s0: DCDC_REG5 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <675000>;
regulator-max-microvolt = <900000>;
regulator-init-microvolt = <850000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_ddr_s0";
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <850000>;
};
};
vdd2_ddr_s3: DCDC_REG6 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vdd2_ddr_s3";
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_2v0_pldo_s3: DCDC_REG7 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>;
regulator-name = "vdd_2v0_pldo_s3";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <2000000>;
};
};
vcc_3v3_s3: DCDC_REG8 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc_3v3_s3";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vddq_ddr_s0: DCDC_REG9 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vddq_ddr_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v8_s3: DCDC_REG10 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_1v8_s3";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
avcc_1v8_s0: PLDO_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "avcc_1v8_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v8_s0: PLDO_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_1v8_s0";
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
avdd_1v2_s0: PLDO_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-name = "avdd_1v2_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v3_s0: PLDO_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc_3v3_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vccio_sd_s0: PLDO_REG5 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vccio_sd_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
pldo6_s3: PLDO_REG6 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "pldo6_s3";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vdd_0v75_s3: NLDO_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <750000>;
regulator-name = "vdd_0v75_s3";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <750000>;
};
};
vdd_ddr_pll_s0: NLDO_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-name = "vdd_ddr_pll_s0";
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <850000>;
};
};
avdd_0v75_s0: NLDO_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <837500>;
regulator-max-microvolt = <837500>;
regulator-name = "avdd_0v75_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_0v85_s0: NLDO_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <850000>;
regulator-name = "vdd_0v85_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_0v75_s0: NLDO_REG5 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <750000>;
regulator-name = "vdd_0v75_s0";
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
};
};
&i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc4v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_cpu_big0_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
compatible = "rockchip,rk8603";
reg = <0x43>;
vin-supply = <&vcc4v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_cpu_big1_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
&i2c2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c2m0_xfer>;
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc4v0_sys>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_npu_s0";
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-boot-on;
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
&pinctrl {
regulators {
vcc5v0_pwren: vcc5v0-pwren {
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_output_high_pull_none>;
};
vcc5v0_u3host_en: vcc5v0-usb3-en {
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
vcc5v0_u2host_en: vcc5v0-usb2-en {
rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
typec5v_pwren: typec5v-pwren {
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
};
lcd_pwren_en: lcd-pwren {
rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
pcie_pwren: pcie-pwren {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

View File

@@ -0,0 +1,24 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2024 Hardkernel Co., Ltd.
*
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588s-odroid-m2-power.dtsi"
#include "rk3588s-odroid-m2.dtsi"
#include "rk3588-linux.dtsi"
/ {
model = "Hardkernel ODROID-M2";
compatible = "hardkernel,odroid-m2", "rockchip,rk3588";
};

View File

@@ -0,0 +1,827 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2024 Hardkernel Co., Ltd.
*
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/input/rk-input.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/sensor-dev.h>
/ {
backlight: backlight {
status = "disabled";
compatible = "pwm-backlight";
pwms = <&pwm14 0 25000 0>;
brightness-levels = <
0 20 20 21 21 22 22 23
23 24 24 25 25 26 26 27
27 28 28 29 29 30 30 31
31 32 32 33 33 34 34 35
35 36 36 37 37 38 38 39
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103
104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135
136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151
152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167
168 169 170 171 172 173 174 175
176 177 178 179 180 181 182 183
184 185 186 187 188 189 190 191
192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223
224 225 226 227 228 229 230 231
232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255
>;
default-brightness-level = <100>;
};
es8316_sound: es8316-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,es8316-codec";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Mic Jack", "Mic Bias",
"MIC2", "Mic Jack",
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR";
simple-audio-card,cpu {
sound-dai = <&i2s0_8ch>;
system-clock-frequency = <11289600>;
};
simple-audio-card,codec {
sound-dai = <&es8316>;
system-clock-frequency = <11289600>;
};
};
fan: pwm-fan {
status = "disabled";
compatible = "pwm-fan";
#cooling-cells = <2>;
pwms = <&pwm0 0 50000 0>;
cooling-levels = <0 50 100 150 200 255>;
rockchip,temp-trips = <
50000 1
55000 2
60000 3
65000 4
70000 5
>;
};
hdmi0_sound: hdmi0-sound {
status = "okay";
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <128>;
rockchip,card-name = "rockchip-hdmi0";
rockchip,cpu = <&i2s5_8ch>;
rockchip,codec = <&hdmi0>;
rockchip,jack-det;
};
leds {
compatible = "gpio-leds";
status = "okay";
red_led: red {
gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};
blue_led: blue {
gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
};
spdif_tx1_dc: spdif-tx1-dc {
status = "disabled";
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
};
spdif_tx1_sound: spdif-tx1-sound {
status = "disabled";
compatible = "simple-audio-card";
simple-audio-card,name = "rockchip,spdif-tx1";
simple-audio-card,mclk-fs = <128>;
simple-audio-card,cpu {
sound-dai = <&spdif_tx1>;
};
simple-audio-card,codec {
sound-dai = <&spdif_tx1_dc>;
};
};
test-power {
status = "disabled";
};
};
&av1d_mmu {
status = "okay";
};
&combphy0_ps {
status = "okay";
};
&combphy2_psu {
status = "okay";
};
&dp0 {
status = "okay";
};
&dp0_in_vp1 {
status = "okay";
};
&cpu_l0 {
cpu-supply = <&vdd_cpu_lit_s0>;
mem-supply = <&vdd_cpu_lit_mem_s0>;
};
&cpu_b0 {
cpu-supply = <&vdd_cpu_big0_s0>;
mem-supply = <&vdd_cpu_big0_mem_s0>;
};
&cpu_b2 {
cpu-supply = <&vdd_cpu_big1_s0>;
mem-supply = <&vdd_cpu_big1_mem_s0>;
};
&dsi0 {
status = "disabled";
dsi0_panel: panel@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
status = "disabled";
backlight = <&backlight>;
power-supply = <&vcc3v3_lcd>;
reset-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_rst_gpio>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
};
};
&dsi1 {
status = "disabled";
};
&gmac_uio1 {
status = "okay";
};
&gmac1 {
status = "okay";
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "input";
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1_miim
&gmac1_clkinout
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
tx_delay = <0x44>;
/* rx_delay = <0x4f>; */
phy-handle = <&rgmii_phy1>;
};
&gpu {
mali-supply = <&vdd_gpu_s0>;
mem-supply = <&vdd_gpu_mem_s0>;
status = "okay";
};
&hdmi0 {
enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&hdmi0_in_vp0 {
status = "okay";
};
&hdptxphy0 {
status = "disabled";
/* Single Vdiff Training Table for power reduction (optional) */
training-table = /bits/ 8 <
/* voltage swing 0, pre-emphasis 0->3 */
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
/* voltage swing 1, pre-emphasis 0->2 */
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
/* voltage swing 2, pre-emphasis 0->1 */
0x0d 0x00 0x00 0x00 0x00 0x00
0x0d 0x00 0x00 0x00 0x00 0x00
/* voltage swing 3, pre-emphasis 0 */
0x0d 0x00 0x00 0x00 0x00 0x00
>;
};
&hdptxphy_hdmi0 {
status = "okay";
};
&i2c7 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c7m0_xfer>;
es8316: es8316@11 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "everest,es8316";
reg = <0x11>;
clocks = <&mclkout_i2s0>;
clock-names = "mclk";
pinctrl-names = "default";
pinctrl-0 = <&i2s0_mclk>;
};
};
&i2c8 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c8m2_xfer>;
clock-frequency = <400000>;
pcf8563: rtc@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
};
touchscreen: touchscreen {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&touch_gpio>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
irq-gpios = <&gpio1 RK_PA3 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
power-supply = <&vcc3v3_lcd>;
};
usbc0: fusb302@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio4>;
interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbc0_int>;
vbus-supply = <&vbus5v0_typec>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc0_role_sw: endpoint@0 {
remote-endpoint = <&dwc3_0_role_switch>;
};
};
};
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "dual";
try-power-role = "sink";
op-sink-microwatt = <1000000>;
sink-pdos =
<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
source-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
altmodes {
#address-cells = <1>;
#size-cells = <0>;
altmode@0 {
reg = <0>;
svid = <0xff01>;
vdo = <0xffffffff>;
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc0_orien_sw: endpoint {
remote-endpoint = <&usbdp_phy0_orientation_switch>;
};
};
port@1 {
reg = <1>;
dp_altmode_mux: endpoint {
remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
};
};
};
};
};
};
&i2s0_8ch {
status = "okay";
pinctrl-0 = <&i2s0_lrck
&i2s0_sclk
&i2s0_sdi0
&i2s0_sdo0>;
};
&i2s5_8ch {
status = "okay";
};
&iep {
status = "okay";
};
&iep_mmu {
status = "okay";
};
&jpegd {
status = "okay";
};
&jpegd_mmu {
status = "okay";
};
&jpege_ccu {
status = "okay";
};
&jpege0 {
status = "okay";
};
&jpege0_mmu {
status = "okay";
};
&jpege1 {
status = "okay";
};
&jpege1_mmu {
status = "okay";
};
&jpege2 {
status = "okay";
};
&jpege2_mmu {
status = "okay";
};
&jpege3 {
status = "okay";
};
&jpege3_mmu {
status = "okay";
};
&mpp_srv {
status = "okay";
};
&rga3_core0 {
status = "okay";
};
&rga3_0_mmu {
status = "okay";
};
&rga3_core1 {
status = "okay";
};
&rga3_1_mmu {
status = "okay";
};
&rga2 {
status = "okay";
};
&rknpu {
rknpu-supply = <&vdd_npu_s0>;
mem-supply = <&vdd_npu_mem_s0>;
status = "okay";
};
&rknpu_mmu {
status = "okay";
};
&rkvdec_ccu {
status = "okay";
};
&rkvdec0 {
status = "okay";
};
&rkvdec0_mmu {
status = "okay";
};
&rkvdec1 {
status = "okay";
};
&rkvdec1_mmu {
status = "okay";
};
&rkvenc_ccu {
status = "okay";
};
&rkvenc0 {
venc-supply = <&vdd_vdenc_s0>;
mem-supply = <&vdd_vdenc_mem_s0>;
status = "okay";
};
&rkvenc0_mmu {
status = "okay";
};
&rkvenc1 {
venc-supply = <&vdd_vdenc_s0>;
mem-supply = <&vdd_vdenc_mem_s0>;
status = "okay";
};
&rkvenc1_mmu {
status = "okay";
};
&rockchip_suspend {
status = "okay";
rockchip,sleep-debug-en = <1>;
};
&saradc {
status = "okay";
vref-supply = <&vcc_1v8_s0>;
};
&sdhci {
bus-width = <8>;
no-sdio;
no-sd;
non-removable;
max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
full-pwr-cycle-in-suspend;
status = "okay";
};
&sdmmc {
max-frequency = <150000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
card-detect-delay = <800>;
vmmc-supply = <&vcc_3v3_sd_s0>;
vqmmc-supply = <&vccio_sd_s0>;
status = "okay";
};
&mdio1 {
rgmii_phy1: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
};
};
&mipi_dcphy0 {
status = "disabled";
};
&mipi_dcphy1 {
status = "disabled";
};
&pcie2x1l1 {
status = "disabled";
};
&pcie2x1l2 {
reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
rockchip,skip-scan-in-resume;
status = "okay";
};
&pinctrl {
headphone {
hp_det: hp-det {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
lcd {
lcd_rst_gpio: lcd-rst-gpio {
rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
touch {
touch_gpio: touch-gpio {
rockchip,pins =
<1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>,
<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb-typec {
usbc0_int: usbc0-int {
rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0m2_pins>;
};
&pwm14 {
status = "disabled";
pinctrl-0 = <&pwm14m1_pins>;
};
&route_dsi0 {
status = "disabled";
connect = <&vp3_out_dsi0>;
};
&route_dsi1 {
status = "disabled";
connect = <&vp3_out_dsi1>;
};
&route_hdmi0 {
status = "okay";
connect = <&vp0_out_hdmi0>;
};
&route_dp0 {
status = "okay";
connect = <&vp1_out_dp0>;
};
&spdif_tx1 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&spdif1m1_tx>;
};
&tsadc {
status = "okay";
};
&u2phy0 {
status = "okay";
};
&u2phy2 {
status = "okay";
};
&u2phy3 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
rockchip,typec-vbus-det;
rockchip,sel-pipe-phystatus;
vbus-supply = <&vbus5v0_typec>;
};
&u2phy2_host {
status = "okay";
phy-supply = <&vcc5v0_u2host>;
};
&u2phy3_host {
status = "okay";
phy-supply = <&vcc5v0_u3host>;
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usbhost3_0 {
status = "okay";
};
&usbhost_dwc3_0 {
status = "okay";
};
&usbdp_phy0 {
status = "okay";
orientation-switch;
svid = <0xff01>;
sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy0_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
usbdp_phy0_dp_altmode_mux: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_altmode_mux>;
};
};
};
&usbdp_phy0_dp {
status = "okay";
};
&usbdp_phy0_u3 {
status = "okay";
};
&usbdrd3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
dr_mode = "otg";
status = "okay";
usb-role-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
dwc3_0_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&vdpu {
status = "okay";
};
&vdpu_mmu {
status = "okay";
};
&vepu {
status = "okay";
};
&vop {
status = "okay";
};
&vop_mmu {
status = "okay";
};
&vp0 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART0>;
};
&vp1 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART1>;
};
&vp2 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART2>;
};
&vp3 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART3>;
};