Skip to contentSkip to conversation

arm64: dts: qcom: sc7180-trogdor: Wire up USB

PATCH In review Stephen Boyd 5 participants 7 messages Feb 25, 2025 – Mar 18

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v5 cover arm64: dts: qcom: sc7180-trogdor: Wire up USB

Wiring up the USB hub to the connectors allows us to gain the proper 'connect_type' and 'removable' values in sysfs for the USB devices on sc7180 trogdor devices. These two patches are split off of a larger series[1] so they can land faster and because we've come to the conclusion that the DisplayPort path is going to connect to the cros-ec-typec node, not the usb-c-connector node.

The first patch adds the pogo pin binding to describe the detachable keyboards found on some trogdor devices (actually strongbad). The second patch is the dts changes required to wire up all the USB stuff. This is sufficient to set the sysfs properties for USB devices so that the builtin USB webcam is considered "fixed" or hard-wired while devices plugged into the connectors or the keyboard are considered "removable" or hotpluggable.

Changes from v4 https://lore.kernel.org/r/[email protected]
* Add newline after property before child node
* Pick up ack from Konrad

Changes from v3 https://lore.kernel.org/r/[email protected]
* Consistent quotes in binding
* Drop unused labels on hub ports

Changes from v2 https://lore.kernel.org/r/[email protected]
* Make binding specific to keyboard and move to usb/
* Update dts to reflect new compatible string for pogo pin keyboard

Changes from v1 https://lore.kernel.org/r/[email protected]
* Split out of larger series
* Added description to DT binding
* Removed DP part of dts changes

[1] https://lore.kernel.org/r/[email protected]

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Benson Leung <[email protected]>
Cc Pin-yen Lin <[email protected]>

Stephen Boyd (2):
dt-bindings: usb: Add binding for ChromeOS Pogo pin keyboard connector
arm64: dts: qcom: sc7180-trogdor: Wire up USB to usb-c-connectors

 .../usb/google,usb-pogo-keyboard.yaml         |  68 ++++++++++
 .../dts/qcom/sc7180-trogdor-clamshell.dtsi    |  21 +++
 .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi  |  47 +++++++
 .../dts/qcom/sc7180-trogdor-detachable.dtsi   |  16 +++
 .../dts/qcom/sc7180-trogdor-homestar.dtsi     |  47 +++++++
 .../dts/qcom/sc7180-trogdor-kingoftown.dts    |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi   |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pazquel.dtsi |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi  |  44 +++++++
 .../qcom/sc7180-trogdor-quackingstick.dtsi    |  31 +++++
 .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts |  57 ++++++++-
 .../dts/qcom/sc7180-trogdor-wormdingler.dtsi  |  47 +++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  | 121 ++++++++++++++++++
 13 files changed, 662 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

Signature · 1 line
https://chromeos.dev
#1 lore raw

PATCH v5 1/2 dt-bindings: usb: Add binding for ChromeOS Pogo pin keyboard connector

Describe the set of pins used to connect the detachable keyboard on detachable ChromeOS devices. The set of pins is called the "pogo pins". It's basically USB 2.0 with an extra pin for base detection. We expect to find a keyboard on the other side of this connector with a specific vid/pid, so describe that as a child device at the port of the usb device connected upstream.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Benson Leung <[email protected]>
Cc Pin-yen Lin <[email protected]>
---
 .../usb/google,usb-pogo-keyboard.yaml         | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml
Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml new file +68 -0
new file mode 100644
index 000000000000..053c1cfed6d4
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/google,usb-pogo-keyboard.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google USB Pogo Pin Keyboard
+
+maintainers:
+  - Stephen Boyd <[email protected]>
+
+description:
+  ChromeOS devices with a detachable keyboard have a set of five pogo pins that
+  are the typical four pins for USB (D+/D-, VBUS, GND) and an extra pin for
+  base detection. The detachable keyboard is a USB device that connects to the
+  four USB pogo pins.
+
+properties:
+  compatible:
+    const: google,usb-pogo-keyboard
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description: Connection to USB2 port providing USB HS signals
+    required:
+      - endpoint
+
+patternProperties:
+  '^keyboard@[0-9a-f]{1,2}$':
+    description: The detachable keyboard
+    type: object
+    $ref: /schemas/usb/usb-device.yaml
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+      compatible = "google,usb-pogo-keyboard";
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      keyboard@2 {
+        compatible = "usb18d1,504c";
+        reg = <2>;
+      };
+
+      port {
+        pogo_connector_in: endpoint {
+          remote-endpoint = <&usb_hub_dsp3_hs>;
+        };
+      };
+    };
+
+...
Signature · 1 line
https://chromeos.dev
maintainer Reviewed-by on v5 1/2
#2 lore raw

Re: [PATCH v5 1/2] dt-bindings: usb: Add binding for ChromeOS Pogo pin keyboard connector

Quoted 15 lines · Stephen Boyd

Describe the set of pins used to connect the detachable keyboard on detachable ChromeOS devices. The set of pins is called the "pogo pins". It's basically USB 2.0 with an extra pin for base detection. We expect to find a keyboard on the other side of this connector with a specific vid/pid, so describe that as a child device at the port of the usb device connected upstream.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Benson Leung <[email protected]>
Cc Pin-yen Lin <[email protected]>
Quoted 5 lines
---
 .../usb/google,usb-pogo-keyboard.yaml         | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml
maintainer
#3 lore raw

Re: [PATCH v5 1/2] dt-bindings: usb: Add binding for ChromeOS Pogo pin keyboard connector

Quoted 23 lines · Rob Herring (Arm)
Quoted 15 lines · Stephen Boyd

Describe the set of pins used to connect the detachable keyboard on detachable ChromeOS devices. The set of pins is called the "pogo pins". It's basically USB 2.0 with an extra pin for base detection. We expect to find a keyboard on the other side of this connector with a specific vid/pid, so describe that as a child device at the port of the usb device connected upstream.

Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Benson Leung <[email protected]>
Cc Pin-yen Lin <[email protected]>
Quoted 5 lines
---
 .../usb/google,usb-pogo-keyboard.yaml         | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml
Quoted 1 line

Rob, this has been stuck for a year. Could you please pick it up?

Konrad

maintainer Reviewed-by on v5 1/2
#4 lore raw

Re: [PATCH v5 1/2] dt-bindings: usb: Add binding for ChromeOS Pogo pin keyboard connector

In reply to Stephen Boyd
Quoted 7 lines · Stephen Boyd

Describe the set of pins used to connect the detachable keyboard on detachable ChromeOS devices. The set of pins is called the "pogo pins". It's basically USB 2.0 with an extra pin for base detection. We expect to find a keyboard on the other side of this connector with a specific vid/pid, so describe that as a child device at the port of the usb device connected upstream.

Quoted 8 lines
Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Benson Leung <[email protected]>
Cc Pin-yen Lin <[email protected]>

Still waiting for the binding (patch 1) to be picked up in the USB subsystem, or an ack...so that I can pick the dts change.

Binding looks good to me.

Regards,
Bjorn

Quoted 82 lines
---
 .../usb/google,usb-pogo-keyboard.yaml         | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml
Documentation/devicetree/bindings/usb/google,usb-pogo-keyboard.yaml new file +68 -0
new file mode 100644
index 000000000000..053c1cfed6d4
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/google,usb-pogo-keyboard.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google USB Pogo Pin Keyboard
+
+maintainers:
+  - Stephen Boyd <[email protected]>
+
+description:
+  ChromeOS devices with a detachable keyboard have a set of five pogo pins that
+  are the typical four pins for USB (D+/D-, VBUS, GND) and an extra pin for
+  base detection. The detachable keyboard is a USB device that connects to the
+  four USB pogo pins.
+
+properties:
+  compatible:
+    const: google,usb-pogo-keyboard
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description: Connection to USB2 port providing USB HS signals
+    required:
+      - endpoint
+
+patternProperties:
+  '^keyboard@[0-9a-f]{1,2}$':
+    description: The detachable keyboard
+    type: object
+    $ref: /schemas/usb/usb-device.yaml
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+      compatible = "google,usb-pogo-keyboard";
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      keyboard@2 {
+        compatible = "usb18d1,504c";
+        reg = <2>;
+      };
+
+      port {
+        pogo_connector_in: endpoint {
+          remote-endpoint = <&usb_hub_dsp3_hs>;
+        };
+      };
+    };
+
+...
Signature · 1 line
https://chromeos.dev
#5 lore raw

PATCH v5 2/2 arm64: dts: qcom: sc7180-trogdor: Wire up USB to usb-c-connectors

In reply to Stephen Boyd

Fully describe the USB type-c on sc7180 Trogdor devices. Most Trogdor devices have two USB type-c ports (i.e. usb-c-connector nodes), but Quackingstick only has one. Also, clamshell devices such as Lazor have a USB webcam connected to the USB hub, while detachable devices such as Wormdingler don't have a webcam, or a USB type-a connector. Instead they have the pogo pins for the detachable keyboard.

Fully describing the topology like this will let us expose information about what devices are connected to which physical USB connector (type-A or type-C).

---
 .../dts/qcom/sc7180-trogdor-clamshell.dtsi    |  21 +++
 .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi  |  47 +++++++
 .../dts/qcom/sc7180-trogdor-detachable.dtsi   |  16 +++
 .../dts/qcom/sc7180-trogdor-homestar.dtsi     |  47 +++++++
 .../dts/qcom/sc7180-trogdor-kingoftown.dts    |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi   |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pazquel.dtsi |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi  |  44 +++++++
 .../qcom/sc7180-trogdor-quackingstick.dtsi    |  31 +++++
 .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts |  57 ++++++++-
 .../dts/qcom/sc7180-trogdor-wormdingler.dtsi  |  47 +++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  | 121 ++++++++++++++++++
 12 files changed, 594 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc7180-trogdor-clamshell.dtsi +21 -0
index d91533b80e76..4e4f0b239f3c 100644
@@ -7,3 +7,24 @@
 
 /* This file must be included after sc7180-trogdor.dtsi to modify cros_ec */
 #include <arm/cros-ec-keyboard.dtsi>
+
+/ {
+	usb-a-connector {
+		compatible = "usb-a-connector";
+
+		port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			usb_a0_hs: endpoint@0 {
+				reg = <0>;
+				/* Endpoint filled in by board */
+			};
+
+			usb_a0_ss: endpoint@1 {
+				reg = <1>;
+				/* Endpoint filled in by board */
+			};
+		};
+	};
+};
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi +47 -0

59 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-detachable.dtsi +16 -0
index 7c5d8a57ef7f..3847c10c64c9 100644
@@ -6,6 +6,22 @@
  */
 
 /* This file must be included after sc7180-trogdor.dtsi to modify cros_ec */
+
+/ {
+	pogo_pins: keyboard-connector {
+		compatible = "google,usb-pogo-keyboard";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* Detachable keyboard filled in by board */
+		port {
+			pogo_pins_in: endpoint {
+				/* Endpoint filled in by board */
+			};
+		};
+	};
+};
+
 &cros_ec {
 	keyboard-controller {
 		compatible = "google,cros-ec-keyb-switches";
arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi +47 -0

59 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts +55 -0

61 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi +55 -0

61 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel.dtsi +55 -0

61 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +44 -0

54 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi +31 -0
index ff8996b4de4e..174efd3abfa5 100644
@@ -105,6 +105,17 @@ &sdhc_2 {
 	status = "okay";
 };
 
+&pogo_pins {
+	keyboard@1 {
+		compatible = "usb18d1,505b";
+		reg = <1>;
+	};
+};
+
+&pogo_pins_in {
+	remote-endpoint = <&usb_hub_dfp1_hs>;
+};
+
 &pp1800_uf_cam {
 	status = "okay";
 };
@@ -129,11 +140,31 @@ pp3300_disp_on: &pp3300_dx_edp {
 	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
 };
 
+&usb_c0_hs {
+	remote-endpoint = <&usb_hub_dfp2_hs>;
+};
+
+&usb_c0_ss {
+	remote-endpoint = <&usb_hub_dfp2_ss>;
+};
+
 /* This board only has 1 USB Type-C port. */
 &usb_c1 {
 	status = "disabled";
 };
 
+&usb_hub_dfp2_hs {
+	remote-endpoint = <&usb_c0_hs>;
+};
+
+&usb_hub_dfp2_ss {
+	remote-endpoint = <&usb_c0_ss>;
+};
+
+&usb_hub_dfp1_hs {
+	remote-endpoint = <&pogo_pins_in>;
+};
+
 /* PINCTRL - modifications to sc7180-trogdor.dtsi */
 
 /*
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts +55 -2

67 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi +47 -0

59 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +121 -0

145 lines not on this page · raw message

Signature · 1 line
https://chromeos.dev
Reviewed-by on v5 2/2
#6 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: sc7180-trogdor: Wire up USB to usb-c-connectors

Quoted 21 lines · Stephen Boyd

Fully describe the USB type-c on sc7180 Trogdor devices. Most Trogdor devices have two USB type-c ports (i.e. usb-c-connector nodes), but Quackingstick only has one. Also, clamshell devices such as Lazor have a USB webcam connected to the USB hub, while detachable devices such as Wormdingler don't have a webcam, or a USB type-a connector. Instead they have the pogo pins for the detachable keyboard.

Fully describing the topology like this will let us expose information about what devices are connected to which physical USB connector (type-A or type-C).

Quoted 15 lines
---
 .../dts/qcom/sc7180-trogdor-clamshell.dtsi    |  21 +++
 .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi  |  47 +++++++
 .../dts/qcom/sc7180-trogdor-detachable.dtsi   |  16 +++
 .../dts/qcom/sc7180-trogdor-homestar.dtsi     |  47 +++++++
 .../dts/qcom/sc7180-trogdor-kingoftown.dts    |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi   |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pazquel.dtsi |  55 ++++++++
 .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi  |  44 +++++++
 .../qcom/sc7180-trogdor-quackingstick.dtsi    |  31 +++++
 .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts |  57 ++++++++-
 .../dts/qcom/sc7180-trogdor-wormdingler.dtsi  |  47 +++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  | 121 ++++++++++++++++++
 12 files changed, 594 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry