public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 00/10] rockchip: pinctrl: Add support for pinmux status cmd
@ 2024-08-02 22:56 Jonas Karlman
  2024-08-02 22:56 ` [PATCH v2 01/10] pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle() Jonas Karlman
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Jonas Karlman @ 2024-08-02 22:56 UTC (permalink / raw)
  To: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini; +Cc: u-boot, Jonas Karlman

This series includes some cleanup, add support for using the pinmux
status cmd and add support for the gpio request ops.

Following is an example on a Radxa ROCK 5A (RK3588S):

  => pinmux dev pinctrl
  dev: pinctrl
  => pinmux status
  GPIO0_A0  : gpio
  GPIO0_A1  : func-2
  GPIO0_A2  : gpio
  GPIO0_A3  : gpio
  GPIO0_A4  : func-1
  GPIO0_A5  : func-2
  GPIO0_A6  : gpio
  GPIO0_A7  : gpio
  GPIO0_B0  : gpio
  GPIO0_B1  : gpio
  GPIO0_B2  : gpio
  GPIO0_B3  : gpio
  GPIO0_B4  : gpio
  GPIO0_B5  : func-10
  GPIO0_B6  : func-10
  GPIO0_B7  : gpio
  [...]

and on a ASUS TinkerBoard R2.0 (RK3288W):

  => pinmux dev pinctrl
  dev: pinctrl
  => pinmux status
  [...]
  GPIO2_C6  : gpio
  GPIO2_C7  : gpio
  GPIO2_D0  : unrouted
  GPIO2_D1  : unrouted
  GPIO2_D2  : unrouted
  GPIO2_D3  : unrouted
  GPIO2_D4  : unrouted
  GPIO2_D5  : unrouted
  GPIO2_D6  : unrouted
  GPIO2_D7  : unrouted
  GPIO3_A0  : func-2
  GPIO3_A1  : func-2
  [...]

Patch 1 refactor to use syscon_regmap_lookup_by_phandle() helper.
Patch 6 refactor to get pinctrl device from gpio-ranges prop.

Patch 2, 3 and 7 change to use pinctrl pin offset instead of bank num to
get current pinmux.
Patch 4 add required ops for use of the pinmux status cmd.

Patch 5 and 8 add gpio_request_enable() and request() ops.

Patch 9 add gpio-ranges props for remaining RK SoCs, this is strictly
not needed for pinmux status cmd to function. However, the change to not
require the pin controller offset to be 32 aligned was required to add
gpio-ranges props for RK3288.

Patch 10 add gpio aliases for RK SoCs that is missing alias for gpio
controllers.

Changes in v2:
- Drop fixes patches already applied
- Split adding pin_to_bank() helper into own patch
- Add gpio_request_enable() and request() ops patch from the "rockchip:
  Add gpio request() ops" series
- Add missing gpio aliases
- Collect r-b tags

Jonas Karlman (10):
  pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()
  pinctrl: rockchip: Add a pin_to_bank() helper
  pinctrl: rockchip: Update get_gpio_mux() ops
  pinctrl: rockchip: Add pinmux status related ops
  pinctrl: rockchip: Add gpio_request_enable() ops
  gpio: rockchip: Get pinctrl device from gpio-ranges prop
  gpio: rockchip: Use pinctrl pin offset to get_gpio_mux()
  gpio: rockchip: Add request() ops
  rockchip: gpio: Add gpio-ranges props
  rockchip: gpio: Add missing gpio aliases

 arch/arm/dts/px30-u-boot.dtsi                 |   4 +
 arch/arm/dts/rk3036-u-boot.dtsi               |  12 ++
 arch/arm/dts/rk3066a-u-boot.dtsi              |  10 +-
 arch/arm/dts/rk3128-u-boot.dtsi               |  16 ++
 arch/arm/dts/rk322x-u-boot.dtsi               |  16 ++
 arch/arm/dts/rk3288-u-boot.dtsi               |  42 ++++--
 arch/arm/dts/rk3308-u-boot.dtsi               |  20 +++
 arch/arm/dts/rk3328-u-boot.dtsi               |  13 ++
 arch/arm/dts/rk3368-u-boot.dtsi               |  16 ++
 arch/arm/dts/rk3399-u-boot.dtsi               |  20 +++
 arch/arm/dts/rk3xxx-u-boot.dtsi               |   7 +
 arch/arm/dts/rv1108-u-boot.dtsi               |  25 +++
 arch/arm/dts/rv1126-u-boot.dtsi               |  22 +++
 drivers/gpio/rk_gpio.c                        |  54 +++++--
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  | 142 ++++++++++++++----
 15 files changed, 364 insertions(+), 55 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-08-12  6:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02 22:56 [PATCH v2 00/10] rockchip: pinctrl: Add support for pinmux status cmd Jonas Karlman
2024-08-02 22:56 ` [PATCH v2 01/10] pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle() Jonas Karlman
2024-08-06 15:12   ` Quentin Schulz
2024-08-02 22:56 ` [PATCH v2 02/10] pinctrl: rockchip: Add a pin_to_bank() helper Jonas Karlman
2024-08-06 15:36   ` Quentin Schulz
2024-08-09  9:35   ` Kever Yang
2024-08-02 22:56 ` [PATCH v2 03/10] pinctrl: rockchip: Update get_gpio_mux() ops Jonas Karlman
2024-08-02 22:56 ` [PATCH v2 04/10] pinctrl: rockchip: Add pinmux status related ops Jonas Karlman
2024-08-07  9:20   ` Quentin Schulz
2024-08-02 22:56 ` [PATCH v2 05/10] pinctrl: rockchip: Add gpio_request_enable() ops Jonas Karlman
2024-08-07  9:25   ` Quentin Schulz
2024-08-09  9:37   ` Kever Yang
2024-08-02 22:56 ` [PATCH v2 06/10] gpio: rockchip: Get pinctrl device from gpio-ranges prop Jonas Karlman
2024-08-07  9:49   ` Quentin Schulz
2024-08-02 22:56 ` [PATCH v2 07/10] gpio: rockchip: Use pinctrl pin offset to get_gpio_mux() Jonas Karlman
2024-08-07 10:02   ` Quentin Schulz
2024-08-02 22:56 ` [PATCH v2 08/10] gpio: rockchip: Add request() ops Jonas Karlman
2024-08-07 10:12   ` Quentin Schulz
2024-08-09  9:38   ` Kever Yang
2024-08-02 22:56 ` [PATCH v2 09/10] rockchip: gpio: Add gpio-ranges props Jonas Karlman
2024-08-07 10:28   ` Quentin Schulz
2024-08-09  9:38   ` Kever Yang
2024-08-02 22:56 ` [PATCH v2 10/10] rockchip: gpio: Add missing gpio aliases Jonas Karlman
2024-08-07 10:47   ` Quentin Schulz
2024-08-09  9:39   ` Kever Yang
2024-08-12  6:30 ` [PATCH v2 00/10] rockchip: pinctrl: Add support for pinmux status cmd Kever Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox