|
发表于 2020-4-26 16:17:44
只看该作者
沙发
- diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
- index 5983c42..0c14469 100644
- --- a/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
- +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
- @@ -42,7 +42,7 @@
- #include <dt-bindings/sensor-dev.h>
-
- / {
- - model = "AIO-3399C Board (Linux Opensource)";
- + model = "AIO-3399C-AI Board (Linux Opensource)";
- compatible = "rockchip,rk3399-firefly", "rockchip,rk3399";
-
- test-power {
- @@ -84,6 +84,20 @@
- regulator-name = "dc_ctl";
- regulator-always-on;
- };
- +
- + vcc_otg_vbus: otg-vbus-regulator {
- + compatible = "regulator-fixed";
- + gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
- + pinctrl-names = "default";
- + pinctrl-0 = <&otg_vbus_drv>;
- + regulator-name = "vcc_otg_vbus";
- + regulator-min-microvolt = <5000000>;
- + regulator-max-microvolt = <5000000>;
- +
- + enable-active-high;
- +
- + };
- +
- };
-
- &gmac {
- @@ -212,6 +226,13 @@
- };
- };
-
- + vbus-usb {
- +
- + otg_vbus_drv: otg-vbus-drv {
- + rockchip,pins = <1 3 RK_FUNC_GPIO &pcfg_pull_none>;
- + };
- + };
- +
- };
-
- &fusb0 {
- @@ -224,26 +245,27 @@
-
- &tcphy0 {
- /delete-property/ extcon;
- - status = "okay";
- + status = "disabled";
- };
-
- &u2phy0 {
- status = "okay";
- /delete-property/ extcon;
- -
- u2phy0_otg: otg-port {
- - rockchip,vbus-always-on;
- - vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
- - status = "okay";
- + vbus-supply = <&vcc_otg_vbus>; /*配置Vbus regulator属性 */
- + status = "okay";
- };
- };
-
- &usbdrd3_0 {
- status = "okay";
- - /delete-property/ extcon;
- + extcon = <&u2phy0>;
- };
-
- &usbdrd_dwc3_0 {
- - dr_mode = "host";
- + dr_mode = "otg";
- + phys = <&u2phy0_otg>;
- + maximum-speed = "high-speed";
- + phy-names = "usb2-phy";
- };
复制代码
感谢firefly, 我得到了firefly很好的支持。
打上以上这个patch -> kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
typec口就可以用作otg功能了,adb调试也就正常了
确保一下 device/rockchip/ .BoardConfig.mk 的 RK_KERNEL_DTS=rk3399-firefly-aioc-ai 是否正确 重新编译,升级
PS:数据线接typec |
|