2022-04-11 23:42:09

by Sander Vanheule

[permalink] [raw]
Subject: [PATCH v1 0/6] Support for RTL930x/RTL931x GPIOs

This patch series adds support for the GPIO controllers as found on the
RTL930x and RTL931x SoC families of MIPS CPUs, used in managed NBase-T
ethernet switches.

The RTL931x's GPIO controller behaves the same as the one in the older
RTL838x and RTL839x series. This controller is trivially supported.

The RTL930x's controller has a reversed port order, and supports CPU
affinity settings for individual GPIO line IRQs, thus requiring two
additional changes to implement these features.

Sander Vanheule (6):
dt-bindings: gpio: realtek-otto: Add rtl9300 compatible
gpio: realtek-otto: Support reversed port layouts
gpio: realtek-otto: Support per-cpu interrupts
gpio: realtek-otto: Add RTL930x support
dt-bindings: gpio: realtek-otto: Add rtl9310 compatible
gpio: realtek-otto: Add RTL931x support

.../bindings/gpio/realtek,otto-gpio.yaml | 34 ++++-
drivers/gpio/gpio-realtek-otto.c | 137 +++++++++++++++++-
2 files changed, 164 insertions(+), 7 deletions(-)

--
2.35.1


2022-04-11 23:42:42

by Sander Vanheule

[permalink] [raw]
Subject: [PATCH v1 4/6] gpio: realtek-otto: Add RTL930x support

The RTL930x SoC series has support for 24 GPIOs, with the port order
reversed compared to RTL838x and RTL839x. The RTL930x series also has
two CPUs (VPEs) and can distribute individual GPIO interrupts between
them.

Signed-off-by: Sander Vanheule <[email protected]>
---
drivers/gpio/gpio-realtek-otto.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpio/gpio-realtek-otto.c b/drivers/gpio/gpio-realtek-otto.c
index dd1b7656d23a..3ddaa17accff 100644
--- a/drivers/gpio/gpio-realtek-otto.c
+++ b/drivers/gpio/gpio-realtek-otto.c
@@ -335,6 +335,10 @@ static const struct of_device_id realtek_gpio_of_match[] = {
{
.compatible = "realtek,rtl8390-gpio",
},
+ {
+ .compatible = "realtek,rtl9300-gpio",
+ .data = (void *)(GPIO_PORTS_REVERSED | GPIO_INTERRUPTS_PER_CPU)
+ },
{}
};
MODULE_DEVICE_TABLE(of, realtek_gpio_of_match);
--
2.35.1

2022-04-12 23:43:26

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v1 0/6] Support for RTL930x/RTL931x GPIOs

On Sat, Apr 9, 2022 at 9:56 PM Sander Vanheule <[email protected]> wrote:
>
> This patch series adds support for the GPIO controllers as found on the
> RTL930x and RTL931x SoC families of MIPS CPUs, used in managed NBase-T
> ethernet switches.
>
> The RTL931x's GPIO controller behaves the same as the one in the older
> RTL838x and RTL839x series. This controller is trivially supported.
>
> The RTL930x's controller has a reversed port order, and supports CPU
> affinity settings for individual GPIO line IRQs, thus requiring two
> additional changes to implement these features.
>
> Sander Vanheule (6):
> dt-bindings: gpio: realtek-otto: Add rtl9300 compatible
> gpio: realtek-otto: Support reversed port layouts
> gpio: realtek-otto: Support per-cpu interrupts
> gpio: realtek-otto: Add RTL930x support
> dt-bindings: gpio: realtek-otto: Add rtl9310 compatible
> gpio: realtek-otto: Add RTL931x support
>
> .../bindings/gpio/realtek,otto-gpio.yaml | 34 ++++-
> drivers/gpio/gpio-realtek-otto.c | 137 +++++++++++++++++-
> 2 files changed, 164 insertions(+), 7 deletions(-)
>
> --
> 2.35.1
>

Queued the entire series, thanks!

Bart