From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Ahmad Fatoum <ahmad@a3f.at>
Subject: Re: [PATCH 6/8] pinctrl: stm32: fix up st,package into stm32mp nodes
Date: Tue, 31 Mar 2020 08:55:29 +0200 [thread overview]
Message-ID: <20200331065529.GI27288@pengutronix.de> (raw)
In-Reply-To: <08a304f9-cfd3-706d-0c4e-7725c3f965f6@pengutronix.de>
On Tue, Mar 31, 2020 at 07:50:32AM +0200, Ahmad Fatoum wrote:
> Hi,
>
> On 3/31/20 7:45 AM, Sascha Hauer wrote:
> > On Mon, Mar 30, 2020 at 04:39:13PM +0200, Ahmad Fatoum wrote:
> >> Since Linux v5.1, the pinctrl driver can use the st,package property
> >> if provided to validate whether the ball to be configured exists
> >> on the package. Have barebox supply this property.
> >>
> >> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> >> ---
> >> arch/arm/dts/stm32mp151.dtsi | 16 ++++++++
> >> drivers/pinctrl/pinctrl-stm32.c | 67 +++++++++++++++++++++++++++++++++
> >> 2 files changed, 83 insertions(+)
> >>
> >> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
> >> index 8f8249dbc479..2a70a747e76e 100644
> >> --- a/arch/arm/dts/stm32mp151.dtsi
> >> +++ b/arch/arm/dts/stm32mp151.dtsi
> >> @@ -37,4 +37,20 @@
> >>
> >> &bsec {
> >> barebox,provide-mac-address = <ðernet0 0x39>;
> >> +
> >> + soc_package: soc-package@43 {
> >> + reg = <0x43 1>;
> >> + bits = <3 3>;
> >> + read-only;
> >> + };
> >> +};
> >> +
> >> +&pinctrl {
> >> + nvmem-cells = <&soc_package>;
> >> + nvmem-cell-names = "soc-package";
> >> +};
> >> +
> >> +&pinctrl_z {
> >> + nvmem-cells = <&soc_package>;
> >> + nvmem-cell-names = "soc-package";
> >> };
> >
> > Why this detour over device tree? We already have get_cpu_package() and
> > could use it here.
>
> The pinctrl driver should also be compatible to the STM32 MCUs, which don't
> have this property. I tried calling get_cpu_package at first, but the ifdefery
> needed to keep the driver independent on CONFIG_ARCH_STM32MP looked ugly.
The fixup for the device tree nodes doesn't necessarily have to be in
the pinctrl driver, it could be somewhere where you know get_cpu_package
is present and valid.
>
> Making it a device property solves this nicely IMO.
I might agree if there wasn't the nvmem binding involved.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-03-31 6:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 14:39 [PATCH 1/8] ARM: stm32mp: init: don't cast signed error to unsigned Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 2/8] ARM: stm32mp: init: detect Revision Z and 800 MHz profiles Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 3/8] ARM: stm32mp: init: fix up CPU device tree nodes Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 4/8] nvmem: bsec: allow reads at unaligned offsets Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 5/8] nvmem: bsec: remove wrongly named bsec_field type Ahmad Fatoum
2020-05-08 12:53 ` Sascha Hauer
2020-03-30 14:39 ` [PATCH 6/8] pinctrl: stm32: fix up st,package into stm32mp nodes Ahmad Fatoum
2020-03-31 5:45 ` Sascha Hauer
2020-03-31 5:50 ` Ahmad Fatoum
2020-03-31 6:55 ` Sascha Hauer [this message]
2020-03-31 7:03 ` Ahmad Fatoum
2020-04-15 9:38 ` Ahmad Fatoum
2020-05-08 6:43 ` Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 7/8] ARM: stm32mp: init: don't query package type Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 8/8] ARM: stm32mp: add support for STM32MP157-EV1 board Ahmad Fatoum
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=20200331065529.GI27288@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=ahmad@a3f.at \
--cc=barebox@lists.infradead.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