Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omap: add support for kernel 5.15 #11953

Open
1 of 2 tasks
lynxis opened this issue Feb 6, 2023 · 3 comments
Open
1 of 2 tasks

omap: add support for kernel 5.15 #11953

lynxis opened this issue Feb 6, 2023 · 3 comments
Assignees
Labels
bug issue report with a confirmed bug kernel pull request/issue with Linux kernel related changes target/omap pull request/issue for omap target

Comments

@lynxis
Copy link
Member

lynxis commented Feb 6, 2023

Describe the bug

  • Add support for omap for kernel 5.15.
  • check if CONFIG_RESET_TI_SYSCON should be built

Bugs to kernel 5.15:

The eth0 interface can't be added to the br-lan default interface resulting in a broken ethernet.
Assign an ip or setting the lan interface direct to eth0 works.

root@OpenWrt:/# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.15.89 (lynxis@javelin) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 12.2.0 r21912+3-7396263680b9) 12.2.0, GNU ld (GNU Binutils) 2.39) #0 SMP Wed Jan 25 01:31:07 2023
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x9ec00000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] percpu: Embedded 12 pages/cpu s17676 r8192 d23284 u49152
[    0.000000] pcpu-alloc: s17676 r8192 d23284 u49152 alloc=12*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootwait
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 486164K/522240K available (9427K kernel code, 708K rwdata, 2548K rodata, 1024K init, 304K bss, 19692K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[    0.000002] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000026] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000370] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[    0.001483] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.090475] pid_max: default: 32768 minimum: 301
[    0.090728] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.090750] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.091747] CPU: Testing write buffer coherency: ok
[    0.091837] CPU0: Spectre v2: using BPIALL workaround
[    0.092177] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.093180] Setting up static identity map for 0x80100000 - 0x80100060
[    0.093378] rcu: Hierarchical SRCU implementation.
[    0.093602] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.093743] smp: Bringing up secondary CPUs ...
[    0.093757] smp: Brought up 1 node, 1 CPU
[    0.093768] SMP: Total of 1 processors activated (996.14 BogoMIPS).
[    0.093780] CPU: All CPU(s) started in SVC mode.
[    0.105608] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.105831] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.105864] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.107080] pinctrl core: initialized pinctrl subsystem
[    0.108794] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.110618] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.111505] thermal_sys: Registered thermal governor 'fair_share'
[    0.111519] thermal_sys: Registered thermal governor 'step_wise'
[    0.111533] thermal_sys: Registered thermal governor 'user_space'
[    0.111888] cpuidle: using governor ladder
[    0.111908] cpuidle: using governor menu
[    0.133811] cryptd: max_cpu_qlen set to 1000
[    0.139586] SCSI subsystem initialized
[    0.139949] libata version 3.00 loaded.
[    0.140202] usbcore: registered new interface driver usbfs
[    0.140262] usbcore: registered new interface driver hub
[    0.140313] usbcore: registered new device driver usb
[    0.140744] pps_core: LinuxPPS API ver. 1 registered
[    0.140762] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.140788] PTP clock support registered
[    0.141004] Advanced Linux Sound Architecture Driver Initialized.
[    0.142420] clocksource: Switched to clocksource dmtimer
[    0.142680] VFS: Disk quotas dquot_6.6.0
[    0.142763] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.143469] NET: Registered PF_INET protocol family
[    0.143713] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.144468] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.144518] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.144542] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.144588] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.144650] TCP: Hash tables configured (established 4096 bind 4096)
[    0.144753] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.144784] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.144976] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.145793] RPC: Registered named UNIX socket transport module.
[    0.145820] RPC: Registered udp transport module.
[    0.145829] RPC: Registered tcp transport module.
[    0.145837] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.151222] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.156400] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.158543] NFS: Registering the id_resolver key type
[    0.158634] Key type id_resolver registered
[    0.158645] Key type id_legacy registered
[    0.158696] jffs2: version 2.2 (NAND) (SUMMARY) (LZO) (LZMA) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.249246] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
[    0.279241] brd: module loaded
[    0.289315] loop: module loaded
[    0.290127] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.292713] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.292742] ehci-omap: OMAP-EHCI Host Controller driver
[    0.293316] i2c_dev: i2c /dev entries driver
[    0.294371] cpuidle: enable-method property 'ti,am3352' found operations
[    0.294750] sdhci: Secure Digital Host Controller Interface driver
[    0.294764] sdhci: Copyright(c) Pierre Ossman
[    0.294875] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.316454] ledtrig-cpu: registered to indicate activity on CPUs
[    0.319562] NET: Registered PF_INET6 protocol family
[    0.327453] Segment Routing with IPv6
[    0.327544] In-situ OAM (IOAM) with IPv6
[    0.327642] NET: Registered PF_PACKET protocol family
[    0.327676] NET: Registered PF_KEY protocol family
[    0.327788] 8021q: 802.1Q VLAN Support v1.8
[    0.327868] Key type dns_resolver registered
[    0.327979] ThumbEE CPU extension supported.
[    0.327998] Registering SWP/SWPB emulation handler
[    0.330324] omap_voltage_late_init: Voltage driver support not added
[    0.330739] SmartReflex Class3 initialized
[    0.359753] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    0.363317] ti-sysc: probe of 44e31000.target-module failed with error -16
[    0.377727] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    0.379461] omap_rtc 44e3e000.rtc: already running
[    0.380018] omap_rtc 44e3e000.rtc: registered as rtc0
[    0.380076] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01T00:00:27 UTC (946684827)
[    0.398892] ti-sysc: probe of 48040000.target-module failed with error -16
[    0.407937] OMAP GPIO hardware version 0.1
[    0.433298] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    0.451260] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    0.467388] omap_rng 48310000.rng: Random Number Generator ver. 20
[    0.473792] random: crng init done
[    0.532443] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    0.534332] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    0.534747] cpsw-switch 4a100000.switch: initialized cpsw ale version 1.4
[    0.534770] cpsw-switch 4a100000.switch: ALE Table size 1024
[    0.534881] cpsw-switch 4a100000.switch: cpts: overflow check period 500 (jiffies)
[    0.534901] cpsw-switch 4a100000.switch: CPTS: ref_clk_freq:250000000 calc_mult:2147483648 calc_shift:29 error:0 nsec/sec
[    0.534970] cpsw-switch 4a100000.switch: Detected MACID = 68:9e:19:6f:45:88
[    0.536440] cpsw-switch 4a100000.switch: initialized (regs 0x4a100000, pool size 256) hw_ver:0019010C 1.12 (0)
[    0.544921] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    0.544975] edma 49000000.dma: TI EDMA DMA engine driver
[    0.550107] am335x-phy-driver 47401300.usb-phy: supply vcc not found, using dummy regulator
[    0.550383] am335x-phy-driver 47401300.usb-phy: dummy supplies not allowed for exclusive requests
[    0.580710] am335x-phy-driver 47401b00.usb-phy: supply vcc not found, using dummy regulator
[    0.581011] am335x-phy-driver 47401b00.usb-phy: dummy supplies not allowed for exclusive requests
[    0.610649] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    0.613730] omap-sham 53100000.sham: will run requests pump with realtime priority
[    0.616633] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    0.617972] omap-aes 53500000.aes: will run requests pump with realtime priority
[    0.625685] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.625812] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 18, base_baud = 3000000) is a OMAP UART0
[    0.637672] l3-aon-clkctrl:0000:0: failed to disable
[    1.600201] printk: console [ttyO0] enabled
[    1.633092] tps65217-pmic: Failed to locate of_node [id: -1]
[    1.647780] tps65217-bl: Failed to locate of_node [id: -1]
[    1.658367] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.664979] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.681781] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    1.691110] sdhci-omap 48060000.mmc: Got CD GPIO
[    1.696169] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[    1.708146] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    1.720198] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    1.725897] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    1.740082] hub 1-0:1.0: USB hub found
[    1.745469] hub 1-0:1.0: 1 port detected
[    1.758036] ALSA device list:
[    1.761176]   No soundcards found.
[    1.765432] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    1.776932] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[    1.789513] Waiting for root device /dev/mmcblk0p2...
[    1.854365] mmc0: new high speed SDHC card at address aaaa
[    1.863703] mmcblk0: mmc0:aaaa SE32G 29.7 GiB 
[    1.873841]  mmcblk0: p1 p2
[    1.882020] mmc1: new high speed MMC card at address 0001
[    1.892253] mmcblk1: mmc1:0001 MMC04G 3.66 GiB 
[    1.900638] mmcblk1boot0: mmc1:0001 MMC04G 1.00 MiB 
[    1.908531] mmcblk1boot1: mmc1:0001 MMC04G 1.00 MiB 
[    1.914395] mmcblk1rpmb: mmc1:0001 MMC04G 128 KiB, chardev (247:0)
[    1.933820] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null). Quota mode: none.
[    1.943587] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.952290] Freeing unused kernel image (initmem) memory: 1024K
[    1.963036] Run /sbin/init as init process
[    1.967348]   with arguments:
[    1.967354]     /sbin/init
[    1.967360]   with environment:
[    1.967366]     HOME=/
[    1.967371]     TERM=linux
[    2.042880] init: Console is alive
[    2.048297] init: - watchdog -
[    2.130800] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.142091] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.160963] init: - preinit -
[    2.495714] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[    2.584678] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[    2.604184] 8021q: adding VLAN 0 to HW filter on device eth0
[    4.801495] mount_root: mounting /dev/root
[    4.806852] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended
[    4.819071] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none.
[    4.880415] urandom-seed: Seeding with /etc/urandom.seed
[    5.393669] procd: - early -
[    5.397034] procd: - watchdog -
[    6.030770] procd: - watchdog -
[    6.039704] procd: - ubus -
[    6.097834] procd: - init -
[    6.605242] urngd: v1.0.2 started.
[    6.614050] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.801339] PPP generic driver version 2.4.2
[    6.829089] NET: Registered PF_PPPOX protocol family
[    6.865257] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.806413] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[   11.914610] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[   11.978680] 8021q: adding VLAN 0 to HW filter on device eth0
[   12.020849] br-lan: port 1(eth0) entered blocking state
[   12.026485] br-lan: port 1(eth0) entered disabled state
[   12.033166] device eth0 entered promiscuous mode
[   12.039008] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.093006] br-lan: port 1(eth0) entered blocking state
[   12.098535] br-lan: port 1(eth0) entered disabled state
[   12.105393] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.150713] br-lan: port 1(eth0) entered blocking state
[   12.156406] br-lan: port 1(eth0) entered disabled state
[   12.163201] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.221286] br-lan: port 1(eth0) entered blocking state
[   12.226943] br-lan: port 1(eth0) entered disabled state
[   12.233735] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.495478] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[   12.626502] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[   12.679104] 8021q: adding VLAN 0 to HW filter on device eth0
[   12.708839] br-lan: port 1(eth0) entered blocking state
[   12.714530] br-lan: port 1(eth0) entered disabled state
[   12.721365] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.783175] br-lan: port 1(eth0) entered blocking state
[   12.788705] br-lan: port 1(eth0) entered disabled state
[   12.795582] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.853106] br-lan: port 1(eth0) entered blocking state
[   12.858636] br-lan: port 1(eth0) entered disabled state
[   12.865479] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[   12.927290] br-lan: port 1(eth0) entered blocking state
[   12.932950] br-lan: port 1(eth0) entered disabled state
[   12.939711] cpsw-switch 4a100000.switch eth0: failed to initialize vlan filtering on this port
[  131.086194] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[  131.174732] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[  131.191105] 8021q: adding VLAN 0 to HW filter on device eth0
[  183.443384] cpsw-switch 4a100000.switch eth0: Link is Up - 100Mbps/Full - flow control off
[  183.452308] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@OpenWrt:/# 
Please press Enter to activate this console.

OpenWrt version

master

OpenWrt target/subtarget

omap

Device

beaglebone black

Image kind

Self-built image

Steps to reproduce

No response

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@lynxis lynxis added the bug issue report with a confirmed bug label Feb 6, 2023
@lynxis lynxis self-assigned this Feb 6, 2023
@musashino205
Copy link
Contributor

I faced the same issue on Century Systems MA-E350/N and I set the higher pvid (ex.: 4000) to ethernet ports in dts as a workaround.

@lynxis lynxis added kernel pull request/issue with Linux kernel related changes target/omap pull request/issue for omap target labels Feb 6, 2023
@lynxis
Copy link
Member Author

lynxis commented Feb 6, 2023

The problem is the dual-emac features. It requires assigning each port a pvid, even when only using a single port. The pvid is used to differentiate the incoming packets by assigning each port a vlan pvid. The pvid which is used by each port can be set via the dts property ti,dual-emac-pvid.

Maybe a solution for single port device can skip this.

In cpsw_ndo_vlan_rx_add_vid():462 it goes into a for loop.

static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev,
                                    __be16 proto, u16 vid)
{
// [...]
        /* In dual EMAC, reserved VLAN id should not be used for
         * creating VLAN interfaces as this can break the dual
         * EMAC port separation
         */
        for (i = 0; i < cpsw->data.slaves; i++) {
                if (cpsw->slaves[i].ndev &&
                    vid == cpsw->slaves[i].port_vlan) { // 
                        ret = -EINVAL; // < here
                        goto err;
                }
        }

Ansuel pushed a commit to PolynomialDivision/openwrt that referenced this issue May 12, 2023
Switch to kernel 5.15 although it is marked as source only. It is marked
as source only because the eth0 interface can't be added to the br-lan
default interface resulting in a broken ethernet [0]. There is a
workaround to set a higher pvd (e.g. to 4000) in the dts [1].

Other functionality was already tested on a Beaglebone Black for
+6month now without issues.

Merging this is important to finally branch a new release. We want to
get rid completely of 5.10 kernel. Without this commit we get following
error: "Missing kernel version/hash file for 5.10." Hopfully someone
will fix the board in the rc phase.

- [0] openwrt#11953
- [1] openwrt#11953 (comment)

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
[rewrite commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this issue May 12, 2023
Switch to kernel 5.15 although it is marked as source only. It is marked
as source only because the eth0 interface can't be added to the br-lan
default interface resulting in a broken ethernet [0]. There is a
workaround to set a higher pvd (e.g. to 4000) in the dts [1].

Other functionality was already tested on a Beaglebone Black for
+6month now without issues.

Merging this is important to finally branch a new release. We want to
get rid completely of 5.10 kernel. Without this commit we get following
error: "Missing kernel version/hash file for 5.10." Hopfully someone
will fix the board in the rc phase.

- [0] openwrt#11953
- [1] openwrt#11953 (comment)

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
[rewrite commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
@janh
Copy link
Contributor

janh commented Oct 23, 2023

There is some information about the network issue in the kernel documentation of the new cpsw-switch driver. The reason why it even the default non-vlan-aware bridge doesn't work is that default_pvid is set to 1.

There are two ways to make this work using just device tree changes:

  • Change ti,dual-emac-pvid to some other VLAN that is unlikely to be used (as already mentioned by @musashino205)
  • Switch back to the old cpsw driver, which is still available in the kernel (even in current versions)

Both approaches work fine on a Beaglebone Black here. If something like that would be an acceptable solution to activate the target again, I can prepare a proper patch.

Here are the patches I used for testing:

Kernel patch to change reserved vlan
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -356,7 +356,7 @@
 &cpsw_port1 {
 	phy-handle = <&ethphy0>;
 	phy-mode = "mii";
-	ti,dual-emac-pvid = <1>;
+	ti,dual-emac-pvid = <4094>;
 };
 
 &cpsw_port2 {
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -704,7 +704,7 @@
 &cpsw_port1 {
 	phy-handle = <&ethphy0>;
 	phy-mode = "rgmii-id";
-	ti,dual-emac-pvid = <1>;
+	ti,dual-emac-pvid = <4094>;
 };
 
 &cpsw_port2 {
Kernel patch to switch to old driver
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -353,27 +353,24 @@
 	};
 };
 
-&cpsw_port1 {
+&cpsw_emac0 {
 	phy-handle = <&ethphy0>;
 	phy-mode = "mii";
-	ti,dual-emac-pvid = <1>;
 };
 
-&cpsw_port2 {
-	status = "disabled";
-};
-
-&mac_sw {
+&mac {
+	slaves = <1>;
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&cpsw_default>;
 	pinctrl-1 = <&cpsw_sleep>;
 	status = "okay";
 };
 
-&davinci_mdio_sw {
+&davinci_mdio {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
+	status = "okay";
 
 	ethphy0: ethernet-phy@0 {
 		reg = <0>;
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -684,31 +684,28 @@
 	};
 };
 
-&mac_sw {
+&mac {
+	slaves = <1>;
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&cpsw_default>;
 	pinctrl-1 = <&cpsw_sleep>;
 	status = "okay";
 };
 
-&davinci_mdio_sw {
+&davinci_mdio {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
+	status = "okay";
 
 	ethphy0: ethernet-phy@0 {
 		reg = <0>;
 	};
 };
 
-&cpsw_port1 {
+&cpsw_emac0 {
 	phy-handle = <&ethphy0>;
 	phy-mode = "rgmii-id";
-	ti,dual-emac-pvid = <1>;
-};
-
-&cpsw_port2 {
-	 status = "disabled";
 };
 
 &tscadc {

(Theoretically, another option might be to reconfigure the cpsw-switch driver from dual mac mode to switch mode. However, the only way to do this seems to be a runtime toggle via devlink. It also doesn't work: As soon as the port joins/leaves the bridge, it triggers a NULL pointer dereference in cpsw_port_offload_fwd_mark_update. I think this happens because the second port is disabled, and the driver fails to handle this properly. After adding a check for sl_ndev there, the bridge can be set up, but no data is flowing.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug kernel pull request/issue with Linux kernel related changes target/omap pull request/issue for omap target
Projects
None yet
Development

No branches or pull requests

3 participants