Firefly开源社区

打印 上一主题 下一主题

[Linux] 求助:rk3399 adb不能使用

19

积分

0

威望

0

贡献

技术小白

积分
19

求助:rk3399 adb不能使用

发表于 2020-4-14 16:58:51      浏览:3270 | 回复:1        打印      只看该作者   [复制链接] 楼主

我手头有块AIO-3399C(AI)板子,目前按照 http://wiki.t-firefly.com/AIO-3399C/buildroot_compile.html
Buildroot部分的指导,编译出的linux固件不能使用adb调试,请问各位大神是什么原因?
1.PC连接板子的typeC时,串口打印如下:
[root@rk3399:/]# [   20.493897] phy phy-ff770000.syscon:usb2-phy@e450.7: charger = USB_SDP_CHARGER
2.PC使用公对公usb连接板子的usb3.0时,串口没有任何输出

PC端lsusb也是没有发现相关设备。

回复

使用道具 举报

19

积分

0

威望

0

贡献

技术小白

积分
19
发表于 2020-4-26 16:17:44        只看该作者  沙发
  1. diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
  2. index 5983c42..0c14469 100644
  3. --- a/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
  4. +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc-ai.dts
  5. @@ -42,7 +42,7 @@
  6. #include <dt-bindings/sensor-dev.h>

  7. / {
  8. -       model = "AIO-3399C Board (Linux Opensource)";
  9. +       model = "AIO-3399C-AI Board (Linux Opensource)";
  10.         compatible = "rockchip,rk3399-firefly", "rockchip,rk3399";

  11.         test-power {
  12. @@ -84,6 +84,20 @@
  13.                 regulator-name = "dc_ctl";
  14.                 regulator-always-on;
  15.         };
  16. +      
  17. +       vcc_otg_vbus: otg-vbus-regulator {
  18. +               compatible = "regulator-fixed";
  19. +                     gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
  20. +                     pinctrl-names = "default";
  21. +                     pinctrl-0 = <&otg_vbus_drv>;
  22. +                     regulator-name = "vcc_otg_vbus";
  23. +                     regulator-min-microvolt = <5000000>;
  24. +                     regulator-max-microvolt = <5000000>;
  25. +
  26. +                     enable-active-high;
  27. +
  28. +             };
  29. +
  30. };

  31. &gmac {
  32. @@ -212,6 +226,13 @@
  33.                 };
  34.         };

  35. +       vbus-usb {
  36. +               
  37. +               otg_vbus_drv: otg-vbus-drv {
  38. +                       rockchip,pins = <1 3 RK_FUNC_GPIO &pcfg_pull_none>;     
  39. +               };
  40. +       };
  41. +
  42. };

  43. &fusb0 {
  44. @@ -224,26 +245,27 @@

  45. &tcphy0 {
  46.      /delete-property/ extcon;
  47. -    status = "okay";
  48. +    status = "disabled";
  49. };

  50. &u2phy0 {
  51.      status = "okay";
  52.      /delete-property/ extcon;
  53. -
  54.      u2phy0_otg: otg-port {
  55. -        rockchip,vbus-always-on;
  56. -        vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
  57. -        status = "okay";
  58. +        vbus-supply = <&vcc_otg_vbus>; /*配置Vbus regulator属性 */
  59. +       status = "okay";
  60.      };
  61. };

  62. &usbdrd3_0 {
  63.      status = "okay";
  64. -    /delete-property/ extcon;
  65. +    extcon = <&u2phy0>;
  66. };

  67. &usbdrd_dwc3_0 {
  68. -    dr_mode = "host";
  69. +    dr_mode = "otg";
  70. +    phys = <&u2phy0_otg>;
  71. +    maximum-speed = "high-speed";
  72. +    phy-names = "usb2-phy";
  73. };
复制代码

感谢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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表