Devicetree
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
@ 2026-07-20 20:21 Bhargav Joshi
  2026-07-20 20:33 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Bhargav Joshi @ 2026-07-20 20:21 UTC (permalink / raw)
  To: MyungJoo Ham, Chanwoo Choi, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Roger Quadros
  Cc: linux-kernel, devicetree, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca, j.bhargav.u

Convert Texas Instruments Palmas USB Comparator from legacy text to DT
schema.

Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
 .../devicetree/bindings/extcon/extcon-palmas.txt   | 22 -------
 .../bindings/extcon/ti,extcon-palmas.yaml          | 74 ++++++++++++++++++++++
 2 files changed, 74 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
deleted file mode 100644
index f61d5af44a27..000000000000
--- a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-EXTCON FOR PALMAS/TWL CHIPS
-
-PALMAS USB COMPARATOR
-Required Properties:
- - compatible: should contain one of:
-   * "ti,palmas-usb-vid".
-   * "ti,twl6035-usb-vid".
-   * "ti,palmas-usb" (DEPRECATED - use "ti,palmas-usb-vid").
-   * "ti,twl6035-usb" (DEPRECATED - use "ti,twl6035-usb-vid").
-
-Optional Properties:
- - ti,wakeup : To enable the wakeup comparator in probe
- - ti,enable-id-detection: Perform ID detection. If id-gpio is specified
-		it performs id-detection using GPIO else using OTG core.
- - ti,enable-vbus-detection: Perform VBUS detection.
- - id-gpio: gpio for GPIO ID detection. See gpio binding.
- - debounce-delay-ms: debounce delay for GPIO ID pin in milliseconds.
-
-palmas-usb {
-       compatible = "ti,twl6035-usb", "ti,palmas-usb";
-       ti,wakeup;
-};
diff --git a/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml b/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml
new file mode 100644
index 000000000000..0bcd8df79414
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/extcon/ti,extcon-palmas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PALMAS USB COMPARATOR
+
+maintainers:
+  - Roger Quadros <rogerq@ti.com>
+  - Bhargav Joshi <j.bhargav.u@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - ti,palmas-usb-vid
+          - ti,twl6035-usb-vid
+      - enum:
+          - ti,palmas-usb
+          - ti,twl6035-usb
+        deprecated: true
+
+  ti,wakeup:
+    type: boolean
+    description:
+      To enable the wakeup comparator in probe.
+
+  ti,enable-id-detection:
+    type: boolean
+    description:
+      Perform ID detection. If id-gpios is specified it performs ID detection
+      using GPIO, otherwise using the OTG core.
+
+  ti,enable-vbus-detection:
+    type: boolean
+    description:
+      Perform VBUS detection.
+
+  id-gpios:
+    maxItems: 1
+
+  id-gpio:
+    maxItems: 1
+    deprecated: true
+
+  vbus-gpios:
+    maxItems: 1
+
+  vbus-gpio:
+    maxItems: 1
+    deprecated: true
+
+  debounce-delay-ms:
+    description:
+      Debounce delay for GPIO ID pin in milliseconds.
+    default: 20
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    palmas_usb {
+        compatible = "ti,palmas-usb-vid";
+        ti,wakeup;
+        ti,enable-id-detection;
+        ti,enable-vbus-detection;
+        id-gpios = <&palmas_gpio 0 GPIO_ACTIVE_HIGH>;
+    };

---
base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
change-id: 20260721-ti-extcon-palmas-2eeed9a6ddb3

Best regards,
-- 
Bhargav


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

end of thread, other threads:[~2026-07-20 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 20:21 [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema Bhargav Joshi
2026-07-20 20:33 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox