All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/4] dt-bindings: usb: add documentation for typec switch simple driver
@ 2020-10-19  9:03 Li Jun
  2020-10-19  9:03 ` [PATCH v4 2/4] device property: Add fwnode_is_compatible() and device_is_compatible() helpers Li Jun
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Li Jun @ 2020-10-19  9:03 UTC (permalink / raw)
  To: heikki.krogerus, robh+dt, rafael
  Cc: gregkh, andriy.shevchenko, hdegoede, lee.jones, mika.westerberg,
	dmitry.torokhov, prabhakar.mahadev-lad.rj,
	laurent.pinchart+renesas, linux-usb, devicetree, linux-imx,
	peter.chen

Some platforms need a simple driver to do some controls according to
typec orientation, this can be extended to be a generic driver with
compatible with "typec-orientation-switch".

Signed-off-by: Li Jun <jun.li@nxp.com>
---
changes on v4:
- Use compatible instead of bool property for switch matching.
- Change switch GPIO to be switch simple.
- Change the active channel selection GPIO to be optional.

previsou discussion:
http://patchwork.ozlabs.org/patch/1054342/

 .../bindings/usb/typec-switch-simple.yaml          | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/typec-switch-simple.yaml b/Documentation/devicetree/bindings/usb/typec-switch-simple.yaml
new file mode 100644
index 0000000..244162d
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/typec-switch-simple.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/typec-switch-simple.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Typec Orientation Switch Simple Solution Bindings
+
+maintainers:
+  - Li Jun <jun.li@nxp.com>
+
+description: |-
+  USB SuperSpeed (SS) lanes routing to which side of typec connector is
+  decided by orientation, this maybe achieved by some simple control like
+  GPIO toggle.
+
+properties:
+  compatible:
+    const: typec-orientation-switch
+
+  switch-gpios:
+    description: |
+      gpio specifier to switch the super speed active channel,
+      GPIO_ACTIVE_HIGH: GPIO state high for cc1;
+      GPIO_ACTIVE_LOW:  GPIO state low for cc1.
+    maxItems: 1
+
+  port:
+    type: object
+    additionalProperties: false
+    description: -|
+      Connection to the remote endpoint using OF graph bindings that model SS
+      data bus to typec connector.
+
+    properties:
+      endpoint:
+        type: object
+        additionalProperties: false
+
+        properties:
+          remote-endpoint: true
+
+        required:
+          - remote-endpoint
+
+    required:
+      - endpoint
+
+required:
+  - compatible
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    ptn36043 {
+        compatible = "typec-orientation-switch";
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_ss_sel>;
+        switch-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
+
+        port {
+                usb3_data_ss: endpoint {
+                        remote-endpoint = <&typec_con_ss>;
+                };
+        };
+    };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-10-22 11:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19  9:03 [PATCH v4 1/4] dt-bindings: usb: add documentation for typec switch simple driver Li Jun
2020-10-19  9:03 ` [PATCH v4 2/4] device property: Add fwnode_is_compatible() and device_is_compatible() helpers Li Jun
2020-10-19 12:25   ` Andy Shevchenko
2020-10-20 11:13     ` Jun Li
2020-10-20 12:06       ` Andy Shevchenko
2020-10-21 18:55       ` dmitry.torokhov
2020-10-22 11:03         ` Jun Li
2020-10-19  9:03 ` [PATCH v4 3/4] usb: typec: mux: add "compatible" property for switch match Li Jun
2020-10-20  6:05   ` Peter Chen
2020-10-20 13:02     ` Jun Li
2020-10-21  0:16       ` Peter Chen
2020-10-21  2:43         ` Jun Li
2020-10-19  9:03 ` [PATCH v4 4/4] usb: typec: mux: add typec switch simple driver Li Jun
2020-10-19 12:31   ` Andy Shevchenko
2020-10-20 12:48     ` Jun Li
2020-10-21 19:55   ` dmitry.torokhov
2020-10-22 11:52     ` Jun Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.