mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Giandomenico Rossi <rossi@amelchem.com>
To: barebox@lists.infradead.org
Cc: Giandomenico Rossi <rossi@amelchem.com>, Nicola Fontana <ntd@entidi.it>
Subject: [PATCH 3/4] dt-bindings: usb: add STUSB4500 USB PD sink controller binding
Date: Sat, 14 Nov 2026 17:19:52 +0100	[thread overview]
Message-ID: <20261114161953.1457428-4-rossi@amelchem.com> (raw)
In-Reply-To: <20261114161953.1457428-1-rossi@amelchem.com>

Add the Device Tree binding for the STMicroelectronics STUSB4500
USB Power Delivery sink controller.

The binding allows up to three Fixed Supply sink PDOs to be
specified using the standard PDO_FIXED() encoding.

Add the STUSB4500 node and its USB-C connector configuration to
the STM32MP151A SIPV2 Device Tree.

Reviewed-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Giandomenico Rossi <rossi@amelchem.com>
---
 .../bindings/misc/st,stusb4500.yaml           | 102 ++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/st,stusb4500.yaml

diff --git a/Documentation/devicetree/bindings/misc/st,stusb4500.yaml b/Documentation/devicetree/bindings/misc/st,stusb4500.yaml
new file mode 100644
index 0000000000..29cb6f3b1f
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/st,stusb4500.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/st,stusb4500.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STUSB4500 USB Power Delivery sink controller
+
+maintainers:
+  - Giandomenico Rossi <rossi@amelchem.com>
+
+description: |
+  The STUSB4500 is an autonomous USB Type-C and Power Delivery sink
+  controller. It negotiates a power contract with the source in hardware,
+  using up to 3 Fixed Supply sink PDOs. This binding describes the sink
+  PDOs to advertise, provided through a child "connector" node using the
+  common USB connector binding.
+
+  https://www.st.com/resource/en/datasheet/stusb4500.pdf
+
+properties:
+  compatible:
+    const: st,stusb4500
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description:
+      ALERT# pin, active low, open-drain.
+
+  st,renegotiate-on-probe:
+    type: boolean
+    description:
+      Trigger a USB PD renegotiation when the driver probes, so the sink
+      PDOs described here take effect immediately instead of only after
+      the next attach. The renegotiation is done with a PD Soft Reset
+      message, which preserves VBUS (the source briefly returns to vSafe5V
+      during the transition). Omit this property to leave renegotiation to
+      board code or later software.
+
+  connector:
+    type: object
+    $ref: /schemas/connector/usb-connector.yaml#
+    unevaluatedProperties: false
+    description:
+      The Type-C connector attached to this controller.
+    properties:
+      compatible:
+        const: usb-c-connector
+
+      power-role:
+        const: sink
+
+      sink-pdos:
+        minItems: 1
+        maxItems: 3
+        description:
+          One to three Fixed Supply sink PDOs, encoded with PDO_FIXED()
+          from dt-bindings/usb/pd.h, written into the STUSB4500
+          DPM_SNK_PDOx registers.
+
+          Per the datasheet, the first PDO's voltage is fixed to 5 V
+          (vSafe5V) in hardware; only the second and third PDOs have a
+          programmable voltage (5 V to 20 V, in 50 mV steps). The first
+          PDO must therefore be encoded as 5 V.
+
+    required:
+      - compatible
+      - power-role
+      - sink-pdos
+
+required:
+  - compatible
+  - reg
+  - connector
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/usb/pd.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        typec@28 {
+            compatible = "st,stusb4500";
+            reg = <0x28>;
+            st,renegotiate-on-probe;
+
+            connector {
+                compatible = "usb-c-connector";
+                label = "USB-C";
+                power-role = "sink";
+                sink-pdos = <PDO_FIXED(5000, 1500, 0)
+                             PDO_FIXED(20000, 2500, 0)>;
+            };
+        };
+    };
-- 
2.34.1




  parent reply	other threads:[~2026-11-14 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 16:19 [PATCH 0/4] usb: typec: add STUSB4500 USB-C PD sink support Giandomenico Rossi
2026-11-14 16:19 ` [PATCH 1/4] usb: typec: add typec_port_from_device() Giandomenico Rossi
2026-11-14 16:19 ` [PATCH 2/4] usb: typec: stusb4500: add USB PD fixed supply driver Giandomenico Rossi
2026-11-17 11:27   ` Sascha Hauer
2026-11-14 16:19 ` Giandomenico Rossi [this message]
2026-11-14 16:19 ` [PATCH 4/4] commands: stusb4500: add USB-C PD control command Giandomenico Rossi
2026-11-17 11:46   ` Sascha Hauer
2026-11-17 13:12     ` Giandomenico Rossi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261114161953.1457428-4-rossi@amelchem.com \
    --to=rossi@amelchem.com \
    --cc=barebox@lists.infradead.org \
    --cc=ntd@entidi.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox