Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: phy: renesas,rcar-gen2-usb-phy: Convert to json-schema

Convert the Renesas R-Car Gen2 USB PHY Device Tree binding documentation
to json-schema.

Add missing properties.
Rename the device node from "usb-phy" to "usb-phy-controller", as it
does not represent a USB PHY itself, and thus does not have a
"#phy-cells" property.
Rename the child nodes from "usb-channel" to "usb-phy", as these do
represent USB PHYs.
Drop the second example, as it doesn't add any value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/dbdcffd009302734fe2fb895ce04b72fa1ea4355.1663165000.git.geert+renesas@glider.be
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Geert Uytterhoeven and committed by
Vinod Koul
92086b88 f5d6b5d6

+123 -112
-112
Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
··· 1 - * Renesas R-Car generation 2 USB PHY 2 - 3 - This file provides information on what the device node for the R-Car generation 4 - 2 USB PHY contains. 5 - 6 - Required properties: 7 - - compatible: "renesas,usb-phy-r8a7742" if the device is a part of R8A7742 SoC. 8 - "renesas,usb-phy-r8a7743" if the device is a part of R8A7743 SoC. 9 - "renesas,usb-phy-r8a7744" if the device is a part of R8A7744 SoC. 10 - "renesas,usb-phy-r8a7745" if the device is a part of R8A7745 SoC. 11 - "renesas,usb-phy-r8a77470" if the device is a part of R8A77470 SoC. 12 - "renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC. 13 - "renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC. 14 - "renesas,usb-phy-r8a7794" if the device is a part of R8A7794 SoC. 15 - "renesas,rcar-gen2-usb-phy" for a generic R-Car Gen2 or 16 - RZ/G1 compatible device. 17 - 18 - When compatible with the generic version, nodes must list the 19 - SoC-specific version corresponding to the platform first 20 - followed by the generic version. 21 - 22 - - reg: offset and length of the register block. 23 - - #address-cells: number of address cells for the USB channel subnodes, must 24 - be <1>. 25 - - #size-cells: number of size cells for the USB channel subnodes, must be <0>. 26 - - clocks: clock phandle and specifier pair. 27 - - clock-names: string, clock input name, must be "usbhs". 28 - 29 - The USB PHY device tree node should have the subnodes corresponding to the USB 30 - channels. These subnodes must contain the following properties: 31 - - reg: the USB controller selector; see the table below for the values. 32 - - #phy-cells: see phy-bindings.txt in the same directory, must be <1>. 33 - 34 - The phandle's argument in the PHY specifier is the USB controller selector for 35 - the USB channel other than r8a77470 SoC; see the selector meanings below: 36 - 37 - +-----------+---------------+---------------+ 38 - |\ Selector | | | 39 - + --------- + 0 | 1 | 40 - | Channel \| | | 41 - +-----------+---------------+---------------+ 42 - | 0 | PCI EHCI/OHCI | HS-USB | 43 - | 2 | PCI EHCI/OHCI | xHCI | 44 - +-----------+---------------+---------------+ 45 - 46 - For r8a77470 SoC;see the selector meaning below: 47 - 48 - +-----------+---------------+---------------+ 49 - |\ Selector | | | 50 - + --------- + 0 | 1 | 51 - | Channel \| | | 52 - +-----------+---------------+---------------+ 53 - | 0 | EHCI/OHCI | HS-USB | 54 - +-----------+---------------+---------------+ 55 - 56 - Example (Lager board): 57 - 58 - usb-phy@e6590100 { 59 - compatible = "renesas,usb-phy-r8a7790", "renesas,rcar-gen2-usb-phy"; 60 - reg = <0 0xe6590100 0 0x100>; 61 - #address-cells = <1>; 62 - #size-cells = <0>; 63 - clocks = <&cpg CPG_MOD 704>; 64 - clock-names = "usbhs"; 65 - power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 66 - resets = <&cpg 704>; 67 - 68 - usb0: usb-channel@0 { 69 - reg = <0>; 70 - #phy-cells = <1>; 71 - }; 72 - usb2: usb-channel@2 { 73 - reg = <2>; 74 - #phy-cells = <1>; 75 - }; 76 - }; 77 - 78 - Example (iWave RZ/G1C sbc): 79 - 80 - usbphy0: usb-phy0@e6590100 { 81 - compatible = "renesas,usb-phy-r8a77470", 82 - "renesas,rcar-gen2-usb-phy"; 83 - reg = <0 0xe6590100 0 0x100>; 84 - #address-cells = <1>; 85 - #size-cells = <0>; 86 - clocks = <&cpg CPG_MOD 704>; 87 - clock-names = "usbhs"; 88 - power-domains = <&sysc R8A77470_PD_ALWAYS_ON>; 89 - resets = <&cpg 704>; 90 - 91 - usb0: usb-channel@0 { 92 - reg = <0>; 93 - #phy-cells = <1>; 94 - }; 95 - }; 96 - 97 - usbphy1: usb-phy@e6598100 { 98 - compatible = "renesas,usb-phy-r8a77470", 99 - "renesas,rcar-gen2-usb-phy"; 100 - reg = <0 0xe6598100 0 0x100>; 101 - #address-cells = <1>; 102 - #size-cells = <0>; 103 - clocks = <&cpg CPG_MOD 706>; 104 - clock-names = "usbhs"; 105 - power-domains = <&sysc R8A77470_PD_ALWAYS_ON>; 106 - resets = <&cpg 706>; 107 - 108 - usb1: usb-channel@0 { 109 - reg = <0>; 110 - #phy-cells = <1>; 111 - }; 112 - };
+123
Documentation/devicetree/bindings/phy/renesas,rcar-gen2-usb-phy.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/phy/renesas,rcar-gen2-usb-phy.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas R-Car Gen2 USB PHY 8 + 9 + maintainers: 10 + - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> 11 + 12 + properties: 13 + compatible: 14 + items: 15 + - enum: 16 + - renesas,usb-phy-r8a7742 # RZ/G1H 17 + - renesas,usb-phy-r8a7743 # RZ/G1M 18 + - renesas,usb-phy-r8a7744 # RZ/G1N 19 + - renesas,usb-phy-r8a7745 # RZ/G1E 20 + - renesas,usb-phy-r8a77470 # RZ/G1C 21 + - renesas,usb-phy-r8a7790 # R-Car H2 22 + - renesas,usb-phy-r8a7791 # R-Car M2-W 23 + - renesas,usb-phy-r8a7794 # R-Car E2 24 + - const: renesas,rcar-gen2-usb-phy # R-Car Gen2 or RZ/G1 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + '#address-cells': 30 + const: 1 31 + 32 + '#size-cells': 33 + const: 0 34 + 35 + clocks: 36 + maxItems: 1 37 + 38 + clock-names: 39 + items: 40 + - const: usbhs 41 + 42 + power-domains: 43 + maxItems: 1 44 + 45 + resets: 46 + maxItems: 1 47 + 48 + patternProperties: 49 + "^usb-phy@[02]$": 50 + type: object 51 + description: Subnode corresponding to a USB channel. 52 + 53 + properties: 54 + reg: 55 + description: FIXME RZ/G1C supports channel 0 only 56 + enum: [0, 2] 57 + 58 + '#phy-cells': 59 + description: | 60 + The phandle's argument in the PHY specifier is the USB controller 61 + selector for the USB channel. 62 + For RZ/G1C: 63 + - 0 for EHCI/OHCI 64 + - 1 for HS-USB 65 + For all other SoCS: 66 + - 0 for PCI EHCI/OHCI 67 + - 1 for HS-USB (channel 0) or xHCI (channel 2) 68 + const: 1 69 + 70 + required: 71 + - reg 72 + - '#phy-cells' 73 + 74 + additionalProperties: false 75 + 76 + required: 77 + - compatible 78 + - reg 79 + - '#address-cells' 80 + - '#size-cells' 81 + - clocks 82 + - clock-names 83 + - resets 84 + - power-domains 85 + - usb-phy@0 86 + 87 + if: 88 + properties: 89 + compatible: 90 + contains: 91 + const: renesas,usb-phy-r8a77470 92 + then: 93 + properties: 94 + usb-phy@2: false 95 + else: 96 + required: 97 + - usb-phy@2 98 + 99 + additionalProperties: false 100 + 101 + examples: 102 + - | 103 + #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 104 + #include <dt-bindings/power/r8a7790-sysc.h> 105 + usb-phy-controller@e6590100 { 106 + compatible = "renesas,usb-phy-r8a7790", "renesas,rcar-gen2-usb-phy"; 107 + reg = <0xe6590100 0x100>; 108 + #address-cells = <1>; 109 + #size-cells = <0>; 110 + clocks = <&cpg CPG_MOD 704>; 111 + clock-names = "usbhs"; 112 + power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 113 + resets = <&cpg 704>; 114 + 115 + usb0: usb-phy@0 { 116 + reg = <0>; 117 + #phy-cells = <1>; 118 + }; 119 + usb2: usb-phy@2 { 120 + reg = <2>; 121 + #phy-cells = <1>; 122 + }; 123 + };