From: Conor Dooley <conor@kernel.org>
To: linus.walleij@linaro.org
Cc: conor@kernel.org, Conor Dooley <conor.dooley@microchip.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: [RFC 0/5] microchip mpfs/pic64gx pinctrl questions
Date: Fri, 26 Sep 2025 15:33:08 +0100 [thread overview]
Message-ID: <20250926-manpower-glacial-e9756c82b427@spud> (raw)
From: Conor Dooley <conor.dooley@microchip.com>
Hey Linus, or whoever else,
Working on some pinctrl drivers for my devices, and I had two questions,
so I am sending this as an RFC in the hopes of getting an answer before
progressing further with the third pin controller on the platform.
Firstly, both of the drivers I have produced so far have only pinmuxing
functions and no pincfg role - they only determine internal routing in
the SoC. I've got an identical dt_node_to_map implementation in both
drivers, as all they are doing is populating the pin and mux bit setting
from dt. I used what the recently added spacemit k1 was doing as a
guide, but removed the loop since there's no pincfg stuff that can
differ between pins. I notice there are generic implementations of
dt_node_to_map but I didn't get them to work. Have I missed a trick here
(either on the dt side, or in the driver) that would let me use a generic
function instead of having my own implementation, either in the driver
or in how I've set up the dt side?
I got to this point by partially writing the third driver first, based
on that spacemit k1 driver's approach, so I might've blinded myself to
the correct/simple approach to things as a result of having to handle
the pincfg stuff etc in dt_node_to_map there.
Secondly, particularly if there's not some neat way to simplify things
in dt_node_to_map, should I merge the two drivers, at least partially?
They're effectively only different in their pinctrl_pin_desc and how the
regmap is generated in probe (from a syscon regmap versus
regmap_init_mmio). I've kept the bindings apart, as despite similarity,
they're really only similar due to simplicity.
None of this is in any sort of final state, it's either WIP in and off
itself or depends on other stuff that's not yet accepted, so please
excuse any build warnings etc.
Cheers,
Conor.
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzk+dt@kernel.org>
CC: linux-kernel@vger.kernel.org
CC: linux-gpio@vger.kernel.org
CC: devicetree@vger.kernel.org
Conor Dooley (5):
dt-bindings: pinctrl: add polarfire soc iomux0 pinmux
dt-bindings: pinctrl: add pic64gx "gpio2" pinmux
pinctrl: add polarfire soc iomux0 pinmux driver
pinctrl: add pic64gx "gpio2" pinmux driver
riscv: dts: microchip: add pinctrl nodes for iomux0
.../microchip,mpfs-pinctrl-iomux0.yaml | 77 +++++
.../microchip,pic64gx-pinctrl-gpio2.yaml | 74 +++++
.../microchip,mpfs-mss-top-sysreg.yaml | 17 +-
.../dts/microchip/mpfs-icicle-kit-fabric.dtsi | 56 ++++
.../boot/dts/microchip/mpfs-icicle-kit.dts | 1 -
.../boot/dts/microchip/mpfs-pinctrl.dtsi | 117 ++++++++
arch/riscv/boot/dts/microchip/mpfs.dtsi | 9 +
drivers/pinctrl/Kconfig | 14 +
drivers/pinctrl/Makefile | 2 +
drivers/pinctrl/pinctrl-mpfs-iomux0.c | 252 ++++++++++++++++
drivers/pinctrl/pinctrl-pic64gx-gpio2.c | 283 ++++++++++++++++++
11 files changed, 900 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/microchip,pic64gx-pinctrl-gpio2.yaml
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-pinctrl.dtsi
create mode 100644 drivers/pinctrl/pinctrl-mpfs-iomux0.c
create mode 100644 drivers/pinctrl/pinctrl-pic64gx-gpio2.c
--
2.47.3
next reply other threads:[~2025-09-26 14:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 14:33 Conor Dooley [this message]
2025-09-26 14:33 ` [RFC 1/5] dt-bindings: pinctrl: add polarfire soc iomux0 pinmux Conor Dooley
2025-09-26 14:33 ` [RFC 2/5] dt-bindings: pinctrl: add pic64gx "gpio2" pinmux Conor Dooley
2025-10-01 11:32 ` Linus Walleij
2025-10-01 15:47 ` Conor Dooley
2025-10-01 15:48 ` Conor Dooley
2025-10-13 10:56 ` Linus Walleij
2025-10-13 11:22 ` Conor Dooley
2025-09-26 14:33 ` [RFC 3/5] pinctrl: add polarfire soc iomux0 pinmux driver Conor Dooley
2025-10-01 11:34 ` Linus Walleij
2025-10-01 11:36 ` Linus Walleij
2025-10-01 15:45 ` Conor Dooley
2025-10-13 11:02 ` Linus Walleij
2025-10-13 11:42 ` Conor Dooley
2025-10-14 10:27 ` Linus Walleij
2025-09-26 14:33 ` [RFC 4/5] pinctrl: add pic64gx "gpio2" " Conor Dooley
2025-09-26 14:33 ` [RFC 5/5] riscv: dts: microchip: add pinctrl nodes for iomux0 Conor Dooley
2025-10-01 11:29 ` [RFC 0/5] microchip mpfs/pic64gx pinctrl questions Linus Walleij
2025-10-01 16:00 ` Conor Dooley
2025-10-01 16:15 ` Conor Dooley
2025-10-09 15:55 ` Conor Dooley
2025-10-13 13:27 ` Linus Walleij
2025-10-13 13:55 ` Conor Dooley
2025-10-14 10:33 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250926-manpower-glacial-e9756c82b427@spud \
--to=conor@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox