I am not sure the driver is included by default in the makefile, The usb on the b3000 is not populated, thus the driver was not needed nor include, i may have overlooked this while doing the makefile for the x2000 . I will look into that as well. Out of curiosity ... is the fan functioning at all ?
The usb on the b3000 is not populated, thus the driver was not needed nor include
Ok .. next build is with CONFIG_PACKAGE_kmod-usb-ehci
Out of curiosity ... is the fan functioning at all ?
I didn't check it
..
you need the usb driver georgem83 ported for ipq5018...
@georgem83 is the usb driver still included in the defconfig ?
DEVICE_PACKAGES := \
ath11k-firmware-qcn6122 \
ipq-wifi-glinet_gl-x2000 \
kmod-bluetooth \
ipq5018-maple-bt-firmware
usb driver is not in makefile package list. I can't recall the name off it of the top me head... I am sure georgem83 will chime in eventually.
EDIT
the fan drivers are not being included either
Based on my /sys/kernel/debug/usb/devices dump it should be a
Genesys Logic, Inc. -hub. Or is this just for the physical USB-connector?
Edit .. is it this one?
$ grep 5018 phy/qualcomm/*.c
phy/qualcomm/phy-qcom-m31.c:static const struct m31_phy_regs m31_ipq5018_regs[] = {
phy/qualcomm/phy-qcom-m31.c:static const struct m31_priv_data m31_ipq5018_data = {
phy/qualcomm/phy-qcom-m31.c: .regs = m31_ipq5018_regs,
phy/qualcomm/phy-qcom-m31.c: .nregs = ARRAY_SIZE(m31_ipq5018_regs),
phy/qualcomm/phy-qcom-m31.c: { .compatible = "qcom,ipq5018-usb-hsphy", .data = &m31_ipq5018_data },
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:static const struct qcom_uniphy_pcie_regs ipq5018_regs[] = {
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:static const struct qcom_uniphy_pcie_data ipq5018_data = {
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c: .init_seq = ipq5018_regs,
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c: .init_seq_num = ARRAY_SIZE(ipq5018_regs),
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c: .compatible = "qcom,ipq5018-uniphy-pcie-phy",
phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c: .data = &ipq5018_data,
I think it's dwc3_qcom. After loading that module the USB bus appears
in OEM
root@GL-X2000:~# rmmod dwc3
[ 570.790979] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 570.791037] usb usb2: USB disconnect, device number 1
[ 570.795561] usb 2-1: USB disconnect, device number 2
[ 570.796231] option1 ttyUSB2: usb_wwan_open: submit int urb failed: -19
[ 570.802499] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 570.805086] option1 ttyUSB2: usb_wwan_open: submit read urb 0 failed: -19
[ 570.805093] option1 ttyUSB2: usb_wwan_open: submit read urb 1 failed: -19
[ 570.805099] option1 ttyUSB2: usb_wwan_open: submit read urb 2 failed: -19
[ 570.805108] option1 ttyUSB2: usb_wwan_open: submit read urb 3 failed: -19
[ 570.820165] option1 ttyUSB2: usb_wwan_open: submit int urb failed: -19
[ 570.827881] option 2-1:1.0: device disconnected
[ 570.835494] option1 ttyUSB2: usb_wwan_open: submit read urb 0 failed: -19
[ 570.842033] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 570.851067] option1 ttyUSB2: usb_wwan_open: submit read urb 1 failed: -19
[ 570.853930] option 2-1:1.1: device disconnected
[ 570.857860] option1 ttyUSB2: usb_wwan_open: submit read urb 2 failed: -19
[ 570.883573] option1 ttyUSB2: usb_wwan_open: submit read urb 3 failed: -19
[ 570.891080] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 570.899652] option 2-1:1.2: device disconnected
[ 570.907018] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 570.910670] option 2-1:1.3: device disconnected
[ 570.920101] qmap_unregister_device(wwan0_1)
[ 570.955764] qmi_wwan_q 2-1:1.4 wwan0: unregister 'qmi_wwan_q' usb-xhci-hcd.0.auto-1, RMNET/USB device
[ 571.016357] option 2-1:1.12: device disconnected
[ 571.049833] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 571.049908] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 571.054642] usb usb1: USB disconnect, device number 1
[ 571.064094] usb 1-1: USB disconnect, device number 2
[ 571.065675] usb 1-1.1: USB disconnect, device number 3
[ 571.527550] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
ya thats the one
That's the problem. I tried to integrate the QSDK-patches from NHSS.QSDK.13.0.5-00628-O
$ patch -p1 < /$HOME/src/openwrt/qsdk/qsdk/target/linux/feeds/patches-6.6/0368-usb-dwc3-qcom-fix-clock-handling-in-dwc3_qcom_remove.patch
patching file drivers/usb/dwc3/dwc3-qcom.c
Hunk #1 succeeded at 848 with fuzz 2 (offset -154 lines).
Hunk #2 succeeded at 851 with fuzz 1 (offset -165 lines).
$ patch -p1 < $HOME/src/openwrt/qsdk/qsdk/target/linux/feeds/patches-6.6/0683-usb-dwc3-qcom-add-support-for-the-EBC-configuration.patch
Hunk #2 succeeded at 24 with fuzz 2 (offset -2 lines).
Hunk #3 succeeded at 46 (offset -3 lines).
Hunk #4 succeeded at 88 with fuzz 1 (offset 4 lines).
Hunk #5 succeeded at 126 with fuzz 1 (offset -6 lines).
Hunk #6 succeeded at 156 (offset -6 lines).
Hunk #7 succeeded at 1775 (offset -142 lines).
$ cp $HOME/src/openwrt/qsdk/qsdk/target/linux/feeds/files-6.6/include/linux/usb/dwc3-qcom.h include/linux/usb/
no luck
root@OpenWrt:~# modprobe dwc3_qcom
[ 300.406358] dwc3 8a00000.usb: Configuration mismatch. dr_mode forced to host
[ 300.408410] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 300.412744] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[ 300.417991] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000808000000010
[ 300.425504] xhci-hcd xhci-hcd.1.auto: irq 42, io mem 0x08a00000
[ 300.435001] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 300.440644] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[ 300.446289] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[ 300.455619] hub 1-0:1.0: USB hub found
[ 300.460431] hub 1-0:1.0: 1 port detected
[ 300.465463] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 300.469321] hub 2-0:1.0: USB hub found
[ 300.476441] hub 2-0:1.0: 1 port detected
root@OpenWrt:~# [ 300.732255] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 300.862327] usb 1-1: device descriptor read/64, error -71
[ 301.102373] usb 1-1: device descriptor read/64, error -71
[ 301.342220] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 301.472272] usb 1-1: device descriptor read/64, error -71
[ 301.712303] usb 1-1: device descriptor read/64, error -71
[ 301.822462] usb usb1-port1: attempt power cycle
[ 302.242250] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[ 302.242411] usb 1-1: Device not responding to setup address.
[ 302.456274] usb 1-1: Device not responding to setup address.
[ 302.662208] usb 1-1: device not accepting address 4, error -71
[ 302.792271] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[ 302.792410] usb 1-1: Device not responding to setup address.
[ 303.002273] usb 1-1: Device not responding to setup address.
[ 303.212212] usb 1-1: device not accepting address 5, error -71
[ 303.212531] usb usb1-port1: unable to enumerate USB device
We'll have to wait on @georgem83 to figure out the usb, i cannot do much without a unit with usb. We can get everything else working in the meantime. Just looking at the src now. I see some things that need to be updated. i will push to you once i am done the review. Lets get wifi and the fan working properly first.
also, can you give me a better output of the macs, both oem and ow .. use ifconfig, its easier to extract the information needed for the dts
OEM
root@GL-X2000:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 94:83:C4:AB:32:F5
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:84
root@GL-X2000:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 94:83:C4:AB:32:F6
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2870 errors:0 dropped:6 overruns:0 frame:0
TX packets:610 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:409465 (399.8 KiB) TX bytes:44579 (43.5 KiB)
Interrupt:85
openwrt-snapshot
root@OpenWrt:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:38
root@OpenWrt:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 94:83:C4:AB:32:F5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:164 errors:87 dropped:87 overruns:87 frame:0
TX packets:0 errors:87 dropped:0 overruns:87 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35131 (34.3 KiB) TX bytes:0 (0.0 B)
Interrupt:39
looks like there may be two macs in ART partion ... can you do the equivalent on your unit, we're looking for both macs . you can see mine below at 0x06
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "0:sbl1"
mtd1: 00080000 00020000 "0:mibib"
mtd2: 00040000 00020000 "0:bootconfig"
mtd3: 00100000 00020000 "0:qsee"
mtd4: 00040000 00020000 "0:devcfg"
mtd5: 00040000 00020000 "0:cdt"
mtd6: 00080000 00020000 "0:appsblenv"
mtd7: 00140000 00020000 "0:appsbl"
mtd8: 00100000 00020000 "0:art"
mtd9: 00080000 00020000 "0:training"
mtd10: 00200000 00020000 "cfg"
mtd11: 07800000 00020000 "rootfs"
root@OpenWrt:~# hexdump /sys/bus/nvmem/devices/mtd8/nvmem
0000000 ffff ffff ffff 8394 a4c4 21a7 ffff ffff
0000010 686f 6134 3237 ff31 ffff ffff ffff ffff
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "0:SBL1"
mtd1: 00080000 00020000 "0:MIBIB"
mtd2: 00040000 00020000 "0:BOOTCONFIG"
mtd3: 00100000 00020000 "0:QSEE"
mtd4: 00040000 00020000 "0:DEVCFG"
mtd5: 00040000 00020000 "0:CDT"
mtd6: 00080000 00020000 "0:APPSBLENV"
mtd7: 00140000 00020000 "0:APPSBL"
mtd8: 00100000 00020000 "0:ART"
mtd9: 00080000 00020000 "0:TRAINING"
mtd10: 00200000 00020000 "CFG"
mtd11: 00200000 00020000 "log"
mtd12: 07600000 00020000 "rootfs"
root@OpenWrt:~# hexdump /sys/bus/nvmem/devices/mtd8/nvmem
hexdump: /sys/bus/nvmem/devices/mtd8/nvmem: Bad message
root@OpenWrt:~#
OEM doesn't expose this
root@GL-X2000:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "0:SBL1"
mtd1: 00080000 00020000 "0:MIBIB"
mtd2: 00040000 00020000 "0:BOOTCONFIG"
mtd3: 00100000 00020000 "0:QSEE"
mtd4: 00040000 00020000 "0:DEVCFG"
mtd5: 00040000 00020000 "0:CDT"
mtd6: 00080000 00020000 "0:APPSBLENV"
mtd7: 00140000 00020000 "0:APPSBL"
mtd8: 00100000 00020000 "0:ART"
mtd9: 00080000 00020000 "0:TRAINING"
mtd10: 00200000 00020000 "CFG"
mtd11: 00200000 00020000 "log"
mtd12: 07600000 00020000 "rootfs"
mtd13: 0036237c 0001f000 "kernel"
mtd14: 003e9800 0001f000 "wifi_fw"
mtd15: 04107000 0001f000 "ubi_rootfs"
mtd16: 0214d000 0001f000 "rootfs_data"
root@GL-X2000:~# find /sys/bus/nvmem/devices/
/sys/bus/nvmem/devices/
/sys/bus/nvmem/devices/qfprom0
i think its qfprom in oem... i would use ow for this. you can back up each partition from luci if you haven't already too
$ hexdump -C GL-X2000.mtd8.bin
00000000 ff ff ff ff ff ff 94 83 c4 ab 32 f5 ff ff ff ff |..........2.....|
00000010 77 6e 62 33 32 66 35 ff ff ff ff ff ff ff ff ff |wnb32f5.........|
00000020 31 62 62 36 31 32 38 34 65 30 38 37 63 61 31 35 |1bb61284e087ca15|
00000030 37 38 61 65 61 31 33 33 39 36 32 64 37 34 39 62 |78aea133962d749b|
00000040 50 54 35 58 59 33 58 34 35 53 ff ff ff ff ff ff |PT5XY3X45S......|
00000050 66 69 72 73 74 74 65 73 74 ff ff ff ff ff ff ff |firsttest.......|
00000060 73 65 63 6f 6e 64 74 65 73 74 ff ff ff ff ff ff |secondtest......|
00000070 47 4c 2d 32 34 31 32 30 32 34 30 30 36 34 35 ff |GL-241202400645.|
00000080 ff ff ff ff ff ff ff ff 44 45 ff ff ff ff ff ff |........DE......|
00000090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
The second mac-addr is not in the file
ok no worries we can set it in dts
USB works in USB2 mode only for now. Enabling USB3 is proving to be harder than expected, I’ve emailed qcom but I’m waiting for their reply.
The packages are already selected in the config file in the root of qualcommax.
Id also recommend to not hardcode the nand partitions but instead retrieve them from SMEM and only list the ART partition to retrieve the MAC addresses.
Does this device use the bootconfig partition to toggle between boot partitions? If so, check the scripts used for Linksys MX6200 and the Zyxel device (there’s only one in ipq50xx).
no, same layout as b3000 ...
[ 0.936816] spi-nand spi0.0: Winbond SPI NAND was found.
[ 0.936868] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[ 0.956714] 13 fixed-partitions partitions found on MTD device spi0.0
[ 0.956779] Creating 13 MTD partitions on "spi0.0":
[ 0.962160] 0x000000000000-0x000000080000 : "0:SBL1"
[ 0.968902] 0x000000080000-0x000000100000 : "0:MIBIB"
[ 0.974220] 0x000000100000-0x000000140000 : "0:BOOTCONFIG"
[ 0.978534] 0x000000140000-0x000000240000 : "0:QSEE"
[ 0.985269] 0x000000240000-0x000000280000 : "0:DEVCFG"
[ 0.989066] 0x000000280000-0x0000002c0000 : "0:CDT"
[ 0.994477] 0x0000002c0000-0x000000340000 : "0:APPSBLENV"
[ 0.999551] 0x000000340000-0x000000480000 : "0:APPSBL"
[ 1.006154] 0x000000480000-0x000000580000 : "0:ART"
[ 1.011236] 0x000000580000-0x000000600000 : "0:TRAINING"
[ 1.014677] 0x000000600000-0x000000800000 : "CFG"
[ 1.022639] 0x000000800000-0x000000a00000 : "log"
[ 1.027361] 0x000000a00000-0x000008000000 : "rootfs"
[ 1.219394] mtd: setting mtd12 (rootfs) as root device
I am updating the dts now... i'll fix nand and macs and try and get the fan functioning on some level, I am no help with usb.
@boecko are you planning on creating a pr for this device ? it might not hurt to get one started. This dts will need allot of work, the more eyes the better. I suppose we should get it running first ..
are all leds the same color ..green or are they actual pwm leds ? i need to update leds in dts to use color/function in place of label
I've invited you to my repo so you don't have to do PRs right now.
About the PR.
I have to catch some DTS skills before i'll do a PR to upstream
so be patient with me.
I'm compiling linux kernels since 30 years (starting with 2.0.x) but avoided this stuff alltogether ![]()
you can start by updating the leds
..
currently you have ...
led_system_power: led_system_power {
label = "led_system_power";
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
each of these needs to be updated to use newer the color/function standard.
led_system_power: led_system_power {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
use the.. leds/common.h to select the appropriate function for the led. Valid led colors can be found here as well
If not i will finish it later tonight.
It runs on 100%
done https://github.com/boecko/openwrt/commit/81cfbdb1de3b6bfdcb2d1f4722e36b034975994c
I'm not sure if the 5g-signal indicators are correctly set or needed.
