From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 663ACC54EAA for ; Mon, 30 Jan 2023 19:02:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 48AC6855F5; Mon, 30 Jan 2023 20:02:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WXdEokAL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F29F285742; Mon, 30 Jan 2023 20:02:09 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3185D855F5 for ; Mon, 30 Jan 2023 20:02:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BF562B8126A; Mon, 30 Jan 2023 19:02:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10C92C4339B; Mon, 30 Jan 2023 19:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675105325; bh=9zz6bOHuLqwPFkD4aMGvHMIG0yrX1x25tnxPI5uWRdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WXdEokALLgL+dcmK9IyppiKwtCopr+X0ltp3ADX71HmfIQZGpg73HCysug0eSl70b ocWkUKg487EfM99eTqiUpGdF1GNFK751hpc5hBT+F7/deYSF+TCY1P4d3XzyL8g6F3 JFQTE+Vcs41yrr1Xc7xGWFw7IPnvIF3w08hvDEzAAkKxpSQlcz4W3fZLvaelLh8NsA OiPEURa8mBR1mF53Sd/hgNqI8WaSGWaqJy5cOZR4TMeT+yzBi/Prz1s0JgMMC87GZF AplOzH4At8kRsb/9x2hBfXB4qsrAPEYNbV+xF7fFGMOrUGdaUERg8t8pju/hyJFy8U /t5StE8z6UPAQ== Received: by pali.im (Postfix) id 2B4C8AF1; Mon, 30 Jan 2023 20:02:02 +0100 (CET) Date: Mon, 30 Jan 2023 20:02:02 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Mark Kettenis , Marek =?utf-8?B?QmVow7pu?= , Simon Glass , u-boot@lists.denx.de, sr@denx.de Subject: Re: [PATCH 016/171] iommu: Add a Kconfig for SPL_PINCTRL_ARMADA_38X Message-ID: <20230130190202.2jtgdyc6bidecsl4@pali> References: <20230130144324.206208-1-sjg@chromium.org> <20230130144324.206208-17-sjg@chromium.org> <87k014knbe.fsf@bloch.sibelius.xs4all.nl> <20230130181626.mramh3hgwwmtdm2n@pali> <20230130182856.mdesbicogb623wdo@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Monday 30 January 2023 13:59:21 Tom Rini wrote: > On Mon, Jan 30, 2023 at 07:28:56PM +0100, Pali Rohár wrote: > > On Monday 30 January 2023 13:25:25 Tom Rini wrote: > > > On Mon, Jan 30, 2023 at 07:16:26PM +0100, Pali Rohár wrote: > > > > On Monday 30 January 2023 11:29:27 Tom Rini wrote: > > > > > On Mon, Jan 30, 2023 at 05:19:01PM +0100, Mark Kettenis wrote: > > > > > > > From: Simon Glass > > > > > > > Date: Mon, 30 Jan 2023 07:40:49 -0700 > > > > > > > > > > > > > > This is implicitly used in the source and seems useful, so add it. > > > > > > > > > > > > Not sure how this ended up with an "iommu" tag, but that seems wrong. > > > > > > > > > > > > > Signed-off-by: Simon Glass > > > > > > > --- > > > > > > > > > > > > > > drivers/pinctrl/mvebu/Kconfig | 4 ++++ > > > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > > > > > diff --git a/drivers/pinctrl/mvebu/Kconfig b/drivers/pinctrl/mvebu/Kconfig > > > > > > > index 7c51d138c8b..0b2be88e3a1 100644 > > > > > > > --- a/drivers/pinctrl/mvebu/Kconfig > > > > > > > +++ b/drivers/pinctrl/mvebu/Kconfig > > > > > > > @@ -7,6 +7,10 @@ config PINCTRL_ARMADA_38X > > > > > > > Support pin multiplexing and pin configuration control on > > > > > > > Marvell's Armada-38x SoC. > > > > > > > > > > > > > > +config SPL_PINCTRL_ARMADA_38X > > > > > > > + def_bool n # Armada 38x pin control driver (SPL) > > > > > > > + depends on SPL && ARMADA_38X && SPL_PINCTRL_FULL > > > > > > > + > > > > > > > config PINCTRL_ARMADA_37XX > > > > > > > depends on ARMADA_3700 && PINCTRL_FULL > > > > > > > bool "Armada 37xx pin control driver" > > > > > > > > > > Looking at the code in question, it's because in > > > > > drivers/gpio/mvebu_gpio.c we conditionally not set request / rfree > > > > > dm_gpio_ops because turris_omnia (only platform in question) does not > > > > > set pinctrl in SPL, but does set SPL_DM_GPIO. So the question I have, is > > > > > all of that intentional and used today, in SPL, on the platform? I guess > > > > > some set/get directions / values, to check board revs or something? > > > > > > > > I think this is because no A38x board use DM pinctrl framework for > > > > configuring pin muxing. All boards set pin muxing in open coded board > > > > function which directly touch HW registers. DM pinctrl driver for A38x > > > > is relatively new and I think nobody converted any board to use it for > > > > initialization. > > > > > > I do see that turris_omnia builds the pinctrl driver for full U-Boot > > > today. > > > > Yes, it allows u-boot pinmux command to print current pinctrl > > configuration and also allows gpio command to work correctly for gpios > > which are not in gpio mode by default. > > > > > But, does that mean that at some point in the future it should > > > be converted to use SPL_PINCTRL ? > > > > Every a38x board could be converted. But personally I'm not planning to > > do it. > > OK, but if someone were to do it, it would then be the case that > PINCTRL_ARMADA_38X would be the driver used, yes? Then it would be used in SPL. In proper U-Boot it is already used by commands like 'pinmux' or 'gpio'. > > > As that would imply that we do not > > > need / want SPL_PINCTRL_ARMADA_38X added (I suspect SPL_PINCTRL_STMFX > > > and SPL_PINCTRL_ROCKCHIP are wrong) as it will be handled like the > > > majority of other platforms in this area. > > As I look at this more, I see that SPL_PINCTRL_STMFX _is_ one of the > special cases as it seems in SPL they use the PINCTRL_STM32 driver and > do _not_ want PINCTRL_STMFX so SPL_PINCTRL_STMFX is introduced as a way > to keep the driver from being built in SPL. > > -- > Tom