Thread (14 messages) 14 messages, 3 authors, 2021-05-31

RE: [PATCH 1/4] dt-bindings: connector: Add typec orientation switch properties

From: Jun Li <hidden>
Date: 2021-05-25 11:48:28
Also in: linux-arm-kernel, linux-devicetree

Hi
-----Original Message-----
From: Rob Herring <robh@kernel.org>
Sent: Friday, May 21, 2021 9:31 AM
To: Jun Li <redacted>
Cc: heikki.krogerus@linux.intel.com; shawnguo@kernel.org;
gregkh@linuxfoundation.org; linux@roeck-us.net;
linux-usb@vger.kernel.org; dl-linux-imx [off-list ref];
devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] dt-bindings: connector: Add typec orientation
switch properties

On Wed, May 19, 2021 at 03:14:47PM +0800, Li Jun wrote:
quoted
Typec orientation switch can be implementaed as a consumer of mux
controller, with this way, mux-control-name must be provided with name
"typec-orientation-switch", along with its 3 states value array for
none(high impedance), cc1, cc2.

Signed-off-by: Li Jun <redacted>
---
 .../bindings/connector/usb-connector.yaml     | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git
a/Documentation/devicetree/bindings/connector/usb-connector.yaml
b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 32509b98142e..567183e199a3 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -111,6 +111,24 @@ properties:
       - 1.5A
       - 3.0A

+  mux-controls:
+    description:
+      mux controller node to use for orientation switch selection.
+    maxItems: 1
+
+  mux-control-name:
+    items:
+      - const: typec-orientation-switch
Don't really need a name with only 1 entry.
Okay, will remove it.
quoted
+
+  mux-control-switch-states:
Not really part of the 'mux-control' binding, but part of the connector.
Yes, agree.
So 'typec-orientation-switch-states' or something.
will use typec-orientation-switch-states.

Thanks
Li Jun
quoted
+    description: |
+      An ordered u32 array describing the mux state value for each typec
+      orientations: NONE(high impedance), CC1, CC2, if there is no HW mux
+      state for NONE, use value of CC1 or CC2 for it,
+    minItems: 3
+    maxItems: 3
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+
   # The following are optional properties for "usb-c-connector" with power
   # delivery support.
   source-pdos:
@@ -301,6 +319,9 @@ examples:
         sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
                      PDO_VAR(5000, 12000, 2000)>;
         op-sink-microwatt = <10000000>;
+        mux-controls = <&mux>;
+        mux-control-names = "typec-orientation-switch";
+        mux-control-switch-states = <2>, <0>, <1>;
       };
     };

--
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help