[RFC 5/6] firmware: scmi: add pseudo pinctrl protocol support on sandbox

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Sep 11 07:23:09 CEST 2023


On Sun, Sep 10, 2023 at 01:13:28PM -0600, Simon Glass wrote:
> Hi AKASHI,
> 
> On Tue, 5 Sept 2023 at 20:41, AKASHI Takahiro
> <takahiro.akashi at linaro.org> wrote:
> >
> > With this patch, sandbox SCMI agent can handle pinctrl protocol.
> > This feature is used in an unit test for SCMI pinctrl.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> > ---
> >  arch/sandbox/dts/test.dts                  | 115 ++++
> >  drivers/firmware/scmi/sandbox-scmi_agent.c | 722 +++++++++++++++++++++
> >  2 files changed, 837 insertions(+)
> >
> > diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
> > index dc0bfdfb6e4b..d2ddea801995 100644
> > --- a/arch/sandbox/dts/test.dts
> > +++ b/arch/sandbox/dts/test.dts
> > @@ -723,9 +723,124 @@
> >                                         };
> >                                 };
> >                         };
> > +
> > +                       pinctrl_scmi: protocol at 19 {
> > +                               reg = <0x19>;
> > +
> > +                               pinctrl-names = "default","alternate";
> > +                               pinctrl-0 = <&scmi_pinctrl_gpios>, <&scmi_pinctrl_i2s>;
> > +                               pinctrl-1 = <&scmi_pinctrl_spi>, <&scmi_pinctrl_i2c>;
> > +
> > +#if 0
> 
> Are these alternatives that you are testing?

I should have had more explanation.
Yes, as I mentioned in the cover letter (and patch#4), there
are two alternatives for defining SCMI pinctrl based gpio devices.
Actually, this "#if" corresponds to the case (B) where gpio node
is located under scmi node.

Since I didn't come up with any good way to switch two cases dynamically
in the test, I had modified this option manually.
(I left two "#if" here as the patch was an RFC, any way.)

Thanks,
-Takahiro Akashi

> 
> The bindings  look OK to me - is this how it is done in Linux?
> 
> Regards,
> Simon


More information about the U-Boot mailing list