[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200528095151.GE10358@localhost>
Date: Thu, 28 May 2020 11:51:51 +0200
From: Johan Hovold <johan@...nel.org>
To: Rob Herring <robh@...nel.org>
Cc: Tony Lindgren <tony@...mide.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Johan Hovold <johan@...nel.org>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Lee Jones <lee.jones@...aro.org>, Jiri Slaby <jslaby@...e.cz>,
Merlijn Wajer <merlijn@...zup.org>,
Pavel Machek <pavel@....cz>,
Peter Hurley <peter@...leysoftware.com>,
Sebastian Reichel <sre@...nel.org>,
linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org
Subject: Re: [PATCH 3/6] dt-bindings: serdev: ngsm: Add binding for GNSS
child node
On Wed, May 27, 2020 at 01:28:17PM -0600, Rob Herring wrote:
> On Tue, May 12, 2020 at 02:47:10PM -0700, Tony Lindgren wrote:
> > For motorola modem case, we may have a GNSS device on channel 4.
> > Let's add that to the binding and example.
> >
> > Signed-off-by: Tony Lindgren <tony@...mide.com>
> > ---
> > .../devicetree/bindings/serdev/serdev-ngsm.yaml | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml
> > --- a/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml
> > +++ b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml
> > @@ -42,6 +42,10 @@ allOf:
> > description: Name of the USB PHY
> > const: usb
> >
> > + compatible:
> > + description: GNSS receiver
> > + const: motorola,mapphone-mdm6600-gnss
>
> I'm not sure how this isn't failing on the example because it is wrong.
>
> You're saying this compatible belongs at the same level as
> phys/phy-names, but that would be the parent which already has a
> compatible. You have to define a child node property (gnss@4) and have
> 'compatible' under it. At that point, this schema becomes very much
> Motorola specific.
>
> > +
> > required:
> > - phys
> > - phy-names
> > @@ -61,4 +65,9 @@ examples:
> > phy-names = "usb";
> > #address-cells = <1>;
> > #size-cells = <0>;
> > +
> > + gnss@4 {
> > + compatible = "motorola,mapphone-mdm6600-gnss";
> > + reg = <4>;
> > + };
> > };
> > --
> > 2.26.2
And since we're describing a mux, I think you need nodes for the virtual
ports rather than a reg property in what should be a serial client. That
is something like
serial@nnn {
modem {
compatible = "etsi,ts27001-mux";
serial@4 {
compatible = "etsi,ts27001-serial";
reg = <4>;
gnss {
compatible = "motorola,motmdm-gnss";
};
};
};
};
This way you can actually use serdev for the client drivers (e.g. for
gnss), and those drivers also be used for non-muxed ports if needed
(e.g. over USB).
Johan
Powered by blists - more mailing lists