U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Junhui Liu" <junhui.liu@pigmoral.tech>
To: "Anand Moon" <linux.amoon@gmail.com>, <u-boot@lists.u-boot-project.org>
Cc: "Dave Klotz" <DaveWK225@protonmail.com>,
	"Eric Chung" <eric.chung@riscstar.com>,
	"Hung-Chun Tseng" <alan.tseng.cs@gmail.com>,
	"E Shattow" <e@freeshell.de>, "Yixun Lan" <dlan@kernel.org>,
	"Huan Zhou" <pericycle.cc@gmail.com>,
	"Tom Rini" <trini@konsulko.com>,
	"Guodong Xu" <guodong@riscstar.com>,
	"Raymond Mao" <raymond.mao@riscstar.com>,
	<u-boot-spacemit@groups.io>
Subject: Re: [PATCH v1 5/6] pinctrl: spacemit: Add SPL support for K1 pinctrl driver
Date: Mon, 23 Nov 2026 23:04:45 +0800	[thread overview]
Message-ID: <DN2OL8QDSA3H.369TW8VSAPCVG@pigmoral.tech> (raw)
In-Reply-To: <20261029134705.3767-6-linux.amoon@gmail.com>

Hi Anand,

On Thu Oct 29, 2026 at 9:46 PM CST, Anand Moon wrote:
> Add `SPL_PINCTRL_SPACEMIT_K1` to enable the SpacemiT K1
> pinctrl driver during SPL initialization.
>
> Depend on `SPL_PINCTRL`, `SPL_DM`, and `PINCTRL_GENERIC`,
> and select `PINCTRL_SPACEMIT_K1` to reuse the existing
> driver implementation.
>
> This allows SPL to configure pin multiplexing for early
> board initialization.
>
> Cc: Dave Klotz <DaveWK225@protonmail.com>
> Cc: Eric Chung <eric.chung@riscstar.com>
> Cc: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
> Cc: E Shattow <e@freeshell.de>
> Cc: Yixun Lan <dlan@kernel.org>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  drivers/pinctrl/spacemit/Kconfig | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pinctrl/spacemit/Kconfig b/drivers/pinctrl/spacemit/Kconfig
> index 87cba336923..5770e4865d9 100644
> --- a/drivers/pinctrl/spacemit/Kconfig
> +++ b/drivers/pinctrl/spacemit/Kconfig
> @@ -7,3 +7,11 @@ config PINCTRL_SPACEMIT_K1
>  	  The driver is controlled by a device tree node which contains both
>  	  the GPIO definitions and pin control functions for each available
>  	  multiplex function.
> +
> +config SPL_PINCTRL_SPACEMIT_K1
> +	bool "Spacemit K1 pinctrl driver in SPL"
> +	depends on SPL_PINCTRL && SPL_DM && PINCTRL_GENERIC
> +	select PINCTRL_SPACEMIT_K1
> +	help
> +	  Enable the Spacemit K1 pinctrl driver in SPL.
> +	  This allows SPL to configure pinctrl during early board initialization.

I tried replacing the hardcoded pin configuration in i2c_early_init()
in board/spacemit/k1/spl.c with the SPL pinctrl driver based on your
series. SPL hangs during boot after this change.

While debugging, I found that CLK_AIB and CLK_AIB_BUS, which pinctrl
requires, are not defined in SPL. It works fine after adding them.

Could you please also add the required clocks to the SPL clock driver?

-- 
Best regards,
Junhui Liu


  parent reply	other threads:[~2026-11-23 15:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 13:46 [PATCH v1 0/6] riscv: dts: spacemit: Improve K1 SPL support Anand Moon
2026-10-29 13:46 ` [PATCH v1 1/6] riscv: dts: spacemit: Clean Up K1 U-Boot Device Tree for SPL Initialization Anand Moon
2026-10-31 11:54   ` Hung-Chun Tseng
2026-10-31 11:56   ` Hung-Chun Tseng
2026-10-31 16:45     ` Anand Moon
2026-10-31 18:15       ` E Shattow
2026-11-02  7:40         ` Anand Moon
2026-10-29 13:46 ` [PATCH v1 2/6] mmc: spacemit_sdhci: Improve voltage switching diagnostics Anand Moon
2026-10-29 13:46 ` [PATCH v1 3/6] mmc: spacemit_sdhci: Handle missing pinctrl states Anand Moon
2026-10-29 13:46 ` [PATCH v1 4/6] gpio: spacemit: Add SPL support for K1 GPIO driver Anand Moon
2026-11-20  5:58   ` Yixun Lan
2026-10-29 13:46 ` [PATCH v1 5/6] pinctrl: spacemit: Add SPL support for K1 pinctrl driver Anand Moon
2026-11-20  6:12   ` Yixun Lan
2026-11-23 15:04   ` Junhui Liu [this message]
2026-10-29 13:46 ` [PATCH v1 6/6] configs: spacemit_k1: Enable SPL GPIO and pinctrl support Anand Moon
2026-11-20  6:19   ` Yixun Lan

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=DN2OL8QDSA3H.369TW8VSAPCVG@pigmoral.tech \
    --to=junhui.liu@pigmoral.tech \
    --cc=DaveWK225@protonmail.com \
    --cc=alan.tseng.cs@gmail.com \
    --cc=dlan@kernel.org \
    --cc=e@freeshell.de \
    --cc=eric.chung@riscstar.com \
    --cc=guodong@riscstar.com \
    --cc=linux.amoon@gmail.com \
    --cc=pericycle.cc@gmail.com \
    --cc=raymond.mao@riscstar.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-spacemit@groups.io \
    --cc=u-boot@lists.u-boot-project.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