From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Rob Herring <robh@kernel.org>
Subject: Re: (EXT) Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb-phy: Add imx8mp specific flags
Date: Fri, 07 Jan 2022 14:50:55 +0100 [thread overview]
Message-ID: <2245006.irdbgypaU6@steina-w> (raw)
In-Reply-To: <YcIICIKjbgEn0I+P@robh.at.kernel.org>
Hello,
thanks for the review.
Am Dienstag, 21. Dezember 2021, 17:59:52 CET schrieb Rob Herring:
> On Thu, Dec 16, 2021 at 05:05:39PM +0100, Alexander Stein wrote:
> > This adds bindings for features only available on imx8mp. They allow
> > setting polarity of PWR and OC as well as disabling port power control.
> > Also permanently atteched can be annotated as well.
> >
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > Adding properties specific to one compatible globally and disabling them
> > on
> > other compatibles is the way to go?
> >
> > Are there any best practices on the usage of '-' and/or '_' in property
> > names?
> Yes, don't use '_'.
Alright, got it.
> > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 52 ++++++++++++++++++-
> > 1 file changed, 51 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml index
> > 2936f3510a6a..1d28b7d1c413 100644
> > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> >
> > @@ -16,7 +16,8 @@ properties:
> > - fsl,imx8mp-usb-phy
> >
> > reg:
> > - maxItems: 1
> > + minItems: 1
> > + maxItems: 2
> >
> > "#phy-cells":
> > const: 0
> >
> > @@ -32,6 +33,28 @@ properties:
> > description:
> > A phandle to the regulator for USB VBUS.
> >
> > + fsl,permanently-attached:
> > + type: boolean
> > + description:
> > + Indicates if the device atached to a downstream port is
> > + permanently attached.
>
> Wouldn't just describing the downstream device be enough to indicate
> this? Though that is in the host controller rather than the phy.
You mean describing the downstream hub in device tree? I guess you are
thinking about Documentation/devicetree/bindings/usb/usb-device.yaml, no?
I'll try using this.
This flag (and the others below) are used to set some specific flag in the
host controller (not the PHY, see Li Jun's response). But I have to admit I do
not know what they actually do. The description is pretty much everything
written in the reference manual.
> > +
> > + fsl,disable-port-power-control:
> > + type: boolean
> > + description:
> > + Indicates whether the host controller implementation includes port
> > + power control. Defines Bit 3 in capability register (HCCPARAMS).
> > +
> > + fsl,over-current-active-low:
> > + type: boolean
> > + description:
> > + Over current signal polarity is active low.
> > +
> > + fsl,power-active-low:
> > + type: boolean
> > + description:
> > + Power pad (PWR) polarity is active low.
> > +
> >
> > required:
> > - compatible
> > - reg
> >
> > @@ -39,6 +62,33 @@ required:
> > - clocks
> > - clock-names
> >
> > +if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - fsl,imx8mp-usb-phy
> > +
> > +then:
> > + properties:
> > + reg:
> > + minItems: 2
> > + maxItems: 2
> > + items:
> > + - description: PHY register base address
> > + - description: Glue layer base address
>
> Move 'items' to the top level and then here you only need 'minItems: 2'.
>
> > +
> > +else:
> > + properties:
> > + reg:
> > + maxItems: 1
> > + items:
> > + - description: PHY register base address
>
> And just 'maxItems' here.
Thanks for the hints on how to write bindings, still fiddling with it.
Best regards,
Alexander
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-07 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 16:05 [PATCH v2 0/3] i.MX8MP: more USB3 glue layer feature support Alexander Stein
2021-12-16 16:05 ` [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb-phy: Add imx8mp specific flags Alexander Stein
2021-12-21 16:59 ` Rob Herring
2022-01-07 13:50 ` Alexander Stein [this message]
2021-12-16 16:05 ` [PATCH v2 2/3] phy: fsl-imx8mq-usb: Add support for setting fsl " Alexander Stein
2021-12-16 16:05 ` [PATCH v2 3/3] arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3_phy nodes Alexander Stein
2021-12-22 3:18 ` [PATCH v2 0/3] i.MX8MP: more USB3 glue layer feature support Jun Li
2022-01-07 13:43 ` (EXT) " Alexander Stein
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=2245006.irdbgypaU6@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-phy@lists.infradead.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