[PATCH v2 7/8] dt-bindings: usb: convert mediatek, mtu3.txt to YAML schema

2020-10-14 Thread Chunfeng Yun
Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml

Signed-off-by: Chunfeng Yun 
---
v2: new patch
---
 .../devicetree/bindings/usb/mediatek,mtu3.txt | 108 -
 .../bindings/usb/mediatek,mtu3.yaml   | 227 ++
 2 files changed, 227 insertions(+), 108 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
 create mode 100644 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml

diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt 
b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
deleted file mode 100644
index a82ca438aec1..
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-The device node for Mediatek USB3.0 DRD controller
-
-Required properties:
- - compatible : should be "mediatek,-mtu3", "mediatek,mtu3",
-   soc-model is the name of SoC, such as mt8173, mt2712 etc,
-   when using "mediatek,mtu3" compatible string, you need SoC specific
-   ones in addition, one of:
-   - "mediatek,mt8173-mtu3"
- - reg : specifies physical base address and size of the registers
- - reg-names: should be "mac" for device IP and "ippc" for IP port control
- - interrupts : interrupt used by the device IP
- - power-domains : a phandle to USB power domain node to control USB's
-   mtcmos
- - vusb33-supply : regulator of USB avdd3.3v
- - clocks : a list of phandle + clock-specifier pairs, one for each
-   entry in clock-names
- - clock-names : must contain "sys_ck" for clock of controller,
-   the following clocks are optional:
-   "ref_ck", "mcu_ck" and "dma_ck";
- - phys : see usb-hcd.yaml in the current directory
- - dr_mode : should be one of "host", "peripheral" or "otg",
-   refer to usb/generic.txt
-
-Optional properties:
- - #address-cells, #size-cells : should be '2' if the device has sub-nodes
-   with 'reg' property
- - ranges : allows valid 1:1 translation between child's address space and
-   parent's address space
- - extcon : external connector for vbus and idpin changes detection, needed
-   when supports dual-role mode.
-   it's considered valid for compatibility reasons, not allowed for
-   new bindings, and use "usb-role-switch" property instead.
- - vbus-supply : reference to the VBUS regulator, needed when supports
-   dual-role mode.
-   it's considered valid for compatibility reasons, not allowed for
-   new bindings, and put into a usb-connector node.
-   see connector/usb-connector.yaml.
- - pinctrl-names : a pinctrl state named "default" is optional, and need be
-   defined if auto drd switch is enabled, that means the property dr_mode
-   is set as "otg", and meanwhile the property "mediatek,enable-manual-drd"
-   is not set.
- - pinctrl-0 : pin control group
-   See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-
- - maximum-speed : valid arguments are "super-speed", "high-speed" and
-   "full-speed"; refer to usb/generic.txt
- - usb-role-switch : use USB Role Switch to support dual-role switch, but
-   not extcon; see usb/generic.txt.
- - enable-manual-drd : supports manual dual-role switch via debugfs; usually
-   used when receptacle is TYPE-A and also wants to support dual-role
-   mode.
- - wakeup-source: enable USB remote wakeup of host mode.
- - mediatek,syscon-wakeup : phandle to syscon used to access the register
-   of the USB wakeup glue layer between SSUSB and SPM; it depends on
-   "wakeup-source", and has two arguments:
-   - the first one : register base address of the glue layer in syscon;
-   - the second one : hardware version of the glue layer
-   - 1 : used by mt8173 etc
-   - 2 : used by mt2712 etc
- - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0,
-   bit1 for u3port1, ... etc;
-
-additionally the properties from usb-hcd.yaml (in the current directory) are
-supported.
-
-Sub-nodes:
-The xhci should be added as subnode to mtu3 as shown in the following example
-if host mode is enabled. The DT binding details of xhci can be found in:
-Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-
-The port would be added as subnode if use "usb-role-switch" property.
-   see graph.txt
-
-Example:
-ssusb: usb@11271000 {
-   compatible = "mediatek,mt8173-mtu3";
-   reg = <0 0x11271000 0 0x3000>,
- <0 0x11280700 0 0x0100>;
-   reg-names = "mac", "ippc";
-   interrupts = ;
-   phys = <&phy_port0 PHY_TYPE_USB3>,
-  <&phy_port1 PHY_TYPE_USB2>;
-   power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
-   clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
-<&pericfg CLK_PERI_USB0>,
-<&pericfg CLK_PERI_USB1>;
-   clock-names = "sys_ck", "ref_ck";
-   vusb33-supply = <&mt6397_vusb_reg>;
-   vbus-supply = <&usb_p0_vbus>;
-   extcon = <&extcon_usb>;
-   dr

Re: [PATCH v2 7/8] dt-bindings: usb: convert mediatek,mtu3.txt to YAML schema

2020-10-13 Thread Rob Herring
On Tue, 13 Oct 2020 16:52:06 +0800, Chunfeng Yun wrote:
> Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml
> 
> Signed-off-by: Chunfeng Yun 
> ---
> v2: new patch
> ---
>  .../devicetree/bindings/usb/mediatek,mtu3.txt | 108 -
>  .../bindings/usb/mediatek,mtu3.yaml   | 227 ++
>  2 files changed, 227 insertions(+), 108 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
>  create mode 100644 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,tphy.example.dt.yaml:
 usb@11271000: compatible: ['mediatek,mt8173-mtu3'] is too short
From schema: 
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,tphy.example.dt.yaml:
 usb@11271000: 'clocks' is a required property
From schema: 
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,tphy.example.dt.yaml:
 usb@11271000: 'clock-names' is a required property
From schema: 
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml


See https://patchwork.ozlabs.org/patch/1381414

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master 
--upgrade

Please check and re-submit.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel