[PATCH v2 00/10] rockchip: pinctrl: Add support for pinmux status cmd
Jonas Karlman
jonas at kwiboo.se
Sat Aug 3 00:56:42 CEST 2024
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
More information about the U-Boot
mailing list