20240926给荣品RD-RK3588-AHD开发板刷Rockchip原厂的Buildroot的EVB4方案【通过HDMI0显示】
2024/9/26 15:15
1、由于荣品RD-RK3588-AHD开发板没有HDMI1部分,因此拿掉了HDMI1的配置部分:
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rk3588s-evb4-lp4x-v10-linux.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
/dts-v1/;
#include "rk3588s-evb4-lp4x.dtsi"
#include "rk3588-linux.dtsi"
/ {
model = "Rockchip RK3588S EVB4 LP4X V10 Board";
compatible = "rockchip,rk3588s-evb4-lp4x-v10", "rockchip,rk3588";
};
// rp
&hdmi0 {
status = "okay";
};
&hdmi0_in_vp0 {
status = "okay";
};
&hdmi0_sound {
status = "okay";
};
&i2s5_8ch {
status = "okay";
};
&hdptxphy_hdmi0 {
status = "okay";
};
&route_hdmi0 {
status = "okay";
connect = <&vp0_out_hdmi0>;
};
// rp
&display_subsystem {
clocks = <&hdptxphy_hdmi_clk0>;
clock-names = "hdmi0_phy_pll";
};
&hdptxphy_hdmi_clk0 {
status = "okay";
};
//&hdptxphy_hdmi_clk1 {
// status = "okay";
//};
原始代码源自:
【HDMI0显示部分】
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rp-lcd-hdmi0.dtsi
&hdmi0 {
status = "okay";
};
&hdmi0_in_vp0 {
status = "okay";
};
&hdmi0_sound {
status = "okay";
};
&i2s5_8ch {
status = "okay";
};
&hdptxphy_hdmi0 {
status = "okay";
};
&route_hdmi0 {
status = "okay";
connect = <&vp0_out_hdmi0>;
};
【配置HDMI0的显示域】
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rd-rk3588s-ahd.dts
&display_subsystem {
clocks = <&hdptxphy_hdmi_clk0>, <&hdptxphy_hdmi_clk1>;
clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll";
};
&hdptxphy_hdmi_clk0 {
status = "okay";
};
&hdptxphy_hdmi_clk1 {
status = "okay";
};
2、【HDMI1部分可选,确认可以不加的】
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rk3588s.dtsi
mclkout_i2s0: mclkout-i2s0@fd58c318 {
compatible = "rockchip,clk-out";
reg = <0 0xfd58c318 0 0x4>;
clocks = <&cru I2S0_8CH_MCLKOUT>;
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
assigned-clock-rates = <22288000>;
#clock-cells = <0>;
clock-output-names = "i2s0_mclkout_to_io";
rockchip,bit-shift = <0>;
rockchip,bit-set-to-disable;
rockchip,clk-ignore-unused; /* for OLD SDK */
};
hdptxphy0: phy@fed60000 {
compatible = "rockchip,rk3588-hdptx-phy";
reg = <0x0 0xfed60000 0x0 0x2000>;
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>;
clock-names = "ref", "apb";
resets = <&cru SRST_P_HDPTX0>, <&cru SRST_HDPTX0_INIT>,
<&cru SRST_HDPTX0_CMN>, <&cru SRST_HDPTX0_LANE>;
reset-names = "apb", "init", "cmn", "lane";
rockchip,grf = <&hdptxphy0_grf>;
#phy-cells = <0>;
status = "disabled";
};
hdptxphy_hdmi0: hdmiphy@fed60000 {
compatible = "rockchip,rk3588-hdptx-phy-hdmi";
reg = <0x0 0xfed60000 0x0 0x2000>;
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>;
clock-names = "ref", "apb";
resets = <&cru SRST_HDPTX0>, <&cru SRST_P_HDPTX0>,
<&cru SRST_HDPTX0_INIT>, <&cru SRST_HDPTX0_CMN>,
<&cru SRST_HDPTX0_LANE>, <&cru SRST_HDPTX0_ROPLL>,
<&cru SRST_HDPTX0_LCPLL>;
reset-names = "phy", "apb", "init", "cmn", "lane", "ropll",
"lcpll";
rockchip,grf = <&hdptxphy0_grf>;
#phy-cells = <0>;
status = "disabled";
hdptxphy_hdmi_clk0: clk-port {
#clock-cells = <0>;
status = "okay";
};
};
hdptxphy_hdmi1: hdmiphy@fed70000 {
compatible = "rockchip,rk3588-hdptx-phy-hdmi";
reg = <0x0 0xfed70000 0x0 0x2000>;
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX1>;
clock-names = "ref", "apb";
resets = <&cru SRST_HDPTX1>, <&cru SRST_P_HDPTX1>,
<&cru SRST_HDPTX1_INIT>, <&cru SRST_HDPTX1_CMN>,
<&cru SRST_HDPTX1_LANE>, <&cru SRST_HDPTX1_ROPLL>,
<&cru SRST_HDPTX1_LCPLL>;
reset-names = "phy", "apb", "init", "cmn", "lane", "ropll",
"lcpll";
rockchip,grf = <&hdptxphy1_grf>;
#phy-cells = <0>;
status = "disabled";
hdptxphy_hdmi_clk1: clk-port {
#clock-cells = <0>;
status = "okay";
};
};
hdptxphy1_grf: syscon@fd5e4000 {
compatible = "rockchip,rk3588-hdptxphy-grf", "syscon";
reg = <0x0 0xfd5e4000 0x0 0x100>;
};
usbdp_phy0: phy@fed80000 {
compatible = "rockchip,rk3588-usbdp-phy";
reg = <0x0 0xfed80000 0x0 0x10000>;
rockchip,u2phy-grf = <&usb2phy0_grf>;
rockchip,usb-grf = <&usb_grf>;
rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
rockchip,vo-grf = <&vo0_grf>;
clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
<&cru CLK_USBDP_PHY0_IMMORTAL>,
<&cru PCLK_USBDPPHY0>,
<&u2phy0>;
clock-names = "refclk", "immortal", "pclk", "utmi";
resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>,
<&cru SRST_USBDP_COMBO_PHY0_CMN>,
<&cru SRST_USBDP_COMBO_PHY0_LANE>,
<&cru SRST_USBDP_COMBO_PHY0_PCS>,
<&cru SRST_P_USBDPPHY0>;
reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
status = "disabled";
usbdp_phy0_dp: dp-port {
#phy-cells = <0>;
status = "disabled";
};
usbdp_phy0_u3: u3-port {
#phy-cells = <0>;
status = "disabled";
};
};
3、【可选】
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rk3588s-evb.dtsi
&sdmmc {
max-frequency = <150000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
sd-uhs-sdr104;
vmmc-supply = <&vcc_3v3_sd_s0>;
vqmmc-supply = <&vccio_sd_s0>;
status = "disabled";
};
修改为:
&sdmmc {
max-frequency = <200000000>;
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";
};
4、【确认可选】电源部分处理:
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rk3588s-evb4-lp4x.dtsi
&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 = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
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 = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
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";
//vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
// compatible = "rockchip,rk8602";
// reg = <0x42>;
// vin-supply = <&vcc5v0_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;
// };
//};
};
&i2c3 {
status = "okay";
es8388: es8388@11 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "everest,es8388", "everest,es8323";
reg = <0x11>;
clocks = <&mclkout_i2s0>;
clock-names = "mclk";
pinctrl-names = "default";
pinctrl-0 = <&i2s0_mclk>;
};
es7202: es7202@32 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_1";
power-supply = <&vcc_1v8_s0>; /* only 1v8 or 3v3, default is 3v3 */
reg = <0x32>;
};
};
&i2c4 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c4m3_xfer>;
gt1x: gt1x@14 {
compatible = "goodix,gt1x";
reg = <0x14>;
pinctrl-names = "default";
pinctrl-0 = <&touch_gpio>;
goodix,rst-gpio = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
goodix,irq-gpio = <&gpio1 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
power-supply = <&vcc3v3_lcd_n>;
};
};
&i2c5 {
status = "okay";
ls_stk3332: light@47 {
compatible = "ls_stk3332";
status = "disabled";
reg = <0x47>;
type = <SENSOR_TYPE_LIGHT>;
irq_enable = <0>;
als_threshold_high = <100>;
als_threshold_low = <10>;
als_ctrl_gain = <2>; /* 0:x1 1:x4 2:x16 3:x64 */
poll_delay_ms = <100>;
};
ps_stk3332: proximity@47 {
compatible = "ps_stk3332";
status = "disabled";
reg = <0x47>;
type = <SENSOR_TYPE_PROXIMITY>;
//pinctrl-names = "default";
//pinctrl-0 = <&gpio3_c6>;
//irq-gpio = <&gpio3 RK_PC6 IRQ_TYPE_LEVEL_LOW>;
//irq_enable = <1>;
ps_threshold_high = <0x200>;
ps_threshold_low = <0x100>;
ps_ctrl_gain = <3>; /* 0:x1 1:x2 2:x5 3:x8 */
ps_led_current = <4>; /* 0:3.125mA 1:6.25mA 2:12.5mA 3:25mA 4:50mA 5:100mA*/
poll_delay_ms = <100>;
};
mpu6500_acc: mpu_acc@68 {
compatible = "mpu6500_acc";
reg = <0x68>;
irq-gpio = <&gpio3 RK_PB4 IRQ_TYPE_EDGE_RISING>;
irq_enable = <0>;
poll_delay_ms = <30>;
type = <SENSOR_TYPE_ACCEL>;
layout = <8>;
};
mpu6500_gyro: mpu_gyro@68 {
compatible = "mpu6500_gyro";
reg = <0x68>;
irq_enable = <0>;
poll_delay_ms = <30>;
type = <SENSOR_TYPE_GYROSCOPE>;
layout = <8>;
};
};
&i2c6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m0_xfer>;
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
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;
};
};
};
&i2c8 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c8m2_xfer>;
usbc0: fusb302@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PC6 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>;
};
};
};
};
};
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 = <&gpio0>;
interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
wakeup-source;
status = "okay";
};
adp5585: mfd-gpio@34 {
compatible = "adi,adp5585";
reg = <0x34>;
status = "okay";
adp5585_gpio: gpio-normal@34 {
compatible = "adp5585-gpio";
gpio-controller;
#gpio-cells = <2>;
};
// adp5585pwm: pwm@34 {
// compatible = "adp5585-pwm";
// #pwm-cells = <3>;
// };
};
};
原始程序来自:
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rp-rk3588s-board.dtsi
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/
/dts-v1/;
/* merage dtsi in rk3588s-evb4-lp4-v10-linux.dts */
#include "dt-bindings/usb/pd.h"
#include "rk3588s.dtsi"
#include "rk3588s-evb.dtsi"
#include "rk3588-rk806-single.dtsi"
#include "rk3588-linux.dtsi"
/ {
model = "Rockchip RK3588S EVB4 LP4X V10 Board";
compatible = "rockchip,rk3588s-evb4-lp4x-v10", "rockchip,rk3588";
};
&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 = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
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 = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
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;
};
};
};
&i2c6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m0_xfer>;
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
compatible = "rockchip,rk8602";
reg = <0x42>;
vin-supply = <&vcc5v0_sys>;
vsel-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
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;
};
};
};
5、【可选==完全一样的】
Z:\rk3588s_20230620\kernel\arch\arm64\boot\dts\rockchip\rk3588s-evb4-lp4x.dtsi
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 = <&vcc5v0_sys>;
};
Z:\rk3588s_20230620\05临时了kernel\arch\arm64\boot\dts\rockchip\rd-rk3588s-ahd.dts
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 = <&vcc5v0_sys>;
};
效果图: