0
Younes_Thabet

use OPIone microusb for touch in a waveshare screen instead of usb

Recommended Posts

Hello all,

 

I have a 5" waveshare touch screen connected (touch screen cable) to an orange pi one through usb with a separate power cable for screen, and it works fine. but when I used the (microusb to microusb cable) for the touch  it doesn't work..

 

is there any way to make it work!? because i need the usb for something else and i can't use a usb hub for it's too big for my application.

 

Regards, 

 

 

Share this post


Link to post
Share on other sites
16 minutes ago, Younes_Thabet said:

but when I used the (microusb to microusb cable) for the touch  it doesn't work..

You probably need to change the "dr_mode" from "otg" to "host" in the DT.

Share this post


Link to post
Share on other sites
19 minutes ago, martinayotte said:

You probably need to change the "dr_mode" from "otg" to "host" in the DT.

excuse me sir, could you show me the file where i can find the dr_mode!? i am a noob.

Share this post


Link to post
Share on other sites
26 minutes ago, Younes_Thabet said:

excuse me sir, could you show me the file where i can find the dr_mode!? i am a noob.

In DT ( DeviceTree ), but it doesn't seems enough ...

I will try to figure out, since I've made such things few years ago !

I will keep you posted when I get it working ...

 

Share this post


Link to post
Share on other sites
3 hours ago, Younes_Thabet said:

excuse me sir, could you show me the file where i can find the dr_mode!? i am a noob.

Ok ! You probably have this error in "dmesg" like I got :

sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO

This is a bug probably introduced several months ago !

I don't have yet a real solution/fix, but at least I have a workaround :

 

Download the DT compiler using "wget http://ftp.debian.org/debian/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.7-3_armhf.deb " , and then installing it using "dpkg -i device-tree-compiler_1.4.7-3_armhf.deb"

 

Then, decompile current DTB into DTS using "dtc -@ -I dtb -O dts -o sun8i-h3-orangepi-one.dts /boot/dtb/sun8i-h3-orangepi-one.dtb".

 

Edit this DTS to change "dr_mode" from "otg" to "host" in the "usb@1c19000" node, and comment out the "usb0_id_det-gpios" line in the "phy@1c19400" node.

 

Recompile DTB from this DTS "dtc -@ -I dts -O dtb -o /boot/dtb/sun8i-h3-orangepi-one.dtb sun8i-h3-orangepi-one.dts" and then reboot. The USB0 should be powered ...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0