devin_2023 发表于 2023-5-22 20:23:06

热心市民小左 发表于 2023-1-30 09:55
您好,我这边调试typec0虚拟rndis功能一切正常,但是把typec0禁掉后,typec1虚拟的rndis只能在windows下 ...

想问下楼主,你的typec0虚拟rndis功能是怎么配置的,能否告知一下,谢谢

devin_2023 发表于 2023-5-22 21:14:39

热心市民小左 发表于 2023-1-30 09:55
您好,我这边调试typec0虚拟rndis功能一切正常,但是把typec0禁掉后,typec1虚拟的rndis只能在windows下 ...

rndis不是需要相应的UDC驱动吗,但看RK3588的内核源码里没有相关驱动,在RK3399的源码里到是看见了

热心市民小左 发表于 2023-5-23 10:06:57

devin_2023 发表于 2023-5-22 20:23
想问下楼主,你的typec0虚拟rndis功能是怎么配置的,能否告知一下,谢谢

通过menuconfig开启一下就可以了 doc里也有相应文档,修改配置脚本,关闭adb开rndis也可以

devin_2023 发表于 2023-5-23 10:59:21

热心市民小左 发表于 2023-5-23 10:06
通过menuconfig开启一下就可以了 doc里也有相应文档,修改配置脚本,关闭adb开rndis也可以

你好,搞了两个礼拜还没有搞定,麻烦帮忙指导下,谢谢!!!
我是参考《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

热心市民小左 发表于 2023-5-23 11:11:49

devin_2023 发表于 2023-5-23 10:59
你好,搞了两个礼拜还没有搞定,麻烦帮忙指导下,谢谢!!!
我是参考《Rockchip_RK3588_Developer_Guid ...

你参考一下这个吧,设备树应该不用动,插typec线自动识别为device
https://blog.csdn.net/lan120576664/article/details/101039293?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167723322016800182158756%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=167723322016800182158756&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-101039293-null-null.142^v73^control_1,201^v4^add_ask,239^v2^insert_chatgpt&utm_term=%E8%8D%94%E6%9E%9D%E6%B4%BE%20usb%20rndis&spm=1018.2226.3001.4187

zrz0815 发表于 2024-8-27 14:43:25

热心市民小左 发表于 2023-1-30 09:55
您好,我这边调试typec0虚拟rndis功能一切正常,但是把typec0禁掉后,typec1虚拟的rndis只能在windows下 ...

针对你的这个typec1配置,vbus detect是怎么连的?然后外面有没有连usb3.0的信号?
页: 1 [2]
查看完整版本: rk3588 USB DEVICE