Re: [PATCH v2 1/8] pinctrl: Add compact Nomadik pin controller

Stephan Gerhold <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
On Mon, Aug 17, 2026 at 11:31:50AM +0200, Linus Walleij wrote:
> Add the minimal pin control support needed to consume default states from
> the upstream DB8500 device trees. Resolve the nine Nomadik GPIO banks
> through nomadik-gpio-chips and apply the mux, direction, value, pull and
> low-EMI settings directly to their registers.
> 
> Only the DB8500 binding and default-state configuration needed by
> U-Boot are supported. There is no GPIO ownership or sleep-state
> handling.
> 
> Signed-off-by: Linus Walleij <[email protected]>
> ---
>  MAINTAINERS                       |   1 +
>  arch/arm/Kconfig                  |   2 +
>  drivers/pinctrl/Kconfig           |   7 ++
>  drivers/pinctrl/Makefile          |   1 +
>  drivers/pinctrl/pinctrl-nomadik.c | 235 ++++++++++++++++++++++++++++++++++++++
>  5 files changed, 246 insertions(+)
> 
> [....]
> diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
> new file mode 100644
> index 000000000000..56ec7edcca48
> --- /dev/null
> +++ b/drivers/pinctrl/pinctrl-nomadik.c
> @@ -0,0 +1,235 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/* Copyright (C) 2026 Linus Walleij <[email protected]> */
> +
> +#include <dm.h>
> +#include <dm/pinctrl.h>
> +#include <vsprintf.h>
> +#include <asm/io.h>
> +
> +#define NMK_GPIO_BANKS		9
> +#define NMK_GPIO_PER_BANK	32
> +
> +#define NMK_INPUT_NOPULL	0
> +#define NMK_INPUT_PULLUP	1
> +#define NMK_INPUT_PULLDOWN	2
> +#define NMK_OUTPUT_LOW		0
> +#define NMK_OUTPUT_HIGH		1

Can we somehow reuse the defines in
dts/upstream/include/dt-bindings/pinctrl/nomadik.h for this?

Looks fine to me otherwise!

Thanks,
Stephan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.