511 lines
8.2 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
* Copyright (c) 2022 Radxa Limited
*
*/
/dts-v1/;
#include "rk3588s-radxa-nx5-module.dtsi"
/ {
model = "Radxa NX5 IO";
compatible = "radxa,nx5-io", "rockchip,rk3588";
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 = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>;
vin-supply = <&vcc5v0_sys>;
};
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;
};
dp0_sound: dp0-sound {
status = "okay";
compatible = "rockchip,hdmi";
rockchip,mclk-fs = <512>;
rockchip,card-name= "rockchip-hdmi1";
rockchip,cpu = <&spdif_tx2>;
rockchip,codec = <&dp0 1>;
rockchip,jack-det;
};
fan0: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
cooling-levels = <0 64 128 192 255>;
pwms = <&pwm12 0 10000 0>;
};
bluetooth_en: bluetooth-en {
compatible = "regulator-fixed";
regulator-name = "bluetooth_en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
enable-active-low;
gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&ble_en>;
vin-supply = <&vcc5v0_sys>;
};
vcc3v3_pcie: vcc3v3-pcie {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
startup-delay-us = <5000>;
vin-supply = <&vcc5v0_sys>;
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led0_en &led1_en>;
pinctrl-names = "default";
state_led {
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
};
};
&pwm12 {
pinctrl-0 = <&pwm12m1_pins>;
status = "okay";
};
&soc_thermal {
sustainable-power = <5000>; /* milliwatts */
cooling-maps {
map4 {
trip = <&target>;
cooling-device =
<&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
map5 {
trip = <&threshold>;
cooling-device =
<&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
};
};
&threshold {
temperature = <60000>;
};
&combphy0_ps {
status = "okay";
};
&pcie2x1l2 {
vpcie3v3-supply = <&vcc3v3_pcie>;
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&combphy2_psu {
status = "okay";
};
&usbhost3_0 {
status = "okay";
};
&usbhost_dwc3_0 {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&u2phy3 {
status = "okay";
};
&u2phy3_host {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&u2phy2 {
status = "okay";
};
&u2phy2_host {
status = "okay";
};
&u2phy0 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
};
&usbdrd3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
status = "okay";
phys = <&u2phy0_otg>;
phy-names = "usb2-phy";
maximum-speed = "high-speed";
extcon = <&u2phy0>;
dr_mode = "host";
/* Fix usb suspend failure */
snps,dis_u3_susphy_quirk;
};
&usbdp_phy0 {
status = "okay";
rockchip,dp-lane-mux = < 0 1 2 3>;
};
&usbdp_phy0_dp {
status = "okay";
};
&dp0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dp0_hpd>;
hpd-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
};
&dp0_in_vp2 {
status = "okay";
};
&route_dp0 {
status = "okay";
connect = <&vp2_out_dp0>;
};
&spdif_tx2 {
status = "okay";
};
&sdhci {
status = "okay";
};
&hdmi0 {
status = "okay";
cec-enable = "true";
};
&hdmi0_in_vp0 {
status = "okay";
};
&route_hdmi0 {
status = "okay";
};
&hdptxphy_hdmi0 {
status = "okay";
};
&i2s5_8ch {
status = "okay";
};
&vdpu {
status = "okay";
};
&vdpu_mmu {
status = "okay";
};
&vop {
status = "okay";
};
&vop_mmu {
status = "okay";
};
&vepu {
status = "okay";
};
&vp0 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER0>;
cursor-win-id = <ROCKCHIP_VOP2_ESMART0>;
};
&vp1 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER1>;
cursor-win-id = <ROCKCHIP_VOP2_ESMART1>;
};
&vp2 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER2>;
cursor-win-id = <ROCKCHIP_VOP2_ESMART2>;
};
&vp3 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER3>;
cursor-win-id = <ROCKCHIP_VOP2_ESMART3>;
};
&display_subsystem {
clocks = <&hdptxphy_hdmi0>;
clock-names = "hdmi0_phy_pll";
};
&hdptxphy_hdmi0 {
status = "okay";
};
&sdmmc {
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
vmmc-supply = <&vcc_3v3_s0>;
vqmmc-supply = <&vccio_sd_s0>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det>;
status = "okay";
};
/* Fix the issue of board howling */
&vdd_cpu_big0_s0 {
regulator-initial-mode = <1>;
};
&vdd_cpu_big1_s0 {
regulator-initial-mode = <1>;
};
&vdd_npu_s0 {
regulator-initial-mode = <1>;
};
&vdd_gpu_s0 {
regulator-initial-mode = <1>;
};
&vdd_cpu_lit_s0 {
regulator-initial-mode = <1>;
};
&vdd_log_s0 {
regulator-initial-mode = <1>;
};
&vdd_vdenc_s0 {
regulator-initial-mode = <1>;
};
&vdd_ddr_s0 {
regulator-initial-mode = <1>;
};
&vdd2_ddr_s3 {
regulator-initial-mode = <1>;
};
&vcc_2v0_pldo_s3 {
regulator-initial-mode = <1>;
};
&vcc_3v3_s3 {
regulator-initial-mode = <1>;
};
&vddq_ddr_s0 {
regulator-initial-mode = <1>;
};
&vcc_1v8_s3 {
regulator-initial-mode = <1>;
};
&pinctrl {
dp {
dp0_hpd: dp0-hpd {
rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb {
vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
bluetooth {
ble_en: ble-en {
rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
led {
led1_en: led1-en {
rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&gpio0 {
gpio-line-names =
/* GPIO0_A0-A3 */
"PIN_31", "", "", "",
/* GPIO0_A4-A7 */
"", "", "", "",
/* GPIO0_B0-B3 */
"PIN_15", "", "", "",
/* GPIO0_B4-B7 */
"", "PIN_8", "PIN_10", "",
/* GPIO0_C0-C3 */
"", "", "", "",
/* GPIO0_C4-C7 */
"", "", "", "",
/* GPIO0_D0-D3 */
"", "", "", "",
/* GPIO0_D4-D7 */
"PIN_3", "PIN_5", "", "";
};
&gpio1 {
gpio-line-names =
/* GPIO1_A0-A3 */
"", "PIN_33", "", "",
/* GPIO1_A4-A7 */
"", "", "", "",
/* GPIO1_B0-B3 */
"", "PIN_21", "PIN_19", "PIN_23",
/* GPIO1_B4-B7 */
"PIN_24", "PIN_26", "", "",
/* GPIO1_C0-C3 */
"PIN_7", "", "", "PIN_12",
/* GPIO1_C4-C7 */
"", "PIN_35", "", "PIN_40",
/* GPIO1_D0-D3 */
"PIN_22", "PIN_37", "PIN_13", "PIN_18",
/* GPIO1_D4-D7 */
"PIN_38", "PIN_16", "", "";
};
&gpio2 {
gpio-line-names =
/* GPIO2_A0-A3 */
"", "", "", "",
/* GPIO2_A4-A7 */
"", "", "", "",
/* GPIO2_B0-B3 */
"", "", "", "",
/* GPIO2_B4-B7 */
"", "", "", "",
/* GPIO2_C0-C3 */
"", "", "", "",
/* GPIO2_C4-C7 */
"", "", "", "",
/* GPIO2_D0-D3 */
"", "", "", "",
/* GPIO2_D4-D7 */
"", "", "", "";
};
&gpio3 {
gpio-line-names =
/* GPIO3_A0-A3 */
"", "", "", "",
/* GPIO3_A4-A7 */
"", "", "", "",
/* GPIO3_B0-B3 */
"", "", "", "",
/* GPIO3_B4-B7 */
"", "", "", "",
/* GPIO3_C0-C3 */
"", "", "", "",
/* GPIO3_C4-C7 */
"", "", "", "",
/* GPIO3_D0-D3 */
"", "", "PIN_11", "PIN_36",
/* GPIO3_D4-D7 */
"", "", "", "";
};
&gpio4 {
gpio-line-names =
/* GPIO4_A0-A3 */
"", "", "", "",
/* GPIO4_A4-A7 */
"", "", "", "",
/* GPIO4_B0-B3 */
"", "", "", "PIN_32",
/* GPIO4_B4-B7 */
"", "", "PIN_29", "",
/* GPIO4_C0-C3 */
"", "", "", "",
/* GPIO4_C4-C7 */
"", "", "", "",
/* GPIO4_D0-D3 */
"", "", "", "",
/* GPIO4_D4-D7 */
"", "", "", "";
};