robimarko / openwrt

Linux distribution for embedded devices
https://openwrt.org
Other
402 stars 129 forks source link

Implement ipq60xx support (shameless plug) #53

Closed mrnuke closed 1 year ago

mrnuke commented 2 years ago

I have a TP-Link EAP610-Outdoor that I'd like to support. The purpose of this shameless plug is to let people know I'm working on a ipq60xx device.

I've started implementing it here: https://github.com/mrnuke/openwrt/commits/eap610-outdoor

It's based heavily on the existing ipq807x work from this repo. I don't have a plan on this this might be merged, but since it relies on nss-packages for the time being, I would like it to go through this repo first. I'll happily takes comments, concerns or suggestions in this issue.

Status

solidus1983 commented 1 year ago

@kirdesde

https://raw.githubusercontent.com/solidus1983/openwrt/eap610-outdoor/target/linux/ipq60xx/image/generic.mk https://raw.githubusercontent.com/solidus1983/openwrt/eap610-outdoor/target/linux/ipq60xx/image/Makefile

Hope this helps, also i am new to the whole porting game.

kirdesde commented 1 year ago

And ipq6018.img is just the renamed openwrt-ipq60xx-generic-gl-ax1800-initramfs-fit-uImage.itb? Please do a binwalk of your ipq6018.img and post the output.

solidus1983 commented 1 year ago

@kirdesde yep, Will quickly boot the vm back up now for the binwalk what commands am i using ?

kirdesde commented 1 year ago

just install the binwalk package and do

binwalk /path/to/ipq6018.img
solidus1983 commented 1 year ago

@kirdesde

Binwalk output of the ufit image

0 0x0 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)

binwalk output of the sysupgrade image

0 0x0 POSIX tar archive (GNU), owner user name: "de-gl-ax1800/"

kirdesde commented 1 year ago

Your initramfs image is missing the FDT. It should look like this:

--------------------------------------------------------------------------------
0             0x0             Flattened device tree, size: 12044740 bytes, version: 17
232           0xE8            gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
10978265      0xA783D9        AES S-Box
11739480      0xB32158        GIF image data, version "89a", 32 x
12019368      0xB766A8        Flattened device tree, size: 24016 bytes, version: 17

Do you even have a dtb in the build_dir/kernel_dir?

Please do a

make target/install V=s

and look in the output for the initramfs generation, I guess there is a at least a warning regarding the missing dtb

solidus1983 commented 1 year ago

@kirdesde here is a log of building with the command you asked.

error.txt

kirdesde commented 1 year ago
Error: /home/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq60xx_generic/linux-5.15.69/arch/arm64/boot/dts/qcom/ipq6018-gl-ax1800.dtsi:175.30-31 syntax error
FATAL ERROR: Unable to parse input tree
make[4]: *** [Makefile:19: /home/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq60xx_generic/image-ipq6018-gl-ax1800.dtb] Error 1
solidus1983 commented 1 year ago

So looks like i can't use the TIP dts/dtsi files 😞

kirdesde commented 1 year ago

So looks like i can't use the TIP dts/dtsi files disappointed

At least not just copy & paste. It's better to use the eap610 dts as an example and then add / update the ax1800 specific stuff.

solidus1983 commented 1 year ago

Thanks, will give it a shot.

kirdesde commented 1 year ago

The TIP is based on qsdk kernel, that means also the dts contains a lot of qsdk-specific stuff that doesn't fit the upstream kernel.

kirdesde commented 1 year ago

here you go

https://github.com/kirdesde/ax1800/commit/a3494b3cf083e5d63e07a8ffc9837341204134ce#diff-487dda4102773a4c4e8f7efff04a3f7e4da68e501833eb0fdfd4787a5723253a

Due to github limitations I can't open a PR to your repo. But you can cherry-pick my commit. Hope that helps

solidus1983 commented 1 year ago

@kirdesde just noticed what you did your a star man, a star! will download and patch after.

kirdesde commented 1 year ago

@kirdesde just noticed what you did your a star man, a star! will download and patch after.

You're welcome. Maybe you should open an issue on your repo for further discussions regarding the ax1800. Just to avoid "spamming" this ipq60xx generic issue

mrnuke commented 1 year ago

@kirdesde, thank you for helping out with @solidus1983's problem. You make tracking that down look easy.

New issue with the latest rebase on @robimarko's latest IPQ8074 branch. Upon reboot, the WCSS crashes, and the system needs a power cycle. The crash appears identical to the issue I saw before disabling coldboot calibration.

An original suspicion was that 0266-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch is causing the problem. However, removing said patch does not resolve the crash on reboot.

crash log
[  360.094750] ------------[ cut here ]------------
[  360.101483] WARNING: CPU: 3 PID: 3107 at q6v5_wcss_stop+0x8a0/0x8e4
[  360.106257] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet ath11k_ahb ath11k pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211 cfg80211 slhc qrtr_smd qrtr qmi_helpers ns nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c crc_ccitt compat seqiv jitterentropy_rng drbg michael_mic hmac cmac leds_gpio qca_nss_dp qca_ssdk gpio_button_hotplug realtek crc32c_generic
[  360.152514] CPU: 3 PID: 3107 Comm: procd Not tainted 5.15.69 #0
[  360.174748] Hardware name: TP-Link EAP610-Outdoor (DT)
[  360.180390] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  360.185599] pc : q6v5_wcss_stop+0x8a0/0x8e4
[  360.192451] lr : q6v5_wcss_stop+0x8a0/0x8e4
[  360.196619] sp : ffffffc00d6c3b70
[  360.200784] x29: ffffffc00d6c3b70 x28: ffffff8003c4a340 x27: 0000000000000000
[  360.204264] x26: ffffff80036da490 x25: ffffffc0088fdf58 x24: 0000000000000001
[  360.211382] x23: 0000000000418958 x22: 00000053d72cf901 x21: ffffffc0087dc118
[  360.218500] x20: ffffff8005641900 x19: ffffff800553c478 x18: 0000000000000168
[  360.225618] x17: 796b736e6f647361 x16: 70203a706f74735f x15: ffffffc00a0c79c8
[  360.232735] x14: 0000000000000438 x13: 0000000000000168 x12: ffffffc00d6c37e8
[  360.239853] x11: ffffffc00a11f9c8 x10: 00000000fffff000 x9 : ffffffc00a11f9c8
[  360.246972] x8 : 0000000000000000 x7 : ffffffc00a0c79c8 x6 : 00000000ffffefff
[  360.254090] x5 : ffffffc00a11f9c8 x4 : 00000000ffffefff x3 : 0000000000000000
[  360.261207] x2 : 0000000000000000 x1 : ffffff8003c4a340 x0 : 000000000000003e
[  360.268327] Call trace:
[  360.275435]  q6v5_wcss_stop+0x8a0/0x8e4
[  360.277694]  rproc_stop+0xb8/0x180
[  360.281514]  rproc_shutdown+0x68/0xd4
[  360.284986]  0xffffffc000c4e0ec
[  360.288718]  ath11k_core_deinit+0x9c/0x460 [ath11k]
[  360.291673]  0xffffffc000c4e8e4
[  360.296530]  platform_shutdown+0x24/0x34
[  360.299656]  device_shutdown+0x140/0x250
[  360.303823]  __do_sys_reboot+0x1dc/0x260
[  360.307729]  __arm64_sys_reboot+0x24/0x30
[  360.311636]  invoke_syscall.constprop.0+0x5c/0x104
[  360.315542]  do_el0_svc+0x74/0x16c
[  360.320228]  el0_svc+0x18/0x54
[  360.323613]  el0t_64_sync_handler+0xa4/0x130
[  360.326654]  el0t_64_sync+0x184/0x188
[  360.331079] ---[ end trace 858d0f8e0c99d457 ]---
kirdesde commented 1 year ago

Strange, I don't think we had a similar issue on ipq807x. Maybe the remoteproc it's not getting reset properly during reboot?

Will check that on my wax610 tomorrow.

kirdesde commented 1 year ago

Hi, I'm seeing issues as well an the WAX610, but on the ethernet side. The phy is't regognized and during ssdk phy init there's a sometimes a crash and the board also needs a power cycle.

Also on the glinet ax1800 from solidus1983 we are having the same crash....but ath11k is sill working fine.

robimarko commented 1 year ago

Are you defining the PHY reset GPIO?

If so, you can try to define a delay after its deasserted until it gets probed

kirdesde commented 1 year ago

Are you defining the PHY reset GPIO?

If so, you can try to define a delay after its deasserted until it gets probed

On the WAX610 and on the glinet AX1800 there is just the mdio-reset defined, no additional phy reset.

for example:

&mdio {
    status = "okay";
    pinctrl-0 = <&mdio_pins>;
    pinctrl-names = "default";
    reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;

    qca8081: ethernet-phy@4 {
        reg = <24>;
    };
};
robimarko commented 1 year ago

That is the PHY reset, MDIO itself doesn't have a reset.

So you should put that under the PHY itself, but then you have to add compatible with the PHY ID and then define delay after deassert

kirdesde commented 1 year ago

Okay, we already have the compatible. What delay would you propose?

robimarko commented 1 year ago

Start high, something like 2 seconds (That should be way too much time)

kirdesde commented 1 year ago

Okay thanks, I'll try that

kirdesde commented 1 year ago

On the glinet we have 5 phys defined, under which we should define the reset? Or doesn't matter it?

robimarko commented 1 year ago

Are they all QC8075 or is there a 2.5G one as well?

kirdesde commented 1 year ago

all QCA8075

robimarko commented 1 year ago

Then it should go directly in the MDIO node

kirdesde commented 1 year ago

Okay, just to make sure, you mean the "reset-deassert-us" property, right?

robimarko commented 1 year ago

Yes, that will give you a delay till it attempts probing after reset is deasserted

kirdesde commented 1 year ago

No luck I'm using this on the wax610:

reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
    reset-deassert-us = <2000000>;

    qca8081: ethernet-phy@4 {
        compatible = "ethernet-phy-id004d.d101";

During DP init I get this:

[    2.958383] QCA808X ethernet 90000.mdio-1:18: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:18, irq=POLL)
[    2.959277]nss-dp 3a001800.dp eth0: Registered netdev eth0(qcom-id:5)
[    2.967597] **********************************************************
[    2.973801] * NSS Data Plane driver
[    2.980297] **********************************************************
[    2.985911] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.995962] init: - preinit -
[    3.104642] random: jshn: uninitialized urandom read (4 bytes read)
[    3.124014] random: jshn: uninitialized urandom read (4 bytes read)
[    3.135483] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    3.750202] hsl_phy_phydev_get[773]:ERROR:phy_addr 0 phydev is NULL
[    3.750250] hsl_phy_phydev_get[773]:ERROR:phy_addr 1 phydev is NULL
[    3.755289] hsl_phy_phydev_get[773]:ERROR:phy_addr 2 phydev is NULL
[    3.761557] hsl_phy_phydev_get[773]:ERROR:phy_addr 3 phydev is NULL
[    4.790199] hsl_phy_phydev_get[773]:ERROR:phy_addr 0 phydev is NULL
[    4.790246] hsl_phy_phydev_get[773]:ERROR:phy_addr 1 phydev is NULL
[    4.795285] hsl_phy_phydev_get[773]:ERROR:phy_addr 2 phydev is NULL
[    4.801551] hsl_phy_phydev_get[773]:ERROR:phy_addr 3 phydev is NULL

And the glinet Ax1800 is stillcrashing after ssdk init....

robimarko commented 1 year ago

I am not sure those are errors, i suppose it by default will try to get PHY from those as there isn't really a way to disable a MAC with the mode setting.

You can see that it attaches to the PHY you defined just fine

kirdesde commented 1 year ago

Yeah, unfortunately those messages are spamming the log.

I've reverted the ssdk bump, and the messages are gone. So it's got to be to do with the new ssdk version (and maybe the external phy support)?

robimarko commented 1 year ago

It's probably SSDK being stupid as DTS only defines one port. AFAIK, you cannot really disable MAC-s, you can only set them to the max value so its still trying to fetch the PHY via some broken logic.

kirdesde commented 1 year ago

@robimarko Any idea about that issue on the glinet?

We are using the very same DTS setup like in the TIP (and the delay in addition):

pinctrl-0 = <&mdio_pins>;
    pinctrl-names = "default";
    reset-gpios = <&tlmm 74 GPIO_ACTIVE_HIGH>;
    reset-deassert-us = <2000000>;

But the phys aren't even recognized:

mdio_bus 90000.mdio-1: MDIO device at address 0 is missing.
[    0.736327] mdio_bus 90000.mdio-1: MDIO device at address 1 is missing.
[    0.741731] mdio_bus 90000.mdio-1: MDIO device at address 2 is missing.
[    0.748309] mdio_bus 90000.mdio-1: MDIO device at address 3 is missing.
[    0.754921] mdio_bus 90000.mdio-1: MDIO device at address 4 is missing.

After ssdk init it crashes:

ssdk_switch_device_num_init[1335]:INFO:ess-switch dts node number: 1
[    1.381939] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    1.388293] ssdk_dt_parse_access_mode[999]:INFO:switch_access_mode: local bus
[    1.394304] ssdk_dt_parse_access_mode[1012]:INFO:switchreg_base_addr: 0x3a000000
[    1.401649] ssdk_dt_parse_access_mode[1013]:INFO:switchreg_size: 0x1000000
[    1.409038] ssdk_dt_parse_mac_mode[327]:INFO:mac mode = 0x0
[    1.415728] ssdk_dt_parse_mac_mode[336]:INFO:mac mode1 = 0xff
[    1.421195] ssdk_dt_parse_mac_mode[345]:INFO:mac mode2 = 0xff
[    1.427164] ssdk_dt_parse_uniphy[364]:INFO:ess-uniphy DT exist!
[    1.433214] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    1.552148] ssdk_gcc_clock_init[1275]:INFO:SSDK gcc clock init successfully!
[    1.553036] ssdk_phy_driver_init[363]:INFO:dev_id = 0, phy_adress = 0, phy_id = 0xffffffff phytype doesn't match
[    1.558318] ssdk_phy_driver_init[363]:INFO:dev_id = 0, phy_adress = 1, phy_id = 0xffffffff phytype doesn't match
[    1.568488] ssdk_phy_driver_init[363]:INFO:dev_id = 0, phy_adress = 2, phy_id = 0xffffffff phytype doesn't match
[    1.578640] ssdk_phy_driver_init[363]:INFO:dev_id = 0, phy_adress = 3, phy_id = 0xffffffff phytype doesn't match
[    1.588795] ssdk_phy_driver_init[363]:INFO:dev_id = 0, phy_adress = 4, phy_id = 0xffffffff phytype doesn't match
[    1.598904] regi_init[3953]:INFO:Initializing HPPE!!
[    1.840799] ssdk_ppe_reset_init[1535]:INFO:ppe reset successfully!
[    1.844029] qca_hppe_portctrl_hw_init[123]:INFO:Cypress PPE port initializing
[    1.961189] __adpt_hppe_uniphy_psgmii_mode_set[1067]:INFO:uniphy 0 psgmii channel selection
[    2.086916] ssdk_switch_register[2017]:INFO:Chip version 0x1501
[    2.086953] qca_link_polling_select[1487]:INFO:link-polling-required node does not exist
[    2.091653] ssdk_switch_register[2043]:INFO:polling is selected
[    2.099977] regi_init[3957]:INFO:Initializing HPPE Done!!
[    2.105717] ssdk_genl_init[211]:INFO:ssdk genl family register success.
[    2.111183] regi_init[4020]:INFO:qca-ssdk module init succeeded!
[    2.121148] EDMA ver 1 hw init
[    2.124058] EDMA HW Reset completed succesfully
[    2.126736] Num rings - TxDesc:1 (23-23) TxCmpl:1 (23-23)
[    2.131146] RxDesc:1 (15-15) RxFill:1 (7-7)
[    2.137237] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000308
[    2.140689] Mem abort info:
[    2.151450]   ESR = 0x96000005
[    2.154129]   EC = 0x25: DABT (current EL), IL = 32 bits
[    2.157258]   SET = 0, FnV = 0
[    2.162732]   EA = 0, S1PTW = 0
[    2.165588]   FSC = 0x05: level 1 translation fault
[    2.168628] Data abort info:
[    2.173494]   ISV = 0, ISS = 0x00000005
[    2.176612]   CM = 0, WnR = 0
[    2.180171] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000042ec8000
[    2.183311] [0000000000000308] pgd=0800000042eb8003, p4d=0800000042eb8003, pud=0800000042eb8003, pmd=0000000000000000
[    2.189736] Internal error: Oops: 96000005 [#1] SMP
[    2.200313] Modules linked in: qca_nss_dp(+) qca_ssdk gpio_button_hotplug crc32c_generic
[    2.205009] CPU: 1 PID: 359 Comm: kmodloader Not tainted 5.15.69 #0
[    2.213336] Hardware name: GL Technologies, Inc. AX1800 (DT)
[    2.219326] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    2.225230] pc : phy_attached_print+0x28/0x1b0
[    2.231909] lr : phy_attached_info+0x14/0x20
[    2.236423] sp : ffffffc009b937d0
[    2.240848] x29: ffffffc009b937d0 x28: ffffffc0080bf560 x27: ffffffc000979700
[    2.244068] x26: ffffffc000979750 x25: 000000000000001f x24: ffffff8002e9db68
[    2.251185] x23: ffffff8003899428 x22: ffffff80026dd010 x21: 0000000000000000
[    2.258303] x20: ffffff80038918c0 x19: 0000000000000000 x18: 0000000000000020
[    2.265422] x17: 0000000000000124 x16: ffffffc000977420 x15: ffffffc089b9378d
[    2.272540] x14: 0000000000000001 x13: 007473696c5f7974 x12: 696e696666615f65
[    2.279657] x11: 0000000000000040 x10: ffffffc009b936d0 x9 : 0000000000000000
[    2.286775] x8 : ffffff800275c680 x7 : 0000000000000006 x6 : 0000000000000184
[    2.293894] x5 : ffffff801ff22750 x4 : 0000000000000000 x3 : 0000000000000001
[    2.301012] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[    2.308130] Call trace:
[    2.315239]  phy_attached_print+0x28/0x1b0
[    2.317500]  phy_attached_info+0x14/0x20

If we use any other reset GPIO, the phys are recognized and ssdk looks fine, but only eth4 is "half" is working.

Are we missing something here?

robimarko commented 1 year ago

I am gonna bet on GPIO_ACTIVE_HIGH needing to be GPIO_ACTIVE_LOW, your classic QCA bullshit here.

Crash is kind of predictable as its trying to print info about the PHY which is just random junk in memory or simply NULL pointer and it implodes.

kirdesde commented 1 year ago

We already tried GPIO_ACTIVE_LOW but when only eth4 is more or less working

robimarko commented 1 year ago

Hm, I would then try poking around GPIO-s manually with gpiod and using mdio-tools to see when PHY-s pop up. I dont really have a better idea, but QCA807x for sure is reset when its reset line is pulled low.

kirdesde commented 1 year ago

Okay good idea

ghost commented 1 year ago

160 MHz channels on 5GHz

Wait what? ipq60xx's built in radio can 160MHz?

maybe it really is?

            HE RX MCS and NSS set 160 MHz
                     1 streams: MCS 0-11
                     2 streams: MCS 0-11
                     3 streams: not supported
                     4 streams: not supported
                     5 streams: not supported
                     6 streams: not supported
                     7 streams: not supported
                     8 streams: not supported
            HE TX MCS and NSS set 160 MHz
                     1 streams: MCS 0-11
                     2 streams: MCS 0-11
                     3 streams: not supported
                     4 streams: not supported
                     5 streams: not supported
                     6 streams: not supported
                     7 streams: not supported
                     8 streams: not supported

atleast on coolsnowwolf's QSDK amalgamation this is what it says but it didnt work yeah.

kirdesde commented 1 year ago

@kirdesde, thank you for helping out with @solidus1983's problem. You make tracking that down look easy.

New issue with the latest rebase on @robimarko's latest IPQ8074 branch. Upon reboot, the WCSS crashes, and the system needs a power cycle. The crash appears identical to the issue I saw before disabling coldboot calibration.

* Everything okay when rebasing on: [3583e54](https://github.com/robimarko/openwrt/commit/3583e54fcc2f5c5ab8dfffd03f31b6bd63b040b4)

* Crash appears when rebasing on: [ae69230](https://github.com/robimarko/openwrt/commit/ae69230d5cbc6b28596f5285602bcfb289c81571)

An original suspicion was that 0266-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch is causing the problem. However, removing said patch does not resolve the crash on reboot. crash log

Hi, I'm seeing the very same crash during a reboot on the WAX1610. Strange thing is, based on the older commit my board even refuses to reboot.

solidus1983 commented 1 year ago

@ayyyuki1 It can't do 160Mhz as it will simply reboot loop the router

@kirdesde i get a crash during reboot as well.

ghost commented 1 year ago

@ayyyuki1 It can't do 160Mhz as it will simply reboot loop the router

Yeah, I had to reset because of this.

... I hope in some time MR7350 be usable with OpenWrt.

mrnuke commented 1 year ago

Hi, I'm seeing the very same crash during a reboot on the WAX1610. Strange thing is, based on the older commit my board even refuses to reboot.

Those are the exact symptoms on my end. You see the first stage bootloader print some messages, and then it just hangs, right?

@robimarko, you had mentioned on IRC about updating the TZ/QSEE (for MR7350). Were you able to document that process?

robimarko commented 1 year ago

@mrnuke Change https://github.com/mrnuke/openwrt/blob/eap610-outdoor/target/linux/ipq60xx/patches-5.15/1004-clk-qcom-ipq6018-add-missing-clocks.patch#L113

To .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, With scaling enabled I had exactly the same issue as I2C6 clock is somehow related to DVFS as well and kernel was trying to disable it as its unused.

I did not document TZ updating, but its not hard

kirdesde commented 1 year ago

Thanks! for me the that fixed the reboot issue. Now there is only one strange thing left, after a boot from flash the Ethernet looks good according to DP/ssdk but there is zero traffic. After a /etc/init.d/network restart it starts working.....

robimarko commented 1 year ago

For that I have no ideas unfortunately

mrnuke commented 1 year ago

@mrnuke Change https://github.com/mrnuke/openwrt/blob/eap610-outdoor/target/linux/ipq60xx/patches-5.15/1004-clk-qcom-ipq6018-add-missing-clocks.patch#L113

To .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,

In my case, this change did not fix the crash on reboot issue.

I did not document TZ updating, but its not hard

Where do I begin? Assuming I can find the right image, do I just flash it with mtd write ?

kirdesde commented 1 year ago

Sorry, I have not made myself clear enough.

The suggested patch change from robimarko fixed the reboot issue on the "old" rebase version for me (otherwise the board refuses to even reboot) On the current rebase I'm still seeing the same crash as you.

kirdesde commented 1 year ago

BTW I noticed that the cpu regulator support for IPQ6018 isn't enabled.

SMD RPM needs to enabled:

From 740ca66592b7057352add15243bab1cf574c826f Mon Sep 17 00:00:00 2001
From: Dirk Buchwalder <buchwalder@posteo.de>
Date: Fri, 7 Oct 2022 09:18:31 +0200
Subject: [PATCH] enable smd rpm driver

---
 target/linux/ipq60xx/config-5.15 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ipq60xx/config-5.15 b/target/linux/ipq60xx/config-5.15
index 2e4c9a1024..006f0ffa44 100644
--- a/target/linux/ipq60xx/config-5.15
+++ b/target/linux/ipq60xx/config-5.15
@@ -155,7 +155,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GLOB=y
-CONFIG_GPIOLIB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
@@ -340,6 +339,7 @@ CONFIG_QCOM_BAM_DMA=y
 # CONFIG_QCOM_CLK_APCC_MSM8996 is not set
 # CONFIG_QCOM_CLK_APCS_MSM8916 is not set
 # CONFIG_QCOM_CLK_APCS_SDX55 is not set
+CONFIG_QCOM_CLK_SMD_RPM=y
 # CONFIG_QCOM_COINCELL is not set
 # CONFIG_QCOM_COMMAND_DB is not set
 # CONFIG_QCOM_CPR is not set
@@ -361,11 +361,13 @@ CONFIG_QCOM_Q6V5_COMMON=y
 CONFIG_QCOM_Q6V5_WCSS=y
 CONFIG_QCOM_QFPROM=y
 # CONFIG_QCOM_RMTFS_MEM is not set
+CONFIG_QCOM_RPMCC=y
 # CONFIG_QCOM_RPMH is not set
+CONFIG_QCOM_RPMPD=y
 CONFIG_QCOM_RPROC_COMMON=y
 CONFIG_QCOM_SCM=y
 # CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
-# CONFIG_QCOM_SMD_RPM is not set
+CONFIG_QCOM_SMD_RPM=y
 CONFIG_QCOM_SMEM=y
 CONFIG_QCOM_SMEM_STATE=y
 CONFIG_QCOM_SMP2P=y
@@ -393,6 +395,7 @@ CONFIG_REGULATOR_CPR3=y
 # CONFIG_REGULATOR_CPR3_NPU is not set
 CONFIG_REGULATOR_CPR4_APSS=y
 # CONFIG_REGULATOR_QCOM_LABIBB is not set
+CONFIG_REGULATOR_QCOM_SMD_RPM=y
 CONFIG_REGULATOR_QCOM_SPMI=y
 # CONFIG_REGULATOR_QCOM_USB_VBUS is not set
 # CONFIG_REGULATOR_VQMMC_IPQ4019 is not set
-- 
2.37.2

CPU is now using the opp table for scaling.

That fixed the non working ethernet after a boot.

Unfortunately the reboot crash is still there.