From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 118F523FC54; Mon, 17 Mar 2025 13:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742218202; cv=none; b=LZRhfNRMczn5nrxmHggT3eLIYWHARfPy4ALbe8LuyQ4pu3Wds6iTuRHzD5Mz1NRRcLD7ISqajTsdbUTsakLwHPwXUrQeFqWUCBSNV+roRIEJnp471H5b0K4wowyBL/nA5wvqBlwK/JbgdoU6nQ0gFajL2ZES/FVAAMPhbB3CD4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742218202; c=relaxed/simple; bh=GG9/8jbQy5nQY9MAlj9xXlX93pIOtqAetS5raHA83BI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YLTCaxQOV1bALAjM1oSlrXd4cMXNd1aBJdaMQkkPDeVovZrhDieUSgLZej0yrGmDEX6A2heGeraXoanQN9O/A7Z6Nv0xB7zo8Lm+j9BQ2Rv0uETqAJ5CuUmLJo5DSUKgrlTTxGitgMttGUq+bcEBaxlVAKl+e+9gNXajnwMvxXk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org; spf=pass smtp.mailfrom=gentoo.org; arc=none smtp.client-ip=140.211.166.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentoo.org Received: from localhost (unknown [116.232.18.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dlan) by smtp.gentoo.org (Postfix) with ESMTPSA id EE6493432A1; Mon, 17 Mar 2025 13:29:59 +0000 (UTC) Date: Mon, 17 Mar 2025 13:29:55 +0000 From: Yixun Lan To: Geert Uytterhoeven Cc: Linus Walleij , Paul Walmsley , Palmer Dabbelt , Alex Elder , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, spacemit@lists.linux.dev, Conor Dooley , Alex Elder Subject: Re: [PATCH v3] pinctrl: spacemit: enable config option Message-ID: <20250317132955-GYC1983@gentoo> References: <20250218-k1-pinctrl-option-v3-1-36e031e0da1b@gentoo.org> <20250317124120-GYA1983@gentoo> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Geert: On 13:59 Mon 17 Mar , Geert Uytterhoeven wrote: > Hi Yixun, > > On Mon, 17 Mar 2025 at 13:41, Yixun Lan wrote: > > On 09:18 Mon 17 Mar , Geert Uytterhoeven wrote: > > > Thanks for your patch, which is now commit 7ff4faba63571c51 > > > ("pinctrl: spacemit: enable config option") in v6.14-rc7. > > > > > > On Tue, 18 Feb 2025 at 01:32, 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. > > > > > > Perhaps this is an issue with the uart driver? > > > I just disabled CONFIG_PINCTRL_RZA2 on RZA2MEVB (which is one of the > > > few Renesas platforms where the pin control driver is not enabled by > > > default, for saving memory), and the system booted fine into a Debian > > > nfsroot. Probe order of some devices did change, and "Trying to > > > probe devices needed for running init" was printed. > > > > > my problem was CONFIG_PINCTRL_SPACEMIT_K1 isn't enabled, result as > > # CONFIG_PINCTRL_SPACEMIT_K1 is not set > > > > for your case, is CONFIG_PINCTRL_RZA2 built as module? > > it should work for uart driver with deferred probe mechanism.. > > No, CONFIG_PINCTRL_RZA2 was disabled in my testing. > emm, this is interesting, there might be problem that uart driver fail to have correct pin settings without pre initialization.. which uart driver is used in RZA2MEVB platform? any pinctrl dts property? different hardware may vary.. > > > > --- 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 > > > > > > Ouch, fix sent... > > > "[PATCH] pinctrl: spacemit: PINCTRL_SPACEMIT_K1 should not default to > > > y unconditionally" > > > https://lore.kernel.org/6881b8d1ad74ac780af8a974e604b5ef3f5d4aad.1742198691.git.geert+renesas@glider.be > > > > > I got suggestion in v1 > > https://lore.kernel.org/all/20250211-nature-kilt-9882e53e5a3f@spud/ > > Yeah, I read that, but only after I noticed the issue in v6.14-rc7. > > > so for COMPILE_TEST case, ARCH_SPACEMIT config won't be enabled? then neither PINCTRL_SPACEMIT_K1 > > anyway, I'm fine with either way, thanks > > > > > > select GENERIC_PINCTRL_GROUPS > > > > select GENERIC_PINMUX_FUNCTIONS > > > > select GENERIC_PINCONF > > It depends. ARCH_SPACEMIT can be enabled only when building for > RISC-V, while COMPILE_TEST can be enabled everywhere. > Ok, good to know > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55