From: Xu Yang <xu.yang_2@nxp.com>
To: Conor Dooley <conor@kernel.org>
Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, jun.li@nxp.com,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: phy: imx8mq-usb: optionally refer to usb-switch.yaml
Date: Fri, 15 Nov 2024 10:00:45 +0800 [thread overview]
Message-ID: <20241115020045.qlrkyrelpgdwpxxk@hippo> (raw)
In-Reply-To: <20241114-marmalade-bottling-8fe656515ee7@spud>
Hi Conor,
On Thu, Nov 14, 2024 at 05:45:07PM +0000, Conor Dooley wrote:
> On Thu, Nov 14, 2024 at 06:22:03PM +0800, Xu Yang wrote:
> > The i.MX95 usb-phy can work with or without orientation-switch. With
> > current setting, if usb-phy works without orientation-switch, the
> > dt-schema check will show below error:
> >
> > phy@4c1f0040: 'oneOf' conditional failed, one must be fixed:
> > 'port' is a required property
> > 'ports' is a required property
> > from schema $id: http://devicetree.org/schemas/phy/fsl,imx8mq-usb-phy.yaml#
> >
> > This will add a condition to optionally refer to usb-switch.yaml.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> $subject is not what the patch does.
I look through other yaml and find below format could achieve the
restriction on one property:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/tree/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml?h=usb-testing#n54
- if:
required:
- mode-switch
then:
required:
- enable-gpios
If mode-switch is present, then enable-gpios is required. If not, then
enable-gpios is not required.
For my case, if compatible contains "fsl,imx95-usb-phy" and orientation-switch
is present, then this schema needs to refer to usb-switch.yaml. If not. then
this schema will not refer to usb-switch.yaml. So the subject could reflect
the thing this patch does.
Is this feasible? If not, could you give some advices?
Thanks,
Xu Yang
>
> > ---
> > Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > index 6d6d211883ae..1238792157f8 100644
> > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > @@ -118,6 +118,8 @@ allOf:
> > contains:
> > enum:
> > - fsl,imx95-usb-phy
> > + required:
> > + - orientation-switch
> > then:
> > $ref: /schemas/usb/usb-switch.yaml#
> >
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2024-11-15 2:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 10:22 [PATCH] dt-bindings: phy: imx8mq-usb: optionally refer to usb-switch.yaml Xu Yang
2024-11-14 17:45 ` Conor Dooley
2024-11-15 2:00 ` Xu Yang [this message]
2024-11-15 18:34 ` Conor Dooley
2024-11-19 10:07 ` Xu Yang
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=20241115020045.qlrkyrelpgdwpxxk@hippo \
--to=xu.yang_2@nxp.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.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