From: Yixun Lan <dlan@gentoo.org>
To: Linus Walleij <linus.walleij@linaro.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alex Elder <elder@kernel.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, spacemit@lists.linux.dev,
Conor Dooley <conor.dooley@microchip.com>,
Alex Elder <elder@riscstar.com>
Subject: Re: [PATCH v3] pinctrl: spacemit: enable config option
Date: Sun, 23 Feb 2025 12:06:38 +0000 [thread overview]
Message-ID: <20250223120638-GYA39613@gentoo> (raw)
In-Reply-To: <20250218-k1-pinctrl-option-v3-1-36e031e0da1b@gentoo.org>
Hi Linus Walleij:
On 08:31 Tue 18 Feb , Yixun Lan wrote:
> Pinctrl is an essential driver for SpacemiT's SoC,
> The uart driver requires it, same as sd card driver,
> so let's enable it by default for this SoC.
>
> The CONFIG_PINCTRL_SPACEMIT_K1 isn't enabled when using
> 'make defconfig' to select kernel configuration options.
> This result in a broken uart driver where fail at probe()
> stage due to no pins found.
>
Can you take this patch via pinctrl fixes tree? if possible in this cycle
> Fixes: a83c29e1d145 ("pinctrl: spacemit: add support for SpacemiT K1 SoC")
> Reported-by: Alex Elder <elder@kernel.org>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Tested-by: Alex Elder <elder@riscstar.com>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
> This should fix problem that CONFIG_PINCTRL_SPACEMIT_K1 is not enabled
> when using make defconfig, thus fail to initilize uart driver which requst
> pins during probe stage.
> ---
> Changes in v3:
> - switch PINCTRL_SPACEMIT_K1 from tristate to bool
> - Link to v2: https://lore.kernel.org/r/20250212-k1-pinctrl-option-v2-1-bde7da0bc0d9@gentoo.org
>
> Changes in v2:
> - set default as y
> - Link to v1: https://lore.kernel.org/r/20250207-k1-pinctrl-option-v1-1-e8a7e4d8404f@gentoo.org
> ---
> arch/riscv/Kconfig.socs | 1 +
> drivers/pinctrl/spacemit/Kconfig | 3 ++-
> drivers/pinctrl/spacemit/pinctrl-k1.c | 2 +-
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> index 1916cf7ba450ec9958265de2ca41dc504d4d2f7c..17606940bb5239d0fdfc6b5aefb50eeb982d14aa 100644
> --- a/arch/riscv/Kconfig.socs
> +++ b/arch/riscv/Kconfig.socs
> @@ -26,6 +26,7 @@ config ARCH_SOPHGO
>
> config ARCH_SPACEMIT
> bool "SpacemiT SoCs"
> + select PINCTRL
> help
> This enables support for SpacemiT SoC platform hardware.
>
> diff --git a/drivers/pinctrl/spacemit/Kconfig b/drivers/pinctrl/spacemit/Kconfig
> index 168f8a5ffbb952cbeae3e3401c11149558e0a84b..a2f98b3f8a75580d2d157008997cc48f42a89368 100644
> --- a/drivers/pinctrl/spacemit/Kconfig
> +++ b/drivers/pinctrl/spacemit/Kconfig
> @@ -4,9 +4,10 @@
> #
>
> config PINCTRL_SPACEMIT_K1
> - tristate "SpacemiT K1 SoC Pinctrl driver"
> + bool "SpacemiT K1 SoC Pinctrl driver"
> depends on ARCH_SPACEMIT || COMPILE_TEST
> depends on OF
> + default y
> select GENERIC_PINCTRL_GROUPS
> select GENERIC_PINMUX_FUNCTIONS
> select GENERIC_PINCONF
> diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c
> index a32579d736130c80bd12f0f9d8b3b2f69c428b3d..59fd555ff38d4453f446263a8fdb4a61faf63cfc 100644
> --- a/drivers/pinctrl/spacemit/pinctrl-k1.c
> +++ b/drivers/pinctrl/spacemit/pinctrl-k1.c
> @@ -1044,7 +1044,7 @@ static struct platform_driver k1_pinctrl_driver = {
> .of_match_table = k1_pinctrl_ids,
> },
> };
> -module_platform_driver(k1_pinctrl_driver);
> +builtin_platform_driver(k1_pinctrl_driver);
>
> MODULE_AUTHOR("Yixun Lan <dlan@gentoo.org>");
> MODULE_DESCRIPTION("Pinctrl driver for the SpacemiT K1 SoC");
>
> ---
> base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
> change-id: 20250207-k1-pinctrl-option-de5bdfd6b42e
>
> Best regards,
> --
> Yixun Lan
>
>
--
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55
next prev parent reply other threads:[~2025-02-23 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 0:31 [PATCH v3] pinctrl: spacemit: enable config option Yixun Lan
2025-02-18 8:47 ` Javier Martinez Canillas
2025-02-23 12:06 ` Yixun Lan [this message]
2025-02-25 16:23 ` Linus Walleij
2025-03-17 8:18 ` Geert Uytterhoeven
2025-03-17 12:11 ` Alex Elder
2025-03-17 12:41 ` Yixun Lan
2025-03-17 12:59 ` Geert Uytterhoeven
2025-03-17 13:29 ` Yixun Lan
2025-03-17 14:18 ` Geert Uytterhoeven
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=20250223120638-GYA39613@gentoo \
--to=dlan@gentoo.org \
--cc=conor.dooley@microchip.com \
--cc=elder@kernel.org \
--cc=elder@riscstar.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=spacemit@lists.linux.dev \
/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