Hello Team,
My customer is trying to connect a camera (USBv2) directly into the USB port2 which is the USB Type-C on the development kit.
once the customer connects his USB camera into the Type C USB (of the development kit) the camera works but while the customer tries to bypass the Type C USB connector and connect the USB camera directly into the USB port 2 PINS of the developed kit (and bypass the Type C components) the camera does not work.
Could you please advise the correct way to bypass the Type-C connector and use it as a standard USB2?
Thanks in advance
Kind regards,
Shai
Hello @weidong_sun,
Please find my email here: shai.b@telsys.co.il, I am waiting for your mail.
Secondly, can you please review the customer DTS and see if there are any conflicts (reattached their DTS)
Thank you so much for your great support.
Kind regards,
Shai
Hello @shai_b ,
In device tree, customer's usbotg2 node is the same as mine.
but usbotg1 is different from mine, I don't konw whether she is using PTN5110.
Regards,
weidong
Hi @weidong_sun,
The customer has connected the camera to the USB1 port and is still it did not work.
Please be noted that the customer has compiled the DTS each time and flashed the image.
He had done some tests that changed DTS incorrectly and re-compiled and he saw that there were no changes while booting.
I do know that there is a way to modify DTS via UBOOT by adding a separate.DTS file with the relevant changes (as overlay).
Can you please guide me on how to perform this approach properly?
(customer concerned is the compiling approach is not working properly)
Waiting for your kind feedback, Thanks a lot and a happy new year.
KR,
Shai
hello @weidong_sun and @BiyongSUN ,
Could you please advise the correct way to modify DTS via UBOOT.
I know there is a way to add a separate .DTS file with the relevant changes and apply then as an overlay.
Can you please guide me on how to perform this approach properly?
Waiting for your kind feedback, Thanks.
KR
Shai
Hi team,
There is any update?
Thanks in advance
KR,
Shai
Hello @shai_b ,
I have given you all materials for customer's USB design.
---full schematic
---full device tree in linux kernel
---explained how to design it.
So no more or no need other materials for the design.
In additon, in u-boot, no ready-made device tree for custer reference. she should refer to that of linux to do it.
Regards,
weidong
Thank you so much, it's looks like the following was missing on my customer dts.
reg_usb2_vbus: regulator_usb2 {
compatible = "regulator-fixed";
regulator-name = "usb2_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 14 0>;
enable-active-high;
};
Hope now it'll work. I keep you posted.
Thanks again.
KR,
Shai
Hi,
USB2 has 2 IDs: USB2_OTG_ID(GPIO ID) & USB2_ID(PHY ID)
Use USB2_OTG_ID, please!
Regards,
weidong
Hi @weidong_sun,
Thanks for your inputs want to UPDATE that the customer would like to use PORT USB1 instead of PORT USB2 (if there are any changes that need to be done in the device tree).
Also, the customer does not want to use MIC2026 (power switch) because the customer soldering the camera (d-,d+) directly into the imx8 pins and already got another source for the VBUS.
If there is any suggestion to bypass the MIC2026 and if there is any consideration in terms of protection and EMI if needed?
Your fast response will be highly appreciated.
Many Thanks with regards,
Shai
Hi,
MIC2026 is used to control the output current of 5V, which should be <=500mA.
If customer is not concern about it, replace USB2_5V with other 5V power.
Have a good day!
Regards,
weidong
Hi Weidong,
When the customer connects all the pins of the USB device (-d,+d) is not recognized by Linux.
I see that MIC2026 is sending a flag to the imx8 via USB1_OTG_OC (GPIO1_IO15), I know the customer did not use this pin at all, in case the customer is not using the MIC2026 there is any consideration that needs to take into account in order to make the USB port work properly, please advise back,
Thanks a lot and regards,
Shai
Hi,
USB1_OTG_OC is only used for over-current protection, it does not affect the use of USB devices.
In addition, you can ask customer to try the following changes in dts file:
-------------------------
&usbotg1 {
dr_mode = "otg";
/* hnp-disable;
srp-disable;
adp-disable;
usb-role-switch;
*/
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "okay";
/*
port {
usb1_drd_sw: endpoint {
remote-endpoint = <&typec1_dr_sw>;
};
};
*/
};
&usbotg2 {
vbus-supply = <®_usb2_vbus>;
dr_mode = "host";
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "okay";
};
----------------------------
Have a great day!
Regards,
weidong
Hi @weidong_sun,
The customer is still trying to connect a camera to the USB on their custom board.
Now on their board is USB is connected directly from IMX8 to the USB device (vbus to vbus, dp to dp etc..) without a PD chip and, the camera is not detected.
They think the reason is that in the DTS the PD circuit (like the one on the EVB) is defined and hence it only works through the PD circuit on the EVB.
Can you please guide us on what changes should be done in order to get the USB device to work directly from IMX USB pins (used USB_PORT1) without a PD circuit?
Here is how the customer currently defined the USB on the DTS:
&usbotg1 {
dr_mode = "otg";
extcon = <0>, <&typec1_ptn5110>; // <=
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "okay";
};
&usbotg2 {
dr_mode = "otg";
extcon = <0>, <&typec2_ptn5110>;
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "disabled";
};
I assume they need to remove (comment-out) the following
extcon = <0>, <&typec2_ptn5110>;
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
But if there are any other changes needed in the IOMUX?
Waiting for your kind assistance, Thanks in advance
Regards,
Shai
Hi,
The circuit and dts code I gave you have been verified, and this board was designed by me. The BSP version I use is L5.4.24_2.1.0. Whether the customer uses a camera or another USB device, he only needs to configure the USB as HOST.
I used Realtek's USB WIFI 8812AU on the USB2 interface of this board without any problems.
Therefore, no other modifications are needed so far, and USB2 should be usable.
Have a good day!
Regards,
weidong
Hi @weidong_sun,
Thank you so much for your inputs, but the customer does not want to use any power switch on the way (to save space).
I would like to know if there is any way to bypass MIC2026 (power switch) because the customer soldering the camera (d-,d+) directly into the imx8 pins and already got another source for the VBUS.
If there is any suggestion to bypass the MIC2026 and if there is any consideration in terms of protection and EMI if needed?
Moreover, as far as I understand the customer would need also to pull-down the USB1_OTG_OC (GPIO1_IO15) in order to make it works properly, please correct me if I wrong?
Secondly, in the schema that you provide the USB2_P1_ID appears to be in pull-down but there is a note: DNP, do not place.
Could you please confirm if there is a need to pull down the USB2_ID?
Waiting for your kind response, Thanks in adveace
Regrads,
Shai
What the problem to bypass the iMX8M Mini EVK?
Here is the sequence in u-boot, you can modify the device tree and compile to dtb accordingly.
And usb has standard binding guide for usb. you need to modify the dts for your own hardware.
The i.MX8MM reference board bsp also depends on those standard binding guide.
fdt rm otg1/port is to disconnect the typeC chip port connection.
i.MX8MM simulate no TYPEC.
run loadfdt
fdt addr ${fdt_addr_r}
fdt list /aliases
fdt resize
fdt set /aliases otg1 /soc@0/bus@32c00000/usb@32e40000
fdt rm otg1/port
fdt rm otg1 usb-role-switch
fdt set otg1 dr_mode host
fdt print otg1
run loadimage
run mmcargs
booti ${loadaddr} - ${fdt_addr_r}
Plug in usb disk to do the test
@BiyongSUN Hello,
Please find the Kernel msg while trying to connect the USB camera
root@imx8mmevk:~# dmesg | grep -i usb
[ 0.440932] usbcore: registered new interface driver usbfs
[ 0.446043] usbcore: registered new interface driver hub
[ 0.451402] usbcore: registered new device driver usb
[ 0.456735] usb_phy_generic usbphynop1: usbphynop1 supply vcc not found, using dummy regulator
[ 0.465383] usb_phy_generic usbphynop2: usbphynop2 supply vcc not found, using dummy regulator
[ 1.388369] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.418994] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.439892] usbcore: registered new interface driver usb-storage
[ 1.445987] usbcore: registered new interface driver usb_ehset_test
[ 1.453268] usbmisc_imx 32e40200.usbmisc: 32e40200.usbmisc supply vbus-wakeup not found, using dummy regulator
[ 1.463571] usbmisc_imx 32e50200.usbmisc: 32e50200.usbmisc supply vbus-wakeup not found, using dummy regulator
[ 1.474469] imx_usb 32e40000.usb: 32e40000.usb supply vbus not found, using dummy regulator
[ 2.924375] usbcore: registered new interface driver usbhid
[ 2.929974] usbhid: USB HID core driver
[ 3.383273] imx_usb 32e40000.usb: 32e40000.usb supply vbus not found, using dummy regulator
It looks like the 'reg_usb2_vbus' is not defined in the DTS, What I am doing wrong?
Thanks in advance
Regards,
Shai
VBUS in dts is not necessary.
Just make sure the VBUS has physically supply the chip.
From the chip side, it doesn't matter the VBUS is on board or from PC.
For chip, VBUS is always external.
and please make sure "host", "peripheral" or. "otg".
One wrong concept is says usb id pin high is peripheral and usb id pin low is host.
"host", "peripheral" has no usb id in hardware. should define in dts.
Only otg has usb id pin.
otg usb id pin high otg plays peripheral and otg usb id pin low, otg plays host.
Read the binding guide first then change according to the hardware.
linux/Documentation/devicetree/bindings/usb/generic.txt
- dr_mode: tells Dual-Role USB controllers that we want to work on a
particular mode. Valid arguments are "host",
"peripheral" and "otg". In case this attribute isn't
passed via DT, USB DRD controllers should default to
OTG.
Hi NXP Team,
We still weren’t able to get USB to work on our board with the IMX8 Mini.
We were told to implement the following circuit:
The problem is that in our design we don’t have MIC2026 chip and we can’t access GPIO_IO15, GPIO_IO14.
We tried to attached GPIO_IO15 and GPIO_IO14 to GND and it still didn’t work.
Also we modify our device tree as follow:
&usbotg1 {
dr_mode = "host";
/*hnp-disable;
srp-disable;
adp-disable;
usb-role-switch;*/
/*extcon = <0>, <&typec1_ptn5110>;*/
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "okay";
/*port {usb1_drd_sw: endpoint {remote-endpoint = <&typec1_dr_sw>;};};*/
};
&usbotg2 {
//vbus-supply = <®_usb2_vbus>;
dr_mode = "host";
//extcon = <0>, <&typec2_ptn5110>;
picophy,pre-emp-curr-control = <3>;
picophy,dc-vol-level-adjust = <7>;
status = "okay";
};
USB is still not detecting any device.
This is the output from dmesg commans:
root@imx8mmevk:~# dmesg | grep -i usb
[ 0.440932] usbcore: registered new interface driver usbfs
[ 0.446043] usbcore: registered new interface driver hub
[ 0.451402] usbcore: registered new device driver usb
[ 0.456735] usb_phy_generic usbphynop1: usbphynop1 supply vcc not found, using dummy regulator
[ 0.465383] usb_phy_generic usbphynop2: usbphynop2 supply vcc not found, using dummy regulator
[ 1.388369] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.418994] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.439892] usbcore: registered new interface driver usb-storage
[ 1.445987] usbcore: registered new interface driver usb_ehset_test
[ 1.453268] usbmisc_imx 32e40200.usbmisc: 32e40200.usbmisc supply vbus-wakeup not found, using dummy regulator
[ 1.463571] usbmisc_imx 32e50200.usbmisc: 32e50200.usbmisc supply vbus-wakeup not found, using dummy regulator
[ 1.474469] imx_usb 32e40000.usb: 32e40000.usb supply vbus not found, using dummy regulator
[ 2.924375] usbcore: registered new interface driver usbhid
[ 2.929974] usbhid: USB HID core driver
[ 3.383273] imx_usb 32e40000.usb: 32e40000.usb supply vbus not found, using dummy regulator
Can you please help?
Thanks,
Shlomi
Hi ,
See below, please!
1. Test result on my board based on i.MX8MM (USB2)
2. For your device tree (USB1)
USB OTG ID = HIGH ---- > USB works as a device.
USB OTG ID = LOW ----- > USB works as a Host.
Since USB1 OTG ID is pulled up to HIGH, why it is still configured as a HOST?
regards,
weidong