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

dt-bindings: usb: add common Type-C USB Switch schema

Several bindings implement parts of Type-C USB orientation and mode
switching, and retiming. Keep definition of such properties in one
place, new usb-switch schema, to avoid duplicate defines.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240122094406.32198-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Krzysztof Kozlowski and committed by
Greg Kroah-Hartman
fd2a052c 53a2d95d

+92 -36
+5 -7
Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml
··· 27 27 vcc-supply: 28 28 description: power supply (2.7V-5.5V) 29 29 30 - mode-switch: 31 - description: Flag the port as possible handle of altmode switching 32 - type: boolean 33 - 34 - orientation-switch: 35 - description: Flag the port as possible handler of orientation switching 36 - type: boolean 30 + mode-switch: true 31 + orientation-switch: true 37 32 38 33 port: 39 34 $ref: /schemas/graph.yaml#/$defs/port-base ··· 73 78 - compatible 74 79 - reg 75 80 - port 81 + 82 + allOf: 83 + - $ref: usb-switch.yaml# 76 84 77 85 additionalProperties: false 78 86
+5 -7
Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
··· 33 33 vcc-supply: 34 34 description: power supply 35 35 36 - mode-switch: 37 - description: Flag the port as possible handle of altmode switching 38 - type: boolean 39 - 40 - orientation-switch: 41 - description: Flag the port as possible handler of orientation switching 42 - type: boolean 36 + mode-switch: true 37 + orientation-switch: true 43 38 44 39 port: 45 40 $ref: /schemas/graph.yaml#/properties/port ··· 48 53 - select-gpios 49 54 - orientation-switch 50 55 - port 56 + 57 + allOf: 58 + - $ref: usb-switch.yaml# 51 59 52 60 additionalProperties: false 53 61
+5 -7
Documentation/devicetree/bindings/usb/nxp,ptn36502.yaml
··· 20 20 vdd18-supply: 21 21 description: Power supply for VDD18 pin 22 22 23 - retimer-switch: 24 - description: Flag the port as possible handle of SuperSpeed signals retiming 25 - type: boolean 26 - 27 - orientation-switch: 28 - description: Flag the port as possible handler of orientation switching 29 - type: boolean 23 + orientation-switch: true 24 + retimer-switch: true 30 25 31 26 ports: 32 27 $ref: /schemas/graph.yaml#/properties/ports ··· 43 48 required: 44 49 - compatible 45 50 - reg 51 + 52 + allOf: 53 + - $ref: usb-switch.yaml# 46 54 47 55 additionalProperties: false 48 56
+5 -8
Documentation/devicetree/bindings/usb/onnn,nb7vpq904m.yaml
··· 21 21 description: power supply (1.8V) 22 22 23 23 enable-gpios: true 24 - 25 - retimer-switch: 26 - description: Flag the port as possible handle of SuperSpeed signals retiming 27 - type: boolean 28 - 29 - orientation-switch: 30 - description: Flag the port as possible handler of orientation switching 31 - type: boolean 24 + orientation-switch: true 25 + retimer-switch: true 32 26 33 27 ports: 34 28 $ref: /schemas/graph.yaml#/properties/ports ··· 88 94 required: 89 95 - compatible 90 96 - reg 97 + 98 + allOf: 99 + - $ref: usb-switch.yaml# 91 100 92 101 additionalProperties: false 93 102
+5 -7
Documentation/devicetree/bindings/usb/qcom,wcd939x-usbss.yaml
··· 35 35 vdd-supply: 36 36 description: USBSS VDD power supply 37 37 38 - mode-switch: 39 - description: Flag the port as possible handle of altmode switching 40 - type: boolean 41 - 42 - orientation-switch: 43 - description: Flag the port as possible handler of orientation switching 44 - type: boolean 38 + mode-switch: true 39 + orientation-switch: true 45 40 46 41 ports: 47 42 $ref: /schemas/graph.yaml#/properties/ports ··· 57 62 - compatible 58 63 - reg 59 64 - ports 65 + 66 + allOf: 67 + - $ref: usb-switch.yaml# 60 68 61 69 additionalProperties: false 62 70
+67
Documentation/devicetree/bindings/usb/usb-switch.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/usb-switch.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: USB Orientation and Mode Switches Common Properties 8 + 9 + maintainers: 10 + - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 11 + 12 + description: 13 + Common properties for devices handling USB mode and orientation switching. 14 + 15 + properties: 16 + mode-switch: 17 + description: Possible handler of altmode switching 18 + type: boolean 19 + 20 + orientation-switch: 21 + description: Possible handler of orientation switching 22 + type: boolean 23 + 24 + retimer-switch: 25 + description: Possible handler of SuperSpeed signals retiming 26 + type: boolean 27 + 28 + port: 29 + $ref: /schemas/graph.yaml#/properties/port 30 + description: 31 + A port node to link the device to a TypeC controller for the purpose of 32 + handling altmode muxing and orientation switching. 33 + 34 + ports: 35 + $ref: /schemas/graph.yaml#/properties/ports 36 + properties: 37 + port@0: 38 + $ref: /schemas/graph.yaml#/properties/port 39 + description: 40 + Super Speed (SS) Output endpoint to the Type-C connector 41 + 42 + port@1: 43 + $ref: /schemas/graph.yaml#/$defs/port-base 44 + description: 45 + Super Speed (SS) Input endpoint from the Super-Speed PHY 46 + unevaluatedProperties: false 47 + 48 + properties: 49 + endpoint: 50 + $ref: /schemas/graph.yaml#/$defs/endpoint-base 51 + unevaluatedProperties: false 52 + properties: 53 + data-lanes: 54 + $ref: /schemas/types.yaml#/definitions/uint32-array 55 + minItems: 1 56 + maxItems: 8 57 + uniqueItems: true 58 + items: 59 + maximum: 8 60 + 61 + oneOf: 62 + - required: 63 + - port 64 + - required: 65 + - ports 66 + 67 + additionalProperties: true