3 Commits

Author SHA1 Message Date
zhangpeng
56d22159eb 耐辐照相机,已经注释掉一些不用的串口 2025-07-21 09:33:56 +08:00
zhangpeng
af654bb685 usb3.0 2025-06-24 17:27:05 +08:00
zhangpeng
0ae4e1e318 已经全部测试完成 2025-04-28 13:38:54 +08:00
7 changed files with 309 additions and 275 deletions

View File

@@ -34,10 +34,9 @@ deps_arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dtb := \
arch/arm64/boot/dts/rockchip/rk3588/../rk3588-linux.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-tp-i2c6-gt911.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rpdzkj_config.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-usb-host.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-usb-typec-rk3588.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-eth-gmac0.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-eth-gmac1.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-pcie-power-rk3588.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-lcd-hdmi1.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dtb: $(deps_arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dtb)

View File

@@ -30,8 +30,7 @@ dr4-rk3588.o: arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts \
arch/arm64/boot/dts/rockchip/rk3588/../rk3588-linux.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-tp-i2c6-gt911.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rpdzkj_config.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-usb-host.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-usb-typec-rk3588.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-eth-gmac0.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-eth-gmac1.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-pcie-power-rk3588.dtsi \
arch/arm64/boot/dts/rockchip/rk3588/rp-lcd-hdmi1.dtsi

View File

@@ -1,6 +1,6 @@
# 0 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts"
@@ -10674,7 +10674,7 @@
};
};
};
# 6888 "arch/arm64/boot/dts/rockchip/rk3588/../rk3588s.dtsi" 2
# 6887 "arch/arm64/boot/dts/rockchip/rk3588/../rk3588s.dtsi" 2
# 8 "arch/arm64/boot/dts/rockchip/rk3588/../rk3588.dtsi" 2
# 1 "arch/arm64/boot/dts/rockchip/rk3588/../rk3588-vccio3-pinctrl.dtsi" 1
@@ -14557,74 +14557,183 @@
# 9 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts" 2
# 1 "arch/arm64/boot/dts/rockchip/rk3588/rp-usb-typec-rk3588.dtsi" 1
# 1 "arch/arm64/boot/dts/rockchip/rk3588/rp-usb-host.dtsi" 1
/ {
vbus5v0_typec: vbus5v0-typec {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio1 2 0>;
vin-supply = <&vcc5v0_usb>;
pinctrl-names = "default";
pinctrl-0 = <&typec5v_pwren>;
};
&u2phy2 {
status = "okay";
};
&u2phy3 {
status = "okay";
vcc5v0_host: vcc5v0-host {
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 8 0>;
vin-supply = <&vcc5v0_usb>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>;
};
};
&u2phy2_host {
&i2c4 {
status = "okay";
};
pinctrl-names = "default";
pinctrl-0 = <&i2c4m1_xfer>;
&u2phy3_host {
usbc0: fusb302@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio0>;
interrupts = <27 8>;
pinctrl-names = "default";
pinctrl-0 = <&usbc0_int>;
vbus-supply = <&vbus5v0_typec>;
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
&usb_host0_ohci {
status = "okay";
};
port@0 {
reg = <0>;
usbc0_role_sw: endpoint@0 {
remote-endpoint = <&dwc3_0_role_switch>;
};
};
};
&usb_host1_ehci {
status = "okay";
};
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 =
<(((0) << 30) | ((1 << 26)) | ((((5000) / 50) & 0x3ff) << 10) | ((((1000) / 10) & 0x3ff) << 0))>;
source-pdos =
<(((0) << 30) | ((1 << 26)) | ((((5000) / 50) & 0x3ff) << 10) | ((((3000) / 10) & 0x3ff) << 0))>;
&usb_host1_ohci {
status = "okay";
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>;
};
};
};
};
};
};
&usbdp_phy0 {
orientation-switch;
svid = <0xff01>;
sbu1-dc-gpios = <&gpio3 28 0>;
sbu2-dc-gpios = <&gpio3 29 0>;
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>;
};
};
};
&usbdrd_dwc3_0 {
dr_mode = "host";
usb-role-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
dwc3_0_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&u2phy1_otg {
phy-supply = <&vcc5v0_host>;
};
&combphy2_psu {
status = "okay";
};
&usbhost3_0 {
status = "okay";
};
&usbhost_dwc3_0 {
dr_mode = "host";
status = "okay";
};
&usbdrd_dwc3_0 {
extcon=<&u2phy0>;
status="okay";
};
&pinctrl {
usb-typec {
usbc0_int: usbc0-int {
rockchip,pins = <0 27 0 &pcfg_pull_up>;
};
&u2phy0 {
status = "okay";
};
typec5v_pwren: typec5v-pwren {
rockchip,pins = <1 2 0 &pcfg_pull_none>;
};
&usbdrd_dwc3_1 {
extcon=<&u2phy1>;
status="okay";
};
usb {
vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <4 3 0 &pcfg_pull_none>;
};
};
};
# 12 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts" 2
&u2phy1 {
status = "okay";
};
# 13 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts" 2
@@ -14699,45 +14808,6 @@
status = "okay";
};
# 18 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts" 2
# 1 "arch/arm64/boot/dts/rockchip/rk3588/rp-pcie-power-rk3588.dtsi" 1
/ {
pcie20_avdd0v85: pcie20-avdd0v85 {
compatible = "regulator-fixed";
regulator-name = "pcie20_avdd0v85";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <850000>;
vin-supply = <&vdd_0v85_s0>;
};
pcie20_avdd1v8: pcie20-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "pcie20_avdd1v8";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&avcc_1v8_s0>;
};
vcc3v3_pcie30: vcc3v3-pcie30 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie30";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpios = <&gpio4 5 0>;
startup-delay-us = <5000>;
vin-supply = <&vcc12v_dcin>;
};
};
# 21 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts" 2
# 64 "arch/arm64/boot/dts/rockchip/rk3588/dr4-rk3588.dts"
# 1 "arch/arm64/boot/dts/rockchip/rk3588/rp-lcd-hdmi1.dtsi" 1
&hdmi1 {
@@ -14811,14 +14881,14 @@
gpio_function = <4>;
};
usb-hub-reset {
gpio_num = <&gpio3 10 0>;
gpio_function = <4>;
};
};
rp_gpio{
status = "disabled";
status = "okay";
compatible = "rp_gpio";
gpio3c7 {
@@ -14828,89 +14898,77 @@
};
};
&uart0 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart0m0_xfer>;
};
&uart1 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart1m1_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart3 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart3m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart4 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart4m1_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart5 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart5m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart6 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart6m2_xfer>;
};
&uart7 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart7m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
pinctrl-0 = <&uart7m1_xfer>;
};
&uart8 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart8m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart9 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart9m2_xfer>;
};
&can0 {
assigned-clocks = <&cru 112>;
assigned-clock-rates = <200000000>;
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can0m0_pins>;
};
&can1 {
assigned-clocks = <&cru 114>;
assigned-clock-rates = <200000000>;
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can1m1_pins>;
};
&spi3 {
status = "okay";
pinctrl-0 = <&spi3m1_pins &spi3m1_cs1>;
spi3_dev@0 {
compatible = "rockchip,spidev";
reg = <0>;
spi-max-frequency = <12000000>;
spi-lsb-first;
};
};
&i2c4 {
status = "disabled";
pinctrl-names = "default";
@@ -14931,8 +14989,9 @@
};
&sdmmc {
status = "disabled";
status = "okay";
};
&fiq_debugger {
@@ -14951,19 +15010,3 @@ clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll";
&hdptxphy_hdmi_clk1 {
status = "okay";
};
&pwm0 {
status = "okay";
compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
pinctrl-names = "active";
pinctrl-0 = <&pwm0m2_pins>;
#pwm-cells = <3>;
};
&pwm13 {
status = "okay";
compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
pinctrl-names = "active";
pinctrl-0 = <&pwm13m2_pins>;
#pwm-cells = <3>;
};

Binary file not shown.

View File

@@ -8,8 +8,8 @@
#include "rpdzkj_config.dtsi"
/* usb */
// #include "rp-usb-typec-rk3588.dtsi"
#include "rp-usb-host.dtsi"
#include "rp-usb-typec-rk3588.dtsi"
// #include "rp-usb-host.dtsi"
/* ethernet */
// #include "rp-eth-pcie2gmac-rk3588.dtsi"
@@ -17,7 +17,7 @@
#include "rp-eth-gmac1.dtsi"
/* pcie */
#include "rp-pcie-power-rk3588.dtsi"
// #include "rp-pcie-power-rk3588.dtsi"
// #include "rp-pcie3.dtsi" //need comment when use board of make it youself,and remove the pcie function
// #include "rp-pcie-5g.dtsi"
@@ -144,14 +144,14 @@
gpio_function = <4>;
};
// usb-hub-reset {
// gpio_num = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
// gpio_function = <4>;
// };
usb-hub-reset {
gpio_num = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
gpio_function = <4>;
};
};
rp_gpio{
status = "disabled";
status = "okay";
compatible = "rp_gpio";
gpio3c7 {
@@ -161,89 +161,77 @@
};
};
&uart0 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart0m0_xfer>;
};
&uart1 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart1m1_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart3 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart3m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart4 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart4m1_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart5 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart5m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart6 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart6m2_xfer>;
};
&uart7 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart7m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
pinctrl-0 = <&uart7m1_xfer>;
};
&uart8 {
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart8m0_xfer>;
fifo-depth =<4096>;
rx-fifo-depth =<2048>;
tx-fifo-depth =<2048>;
dma-names = "tx", "rx";
};
&uart9 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&uart9m2_xfer>;
};
&can0 {
assigned-clocks = <&cru CLK_CAN0>;
assigned-clock-rates = <200000000>;
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can0m0_pins>;
};
&can1 {
assigned-clocks = <&cru CLK_CAN1>;
assigned-clock-rates = <200000000>;
status = "okay";
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&can1m1_pins>;
};
&spi3 {
status = "okay";
pinctrl-0 = <&spi3m1_pins &spi3m1_cs1>;
spi3_dev@0 {
compatible = "rockchip,spidev";
reg = <0>;
spi-max-frequency = <12000000>;
spi-lsb-first;
};
};
&i2c4 {
status = "disabled";
pinctrl-names = "default";
@@ -264,8 +252,9 @@
};
&sdmmc {
status = "disabled";
status = "okay";
};
&fiq_debugger {
@@ -284,19 +273,3 @@ clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll";
&hdptxphy_hdmi_clk1 {
status = "okay";
};
&pwm0 {
status = "okay";
compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
pinctrl-names = "active";
pinctrl-0 = <&pwm0m2_pins>; // 选择 PWM1 的引脚复用
#pwm-cells = <3>;
};
&pwm13 {
status = "okay";
compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
pinctrl-names = "active";
pinctrl-0 = <&pwm13m2_pins>; // 选择 PWM1 的引脚复用和UART1 M1引脚冲突了
#pwm-cells = <3>;
};

View File

@@ -39,27 +39,10 @@
&usbhost3_0 {
status = "okay";
status = "disabled";
};
&usbhost_dwc3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
extcon=<&u2phy0>;
status="okay";
};
&u2phy0 {
status = "okay";
};
&usbdrd_dwc3_1 {
extcon=<&u2phy1>;
status="okay";
};
&u2phy1 {
status = "okay";
};

View File

@@ -11,6 +11,20 @@
pinctrl-names = "default";
pinctrl-0 = <&typec5v_pwren>;
};
vcc5v0_host: vcc5v0-host {
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_PB0 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_usb>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>;
};
};
@@ -111,7 +125,7 @@
&usbdrd_dwc3_0 {
dr_mode = "otg";
dr_mode = "host";
usb-role-switch;
port {
#address-cells = <1>;
@@ -123,6 +137,24 @@
};
};
&u2phy1_otg {
phy-supply = <&vcc5v0_host>;
};
// 使能USB3.1/SATA/PCIe Combo PHY
&combphy2_psu {
status = "okay";
};
// 配置USB3.1 HOST2 Controller
&usbhost3_0 {
status = "okay";
};
&usbhost_dwc3_0 {
dr_mode = "host";
status = "okay";
};
&pinctrl {
usb-typec {
usbc0_int: usbc0-int {
@@ -134,4 +166,9 @@
};
};
usb {
vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};