[PATCH v2 5/5] realtek: remove hardcoded sys-led configurations

2022-06-07 Thread Sander Vanheule
use the pin as GPIO0, allowing for better control as a GPIO LED. Signed-off-by: Sander Vanheule --- .../files-5.10/arch/mips/rtl838x/setup.c | 40 --- 1 file changed, 40 deletions(-) diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c b/target/linux

Re: [PATCH v2 3/5] realtek: add sys-led disable pinctrl for rtl931x

2022-06-07 Thread Sander Vanheule
On Tue, 2022-06-07 at 11:48 +0200, Sander Vanheule wrote: > Add a pinctrl-single node to manage the sys-led mux and JTAG mux. > This allows using the associated pins as GPIOs: >   - sys-led: GPIO0 >   - JTAG: GPIO6, GPIO7, others unknown (TDO, TDI, TMS, TCK /TRST) > > Suggested-

Re: [PATCH v3] ath79: D-Link DAP-2680: select QCA9984 firmware

2022-06-11 Thread Sander Vanheule
On Sat, 2022-05-21 at 22:59 +0200, Stijn Segers wrote: > The DAP-2680 has a QCA9984 radio [1], but the commit adding support > mistakenly adds the QCA99x0 firmware package. See forum topic [2]. > > [1] https://wikidevi.wi-cat.ru/D-Link_DAP-2680_rev_A1 > [2] https://forum.openwrt.org/t/missing-5ghz

[PATCH v1 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem

2022-06-11 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 2 +- 3 files changed, 15 insertions(+), 2 deleti

[PATCH v1 0/6] ath79: convert QCA955x-based D-Link DAP-2xxx to nvmem

2022-06-11 Thread Sander Vanheule
Convert the QCA955x based devices to nvmem-cell based calibration data extraction, so this can be removed from the init scripts. Sander Vanheule (6): ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem ath79: D-Link

[PATCH v1 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI

2022-06-11 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can reference the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts

[PATCH v1 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem

2022-06-11 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 13 - 1 file changed, 12 insertions(+), 1

[PATCH v1 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-11 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 -- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 20 insertions(+),

[PATCH v1 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem

2022-06-11 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 4 ++-- 3 files changed, 16 insertions(+), 3 deleti

[PATCH v1 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem

2022-06-11 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 16 insertions(+),

[PATCH v1 0/2] ath79: convert QCA953x-based D-Link DAP-2xxx to nvmem

2022-06-11 Thread Sander Vanheule
Convert the QCA9533 based devices to nvmem-cell based calibration data extraction, so the downstream mtd-cal-data property can be dropped. Sander Vanheule (2): ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem

[PATCH v1 2/2] ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem

2022-06-11 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts/qca953x_dlink_dap-2xxx.dtsi | 13 - 1 file changed, 12 insertions(+), 1

[PATCH v1 1/2] ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI

2022-06-11 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can reference the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts

Re: [PATCH v1 2/2] ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem

2022-06-11 Thread Sander Vanheule
Hi Christian, On Sat, 2022-06-11 at 15:01 +0200, Christian Lamparter wrote: > On 11/06/2022 14:05, Sander Vanheule wrote: > > Convert the calibration data reference for the ath9k radio to an > > nvmem-cell, replacing the downstream mtd-cal-data property. > > > > Cc: Se

Re: [PATCH v3] realtek: fix tx checks

2022-06-13 Thread Sander Vanheule
Hi Arınç, On Mon, 2022-06-13 at 14:25 +, Arinc UNAL (Xeront) wrote: > There is a bug on the ethernet driver where the checks for the DSA tag and > tag generation don't include port 0. This causes any frame egressing from > the first port of the switch to have a VLAN 0 tag. > > Fix this by ext

[PATCH v2 1/2] ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI

2022-06-13 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can reference the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts

[PATCH v2 0/2] ath79: convert QCA953x-based D-Link DAP-2xxx to nvmem

2022-06-13 Thread Sander Vanheule
Convert the QCA9533 based devices to nvmem-cell based calibration data extraction, so the downstream mtd-cal-data property can be dropped. Changes in v2: - Put nvmem-cell definition in partition node Sander Vanheule (2): ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI ath79: D

[PATCH v2 2/2] ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem

2022-06-13 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Since the 'art' label is no longer used, it can be dropped. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- Changes in v2: - Put nvmem cell defitio

[PATCH v2 0/6] ath79: convert QCA955x-based D-Link DAP-2xxx to nvmem

2022-06-13 Thread Sander Vanheule
Convert the QCA955x based devices to nvmem-cell based calibration data extraction, so this can be removed from the init scripts. Changes in v2: - Put nvmem cell definition directly into partition node Sander Vanheule (6): ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI ath79: D

[PATCH v2 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI

2022-06-13 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can refer to the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts

[PATCH v2 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem

2022-06-13 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- Changes in v2: - Put nvmem cell definition directly in partition node --- target/linux/ath79/dts

[PATCH v2 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-13 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 -- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 20 insertions(+),

[PATCH v2 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem

2022-06-13 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 2 +- 3 files changed, 15 insertions(+), 2 deleti

[PATCH v2 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem

2022-06-13 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 4 ++-- 3 files changed, 16 insertions(+), 3 deleti

[PATCH v2 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem

2022-06-13 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 16 insertions(+),

Re: [PATCH v2 0/6] ath79: convert QCA955x-based D-Link DAP-2xxx to nvmem

2022-06-16 Thread Sander Vanheule
Hi Sebastian, On Mon, 2022-06-13 at 22:15 +0200, Sander Vanheule wrote: > Convert the QCA955x based devices to nvmem-cell based calibration data > extraction, so this can be removed from the init scripts. > > Changes in v2: > - Put nvmem cell definition directly into partition n

Re: [PATCH] realtek: make Netgear GS108T v3 u-boot env partition writable

2022-06-17 Thread Sander Vanheule
Hi Stijn, On Thu, 2022-06-16 at 22:28 +0200, Stijn Segers wrote: > Signed-off-by: Stijn Segers You need to add at least one line describing why this change is needed; now you only have a commit title. Just mentioning that you want to be able to modify the u-boot-env from userspace should be enou

Re: [PATCH v2 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Hi Christian, On Sat, 2022-06-18 at 02:24 +0200, Christian Lamparter wrote: > Hi, > > On 18/06/2022 01:26, Sebastian Schaper wrote: > > unfortunately, testing these changes on DAP-2680 resulted in board-2.bin > > not being loaded, the driver is only looking for board.bin instead. > > > > [   12.

[PATCH v3 0/6] ath79: convert QCA955x-based D-Link DAP-2xxx to nvmem

2022-06-18 Thread Sander Vanheule
nition directly into partition node Sander Vanheule (6): ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem ath79: D-Link DAP-2660 A1: convert ath10k caldata

[PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 -- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 20 insert

[PATCH v3 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- Changes in v2: - Put nvmem cell definition directly in partition node --- target/linux/ath79/dts

[PATCH v3 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 2 +- 3 files changed, 15 insertions(+), 2 deleti

[PATCH v3 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI

2022-06-18 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can refer to the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts

[PATCH v3 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 4 ++-- 3 files changed, 16 insertions(+), 3 deleti

[PATCH v3 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
x27;. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 14 ++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac| 7 ++- 3 files changed, 16 insertions(+),

Re: [PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
ta, > maybe this could be used here as well, for the sake of consistency. I've updated the node name and label for the pre-cal data, and merged the patches. Best, Sander > > Best, > Sebastian > > > Am 18.06.22 um 10:55 schrieb Sander Vanheule: > > Add the PCIe nod

[PATCH] realtek: correct egress frame port verification

2022-06-19 Thread Sander Vanheule
so fixes a potential issue with invalid (negative) egress port numbers on RTL93xx switches. Reported-by: Arınç ÜNAL Reported-by: Birger Koblitz Signed-off-by: Sander Vanheule --- .../drivers/net/ethernet/rtl838x_eth.c| 86 +-- .../drivers/net/ethernet/rtl838x_eth.h

Re: [PATCH] realtek: correct egress frame port verification

2022-06-19 Thread Sander Vanheule
Hi Birger, On Sun, 2022-06-19 at 11:40 +0200, Birger Koblitz wrote: > Hi, > > On 19.06.22 10:56, Sander Vanheule wrote: > > > -   h->cpu_tag[1] = h->cpu_tag[2] = 0; > > -   if (prio >= 0) > > -   h->cpu_tag[2] = BIT(13) | prio &

[PATCH v2 0/4] realtek: egress frame header fixes

2022-06-19 Thread Sander Vanheule
These patches contains a few code improvements and fixes for erroneous bitfield assignments. Currently only compile tested, so until I can test these patches, please let me know how this changes behaviour on the affected platforms. Sander Vanheule (4): realtek: correct egress frame priority

[PATCH v2 3/4] realtek: fix port mask on rtl839x

2022-06-19 Thread Sander Vanheule
Signed-off-by: Sander Vanheule --- .../realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl

[PATCH v2 1/4] realtek: correct egress frame priority assignment

2022-06-19 Thread Sander Vanheule
igned-off-by: Sander Vanheule --- .../drivers/net/ethernet/rtl838x_eth.c| 26 ++- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/eth

[PATCH v2 4/4] realtek: fix egress L2 learning on rtl839x

2022-06-19 Thread Sander Vanheule
U-Tag usage") Signed-off-by: Sander Vanheule --- .../realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/ne

[PATCH v2 2/4] realtek: correct egress frame port verification

2022-06-19 Thread Sander Vanheule
ches. Reported-by: Arınç ÜNAL Reported-by: Birger Koblitz Signed-off-by: Sander Vanheule --- .../drivers/net/ethernet/rtl838x_eth.c| 74 +-- .../drivers/net/ethernet/rtl838x_eth.h| 2 +- 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/targe

Re: [PATCH v2] realtek: make Netgear GS1xx u-boot env partition writable

2022-06-22 Thread Sander Vanheule
On Sun, 2022-06-19 at 19:55 +0200, Stijn Segers wrote: > Make the u-boot environment partition for the NETGEAR > GS108T v3 and GS110TPP writable (they share a DTS), so > the values can be manipulated from userspace. > > See https://forum.openwrt.org/t/57875/1567 for a real > world example. > > Si

Re: [PATCH] realtek: fix gcc-12 build with -Werror=array-compare

2022-06-22 Thread Sander Vanheule
On Sun, 2022-06-19 at 15:59 +0200, Bjørn Mork wrote: > Removing this gcc-12 error: > > arch/mips/rtl838x/setup.c:64:30: error: comparison between two arrays > [-Werror=array-compare] >    64 | else if (__dtb_start != __dtb_end) > > Signed-off-by: Bjørn Mork > --- > Kind of stupid >

Re: [RFT 0/5] realtek: support boards similar to DGS-1210-10

2022-07-09 Thread Sander Vanheule
Hi Luiz, Markus, On Tue, 2021-10-05 at 22:40 +0300, Paul Fertser wrote: > I only have D-Link DGS-1210-10P R1 for testing but other devices should be > very > similar judging by the photos. Would be nice to share support for all the > features available rather than get just R1 fully working. > > P

[RFC PATCH 1/7] kernel: backport devm_bitmap_{alloc,zalloc}

2022-07-16 Thread Sander Vanheule
devm_* helpers are useful for driver resource management. Backport these helpers for bitmap allocations from v5.13. Signed-off-by: Sander Vanheule --- ...de-devm_bitmap_alloc-and-devm_bitmap.patch | 88 +++ 1 file changed, 88 insertions(+) create mode 100644 target/linux

[RFC PATCH 6/7] realtek: Zyxel GS1900-8: define port LEDs

2022-07-16 Thread Sander Vanheule
Signed-off-by: Sander Vanheule --- .../dts-5.10/rtl8380_zyxel_gs1900-8.dts | 41 +++ 1 file changed, 41 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts index e9c5efe60392..41266b

[RFC PATCH 4/7] realtek: add RTL8380 switch port LED driver

2022-07-16 Thread Sander Vanheule
alues for "rtl_hw_trigger") are: - Link present, blink on activity: 1f - 100M/10M link, blink on activity: f - 1G link present: 10 Signed-off-by: Sander Vanheule --- .../drivers/pinctrl/pinctrl-rtl-switchcore.c | 370 ++ ...s-add-RTL8380-switch-port-LED-driver.pa

[RFC PATCH 2/7] realtek: add switch core MFD driver

2022-07-16 Thread Sander Vanheule
be divided into distinct IO ranges. This MFD core driver is intended to manage the switch core regmap, and to expose some limited features that don't warrant their own driver. These include SoC identification and system LED management. Signed-off-by: Sander Vanheule --- .../drivers/mfd/re

[RFC PATCH 0/7] realtek: MFD for switch core

2022-07-16 Thread Sander Vanheule
e and implementation of the different parts. My plan is for this to be the starting point to (finally) start upstreaming the most important part of the Realtek SoCs; the ethernet switch. Best, Sander Sander Vanheule (7): kernel: backport devm_bitmap_{alloc,zalloc} realtek: add switch core MFD driver re

[RFC PATCH 3/7] realtek: add pinctrl for Realtek maple

2022-07-16 Thread Sander Vanheule
tch core's register space, pin control features are provided by a table of regmap fields. This should be flexible enough to allow extension to other SoC generations providing similar features. Signed-off-by: Sander Vanheule --- .../drivers/leds/leds-rtl-switch-port.c | 668 ++

[RFC PATCH 5/7] realtek: rtl838x: replace pinctrl-single

2022-07-16 Thread Sander Vanheule
Replace the pinctrl-single node with the dedicated pinctrl driver for RTL838x SoCs. The node names are kept to stay compatible with existing references. Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl838x.dtsi | 38 ++ 1 file changed, 17 insertions

[RFC PATCH 7/7] realtek: Netgear GS110TPPv1: define port LEDs

2022-07-16 Thread Sander Vanheule
cho realtek-switchport > /sys/class/leds/green:lan-$i/trigger echo f > /sys/class/leds/amber:lan-$i/rtl_hw_trigger echo realtek-switchport > /sys/class/leds/amber:lan-$i/trigger done Signed-off-by: Sander Vanheule --- .../dts-5.10/rtl8380_netgear_gs110tpp-

Re: [RFC PATCH 3/7] realtek: add pinctrl for Realtek maple

2022-07-16 Thread Sander Vanheule
On Sat, 2022-07-16 at 21:09 +0200, Sander Vanheule wrote: > Adds a pin control driver for RTL838x managed gigabit switch SoCs, and > RTL833x managed fast ethernet switch SoCs, both codenamed "Maple". Only > RTL838x has been tested, but functionality should be near identical.

Re: [RFC PATCH 0/7] realtek: MFD for switch core

2022-07-16 Thread Sander Vanheule
On Sat, 2022-07-16 at 21:09 +0200, Sander Vanheule wrote: > This RFC series introduces a new MFD device for the switch core found > in the Realtek SoCs. Currently only an implementation is provided for > RTL8380, but it written with the register structure of other generations > in mi

Re: [RFC PATCH 0/7] realtek: MFD for switch core

2022-07-17 Thread Sander Vanheule
Hi Birger, In the future, could you please CC me when replying to my patches? On Sat, 2022-07-16 at 23:09 +0200, Birger Koblitz wrote: > Hi, > > On 7/16/22 21:31, Sander Vanheule wrote: > > On Sat, 2022-07-16 at 21:09 +0200, Sander Vanheule wrote: > > > This RFC ser

Re: [PATCH firmware-utils] mkh3cimg/mkh3cvfs: add image/filesystem tools for H3C devices

2022-07-27 Thread Sander Vanheule
On Sat, 2022-07-23 at 22:49 +0200, Jan Hoffmann wrote: > mkh3cimg creates a firmware image. Firmware images for these devices can > contain multiple files, but this tool is limited to creating images with > a single application file. In the case of OpenWrt, this is going to > contain the kernel ima

Re: [PATCH 0/7] realtek: add HPE 1920 support

2022-07-28 Thread Sander Vanheule
On Thu, 2022-07-28 at 15:10 +0200, Jan Hoffmann wrote: > > This adds support for three switches from the HPE 1920 series. It has > > been tested on HPE 1920-8G and HPE 1920-16G. Support for HPE 1920-24G > > is also included, as it uses the same board as the 16-port model. > > > > The patch series

Re: [PATCH 0/7] realtek: add HPE 1920 support

2022-07-28 Thread Sander Vanheule
On Thu, 2022-07-28 at 16:51 +0200, Daniel Golle wrote: > On Thu, Jul 28, 2022 at 03:27:14PM +0200, Sander Vanheule wrote: > > On Thu, 2022-07-28 at 15:10 +0200, Jan Hoffmann wrote: > > > > This adds support for three switches from the HPE 1920 series. It has > > >

Re: [RFC PATCH 6/7] realtek: Zyxel GS1900-8: define port LEDs

2022-07-29 Thread Sander Vanheule
at 14:58 +0200, Olliver Schinagl wrote: > On 16-07-2022 21:09, Sander Vanheule wrote: > > Add all port LEDs to the device tree for the GS1900-8. To reproduce the > > same behaviour as stock firmware, the LEDs need to light up on all > > link speeds, and blink on link activity: &g

Re: [RFC PATCH 7/7] realtek: Netgear GS110TPPv1: define port LEDs

2022-07-29 Thread Sander Vanheule
On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > On 16-07-2022 21:09, Sander Vanheule wrote: > > Add the port LEDs for lan1-lan8 to the device tree for the GS110TPP v1. > > To reproduce the same behaviour as stock firmware, green should be > > LINK/ACT 1G, and amb

Re: [RFC PATCH 2/7] realtek: add switch core MFD driver

2022-07-29 Thread Sander Vanheule
On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > Hey Sander, > > On 16-07-2022 21:09, Sander Vanheule wrote: > > Realtek managed switch SoCs such as the RTL8380 consist of a MIPS CPU > > with a number of basic peripherals, and an ethernet switch peripheral. &

Re: [RFC PATCH 3/7] realtek: add pinctrl for Realtek maple

2022-07-29 Thread Sander Vanheule
On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > On 16-07-2022 21:09, Sander Vanheule wrote: > > Adds a pin control driver for RTL838x managed gigabit switch SoCs, and > > RTL833x managed fast ethernet switch SoCs, both codenamed "Maple". Only > &g

Re: [RFC PATCH 5/7] realtek: rtl838x: replace pinctrl-single

2022-07-29 Thread Sander Vanheule
On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > On 16-07-2022 21:09, Sander Vanheule wrote: > > Replace the pinctrl-single node with the dedicated pinctrl driver for > > RTL838x SoCs. The node names are kept to stay compatible with existing > > references. &

Re: [RFC PATCH 4/7] realtek: add RTL8380 switch port LED driver

2022-07-29 Thread Sander Vanheule
On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > On 16-07-2022 21:09, Sander Vanheule wrote: > > RTL8380 switch SoCs can control up to 3×28 LEDs to display status of the > > switch's ethernet port. This driver allows to address these LEDs and > > prov

Re: [PATCH 6/7] tools: add 7z host package

2022-07-31 Thread Sander Vanheule
On Sat, 2022-07-23 at 22:53 +0200, Jan Hoffmann wrote: > Add the 7zr command line tool, which is a version of the 7z application > that only supports 7z archives. > > 7z is one of the two compression formats supported in H3C firmware > images (the alternative would be ARJ). > > (Alternatively, th

Re: [RFC PATCH 2/7] realtek: add switch core MFD driver

2022-08-09 Thread Sander Vanheule
Hi, On Tue, 2022-08-09 at 17:57 +0200, Olliver Schinagl wrote: > Hey Sander, > > On 29-07-2022 22:19, Sander Vanheule wrote: > > On Fri, 2022-07-29 at 14:58 +0200, Olliver Schinagl wrote: > > > Hey Sander, > > > > > > On 16-07-2022 21:09, Sander Vanh

Re: [PATCH] tplink-safeloader: add TP-Link Deco S4 v2 support

2022-08-13 Thread Sander Vanheule
Hi, On Sat, 2022-08-13 at 13:51 -0500, Nick French wrote: > Support creating images for TP-Link Deco S4R v2. > > Original partition layout from OEM image: >  partition fs-uboot base 0x0 size 0x8 >  partition product-info base 0x8 size 0x05000 >  partition default-mac base 0x85000 size

Re: [PATCH] realtek: fix RTL838x receive tag decoding

2022-09-08 Thread Sander Vanheule
Hi Bjørn, On Thu, 2022-09-08 at 19:35 +0200, Bjørn Mork wrote: > Commit dc9cc0d3e2a1 ("realtek: add QoS and rate control") replaced a > 16 bit reserved field in the RTL83xx packet header with the initial > cpu_tag word, shifting the real cpu_tag fields by one.  Adjusting for > this new shift was p

Re: [PATCH] realtek: fix RTL838x receive tag decoding

2022-09-08 Thread Sander Vanheule
On Thu, 2022-09-08 at 22:23 +0200, Bjørn Mork wrote: > Sander Vanheule writes: > > > > Based-on-fix-by: Jan Hoffmann > > > > checkpatch.pl complains about this tag: > > WARNING: Non-standard signature: Based-on-fix-by: > > Yes, I noticed and didn't

Re: [PATCH] realtek: fix RTL838x receive tag decoding

2022-09-08 Thread Sander Vanheule
On Thu, 2022-09-08 at 19:35 +0200, Bjørn Mork wrote: > Commit dc9cc0d3e2a1 ("realtek: add QoS and rate control") replaced a > 16 bit reserved field in the RTL83xx packet header with the initial > cpu_tag word, shifting the real cpu_tag fields by one.  Adjusting for > this new shift was partially fo

Re: [PATCH] realtek: fix RTL839x receive tag decoding

2022-09-09 Thread Sander Vanheule
On Fri, 2022-09-09 at 08:28 +0200, Bjørn Mork wrote: > The previous fixup was incomplete, and the offsets for the > queue and crc_error cpu_tag bitfields were still wrong on > RTL839x. > > Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding") > Suggested-by: Jan Hoffmann > Signed-off-

Re: [PATCH] realtek: fix RTL839x receive tag decoding

2022-09-09 Thread Sander Vanheule
On Fri, 2022-09-09 at 08:28 +0200, Bjørn Mork wrote: > The previous fixup was incomplete, and the offsets for the > queue and crc_error cpu_tag bitfields were still wrong on > RTL839x. > > Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding") > Suggested-by: Jan Hoffmann > Signed-off-

[PATCH v1 2/2] realtek: consistently flood RMA frames

2022-09-12 Thread Sander Vanheule
mistake. Remove this inconsistency by flooding all multicast frames with RMA addresses. Signed-off-by: Sander Vanheule --- .../drivers/net/ethernet/rtl838x_eth.c| 70 +++ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/target/linux/realtek/files-5.10/drivers/net

[PATCH v1 1/2] realtek: remove RTL839x path in RTL838x multicast

2022-09-12 Thread Sander Vanheule
RTL839x ops table, so it should be safe to remove this branch. While touching the code, also re-sort the functions to match sorting elsewhere, with rtl838x coming before rtl839x. Signed-off-by: Sander Vanheule --- .../drivers/net/ethernet/rtl838x_eth.c| 33 --- 1 file

Re: [PATCH] realtek: fix RTL839x egress tag for ports >= 32

2022-09-25 Thread Sander Vanheule
Hi Jan, On Sun, 2022-09-25 at 14:32 +0200, Jan Hoffmann wrote: > Don't overwrite AS_DPM and L2LEARNING flags when dest_port is >= 32. > > Fixes: 1773264a0c6d ("realtek: correct egress frame port verification") > Signed-off-by: Jan Hoffmann Thanks! Merged into master. Best, Sander

[PATCH v2 00/16] realtek: pinctrl and switch LED drivers

2022-10-03 Thread Sander Vanheule
documentation to the devicetree interfaces, the corresponding nodes changes are also implemented, including LED support for the Zyxel GS1900-8 an GS1900-48 switches. In addition to driver changes, this patch series also includes a non-code patch introducing a target TODO file. Sander Vanheule (16

[PATCH v2 01/16] realtek: add switch core MFD driver

2022-10-03 Thread Sander Vanheule
be divided into distinct IO ranges. This MFD core driver is intended to manage the switch core regmap, and to expose some limited features that don't warrant their own driver, such as SoC identification. Signed-off-by: Sander Vanheule --- .../drivers/mfd/realtek-switchcore.c

[PATCH v2 03/16] realtek: add base register field LED support

2022-10-03 Thread Sander Vanheule
LEDs drivers can be grouped together. Signed-off-by: Sander Vanheule --- .../files-5.10/drivers/leds/realtek/Kconfig | 10 ++ .../files-5.10/drivers/leds/realtek/Makefile | 2 + .../drivers/leds/realtek/led-regfield.c | 99 +++ .../drivers/leds/realtek/led-regfield.h

[PATCH v2 04/16] realtek: add system LED peripheral driver

2022-10-03 Thread Sander Vanheule
enable sys-led support. Signed-off-by: Sander Vanheule --- .../files-5.10/drivers/leds/realtek/Kconfig | 9 ++ .../files-5.10/drivers/leds/realtek/Makefile | 1 + .../leds/realtek/rtl-switch-sys-leds.c| 105 ++ 3 files changed, 115 insertions(+) create mode 100644

[PATCH v2 02/16] realtek: add switch core pinctrl driver

2022-10-03 Thread Sander Vanheule
err) + return dev_err_probe(dev, err, "failed to enable\n"); + + return 0; +}; + +static struct platform_driver rtl_swcore_pinctrl_driver = { + .driver = { + .name = "realtek-switchcore-pinctrl", + .of_match_table = of_rtl_swcore_pinctrl_mat

[PATCH v2 06/16] realtek: rtl838x: enable switch core drivers

2022-10-03 Thread Sander Vanheule
To allow devices to use the features provided by the new pinctrl and LED support, enable all related drivers. Signed-off-by: Sander Vanheule --- target/linux/realtek/rtl838x/config-5.10 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/realtek/rtl838x/config-5.10 b/target

[PATCH v2 08/16] realtek: rtl838x: add sys-led node

2022-10-03 Thread Sander Vanheule
"disabled" Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl838x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi b/target/linux/realtek/dts-5.10/rtl838x.dtsi index 631cd0e8f733..bb7348d10243 100644 --- a/ta

[PATCH v2 07/16] realtek: rtl838x: replace pinctrl nodes

2022-10-03 Thread Sander Vanheule
Replace the current "pinctrl-single" nodes by the new "realtek,maple-pinctrl" node. This allows users to specify pin groups and features without having to dig into SoC documentation. Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl838x.dtsi | 43 +

[PATCH v2 05/16] realtek: add switch port LED driver

2022-10-03 Thread Sander Vanheule
be noted that port status offloading is always enabled per port. Note that when offloading is enabled for the primary LED, it will also be enabled for the secondary LED. Signed-off-by: Sander Vanheule --- .../files-5.10/drivers/leds/realtek/Kconfig | 9 + .../files-5.10/drivers/leds/rea

[PATCH v2 09/16] realtek: Zyxel GS1900-8: define port LEDs

2022-10-03 Thread Sander Vanheule
en:lan-?/trigger Signed-off-by: Sander Vanheule --- .../dts-5.10/rtl8380_zyxel_gs1900-8.dts | 69 +++ 1 file changed, 69 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts

[PATCH v2 10/16] realtek: rtl839x: enable switch core drivers

2022-10-03 Thread Sander Vanheule
To allow devices to use the features provided by the new pinctrl and LED support, enable all related drivers Signed-off-by: Sander Vanheule --- target/linux/realtek/rtl839x/config-5.10 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/realtek/rtl839x/config-5.10 b/target

[PATCH v2 11/16] realtek: rtl839x: replace pinctrl nodes

2022-10-03 Thread Sander Vanheule
Replace the current "pinctrl-single" nodes by the new "realtek,cypress-pinctrl" node. This allows users to specify pin groups and features without having to dig into SoC documentation. Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl839x.dtsi | 52 +

[PATCH v2 12/16] realtek: rtl839x: add sys-led node

2022-10-03 Thread Sander Vanheule
"disabled". Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl839x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl839x.dtsi b/target/linux/realtek/dts-5.10/rtl839x.dtsi index 07017c587191..8d040b9c6e3e 100644 --- a/ta

[PATCH v2 14/16] realtek: rtl930x: disable new switch core drivers

2022-10-03 Thread Sander Vanheule
Since the new MFD drivers do not come with support for RTL930x devices yet, leave these disabled for the time being. Signed-off-by: Sander Vanheule --- target/linux/realtek/rtl930x/config-5.10 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/realtek/rtl930x/config-5.10 b

[PATCH v2 13/16] realtek: Zyxel GS1900-48: add port LEDs

2022-10-03 Thread Sander Vanheule
The GS1900-48 has 48 RJ45 ports, and two dedicated SFP ports, each having one associated green LED to indicate port status. Add 50 nodes to allow individual control of each LED. Signed-off-by: Sander Vanheule --- .../dts-5.10/rtl8393_zyxel_gs1900-48.dts | 362 ++ 1 file

[PATCH v2 15/16] realtek: rtl931x: disable new switch core drivers

2022-10-03 Thread Sander Vanheule
Since the new switch core drivers do not come with support for RTL931x devices yet, leave these disabled for the time being. Signed-off-by: Sander Vanheule --- target/linux/realtek/rtl931x/config-5.10 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/realtek/rtl931x/config-5.10

[PATCH v2 16/16] realtek: add target TODO.md

2022-10-03 Thread Sander Vanheule
To keep track of current work items, add a TODO file inspired by upstream code that is still in driver/staging. This should provide room for developers to leave issues open, or features unsupported, and give new contributors a list of topics that still require attention. Signed-off-by: Sander

[PATCH 0/8] realtek: various target cleanups

2022-10-06 Thread Sander Vanheule
As part of the 5.15 patch set [1], Hiroshi has performed some cleanups on the realtek target. Some of these can also be applied to 5.10, which reduces the 5.15 change set, and allows them to be backported to an older release if needed. There aren't any real dependencies in in this series, but I'm

[PATCH 4/8] realtek: fix use of uninitialized sds_mode

2022-10-06 Thread Sander Vanheule
From: INAGAKI Hiroshi The initial state of sds_mode in rtl9300_force_sds_mode() is null and it will be configured in switch-case. So print message after it. Signed-off-by: INAGAKI Hiroshi [amend commit message] Signed-off-by: Sander Vanheule --- target/linux/realtek/files-5.10/drivers/net

[PATCH 3/8] realtek: use MIPS fw_init_cmdline()

2022-10-06 Thread Sander Vanheule
From: INAGAKI Hiroshi Use the generic function of MIPS in Linux Kernel instead of open coding our own initialisation. Signed-off-by: INAGAKI Hiroshi [amend commit message] Signed-off-by: Sander Vanheule --- .../files-5.10/arch/mips/rtl838x/prom.c | 22 ++- 1 file

[PATCH 2/8] realtek: update SMP-related calls in prom_init()

2022-10-06 Thread Sander Vanheule
/setup.c before prom_init(), and as such is not required. Also move mips_cpc_probe() to run just before registering SMP ops. Signed-off-by: INAGAKI Hiroshi [squash SMP change commits, reword commit message] Signed-off-by: Sander Vanheule --- This patch only really has an impact on the rtl931x

[PATCH 1/8] realtek: separate lock of RTL8231 from phy driver

2022-10-06 Thread Sander Vanheule
From: INAGAKI Hiroshi RTL8231 and ethernet phys are not on the same bus, so separate the lock to each own to cut off the unnecessary dependency. Signed-off-by: INAGAKI Hiroshi --- .../files-5.10/drivers/gpio/gpio-rtl8231.c| 19 ++- 1 file changed, 10 insertions(+), 9 deleti

[PATCH 5/8] realtek: add missing of.h include in phy driver

2022-10-06 Thread Sander Vanheule
From: INAGAKI Hiroshi of.h is required for of_property_read_u32(). Signed-off-by: INAGAKI Hiroshi [amend commit message] Signed-off-by: Sander Vanheule --- target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek

<    1   2   3   4   5   >