Здравия! Пытаюсь в линуксе настроить работу усб портов, в первоначальном варианте не было дтб файла для этой доски, его не сделали. Для подобных плат дтб файлы позволяют загрузить систему, но не работает усб. На другой доске с таким же чипом усб заработал из коробки, оба 2, 2.0 и 3.0. Андроид дтб для неё я достал, переконвертировал в дтс, про усб у него:
dwc3@ff500000 {
compatible = "synopsys, dwc3";
status = "okay";
reg = <0xff500000 0x100000>;
interrupts = <0x00 0x1e 0x04>;
usb-phy = <0x2a 0x2b>;
cpu-type = "gxl";
clock-src = "usb3.0";
clocks = <0x13 0x41>;
clock-names = "dwc_general";
phandle = <0xde>;
};
usb2phy@ffe09000 {
compatible = "amlogic, amlogic-new-usb2-v2";
status = "okay";
reg = <0xffe09000 0x80 0xffd01008 0x100 0xff636000 0x2000 0xff63a000 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 = <0x2a>;
};
usb3phy@ffe09080 {
compatible = "amlogic, amlogic-new-usb3-v2";
status = "okay";
reg = <0xffe09080 0x20>;
phy-reg = <0xff646000>;
phy-reg-size = <0x2000>;
usb2-phy-reg = <0xffe09000>;
usb2-phy-reg-size = <0x80>;
interrupts = <0x00 0x10 0x04>;
clocks = <0x13 0x18>;
clock-names = "pcie_refpll";
portnum = <0x01>;
otg = <0x00>;
gpio-vbus-power = "GPIOH_6";
gpios = <0x2c 0x17 0x00>;
phandle = <0x2b>;
};
dwc2_a@ff400000 {
compatible = "amlogic, dwc2";
status = "okay";
device_name = "dwc2_a";
reg = <0xff400000 0x40000>;
interrupts = <0x00 0x1f 0x04>;
pl-periph-id = <0x00>;
clock-src = "usb0";
port-id = <0x00>;
port-type = <0x02>;
port-speed = <0x00>;
port-config = <0x00>;
port-dma = <0x00>;
port-id-mode = <0x00>;
usb-fifo = <0x2d8>;
cpu-type = "v2";
phy-reg = <0xffe09000>;
phy-reg-size = <0xa0>;
phy-interface = <0x00>;
clocks = <0x13 0x41 0x13 0x49>;
clock-names = "usb_general\0usb1";
controller-type = <0x03>;
phandle = <0xdf>;
};
Когда в рабочем дтс я убрал узел про usb_pcie, он начал подавать признаки жизни:
dmesg | grep -i usb
[ 0.074940] usbcore: registered new interface driver usbfs
[ 0.074983] usbcore: registered new interface driver hub
[ 0.075028] usbcore: registered new device driver usb
[ 0.126372] phy-meson-g12a-usb2 36000.phy: can't request region for resource [mem 0x00036000-0x00037fff]
[ 0.126388] phy-meson-g12a-usb2: probe of 36000.phy failed with error -16
[ 0.126415] phy-meson-g12a-usb2 3a000.phy: can't request region for resource [mem 0x0003a000-0x0003bfff]
[ 0.126423] phy-meson-g12a-usb2: probe of 3a000.phy failed with error -16
[ 1.383827] dwc3-meson-g12a ffe09000000000a0.usbffe09000: invalid resource
[ 1.390231] dwc3-meson-g12a: probe of ffe09000000000a0.usbffe09000 failed with error -22
[ 1.398879] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.414269] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.430192] usbcore: registered new interface driver usb-storage
[ 1.492721] usbcore: registered new interface driver usbhid
[ 1.498165] usbhid: USB HID core driver
[ 1.579595] USB_PWR_EN: supplied by 5V
[ 1.863539] dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
[ 1.867816] dwc3-meson-g12a ffe09000.usb: USB3 ports: 0
[ 1.875627] dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
[ 1.880115] dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
[ 1.887221] dwc2 ff400000.usb: Configuration mismatch. dr_mode forced to device
[ 1.894398] dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 1.906804] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1
[ 1.929686] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 1.937759] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.944914] usb usb1: Product: xHCI Host Controller
[ 1.949743] usb usb1: Manufacturer: Linux 5.10.52-gentoo-burato xhci-hcd
[ 1.956384] usb usb1: SerialNumber: xhci-hcd.2.auto
[ 1.961441] hub 1-0:1.0: USB hub found
[ 1.974330] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 2
[ 1.981920] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
[ 1.988403] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.996449] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[ 2.004600] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.011757] usb usb2: Product: xHCI Host Controller
[ 2.016587] usb usb2: Manufacturer: Linux 5.10.52-gentoo-burato xhci-hcd
[ 2.023228] usb usb2: SerialNumber: xhci-hcd.2.auto
[ 2.028235] hub 2-0:1.0: USB hub found
[ 2.373607] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
Пробовал и в исходниках ядра где лежат dts вносить изменения как описано ТУТ и результат такой же, когда я редактировал дтс и приводил dmesg выше.
Что делать, куда копать?