[PATCH 0/2] gpio/pinctrl: spacemit: Add GPIO pin configuration support for K1
Yixun Lan
dlan at kernel.org
Thu Mar 12 04:21:49 PDT 2026
Hi Junhui,
On 16:42 Thu 12 Mar , Junhui Liu wrote:
> This add GPIO pin configuration support for the Spacemit K1 SoC. Some
> use cases require configuring pin attributes like pull-up/down when using
> GPIO lines.
>
> A practical example is the SD card detection pin on the Banana Pi BPI-F3
> board. Since it lacks an external pull-up circuit, the pin must be
> configured with an internal pull-up to function correctly. Such
> configurations can be specified directly in the devicetree:
>
> cd-gpios = <&gpio K1_GPIO(80) (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>
> To address this, add the set_config() callback to the gpio-spacemit-k1
> driver to enable pin configuration through pinctrl, and modify the
> pinctrl driver to return -ENOTSUPP instead of -EINVAL for unsupported
> parameters, allowing the GPIO subsystem to gracefully handle them.
>
Thanks for working on this, for the series
Reviewed-by: Yixun Lan <dlan at kernel.org>
> ---
> Junhui Liu (2):
> pinctrl: spacemit: return -ENOTSUPP for unsupported pin configurations
> gpio: spacemit-k1: Add set_config callback support
>
> drivers/gpio/gpio-spacemit-k1.c | 1 +
> drivers/pinctrl/spacemit/pinctrl-k1.c | 21 ++++++++++++---------
> 2 files changed, 13 insertions(+), 9 deletions(-)
> ---
> base-commit: b29fb8829bff243512bb8c8908fd39406f9fd4c3
> change-id: 20260312-k1-gpio-set-config-f0873e92ebac
>
> Best regards,
> --
> Junhui Liu <junhui.liu at pigmoral.tech>
>
--
Yixun Lan (dlan)
More information about the linux-riscv
mailing list