public inbox for linux-aspeed@lists.ozlabs.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
	Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Joel Stanley <joel@jms.id.au>,
	Andrew Jeffery <andrew@codeconstruct.com.au>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Cc: Andrew Jeffery <andrew@aj.id.au>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org,
	bmc-sw@aspeedtech.com
Subject: Re: [PATCH v3 3/3] pinctrl: aspeed: add G7(AST2700) SoC0 pinctrl support
Date: Tue, 20 Jan 2026 13:27:09 +0100	[thread overview]
Message-ID: <0d8ad41f-a2c4-4a4f-ac1f-68263648c4dc@kernel.org> (raw)
In-Reply-To: <20260120-upstream_pinctrl-v3-3-868fbf8413b5@aspeedtech.com>

On 20/01/2026 12:43, Billy Tsai wrote:
> Add pinctrl support for the SoC0 instance of the ASPEED AST2700.
> 
> AST2700 consists of two interconnected SoC instances, each with its own
> pinctrl register block.
> 
> The SoC0 pinctrl hardware closely follows the design found in previous
> ASPEED BMC generations, allowing the driver to build upon the common
> ASPEED pinctrl infrastructure.
> 
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
> ---
>  drivers/pinctrl/aspeed/Kconfig                  |   8 +
>  drivers/pinctrl/aspeed/Makefile                 |   1 +
>  drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c | 683 ++++++++++++++++++++++++
>  3 files changed, 692 insertions(+)
> 
> diff --git a/drivers/pinctrl/aspeed/Kconfig b/drivers/pinctrl/aspeed/Kconfig
> index 1a4e5b9ed471..16743091a139 100644
> --- a/drivers/pinctrl/aspeed/Kconfig
> +++ b/drivers/pinctrl/aspeed/Kconfig
> @@ -31,3 +31,11 @@ config PINCTRL_ASPEED_G6
>  	help
>  	  Say Y here to enable pin controller support for Aspeed's 6th
>  	  generation SoCs. GPIO is provided by a separate GPIO driver.
> +
> +config PINCTRL_ASPEED_G7
> +	bool "Aspeed G7 SoC pin control"
> +	depends on (ARCH_ASPEED || COMPILE_TEST) && OF
> +	select PINCTRL_ASPEED
> +	help
> +	  Say Y here to enable pin controller support for Aspeed's 7th
> +	  generation SoCs. GPIO is provided by a separate GPIO driver.
> diff --git a/drivers/pinctrl/aspeed/Makefile b/drivers/pinctrl/aspeed/Makefile
> index db2a7600ae2b..cb2c81a69551 100644
> --- a/drivers/pinctrl/aspeed/Makefile
> +++ b/drivers/pinctrl/aspeed/Makefile
> @@ -6,3 +6,4 @@ obj-$(CONFIG_PINCTRL_ASPEED)	+= pinctrl-aspeed.o pinmux-aspeed.o
>  obj-$(CONFIG_PINCTRL_ASPEED_G4)	+= pinctrl-aspeed-g4.o
>  obj-$(CONFIG_PINCTRL_ASPEED_G5)	+= pinctrl-aspeed-g5.o
>  obj-$(CONFIG_PINCTRL_ASPEED_G6)	+= pinctrl-aspeed-g6.o
> +obj-$(CONFIG_PINCTRL_ASPEED_G7) += pinctrl-aspeed-g7-soc0.o
> \ No newline at end of file

Do not introduce patch warnings.

> diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c
> new file mode 100644
> index 000000000000..c4e828c8839a
> --- /dev/null
> +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc0.c
> @@ -0,0 +1,683 @@
> +// SPDX-License-Identifier: GPL-2.0
> +

...

> +
> +static const struct aspeed_pinmux_ops aspeed_g7_soc0_ops = {
> +	.set = aspeed_g7_soc0_sig_expr_set,
> +};
> +
> +static struct aspeed_pinctrl_data aspeed_g7_soc0_pinctrl_data = {

Look at your existing drivers - what is missing here and in other places?

> +	.pins = aspeed_g7_soc0_pins,
> +	.npins = ARRAY_SIZE(aspeed_g7_soc0_pins),
> +	.pinmux = {
> +		.ops = &aspeed_g7_soc0_ops,
> +		.groups = aspeed_g7_soc0_groups,
> +		.ngroups = ARRAY_SIZE(aspeed_g7_soc0_groups),
> +		.functions = aspeed_g7_soc0_functions,
> +		.nfunctions = ARRAY_SIZE(aspeed_g7_soc0_functions),
> +	},
> +	.configs = aspeed_g7_soc0_configs,
> +	.nconfigs = ARRAY_SIZE(aspeed_g7_soc0_configs),
> +	.confmaps = aspeed_g7_soc0_pin_config_map,
> +	.nconfmaps = ARRAY_SIZE(aspeed_g7_soc0_pin_config_map),
> +};
> +
> +static int aspeed_g7_soc0_pinctrl_probe(struct platform_device *pdev)
> +{
> +	return aspeed_pinctrl_probe(pdev, &aspeed_g7_soc0_pinctrl_desc,
> +				    &aspeed_g7_soc0_pinctrl_data);
> +}
> +
> +static const struct of_device_id aspeed_g7_soc0_pinctrl_match[] = {
> +	{ .compatible = "aspeed,ast2700-soc0-pinctrl" },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, aspeed_g7_soc0_pinctrl_match);
> +
> +static struct platform_driver aspeed_g7_soc0_pinctrl_driver = {
> +	.probe = aspeed_g7_soc0_pinctrl_probe,
> +	.driver = {
> +		.name = "aspeed-g7-soc0-pinctrl",
> +		.of_match_table = aspeed_g7_soc0_pinctrl_match,
> +		.suppress_bind_attrs = true,
> +	},
> +};
> +
> +static int __init aspeed_g7_soc0_pinctrl_init(void)
> +{
> +	return platform_driver_register(&aspeed_g7_soc0_pinctrl_driver);
> +}
> +arch_initcall(aspeed_g7_soc0_pinctrl_init);
> 


Best regards,
Krzysztof


  reply	other threads:[~2026-01-20 12:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 11:43 [PATCH v3 0/3] Add pinctrl support for AST2700 SoC Billy Tsai
2026-01-20 11:43 ` [PATCH v3 1/3] Add compatible strings for AST2700 pinctrl to the SCU binding Billy Tsai
2026-01-20 12:12   ` Krzysztof Kozlowski
2026-01-23  6:33   ` Andrew Jeffery
2026-02-11  7:06     ` Andrew Jeffery
2026-01-20 11:43 ` [PATCH v3 2/3] dt-bindings: pinctrl: aspeed: Add support for AST27xx Billy Tsai
2026-01-20 12:24   ` Krzysztof Kozlowski
2026-01-20 12:27   ` Rob Herring (Arm)
2026-01-20 11:43 ` [PATCH v3 3/3] pinctrl: aspeed: add G7(AST2700) SoC0 pinctrl support Billy Tsai
2026-01-20 12:27   ` Krzysztof Kozlowski [this message]
2026-01-29  6:43     ` Billy Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d8ad41f-a2c4-4a4f-ac1f-68263648c4dc@kernel.org \
    --to=krzk@kernel.org \
    --cc=andrew@aj.id.au \
    --cc=andrew@codeconstruct.com.au \
    --cc=billy_tsai@aspeedtech.com \
    --cc=bmc-sw@aspeedtech.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox