嵌入式爱好者

OK3588 Type-C USB 2.0 only DTS 配置(无cc芯片)

2024-9-25 15:06| 发布者: hai| 查看: 71| 评论: 0|原作者: hai

类目: 知识库  >  RK3588系列产品     文档编号: 1523

在之后在rk官方手册上看到“Type-C USB 2.0 only DTS 配置(无cc芯片)”的配置,经过修改设备树,测试正常,需要注意的是要自行搭建vbus和cc转USB_ID电路。
如下是软件修改方法:

  diff --git a/arch/arm64/boot/dts/rockchip/OK3588-C-common.dtsi b/arch/arm64/boot/dts/rockchip/OK3588-C-common.dtsi
index f8ced637d..b6780eb5a 100644
--- a/arch/arm64/boot/dts/rockchip/OK3588-C-common.dtsi
+++ b/arch/arm64/boot/dts/rockchip/OK3588-C-common.dtsi

@@ -554,6 +554,10 @@ usbc0_int: usbc0-int {
rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
};

+ sgm7220_irq_n: sgm7220_irq_n{
+ rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
typec5v_pwren0: typec5v-pwren0 {
rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
};
@@ -719,72 +723,6 @@ gt9xx_dsi0: gt9xx@14 {
        status = "okay";
    };

- usbc0: fusb302@22 {
- compatible = "fcs,fusb302";
- reg = <0x22>;
- interrupt-parent = <&gpio1>;
- interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&usbc0_int>;
- vbus-supply = <&vbus5v0_typec0>;
- 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_con0: 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>;
- dp0_altmode_mux: endpoint {
- remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
- };
- };
- };
- };
- };
-
};

&i2c3 {
@@ -950,14 +888,14 @@ &combphy1_ps {

&pcie30phy {
rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
- status = "okay";
+ status = "disabled";
};

&pcie3x4 {
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
memory-region = <&dma_trans>;
vpcie3v3-supply = <&vcc3v3_pcie30>;
- status = "okay";
+ status = "disabled";
};


@@ -1240,6 +1178,7 @@ &sdmmc {
};

&u2phy0 {
+ orientation-switch;
status = "okay";
};

@@ -1256,6 +1195,8 @@ &u2phy3 {
};

&u2phy0_otg {
+ rockchip,sel-pipe-phystatus;
+ rockchip,typec-vbus-det;
status = "okay";
};

@@ -1289,34 +1230,15 @@ &usb_host1_ohci {
};

&usbdp_phy0 {
- status = "okay";
- orientation-switch;
- rockchip,dp-lane-mux = <2 3>;
- svid = <0xff01>;
- sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
- sbu2-dc-gpios = <&gpio4 RK_PB0 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 = <&dp0_altmode_mux>;
- };
- };
+ status = "disabled";
};

&usbdp_phy0_dp {
- status = "okay";
+ status = "disabled";
};

&usbdp_phy0_u3 {
- status = "okay";
+ status = "disabled";
};

&usbdrd3_0 {
@@ -1325,16 +1247,12 @@ &usbdrd3_0 {

&usbdrd_dwc3_0 {
dr_mode = "otg";
- usb-role-switch;
status = "okay";
- port {
- #address-cells = <1>;
- #size-cells = <0>;
- dwc3_0_role_switch: endpoint@0 {
- reg = <0>;
- remote-endpoint = <&usbc0_role_sw>;
- };
- };
+
+ maximum-speed = "high-speed";
+ phys = <&u2phy0_otg>;
+ phy-names = "usb2-phy";
+ extcon = <&u2phy0>;
};

&usbdp_phy1 {

1

已解决

未解决

只是看看

刚表态过的朋友 (1 人)

最新评论

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-12-22 19:11

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部