|
发表于 2023-5-23 10:59:21
只看该作者
14#
你好,搞了两个礼拜还没有搞定,麻烦帮忙指导下,谢谢!!!
我是参考《Rockchip_RK3588_Developer_Guide_USB_CN.pdf》文档中的Type-C to Type-A USB 3.1/DP DTS 配置改的dts配置,改动如下:
vbus5v0_typec: vbus5v0-typec {
compatible = "regulator-fixed";
regulator-name = "vbus5v0_typec";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&typec5v_pwren>;
vin-supply = <&vcc5v0_usb>;
};
vcc5v0_host_20: vcc5v0-host-20 {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_host_20";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host20_en>;
vin-supply = <&vcc5v0_usb>;
};
&pinctrl {
usb {
vcc5v0_host20_en: vcc5v0-host20-en {
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&u2phy0 {
status = "okay";
};
&u2phy0_otg {
phy-supply = <&vbus5v0_typec>;
status = "okay";
};
&usbdp_phy0 {
rockchip,dp-lane-mux = <2 3>;
status = "okay";
};
&usbdp_phy0_dp {
status = "okay";
};
&usbdp_phy0_u3 {
status = "okay";
};
&usbdrd3_0 {
status = "okay";
};
&usbdrd_dwc3_0 {
dr_mode = "peripheral";
extcon = <&u2phy0>;
phys = <&u2phy0_otg>; /* phys 属性只引用USB2 PHY节点 */
phy-names = "usb2-phy";
status = "okay";
};
内核配置改动如下:
CONFIG_USB_F_ECM=y
CONFIG_USB_F_EEM=y
CONFIG_USB_F_SUBSET=y
CONFIG_USB_F_RNDIS=y
# CONFIG_USB_CONFIGFS_OBEX is not set
# CONFIG_USB_CONFIGFS_NCM is not set
CONFIG_USB_CONFIGFS_ECM=y
CONFIG_USB_CONFIGFS_ECM_SUBSET=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
# CONFIG_USB_CONFIGFS_PHONET is not set
# CONFIG_USB_ZERO is not set
# CONFIG_USB_AUDIO is not set
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
# CONFIG_USB_ETH_EEM is not set
# CONFIG_USB_G_NCM is not set |
|