linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: amlogic-meson-g12b USB does not work
       [not found] <8833871627419165@myt5-76cfa60c365b.qloud-c.yandex.net>
@ 2021-07-30  8:22 ` Neil Armstrong
  2021-07-31 13:09   ` Федоров Григорий
  0 siblings, 1 reply; 2+ messages in thread
From: Neil Armstrong @ 2021-07-30  8:22 UTC (permalink / raw)
  To: Федоров
	Григорий,
	open list:ARM/Amlogic Meson...

Hi,

[added the linux-amlogix ML in CC]

On 27/07/2021 23:00, Федоров Григорий wrote:
> Hi! I want to launch Linux on the x88King s922x board, but for it there is no DTB files and I do not know how to correctly designate the parameters of the USB. I experimented a lot, but I never achieved that the USB ports function. I gotten the DTB from android for this board, but Linux kernel does not work with this DTB. I tried to rewrite with the preservation of recursion to the nodes, everything is associated with USB with android DTB on Linux to different boards, but it does not turn on HSB!
> By the experiments, I achieved that the system recognizes USB hub, the lsusb bonding team shows a hub 2.0 and a hub 3.0, but the device is not defined. The conclusion of dmesg:
> # dmesg | grep -i usb
> [    0.043896] OF: /soc/usb@ffe09000: could not find phandle 4
> [    0.079215] usbcore: registered new interface driver usbfs
> [    0.079251] usbcore: registered new interface driver hub
> [    0.079287] usbcore: registered new device driver usb
> [    1.357460] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    1.372498] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    1.388434] usbcore: registered new interface driver usb-storage
> [    1.451372] usbcore: registered new interface driver usbhid
> [    1.456812] usbhid: USB HID core driver
> [    1.527586] USB1_POW: supplied by VCC_5V
> [    1.531366] USB_PWR_EN: supplied by VCC_5V
> [    1.546269] dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
> [    1.550214] dwc3-meson-g12a ffe09000.usb: USB3 ports: 0
> [    1.558098] dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
> [    1.562525] dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
> [    1.569651] dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
> [    1.581954] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
> [    1.604840] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
> [    1.612908] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [    1.620069] usb usb1: Product: xHCI Host Controller
> [    1.624893] usb usb1: Manufacturer: Linux 5.13.4-gentoo-bur xhci-hcd
> [    1.631188] usb usb1: SerialNumber: xhci-hcd.0.auto
> [    1.636229] hub 1-0:1.0: USB hub found
> [    1.649135] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
> [    1.656724] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
> [    1.663210] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
> [    1.671247] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
> [    1.679404] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [    1.686561] usb usb2: Product: xHCI Host Controller
> [    1.691391] usb usb2: Manufacturer: Linux 5.13.4-gentoo-bur xhci-hcd
> [    1.697687] usb usb2: SerialNumber: xhci-hcd.0.auto
> [    1.702686] hub 2-0:1.0: USB hub found
> [    2.682667] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
> [    3.586674] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
> [    3.588423] usb usb1-port1: attempt power cycle
> [    4.574672] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
> What am I doing wrong? What do you need to do to Linux work well with USB ports on this board? USB ports 100% are good, they work on Аndroid.
> 

It may be an issue with regulators not enabling power to the PHYs and to the devices, please check how USB is enabled on the vendor kernel.

Neil


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re:amlogic-meson-g12b USB does not work
  2021-07-30  8:22 ` amlogic-meson-g12b USB does not work Neil Armstrong
@ 2021-07-31 13:09   ` Федоров Григорий
  0 siblings, 0 replies; 2+ messages in thread
From: Федоров Григорий @ 2021-07-31 13:09 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: open list:ARM/Amlogic Meson...

Hi Neil! I do not have access to the source code of the vendor kernel. But there are free source code for this box, in which the USB works: https://github.com/CoreELEC/linux-amlogic/blob/amlogic-4.9-19/arch/arm64/boot/dts/amlogic/g12b_s922x_x88_king_rev_a.dts
I want to show you the differences in the DTS file of Coreelek and the mainline Linux.
Coreelek x88king dts:usb2phy@ffe09000 {
                compatible = "amlogic, amlogic-new-usb2-v2";
                status = "okay";
                reg = <0x00 0xffe09000 0x00 0x80 0x00 0xffd01008 0x00 0x100 0x00 0xff636000 0x00 0x2000 0x00 0xff63a000 0x00 0x2000>;
                pll-setting-1 = <0x9400414>;
                pll-setting-2 = <0x927e0000>;
                pll-setting-3 = <0xac5f69e5>;
                pll-setting-4 = <0xfe18>;
                pll-setting-5 = <0x8000fff>;
                pll-setting-6 = <0x78000>;
                pll-setting-7 = <0xe0004>;
                pll-setting-8 = <0xe000c>;
                portnum = <0x02>;
                phandle = <0x19>;
        };
linux mainline meson-g12b-s922x dts:

usb@ffe09000 {
                        status = "okay";
                        compatible = "amlogic,meson-g12a-usb-ctrl";
                        reg = <0x00 0xffe09000 0x00 0xa0>;
                        interrupts = <0x00 0x10 0x04>;
                        #address-cells = <0x02>;
                        #size-cells = <0x02>;
                        ranges;
                        clocks = <0x02 0x2f>;
                        resets = <0x05 0x22>;
                        dr_mode = "host";
                        phys = <0x44 0x45 0x06 0x04>;
                        phy-names = "usb2-phy0\0usb2-phy1\0usb3-phy0";
                        vbus-supply = <0x46>;
What is Pll-Setting? What rows of code relative to the USB drivers need to port from the Coreelek source, so that the USB driver is works in the main line Linux? Please pay attention to this problem, this board is very in demand, it turned out great potential in it, it should be revealed, giving it the opportunity to operate the core Linux mainline.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-31 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8833871627419165@myt5-76cfa60c365b.qloud-c.yandex.net>
2021-07-30  8:22 ` amlogic-meson-g12b USB does not work Neil Armstrong
2021-07-31 13:09   ` Федоров Григорий

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).