[PATCH 5/8] dt-bindings: usb: usb-device: Add orientation

From: Ricardo Ribalda
Date: Thu Apr 03 2025 - 16:27:23 EST


For some devices, such as cameras, the OS needs to know where they are
mounted.

ACPI has a property for this purpose, which is parsed by
acpi_get_physical_device_location():
https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/06_Device_Configuration/Device_Configuration.html#pld-physical-location-of-device

In DT we have similar property for video-interface-devices called
orientation:
Documentation/devicetree/bindings/media/video-interface-devices.yaml

Add a new property orientation for usb-devices that matches the already
existing orientation property of video-interface-devices.

Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
Documentation/devicetree/bindings/usb/usb-device.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml b/Documentation/devicetree/bindings/usb/usb-device.yaml
index da890ee60ce6e71a11910c565b6f805470782e4f..bbcda28ec7d5695307efa797f57180044afda77f 100644
--- a/Documentation/devicetree/bindings/usb/usb-device.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
@@ -42,6 +42,10 @@ properties:
port to which this device is attached. The range is 1-255.
maxItems: 1

+ orientation:
+ description: If present, specifies the orientation of the usb device.
+ $ref: /schemas/media/video-interface-devices.yaml#/properties/orientation
+
"#address-cells":
description: should be 1 for hub nodes with device nodes,
should be 2 for device nodes with interface nodes.
@@ -101,6 +105,7 @@ examples:
device@2 {
compatible = "usb123,4567";
reg = <2>;
+ orientation = <0>;
};

device@3 {

--
2.49.0.504.g3bcea36a83-goog