[PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs

Mikhail Kshevetskiy posted 37 patches 1 month, 3 weeks ago
.../pinctrl/airoha,an7563-pinctrl.yaml        |  350 +++
.../pinctrl/airoha,an7583-pinctrl.yaml        |   61 +-
.../pinctrl/airoha,en7523-pinctrl.yaml        |  378 +++
.../pinctrl/airoha,en7581-pinctrl.yaml        |   17 +-
drivers/pinctrl/airoha/Kconfig                |   42 +-
drivers/pinctrl/airoha/Makefile               |    7 +
drivers/pinctrl/airoha/airoha-common.h        |  147 +
drivers/pinctrl/airoha/pinctrl-airoha.c       | 2664 ++---------------
drivers/pinctrl/airoha/pinctrl-an7563.c       | 1115 +++++++
drivers/pinctrl/airoha/pinctrl-an7581.c       | 1487 +++++++++
drivers/pinctrl/airoha/pinctrl-an7583.c       | 1517 ++++++++++
drivers/pinctrl/airoha/pinctrl-en7523.c       | 1157 +++++++
12 files changed, 6460 insertions(+), 2482 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/airoha,an7563-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/airoha,en7523-pinctrl.yaml
create mode 100644 drivers/pinctrl/airoha/airoha-common.h
create mode 100644 drivers/pinctrl/airoha/pinctrl-an7563.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-an7581.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-an7583.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-en7523.c
[PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Mikhail Kshevetskiy 1 month, 3 weeks ago
This patchset
 * fixes more airoha pinctrl issues
 * split combined driver on common code and several SoC specific drivers
 * improves an7583 pinctrl support
 * adds support of en7523 SoC
 * adds support of an7563 SoC

The driver split changes are based on Matheus Sampaio Queiroga work.

Changes v2:
 * more issues of airoha pinctrl driver was fixed
 * SoC specific register addresses, bitfields, macroses were
   removed from common header and placed to SoC specific file
 * fixed address of LAN LED mappings registers for en7523 SoC
 * improves support of an7583 pinctrl

Changes v3:
 * improve searching of chip scu regmap necessary for drivers
   operations

Changes v4:
 * an7583: add support of OLT pin function
 * an7581: do a proper fix of pcie_reset pins mux/conf.

Changes v5:
 * improve description of an7583 i2c pinmux fix
 * rename an7583 registers to match its an7583 names
 * add support of an7563 SoC

Changes v6:
 * fix some of the issues found by
   https://sashiko.dev/#/patchset/20260622113046.3619139-1-mikhail.kshevetskiy%40iopsys.eu
 * update device tree binding
 * add bindings for en7523 and an7563

Changes v7:
 * a lot of IRQ support fixes, now there is chances that IRQ code is
   really working
 * device tree bindings moved to the separate patches
 * fix some of the issues found by
   https://sashiko.dev/#/patchset/20260628143733.273651-1-mikhail.kshevetskiy@iopsys.eu

Changes v8:
 * an7581: fix pinconf of i2c_scl/i2c_sda pins
 * ignore high bit in set_direction/get_direction helpers
 * minor patch modification
 * fix some issue found by
   https://sashiko.dev/#/patchset/20260727074234.3761170-1-mikhail.kshevetskiy@iopsys.eu
 * add more 'Fixes: commit' lines
 * add Acked-by Lorenzo Bianconi where it was approved

Changes v9:
 * fix some issue found by
   https://sashiko.dev/#/message/20260727174141.664933-5-mikhail.kshevetskiy%40iopsys.eu
 * take into account openwrt changes created by Daniel Schwierzeck
 * improve binding patches

Changes v10:
 * fix en7523 binding issue
 * improve a bit error handling

Changes v11:
 * improve binding patches
 * add Acked-by Krzysztof Kozlowski where it was approved

Daniel Schwierzeck (3):
  pinctrl: airoha: fix I2C1 pin mux config for AN7581
  pinctrl: airoha: fix I2C pin mux config for AN7583
  pinctrl: airoha: fix AN7583 MDIO pin mux config

Mikhail Kshevetskiy (34):
  dt-bindings: pinctrl: airoha: en7581: fix misprint in i2s function
    name
  dt-bindings: pinctrl: airoha: an7583: fix device tree binding schema
  pinctrl: airoha: fix mdio bitfield names
  pinctrl: airoha: an7581: fix pinconf of i2c_scl/i2c_sda pins
  pinctrl: airoha: an7583: fix I2C0_SDA_PD register bit order
  dt-bindings: pinctrl: airoha: en7581: allow configuration of
    pcie_reset pins as gpio or pwm
  pinctrl: airoha: an7581: fix mux/conf of pcie_reset pins
  dt-bindings: pinctrl: airoha: an7583: allow configuration of non-gpio
    default pins as gpio and pwm
  pinctrl: airoha: an7583: fix muxing of non-gpio default pins
  dt-bindings: pinctrl: airoha: an7583: add i2c0 group for i2c function
  pinctrl: airoha: an7583: fix spi group pins
  pinctrl: airoha: add missed get_direction() function for gpio_chip
  pinctrl: airoha: add set_direction() helper for gpio_chip
  pinctrl: airoha: minor improvements
  pinctrl: airoha: fix getting gpiochip/pinctrl pointers in the IRQ
    handling code
  pinctrl: airoha: add missed IRQ resource helpers
  pinctrl: airoha: fix IRQ mask/unmask code
  pinctrl: airoha: fix edge-triggered interrupts handling
  pinctrl: airoha: remove not needed irq_type[] array
  pinctrl: airoha: statically allocate gpio regs structure
  pinctrl: airoha: move common definitions to the separate header
  pinctrl: airoha: split driver on shared code and SoC specific drivers
  pinctrl: airoha: an7581: remove en7581 prefix from variable names
  pinctrl: airoha: an7583: remove an7583 prefix from variable names and
    definitions
  pinctrl: airoha: an7583: rename registers to match its an7583 names
  dt-bindings: pinctrl: airoha: an7583: add missed features
  pinctrl: airoha: an7583: add support for npu_uart pinmux
  pinctrl: airoha: an7583: add support for pon_alt pinmux
  pinctrl: airoha: an7583: add support for olt pinmux
  dt-bindings: pinctrl: airoha: add support of en7523 pin controller
  pinctrl: airoha: add support of en7523 SoC
  pinctrl: airoha: try to find chip scu node by phandle first
  dt-bindings: pinctrl: airoha: add support of an7563 pin controller
  pinctrl: airoha: add support of an7563 SoC

 .../pinctrl/airoha,an7563-pinctrl.yaml        |  350 +++
 .../pinctrl/airoha,an7583-pinctrl.yaml        |   61 +-
 .../pinctrl/airoha,en7523-pinctrl.yaml        |  378 +++
 .../pinctrl/airoha,en7581-pinctrl.yaml        |   17 +-
 drivers/pinctrl/airoha/Kconfig                |   42 +-
 drivers/pinctrl/airoha/Makefile               |    7 +
 drivers/pinctrl/airoha/airoha-common.h        |  147 +
 drivers/pinctrl/airoha/pinctrl-airoha.c       | 2664 ++---------------
 drivers/pinctrl/airoha/pinctrl-an7563.c       | 1115 +++++++
 drivers/pinctrl/airoha/pinctrl-an7581.c       | 1487 +++++++++
 drivers/pinctrl/airoha/pinctrl-an7583.c       | 1517 ++++++++++
 drivers/pinctrl/airoha/pinctrl-en7523.c       | 1157 +++++++
 12 files changed, 6460 insertions(+), 2482 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/airoha,an7563-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/airoha,en7523-pinctrl.yaml
 create mode 100644 drivers/pinctrl/airoha/airoha-common.h
 create mode 100644 drivers/pinctrl/airoha/pinctrl-an7563.c
 create mode 100644 drivers/pinctrl/airoha/pinctrl-an7581.c
 create mode 100644 drivers/pinctrl/airoha/pinctrl-an7583.c
 create mode 100644 drivers/pinctrl/airoha/pinctrl-en7523.c

-- 
2.53.0
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Linus Walleij 1 month, 3 weeks ago
Hi Mikhail,

On Fri, Aug 7, 2026 at 12:06 AM Mikhail Kshevetskiy
<mikhail.kshevetskiy@iopsys.eu> wrote:

> This patchset
>  * fixes more airoha pinctrl issues
>  * split combined driver on common code and several SoC specific drivers
>  * improves an7583 pinctrl support
>  * adds support of en7523 SoC
>  * adds support of an7563 SoC
>
> The driver split changes are based on Matheus Sampaio Queiroga work.

This patch set began with 11 patches and is now 37 patches.

Is this becayse Sashiko is touting you to just fix more and more issues?

I think at some point we have to draw a line and say "let's fix the rest
later".

On the other hand I appreciate your efforts...

Yours,
Linus Walleij
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Mikhail Kshevetskiy 1 month, 3 weeks ago
On 8/7/26 19:07, Linus Walleij wrote:
> Hi Mikhail,
>
> On Fri, Aug 7, 2026 at 12:06 AM Mikhail Kshevetskiy
> <mikhail.kshevetskiy@iopsys.eu> wrote:
>
>> This patchset
>>  * fixes more airoha pinctrl issues
>>  * split combined driver on common code and several SoC specific drivers
>>  * improves an7583 pinctrl support
>>  * adds support of en7523 SoC
>>  * adds support of an7563 SoC
>>
>> The driver split changes are based on Matheus Sampaio Queiroga work.
> This patch set began with 11 patches and is now 37 patches.
>
> Is this becayse Sashiko is touting you to just fix more and more issues?
>
> I think at some point we have to draw a line and say "let's fix the rest
> later".
>
> On the other hand I appreciate your efforts...

following reasons:
* move binding changes to separate patches (8 patches)
* openwrt upstream changes (4 patches)
* issues found by sashiko (5 patches)
* new features (3 patches)
* code cleanups (4 patches)

so growing from 11 to 37 patches looks reasonable

>
> Yours,
> Linus Walleij
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Linus Walleij 1 month, 3 weeks ago
On Fri, Aug 7, 2026 at 6:39 PM Mikhail Kshevetskiy
<mikhail.kshevetskiy@iopsys.eu> wrote:

> > This patch set began with 11 patches and is now 37 patches.
> >
> > Is this becayse Sashiko is touting you to just fix more and more issues?
> >
> > I think at some point we have to draw a line and say "let's fix the rest
> > later".
> >
> > On the other hand I appreciate your efforts...
>
> following reasons:
> * move binding changes to separate patches (8 patches)
> * openwrt upstream changes (4 patches)
> * issues found by sashiko (5 patches)
> * new features (3 patches)
> * code cleanups (4 patches)
>
> so growing from 11 to 37 patches looks reasonable

Fair enough :D

Can I ignore the  new Sashiko moanings and just slam this all
into my tree for linux-next now? I.e. are we happy?

Yours,
Linus Walleij
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Mikhail Kshevetskiy 1 month, 3 weeks ago
On 8/7/26 20:20, Linus Walleij wrote:
> On Fri, Aug 7, 2026 at 6:39 PM Mikhail Kshevetskiy
> <mikhail.kshevetskiy@iopsys.eu> wrote:
>
>>> This patch set began with 11 patches and is now 37 patches.
>>>
>>> Is this becayse Sashiko is touting you to just fix more and more issues?
>>>
>>> I think at some point we have to draw a line and say "let's fix the rest
>>> later".
>>>
>>> On the other hand I appreciate your efforts...
>> following reasons:
>> * move binding changes to separate patches (8 patches)
>> * openwrt upstream changes (4 patches)
>> * issues found by sashiko (5 patches)
>> * new features (3 patches)
>> * code cleanups (4 patches)
>>
>> so growing from 11 to 37 patches looks reasonable
> Fair enough :D
>
> Can I ignore the  new Sashiko moanings and just slam this all
> into my tree for linux-next now? I.e. are we happy?
it will be fine
>
> Yours,
> Linus Walleij
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Benjamin Larsson 1 month, 3 weeks ago
On 07/08/2026 18:07, Linus Walleij wrote:
> Hi Mikhail,
> 
> On Fri, Aug 7, 2026 at 12:06 AM Mikhail Kshevetskiy
> <mikhail.kshevetskiy@iopsys.eu> wrote:
> 
>> This patchset
>>   * fixes more airoha pinctrl issues
>>   * split combined driver on common code and several SoC specific drivers
>>   * improves an7583 pinctrl support
>>   * adds support of en7523 SoC
>>   * adds support of an7563 SoC
>>
>> The driver split changes are based on Matheus Sampaio Queiroga work.
> 
> This patch set began with 11 patches and is now 37 patches.
> 
> Is this becayse Sashiko is touting you to just fix more and more issues?
> 
> I think at some point we have to draw a line and say "let's fix the rest
> later".
> 
> On the other hand I appreciate your efforts...
> 
> Yours,
> Linus Walleij


Hi, 2 of them are my doing but I agree we can fix any other issues 
later. We are sort of waiting for this to land so we can start preparing 
support for the Econet SoCs that use a similar structure.

MvH
Benjamin Larsson
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Linus Walleij 1 month, 3 weeks ago
On Fri, Aug 7, 2026 at 12:06 AM Mikhail Kshevetskiy
<mikhail.kshevetskiy@iopsys.eu> wrote:

> This patchset
>  * fixes more airoha pinctrl issues
>  * split combined driver on common code and several SoC specific drivers
>  * improves an7583 pinctrl support
>  * adds support of en7523 SoC
>  * adds support of an7563 SoC
>
> The driver split changes are based on Matheus Sampaio Queiroga work.

Patches applied!

I had to manually fixup one patch due to orthogonal changes,
check the result!

Any remaining nags; let's do patches on top of this.

Yours,
Linus Walleij
Re: [PATCH v11 00/37] pinctrl: airoha: split on shared and SoC drivers, add more SoCs
Posted by Mikhail Kshevetskiy 1 month, 3 weeks ago
On 8/7/26 21:45, Linus Walleij wrote:
> On Fri, Aug 7, 2026 at 12:06 AM Mikhail Kshevetskiy
> <mikhail.kshevetskiy@iopsys.eu> wrote:
>
>> This patchset
>>  * fixes more airoha pinctrl issues
>>  * split combined driver on common code and several SoC specific drivers
>>  * improves an7583 pinctrl support
>>  * adds support of en7523 SoC
>>  * adds support of an7563 SoC
>>
>> The driver split changes are based on Matheus Sampaio Queiroga work.
> Patches applied!
>
> I had to manually fixup one patch due to orthogonal changes,
> check the result!
looks good, thanks!
>
> Any remaining nags; let's do patches on top of this.
>
> Yours,
> Linus Walleij