is this chip replaced after some time with another like it was done for r64?
seems like openwrt uses much smaller driver than i had used on my old r64 branch…but i guess it depends on swconfig framework
is the driver only this file (maybe some includes)?
i see no Makefile/Kconfig including it…
added both drivers to branch 5.15-r2pro of my repo…old driver is still not compilable due to api changes, openwrt-driver compiles (currently active)
as current dts for rk3568 EVB board does not have ethernet-node, i copied the node from rk3368 (clock constants are unknown, as they have different names like ACLK_GMAC0/PCLK_GMAC0/…) and changed compatible, as driver seems to support it
I copied the file rtl8367b and its depencies to my repo…so i hope RTL8367RB-VB-CG is supported by this. If this does not work i can try the driver i’ve used on bpi-r64 (but this still needs some changes to be compilable in 5.15)
i don’t know swconfig tool much (only its name) and cannot compile it outside of openwrt (tried some years ago). basicly it should have a fixed config for debian/ubuntu (wan to eth1,lanX to eth0)
seems like perl called by lintian is failed due to missing procfs…
Cannot open /proc/109668/fd, falling back to generic method - No such file or directory at /usr/share/perl5/IO/Async/OS/linux.pm line 38.
so i did this:
sudo mount -o bind /proc $rootdir/proc
now the error disappear, but still no binary in deb…but i see binary in usr/src/swconfig with actual timestamp and i can call it inside the chroot, so i append it here…no need for debian-package for now
swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)
maybe someone from bpi team can help me transforming the rtl8367 phy-driver to a dsa driver…i have stripped needed functions from the codebase (100k => 3.5k lines) to get a smaller driver. but i hang on mdio-bus needed for dsa (for accessing the phy)…don’t understand the concept behind acces from dsa core to the switch phy (imho driver should setup the switch not the dsa core, maybe some translation is required).
@wei.zuo can you tell me whats different in network compared to evb? I can boot mainline (5.16-rc4) with my dts (evb with changed iodomain and switch node added),but ethernet driver reports it cannot connect to phy
Just for info: mainline uboot (2022-01-rc) with patch for fip-creation is bootable,but cannot boot kernel. Confirmed by Peter. So i use peters uboot and boot Image+dtb with extlinux.conf (currently with his initrd and reduced quartz64 defconfig)
Our chipid 0x6367 seems to be supported.
Currently i hang on getting gmac/mdio up on soc-side (with reduced phy driver) but then we can test the dsa driver. currently it’s hard to apply it because it depends on net-next with many other patches before.
If anybody can figure out,how to define the dts (linking to mdio, interface mode) we can test it.
with a reset of switch using the gpio definition from phy-driver, i get dsa-driver running partially on my r64 v0.1…switch is initialized and dsa-ports are shown in “ip a”…after changing names the seem to be functional…but i cannot get the gmac to run (no traffic), in phy-driver it uses EXTPORT0 as gmac0 (sgmii-port in r64v0.1 i have changed to rgmii/1000Mbit/s already, dsa driver only supports only rgmii). this is mapped to internal number 16, need to look how this is used and compare to dsa driver where a dts-property “realtek,ext-int” (defined as 0-2, so i used 0) is used like it seems…but i’m unsure if i need to change “reg” too
but it seems they come not together (no traffic), rx_pkt_n is zero whereas tx_pkt_n is 51 after some pings (using “lan0” port, first lan next to wan)
@wei.zuo any idea? btw. i wonder why switch driver setup 2 gmacs but wan-port seems not going over switch (is already working in my mainline linux without working switch)
Edit: problem is portmap…as wan is directly connected i dropped portmap property in dts. Now the last port (port4,not connected) get the vlan config for “wan”…now all 4 lan-ports working with full phy driver. And after changing mdio phy-id (r64 used 29,r2pro uses 0) in my reduced driver it works too
edit 2: my reduced phy driver has now a dts property to set the phy-id, works on both devices without touching driver code. got dsa driver on r64 working by using second gmac (already rgmii), maybe first gmac/switchport does not support rgmii. wait for next version and merge this then to r2pro and test there