diff mbox series

dt-bindings: usb: add properties for hard wired devices

Message ID 20200928063950.64722-1-chunfeng.yun@mediatek.com
State New
Headers show
Series dt-bindings: usb: add properties for hard wired devices | expand

Commit Message

Chunfeng Yun (云春峰) Sept. 28, 2020, 6:39 a.m. UTC
Add some optional properties which are needed for hard wired devices

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

---
 Documentation/devicetree/bindings/usb/usb-hcd.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.18.0

Comments

Chunfeng Yun (云春峰) Sept. 29, 2020, 6:06 a.m. UTC | #1
On Mon, 2020-09-28 at 13:12 -0500, Rob Herring wrote:
> On Mon, Sep 28, 2020 at 02:39:50PM +0800, Chunfeng Yun wrote:

> > Add some optional properties which are needed for hard wired devices

> > 

> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

> > ---

> >  Documentation/devicetree/bindings/usb/usb-hcd.yaml | 11 +++++++++++

> >  1 file changed, 11 insertions(+)

> > 

> > diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml

> > index 7263b7f2b510..1194a82887e7 100644

> > --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml

> > +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml

> > @@ -22,6 +22,17 @@ properties:

> >      description:

> >        Name specifier for the USB PHY

> >  

> > +  "#address-cells":

> > +    const: 1

> > +

> > +  "#size-cells":

> > +    const: 0

> > +

> > +patternProperties:

> > +  "^hub|device@[0-9a-f]+$":

> 

> Could be any class of device, so '@[0-9a-f]+$'

You mean we will use different standard node name for each usb class?
e.g.
Use 'ethernet@*' for a usb ethernet adapter, and use 'camera@*' for a
usb camera sensor?

> 

> > +    type: object

> > +    description: The hard wired USB devices. See usb/usb-device.txt

> 

> Ideally, we'd convert usb-device.txt to schema and reference it here.

Ok, I'll try to do it.

BTW: Does the compatible support pattern? Is there any example I can
refer to?

Thanks

> 

> > +

> >  examples:

> >    - |

> >      usb {

> > -- 

> > 2.18.0
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
index 7263b7f2b510..1194a82887e7 100644
--- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
@@ -22,6 +22,17 @@  properties:
     description:
       Name specifier for the USB PHY
 
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^hub|device@[0-9a-f]+$":
+    type: object
+    description: The hard wired USB devices. See usb/usb-device.txt
+
 examples:
   - |
     usb {