robimarko / openwrt

Linux distribution for embedded devices
https://openwrt.org
Other
401 stars 130 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

kirdesde commented 2 years ago

@solidus1983 : can you try the SMD RPM patch if it's changing anything ethernet related on the AX1800?

solidus1983 commented 2 years ago

Compiling new build already

solidus1983 commented 2 years ago
 DEV      PHY-ID  LINK
0x00  0x004dd0b1  up
0x01  0x004dd0b1  down
0x02  0x004dd0b1  up
0x03  0x004dd0b1  down
0x04  0x004dd0b1  down
0x05  0x06820805  down

Still not getting a DHCP ip on WAN port or pinging on it, LAN1-3 still not able to ping 192.168.132.2 (TFTP server) even after changing the network config. LAN4 is still able to ping and get pinged

kirdesde commented 2 years ago

Please post the output of:

cat /sys/kernel/debug/regulator/regulator_summary

solidus1983 commented 2 years ago

Ignore: Was in Gl-inets firmware.

Right correct output now:

root@OpenWrt:/# cat /sys/kernel/debug/regulator/regulator_summary
 regulator                      use open bypass  opmode voltage current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                  1    2      0 unknown     0mV     0mA     0mV     0mV
    59000.qusb-vdda-phy-dpdm      0                                 0mA     0mV     0mV
    59000.qusb-vdda-pll           0                                 0mA     0mV     0mV

Also robimarko CLK fix stopped the phy up and down yoyo via nss-dp i reported on my issue thread.

kirdesde commented 2 years ago

Have you recompiled the kernel?

The s2 regulator is still missing.

Should look like that:

s2                            2    1      0 unknown   725mV     0mA   725mV  1062mV 
       cpu0-cpu                   1                                 0mA   862mV   862mV
solidus1983 commented 2 years ago

I used make -j$(nproc) clean world after each change.

robimarko commented 2 years ago

Is there interest for a IRC channel, Telegram group or whatever for QCA development?

solidus1983 commented 2 years ago

Well i have a Telegram account already. haven't used irc for ages.

kirdesde commented 2 years ago

I don't have Telegram ...what about a Matrix group (https://joinmatrix.org/)?

robimarko commented 2 years ago

I have an Element.io account, its Matrix compatible and has good desktop client

kirdesde commented 2 years ago

I'm on matrix.org

mrnuke commented 2 years ago

Do we need something fancy, or can an IRC subchannel work? I'm also willing to give matrix a go.

Subject: [PATCH] enable smd rpm driver

Applied, Thanks!

robimarko commented 2 years ago

IRC works for me, I can just setup one on OFTC but honestly Matrix is way more user friendly with the clients

solidus1983 commented 2 years ago

Whatever you decide let me know.

kirdesde commented 2 years ago

I've created a private Matrix group. If you like, send me your Matrix ID (maybe via PM on forum.openwrt.org or via email)

solidus1983 commented 2 years ago

Account Created and DM on Forum sent!

kirdesde commented 2 years ago

This might be right :-)

kirdesde commented 2 years 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 ?

+1 for a TZ/QSEE update howto. I found a IPQ6018 QSEE image in the Synology RT6600ax firmware image (https://global.download.synology.com/download/SRM/release/1.3.1/9346-1/SRM_RT6600ax_9346.pat?model=RT6600ax&bays=0&srm_version=1.3.1&build_number=9346) with TZ-Version TZ.WNS.5.1-00132

I've 2 fancy little Orbi Pro that refuses to boot kernel 5.15, TZ version is TZ.WNS.5.1-00075.

robimarko commented 2 years ago

Great, if you found a new enough image then simply erase the QSEE partition and write the new image. You can do it from stock FW or U-boot

kirdesde commented 2 years ago

I think I bricked it, it stuck's now at:

D -     29158 - QSEE Dev Config Image Loaded, Delta - (36354 Bytes)
B -    414220 - Image Load, Start
D -      6375 - Auth

I've used mtd erase and mtd write

robimarko commented 2 years ago

Well, yeah it's bricked nicely. What was the storage medium?

Please tell me you did not use mtd on NAND?

kirdesde commented 2 years ago

Yes it's NAND....:-( damn

kirdesde commented 2 years ago

So nand-utils the next time

robimarko commented 2 years ago

I seriously wish that tool checked for underlying media first, it's not meant for NAND as it doesn't do any kind of bad block checks. Using U-boot is safer.

What is the board you tried this on?

kirdesde commented 2 years ago

Netgear SXR30, IPQ6018

robimarko commented 2 years ago

Lets continue on the Matrix group

robimarko commented 2 years ago

OK, there is a big thing I forgot to mention. DO NOT FLASH REPLACEMENT/UPDATED QSEE/TZ IF SECURE BOOT IS ENABLED

robimarko commented 2 years ago

@mrnuke This sorts out the TZ without having to update anything: https://github.com/robimarko/linux/commit/04e0d236dfff2dc4ed8eff7f70ac375497c51617

robimarko commented 1 year ago

This has been continued on Element

SunBenKu commented 1 year ago

Dear robimarko I did thest steps

  1. tftpboot openwrt-ipq60xx-generic-eap610-outdoor-initramfs-fit-uImage.itb
  2. bootm 0x44000000

the firmware can't start kernel

Loading kernel from FIT Image at 44000000 ...

Using 'config@1' configuration Trying 'kernel-1' kernel subimage Description: ARM64 OpenWrt Linux-5.15.69 Type: Kernel Image Compression: gzip compressed Data Start: 0x440000e8 Data Size: 9726355 Bytes = 9.3 MiB Architecture: AArch64 OS: Linux Load Address: 0x41000000 Entry Point: 0x41000000 Hash algo: crc32 Hash value: f23c78e8 Hash algo: sha1 Hash value: d41f406ae8555bcc6bc9726a5e9f09197c15239a Verifying Hash Integrity ... crc32+ sha1+ OK

Loading fdt from FIT Image at 44000000 ...

Using 'config@1' configuration Trying 'fdt-1' fdt subimage Description: ARM64 OpenWrt eap610-outdoor device tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x44946bbc Data Size: 23379 Bytes = 22.8 KiB Architecture: AArch64 Hash algo: crc32 Hash value: 4cb99d4e Hash algo: sha1 Hash value: 349d208a857063c27e758c1cda05a7057addac77 Verifying Hash Integrity ... crc32+ sha1+ OK Booting using the fdt blob at 0x44946bbc Uncompressing Kernel Image ... OK Loading Device Tree to 484f7000, end 484ffb52 ... OK fdt-fixup: unable to find compatible node Using machid 0x8030003 from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor

Format: Log Type - Time(microsec) - Message - Optional Info

robimarko commented 1 year ago

I cant really help you with that