Skip to content

Commit

Permalink
pinctrl: spacemit: enable config option
Browse files Browse the repository at this point in the history
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.

Fixes: a83c29e ("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>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/20250218-k1-pinctrl-option-v3-1-36e031e0da1b@gentoo.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Yixun Lan authored and Linus Walleij committed Feb 25, 2025
1 parent acf40ab commit 7ff4fab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/riscv/Kconfig.socs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config ARCH_SOPHGO

config ARCH_SPACEMIT
bool "SpacemiT SoCs"
select PINCTRL
help
This enables support for SpacemiT SoC platform hardware.

Expand Down
3 changes: 2 additions & 1 deletion drivers/pinctrl/spacemit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/spacemit/pinctrl-k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7ff4fab

Please sign in to comment.