Message ID | 20200512214713.40501-3-tony@atomide.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | n_gsm serdev support and GNSS driver for droid4 | expand |
On Tue, May 12, 2020 at 02:47:09PM -0700, Tony Lindgren wrote: > Add a binding document for a generic serdev-ngsm driver that can be > used to bring up TS 27.010 line discipline with Linux n_gsm support > on a serial port. > > As the Motorola Mapphone modems require some custom handling, they > are handled with a separate compatible. > > Let's also add vendor string for ETSI as we're using a ETSI 3GPP > TS 27.010 standard. > > Reviewed-by: Pavel Machek <pavel@ucw.cz> > Reviewed-by: Rob Herring <robh@kernel.org> > Signed-off-by: Tony Lindgren <tony@atomide.com> > --- > .../bindings/serdev/serdev-ngsm.yaml | 64 +++++++++++++++++++ > .../devicetree/bindings/vendor-prefixes.yaml | 2 + > 2 files changed, 66 insertions(+) > create mode 100644 Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml > > diff --git a/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml > new file mode 100644 > --- /dev/null > +++ b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serdev/serdev-ngsm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Generic serdev-ngsm TS 27.010 driver > + > +maintainers: > + - Tony Lindgren <tony@atomide.com> > + > +properties: > + compatible: > + enum: > + - etsi,3gpp-ts27010-adaption1 > + - motorola,mapphone-mdm6600-serial > + > + ttymask: > + $ref: /schemas/types.yaml#/definitions/uint64 > + description: Mask of the TS 27.010 channel TTY interfaces to start (64 bit) > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: motorola,mapphone-mdm6600-serial > + then: > + properties: > + phys: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: USB PHY needed for shared GPIO PM wake-up pins > + maxItems: 1 > + > + phy-names: > + description: Name of the USB PHY > + const: usb As I've mentioned before, I think this whole USB phy dependency is misleading and doesn't accurately describe the hardware as devicetree should. It's the modem that needs to be woken up regardless of whether you use its USB or serial interface. > + > + required: > + - phys > + - phy-names > + > +required: > + - compatible > + - ttymask This is a new property which it seems you forgot define. Currently it looks like a linuxism ("tty") which doesn't belong in the devicetree. Perhaps a rename is all that's needed (e.g. portmask or similar). > + - "#address-cells" > + - "#size-cells" > + > +examples: > + - | > + modem { > + compatible = "motorola,mapphone-mdm6600-serial"; > + ttymask = <0 0x00001fee>; > + phys = <&fsusb1_phy>; > + phy-names = "usb"; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml > @@ -323,6 +323,8 @@ patternProperties: > description: Espressif Systems Co. Ltd. > "^est,.*": > description: ESTeem Wireless Modems > + "^etsi,.*": > + description: ETSI Spell out the acronym? > "^ettus,.*": > description: NI Ettus Research > "^eukrea,.*": Johan
diff --git a/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml new file mode 100644 --- /dev/null +++ b/Documentation/devicetree/bindings/serdev/serdev-ngsm.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serdev/serdev-ngsm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic serdev-ngsm TS 27.010 driver + +maintainers: + - Tony Lindgren <tony@atomide.com> + +properties: + compatible: + enum: + - etsi,3gpp-ts27010-adaption1 + - motorola,mapphone-mdm6600-serial + + ttymask: + $ref: /schemas/types.yaml#/definitions/uint64 + description: Mask of the TS 27.010 channel TTY interfaces to start (64 bit) + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +allOf: + - if: + properties: + compatible: + contains: + const: motorola,mapphone-mdm6600-serial + then: + properties: + phys: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: USB PHY needed for shared GPIO PM wake-up pins + maxItems: 1 + + phy-names: + description: Name of the USB PHY + const: usb + + required: + - phys + - phy-names + +required: + - compatible + - ttymask + - "#address-cells" + - "#size-cells" + +examples: + - | + modem { + compatible = "motorola,mapphone-mdm6600-serial"; + ttymask = <0 0x00001fee>; + phys = <&fsusb1_phy>; + phy-names = "usb"; + #address-cells = <1>; + #size-cells = <0>; + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -323,6 +323,8 @@ patternProperties: description: Espressif Systems Co. Ltd. "^est,.*": description: ESTeem Wireless Modems + "^etsi,.*": + description: ETSI "^ettus,.*": description: NI Ettus Research "^eukrea,.*":