导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    T113-Tina5.0在设备树设置usb0为设备模式无效

    T Series
    3
    5
    813
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • E
      eddylin LV 3 最后由 编辑

      大佬们,设备树设置为:

      &usbc0 {
              device_type = "usbc0";
              usb_port_type = <0x0>;
              usb_detect_type = <0x1>;
              usb_detect_mode = <0>;
              usb_id_gpio;
              enable-active-high;
              usb_det_vbus_gpio;
              usb_wakeup_suspend = <0>;
              usb_serial_unique = <0>;
              usb_serial_number = "20080411";
              rndis_wceis = <1>;
              status = "okay";
      };
      

      但是启动之后,看otg_role还是host,需要cat usb_device来手动切换为设备模式。是设备树设置问题?还是这个设置没用的,只能通过拉ID脚来设置?

      1 条回复 最后回复 回复 引用 分享 0
      • Z
        zoipuus LV 5 最后由 编辑

        我之前关闭TYPE-C后也遇到过,你看一下openwrt/target/t113s2仓库rc.final文件是不是有cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_host,我修改了这部分代码

        --- a/t113s2-evb1/busybox-init-base-files/etc/init.d/rc.final
        +++ b/t113s2-evb1/busybox-init-base-files/etc/init.d/rc.final
        @@ -79,10 +79,10 @@ fi
         #umount /tmp
         if [ x${boot_partition} == xboot ];then 
         	amixer cset name="Headphone Switch" 1
        -	cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_host
        +	cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_device
         	nice -n -20 /usr/bin/story_bin &
         else
        -	cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_host
        +	cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_device
         	export swu_software=$(fw_printenv -n swu_software 2>/dev/null)
         	export swu_mode=$(fw_printenv -n swu_mode 2>/dev/null)
         	nice -n -20 /usr/bin/story_ota_bin &
        -- 
        2.7.4
        
        
        E 1 条回复 最后回复 回复 引用 分享 0
        • Z
          zoipuus LV 5 最后由 编辑

          我板子硬件是T113-S2,根据你自己的板子查看对应的仓库,如果rc.final没有,可以在板子上搜索

          1 条回复 最后回复 回复 引用 分享 0
          • E
            eddylin LV 3 @zoipuus 最后由 编辑

            @zoipuus 真的是这里。找了一天的问题,真的谢谢!

            1 条回复 最后回复 回复 引用 分享 0
            • T
              tivon LV 6 最后由 编辑

              留下脚印备用,谢谢。

              1 条回复 最后回复 回复 引用 分享 0
              • Moved from 其它全志芯片讨论区 by  xiaowenge xiaowenge 
              • 1 / 1
              • First post
                Last post

              Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策