[PATCH v3 0/4] arm: mach-snapdragon: Qualcomm pinctrl driver cleanup

Caleb Connolly caleb.connolly at linaro.org
Tue Nov 14 13:55:39 CET 2023


This series moves the Qualcomm pinctrl drivers from mach-snapdragon and
mach-ipq40xx to drivers/pinctrl/qcom. It then makes the necessary changes
to enable compatibility with Linux DTs.

The pinctrl hardware on most Qualcomm platforms is made up of "tiles",
these are just banks of pins at different register addresses. The
mapping between pin number and tile is totally arbitrary, this
unfortunately means that it is necessary to have a map of pin to tile in
order to support all pins. Up until now this driver has ignored tiles,
meaning that the pin numbers and DT nodes are entirely different to the
Linux DT and only a subset of pins are addressable.

Patch 2 solves this by introducing the pin_offset map, initially
supporting SDM845. This map is used for all pin register lookups for
both the pinctrl and GPIO drivers. Similarly to the clock/reset drivers
these are both associated with a single DT node, where the pinctrl
driver is responsible for binding the GPIO drivers.

Patch 3 introduces support for gpio-reserved-ranges, this property
is used on some boards to mark pin ranges that shouldn't be touched
(else firmware will trigger a fault and reset the board).

This series loosely depends on the associated clock driver cleanup which can be
found here (Makefile and perhaps DTS conflicts):

https://lore.kernel.org/u-boot/20231103-b4-qcom-clk-v3-0-8d2d460ece84@linaro.org

---
Changes in v3:
* Fix header in msm_gpio.c
* Link to v2: https://lore.kernel.org/r/20231106-b4-qcom-pinctrl-v2-0-406e8d8689ca@linaro.org

Changes in v2:
* Drop msm -> qcom rename (will be handled in a future patch)
* Drop "handle reserved ranges" patch to be introduced alongside a user
* Re-order APQ4019 move to be the second patch
* Change driver name to pinctrl_qcom instead of qcom_pinctrl
* Add MAINTAINERS entry
* Move shared GPIO header to mach-snapdragon
* Link to v1: https://lore.kernel.org/r/20231025-b4-qcom-pinctrl-v1-0-9123d6a217eb@linaro.org

---
Caleb Connolly (4):
      pinctrl: qcom: move out of mach-snapdragon
      pinctrl: qcom: move ipq4019 driver from mach-ipq40xx
      pinctrl: qcom: make compatible with linux DTs
      msm_gpio: use unsigned int

 MAINTAINERS                                        |   1 +
 arch/arm/Kconfig                                   |   1 +
 arch/arm/dts/dragonboard845c-uboot.dtsi            |   2 +-
 arch/arm/dts/sdm845.dtsi                           |  16 +-
 arch/arm/dts/starqltechn-uboot.dtsi                |   5 +-
 arch/arm/dts/starqltechn.dts                       |  16 +-
 arch/arm/mach-ipq40xx/Makefile                     |   8 -
 arch/arm/mach-ipq40xx/pinctrl-snapdragon.c         | 166 ---------------------
 arch/arm/mach-snapdragon/Kconfig                   |   4 +
 arch/arm/mach-snapdragon/Makefile                  |   5 -
 arch/arm/mach-snapdragon/include/mach/gpio.h       |  28 +++-
 arch/arm/mach-snapdragon/pinctrl-sdm845.c          |  44 ------
 arch/arm/mach-snapdragon/pinctrl-snapdragon.h      |  33 ----
 drivers/gpio/msm_gpio.c                            |  42 +++---
 drivers/pinctrl/Kconfig                            |   1 +
 drivers/pinctrl/Makefile                           |   1 +
 drivers/pinctrl/qcom/Kconfig                       |  46 ++++++
 drivers/pinctrl/qcom/Makefile                      |  10 ++
 .../pinctrl/qcom}/pinctrl-apq8016.c                |  21 ++-
 .../pinctrl/qcom}/pinctrl-apq8096.c                |  21 ++-
 .../pinctrl/qcom}/pinctrl-ipq4019.c                |  25 +++-
 .../pinctrl/qcom/pinctrl-qcom.c                    |  70 +++++----
 .../pinctrl/qcom/pinctrl-qcom.h                    |  15 +-
 .../pinctrl/qcom}/pinctrl-qcs404.c                 |  21 ++-
 drivers/pinctrl/qcom/pinctrl-sdm845.c              | 100 +++++++++++++
 25 files changed, 350 insertions(+), 352 deletions(-)
---
base-commit: 8c5e4ddf52ea3c1e85c44cdd5d5b2e2f6c892b4f

// Caleb (they/them)



More information about the U-Boot mailing list