Closed qosmio closed 2 months ago
i think i got my tplink,onhub working with 11.4 firmware (23.05 branch), i don't know much, i just love tinkering.
memory node from /sys/firmware/fdt
memory {
device_type = "memory";
reg = <0x41500000 0x18a00000 0x5a000000 0x26000000>;
};
i need to make sure memory starts from 0x40000000,
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -406,6 +406,7 @@
memory {
device_type = "memory";
+ linux,usable-memory = <0x40000000 0x38000000>;
reg = <0x0 0x0>;
};
--- a/nss_core.c
+++ b/nss_core.c
@@ -506,6 +506,7 @@ static void nss_get_ddr_info(struct nss_mmu_ddr_info *mmu, char *name)
long cached;
struct sysinfo vals;
struct device_node *node;
+ const __be32 *ppp;
si_meminfo(&vals);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))
@@ -528,7 +529,10 @@ static void nss_get_ddr_info(struct nss_mmu_ddr_info *mmu, char *name)
if (node) {
int isize = 0;
int n_items;
- const __be32 *ppp = (__be32 *)of_get_property(node, "reg", &n_items);
+ ppp = (__be32 *)of_get_property(node, "linux,usable-memory", &n_items);
+ if (ppp == NULL) {
+ ppp = (__be32 *)of_get_property(node, "reg", &n_items);
+ }
n_items /= sizeof(ppp[0]);
nss_info_always("node size %d # items %d\n",
with those patch i no longer get this log in qca-nss-drv: "incorrect memory info %px items %d" (caused by n_items=16) in kernel log before: OF: fdt: Ignoring memory range 0x41500000 - 0x42000000 after: OF: fdt: Ignoring memory range 0x40000000 - 0x42000000
no random reboots, no TRAP, no kernel panic related to qca-nss so far this 4 days.
i don't know for sure if those patch are the reason to be able to boot, since i have a lot of patches i got from linux-ipq-5.4-QSDK-12.0. let's see in a couple of days
[ 16.098234] ssdk_switch_device_num_init[1160]:INFO:ess-switch dts node number: 1
[ 16.098385] ssdk_dt_get_switch_node[967]:WARN:cannot find ess-switch node
[ 16.104702] ssdk_plat_init start
[ 16.111605] ssdk_driver_register[2586]:INFO:Register QCA PHY driver
[ 16.420857] f1_phy_api_ops_init[1517]:INFO:qca probe f1 phy driver succeeded!
[ 16.423906] regi_init[3635]:INFO:qca-ssdk module init succeeded!
[ 16.539555] **********************************************************
[ 16.539591] * Driver :NSS GMAC Driver - RTL v(3.72a)
[ 16.544974] * Version :1.0
[ 16.550197] * Copyright :Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
[ 16.553225] **********************************************************
[ 16.676642] nss-gmac 37000000.ethernet eth0: Initialized NSS GMAC0 mode: rgmii, interface eth0: (base = 0x37000000, irq = 40, PhyId = 1, PollLink = 1)
[ 16.694390] nss-gmac 37400000.ethernet eth1: Initialized NSS GMAC2 mode: sgmii, interface eth1: (base = 0x37400000, irq = 41, PhyId = 0, PollLink = 0)
[ 16.838141] nss_driver - fw of size 622784 bytes copied to load addr: 40000000, nss_id : 0
[ 16.839021] nss_driver - Turbo No Support 0
[ 16.845407] Supported Frequencies -
[ 16.845416] 110Mhz
[ 16.849469] 275Mhz
[ 16.853287] 550Mhz
[ 16.855108]
[ 16.859360] bf615180: set sdma c6863800
[ 16.861090] bf615180: meminfo init succeed
[ 16.868709] debugfs: Directory 'wifi_mesh' with parent 'strings' already present!
[ 16.868749] debugfs: Directory 'wifi_mesh' with parent 'stats' already present!
[ 16.903682] nss_driver - fw of size 221452 bytes copied to load addr: 40800000, nss_id : 1
[ 16.903955] node size 1 # items 2
[ 16.903972] bf6190c0: set sdma c6863400
[ 16.910899] memory: 40000000 939524096 (avl 902029312) items 2 active_cores 2
[ 16.910928] addr/size storage words 1 1 # words 2 in DTS, ddr size 1000000
[ 16.910938] bf615180: nss core 0 booted successfully
[ 16.914348] bf6190c0: meminfo init succeed
[ 16.937286] debugfs: Directory 'dynamic_if' with parent 'stats' already present!
[ 16.941063] debugfs: File 'n2h' in directory 'strings' already present!
[ 16.948680] debugfs: File 'drv' in directory 'strings' already present!
[ 16.954945] debugfs: File 'c2c_tx' in directory 'strings' already present!
[ 16.961602] debugfs: File 'c2c_rx' in directory 'strings' already present!
[ 16.972020] node size 1 # items 2
[ 16.981168] memory: 40000000 939524096 (avl 902098944) items 2 active_cores 2
[ 16.984654] addr/size storage words 1 1 # words 2 in DTS, ddr size 1000000
[ 17.040175] QCA multicast snooping installed successfully
[ 17.088857] nss_lag_init[352]:LAG Manager Installed
[ 17.107930] <NSS-CRYPTO>:module loaded (platform - IPQ806x, build - Build_ID - 05/29/24, 15:59:35)
[ 17.108218] <NSS-CRYPTO>:Register with NSS driver-
[ 17.237315] <NSS-CRYPTO>:NSS Firmware initialized
[ 17.237538] <NSS-CRYPTO>:probing engine - 0
[ 17.241004] <NSS-CRYPTO>:Device Tree node found
[ 17.245125] <NSS-CRYPTO>:init completed for Pipe Pair[0]
[ 17.249608] <NSS-CRYPTO>:init completed for Pipe Pair[1]
[ 17.278696] <NSS-CRYPTO>:probing engine - 1
[ 17.278726] <NSS-CRYPTO>:Device Tree node found
[ 17.281759] <NSS-CRYPTO>:init completed for Pipe Pair[0]
[ 17.286314] <NSS-CRYPTO>:init completed for Pipe Pair[1]
[ 17.305733] <NSS-CRYPTO>:probing engine - 2
[ 17.305761] <NSS-CRYPTO>:Device Tree node found
[ 17.308812] <NSS-CRYPTO>:init completed for Pipe Pair[0]
[ 17.313245] <NSS-CRYPTO>:init completed for Pipe Pair[1]
[ 17.335598] <NSS-CRYPTO>:probing engine - 3
[ 17.335628] <NSS-CRYPTO>:Device Tree node found
[ 17.338666] <NSS-CRYPTO>:init completed for Pipe Pair[0]
[ 17.343111] <NSS-CRYPTO>:init completed for Pipe Pair[1]
That's amazing! I was bashing my head over it for weeks, and then just sort of accepted that 11.1 was going to be as far as I'd go with IPQ806x. I had since moved onto IPQ807x since they're super cheap to come by now.
i need to make sure memory starts from 0x40000000,
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -406,6 +406,7 @@ memory { device_type = "memory"; + linux,usable-memory = <0x40000000 0x38000000>; reg = <0x0 0x0>; };
I knew it was something to do with the load address, didn't even think to try the same address as the one for IPQ807x. Makes sense since the UBI32 cores share similar codebase.
I have my r7800 in storage somewhere, I'll need to try it out.
Are any of your changes available in a repo somewhere?
i tried it on the r7800. but the r7800 wont boot with that change. in addition. btw i can provide a 12.0 nss firmware for NSS.AK
i tried it on the r7800. but the r7800 wont boot with that change. in addition. btw i can provide a 12.0 nss firmware for NSS.AK
did you try it in kernel 6.1+ or 5.15? did you change the mem size for r7800? in my testing with kernel 6.6 i had to use the old hack
as for 12.0.r2, i think its still using the old code, i haven't tried 12.0.r2 using newer version of nss-drv
i used 6.1. for testing. the "old hack" you mentioned was already in my tree. just adding the linux,usable-memory property leads to the kernel not booting anymore. if i remove it, it works again just curious that all devices except for the onhub device have a additional memory@0 node maybe its related to that
but i think the issue is easy to resolve 0x3e000000 length is for 1gb devices. the 7800 has just 512 mb ram
but i think the issue is easy to resolve 0x3e000000 length is for 1gb devices. the 7800 has just 512 mb ram
so are you able to boot now?
still compiling :-)
works. running 12.0 firmware now on r7800
edit: 12.0 fw doesnt work. still crashes. will now try 11.4 edit: 10.4 doesnt work either. i will tomorrow connect my serial to a test device todo some more research. i hope i find a solution. but thank you for the hint with the addressing range
maybe this could be a hint also, for stability in my case https://github.com/regae/openwrt/commit/e3b59d45163abc704ae3740b91f89405010e298e
thx. i will check tomorrow with serial attached whats going on and how i can solve it. i will report my findings
everything is working. i just had a typo in the dts. i tested 11.4, 11.5 and 12.0
That's awesome news! I will take another stab at seeing if I can get a build going too for my R7800.
i am just curious, could you try igs module?
i think igs is not supported for AK.
nss_dynamic_interface_alloc_node(NSS_DYNAMIC_INTERFACE_TYPE_IGS)
returns nothing
i am just curious, could you try igs module? i think igs is not supported for AK.
nss_dynamic_interface_alloc_node(NSS_DYNAMIC_INTERFACE_TYPE_IGS)
returns nothing
That's correct, all of the nss-hosts
Makefiles for qca-nss-drv-qdisc-igs
limit that to IPQ807x/6018/5018
and higher. You would have to use the older nss-ifb
module for shaping.
i am just curious, could you try igs module? i think igs is not supported for AK.
nss_dynamic_interface_alloc_node(NSS_DYNAMIC_INTERFACE_TYPE_IGS)
returns nothingThat's correct, all of the
nss-hosts
Makefiles forqca-nss-drv-qdisc-igs
limit that toIPQ807x/6018/5018
and higher. You would have to use the oldernss-ifb
module for shaping.
fortunately this onhub i'm using is in dumb ap mode, good to know.
Using QSDK 11.4 (drv, clients, and ecm)
First panic caused by 0005-nss-drv-rework-NSS_CORE_DMA_CACHE_MAINT-ops.patch
After removing patch, still crashing but now a more generic error.