I am trying to add support for OpenWRT on a WatchGuard T35. The T35 uses a NXP T1024 SoC, which uses a e5500 CPU and has a PowerPC64 architecture.
After about a 100 hours of work - I have gotten OpenWRT to boot on a WatchGuard T35 - yippee!
I have have the flattened device tree .dts from the stock WatchGuard installation that I can turn into the device tree source .dts file, but of course the labels are gone.
The stock image use a v3.12 linux kernel. I'm working on getting OpenWRT v22.03.7 (linux kernel v5.10.221) working before working on getting the latest version of OpenWRT running. I belive the changes between linux v3.12 and 5.10.221 have changed sufficiently that I can't use the stock dtb anymore.
The device boots, and I get to userspace, but I have no Ethernet ports.
ip a shows only the loop-back interface.
Further, dmesg show the drivers failed to register for the Ethernet ports:
[ 0.116718] OF: /soc@ffe000000/fman@400000: could not get #clock-cells for /cpus/PowerPC,e5500@0/l2-cache
[ 0.126123] OF: /soc@ffe000000/fman@400000: could not get #clock-cells for /cpus/PowerPC,e5500@0/l2-cache
...
[ 2.831597] fsl_dpaa_mac ffe4e4000.ethernet: dev_get_drvdata(/soc@ffe000000/fman@400000/port@89000) failed
[ 2.841329] fsl_dpaa_mac: probe of ffe4e4000.ethernet failed with error -22
[ 2.848397] fsl_dpaa_mac ffe4e6000.ethernet: dev_get_drvdata(/soc@ffe000000/fman@400000/port@8a000) failed
[ 2.858103] fsl_dpaa_mac: probe of ffe4e6000.ethernet failed with error -22
How can I identify the correct device tree parameters?
I've made a few changes to the DTS to get this far, namely:
adding
clocks = <&clockgen 3 0>;
clock-names = "fmanclk";
to my fman@400000 node in the dts, with clockgen being a label for the global-utilies@e1000
as it is in linux/arch/powerpc/boot/dts/fsl/qoriq-clockgen{1,2}.dtsi
adding
fsl,ucode-addr = <0x1110000 0x2000>;
also to the fman node - that is the address of the fman ucode parition
adding labels to the port fman-port-1g-rx/tx nodes under fman and then
fman0_rx_0x0a: port@89000 {
compatible = "fsl,fman-port-1g-tx";
...
}
fman0_tx_0x2a: port@a9000 {...}
fman1_rx_0x0a: port@8a000 {...}
fman1_tx_0x2a: port@aa000 {...}
so that I can use them in the fman/ethernet nodes as fman-ports:
ethernet@e4000 {
fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
}
ethernet@e6000 {
fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
}
Again, I modeled this after linux/arch/powerpc/boot/dts/fsl/qoriq-fman{,3}-0-1g-2.dtsi
I have the T1024 reference design board (t1024rdb) documentation from NXP, as well - though I cannot share it here.