| From a7d12c75f12ae95541bf27ba156a8017600ceffd Mon Sep 17 00:00:00 2001 |
| From: Pin-yen Lin <treapking@chromium.org> |
| Date: Mon, 19 Sep 2022 22:17:13 +0800 |
| Subject: [PATCH] FROMLIST: dt/bindings: drm/bridge: it6505: Add mode-switch |
| support |
| |
| ITE IT6505 can be used in systems to switch USB Type-C DisplayPort |
| alternate mode lane traffic between 2 Type-C ports. |
| |
| Update the binding to accommodate this usage by introducing a switch |
| property. |
| |
| Signed-off-by: Pin-yen Lin <treapking@chromium.org> |
| Signed-off-by: Prashant Malani <pmalani@chromium.org> |
| (am from https://patches.linaro.org/project/linux-usb/patch/20220622173605.1168416-7-pmalani@chromium.org//) |
| (also found at https://lore.kernel.org/r/20220622173605.1168416-7-pmalani@chromium.org) |
| |
| BUG=b:212382669 |
| TEST=Check external displays on Kingler/Krabby |
| UPSTREAM-TASK=b:247731050 |
| |
| Change-Id: Ibfb66cf92ca92cf635011b00798b171e7a015c2c |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3904829 |
| Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org> |
| Reviewed-by: Sean Paul <sean@poorly.run> |
| Tested-by: Pin-yen Lin <treapking@chromium.org> |
| Commit-Queue: Pin-yen Lin <treapking@chromium.org> |
| --- |
| .../bindings/display/bridge/ite,it6505.yaml | 73 ++++++++++++++++++- |
| 1 file changed, 72 insertions(+), 1 deletion(-) |
| |
| diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml |
| index c9a882ee6d98f21516b5a061b41c7358c2ac0a79..d26014b1d420b8f49e9381c9b1deab1aeb4a6d59 100644 |
| --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml |
| +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml |
| @@ -96,15 +96,48 @@ properties: |
| - port@0 |
| - port@1 |
| |
| + switches: |
| + type: object |
| + description: Set of switches controlling DisplayPort traffic on |
| + outgoing RX/TX lanes to Type C ports. |
| + additionalProperties: false |
| + |
| + properties: |
| + '#address-cells': |
| + const: 1 |
| + |
| + '#size-cells': |
| + const: 0 |
| + |
| + patternProperties: |
| + '^switch@[01]$': |
| + $ref: /schemas/usb/typec-switch.yaml# |
| + unevaluatedProperties: false |
| + |
| + properties: |
| + reg: |
| + maxItems: 1 |
| + |
| + required: |
| + - reg |
| + |
| + required: |
| + - switch@0 |
| + |
| required: |
| - compatible |
| - ovdd-supply |
| - pwr18-supply |
| - interrupts |
| - reset-gpios |
| - - extcon |
| - ports |
| |
| +oneOf: |
| + - required: |
| + - extcon |
| + - required: |
| + - switches |
| + |
| additionalProperties: false |
| |
| examples: |
| @@ -146,5 +179,43 @@ examples: |
| }; |
| }; |
| }; |
| + |
| + switches { |
| + #address-cells = <1>; |
| + #size-cells = <0>; |
| + switch@0 { |
| + compatible = "typec-switch"; |
| + reg = <0>; |
| + mode-switch; |
| + |
| + ports { |
| + #address-cells = <1>; |
| + #size-cells = <0>; |
| + port@0 { |
| + reg = <0>; |
| + ite_typec0: endpoint { |
| + remote-endpoint = <&typec_port0>; |
| + }; |
| + }; |
| + }; |
| + }; |
| + |
| + switch@1 { |
| + compatible = "typec-switch"; |
| + reg = <1>; |
| + mode-switch; |
| + |
| + ports { |
| + #address-cells = <1>; |
| + #size-cells = <0>; |
| + port@0 { |
| + reg = <0>; |
| + ite_typec1: endpoint { |
| + remote-endpoint = <&typec_port1>; |
| + }; |
| + }; |
| + }; |
| + }; |
| + }; |
| }; |
| }; |
| -- |
| 2.38.3 |
| |