From nobody Wed Oct 1 23:30:08 2025 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4641A2F999F for ; Fri, 26 Sep 2025 13:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758892307; cv=none; b=EYdd65S8+neGLI5MV/gd3HKaBPHEHH5m6pC3NLIAaHoXcQTaqFrgYKSuT1KxFxoZkqG/ke1IdYR5FaQNet4GfguKg5RQsy0qxaKNHSOIeWId+kaT3WcTVxLE2ULYEVxtPX4C1GC6eFXxGXZmCXvGioL06/d10oXSgO6NcDVGJfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758892307; c=relaxed/simple; bh=7+uj94r/7LeT/xAkBfTGJ8aSRCSPNzAL0fCA+D8DD2o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gEA4Rlp6L2wHKw/lzDyuy57td7XlK1Dqw7KhZbijYMH3ar6Ku7KSp9T6y36xpWISSCUUInceuMUHNaq/dM2ksn8vQwgNPSqWwBZw/ZWP4+yEbmoH+gnS2tJDJE4LCvpQEJ0yVlpLrp6EGCQkxnp+5iF0msfHIqWO3xto2j4cL2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=BmGX5Z0P; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="BmGX5Z0P" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-57bf912cbf6so2406237e87.3 for ; Fri, 26 Sep 2025 06:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1758892294; x=1759497094; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=aCy6Bk8e0KycgUL3e8TXrZ2btc+fiyl+rPdd78IS8Is=; b=BmGX5Z0PvX78ztmXsmk/MgO7YHO5kshdUTFo6L3WtxQhR3b37olVG9YSfVpI3QmYAI EhK0fDcsUSUO3HgE8vLcFK4A664M8X+Bzz0LHtyT64tXMPIS3PsEW6oAJDGLJiSNZl7E dXCAQzyq95/E8D537XqgOO3WqhOEOUoH1rkh8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758892294; x=1759497094; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aCy6Bk8e0KycgUL3e8TXrZ2btc+fiyl+rPdd78IS8Is=; b=AGoOJkhWFlitBVdDPnvIOycCMl0plwRXNHY+r3pH9whc38cC7aCruByopG9a9eVRzJ DgtBYkYgxRqZp0vr6Kwf6q1SVanI049JgN3TS84QsO959o2T9dXKnl5CRCJ/zRt0A+By 8Aggl62iLRKOpu2Lh4jhA3QVhsy90JubZLRQdgxMpDexipHWbz6hykeBrc4YGmSTas0O aVQUC7ZZAYJsNp2WPxtaRH970mpmP6P4n4Ox2bgP5hhNhTIXu0Acual7JB98Y7BafVkD rE0Uq/fBCWRqEbGQgQmCwocW2l5HqQYri0Vn+UZpZ7PvLmOsf/SBjiQHPzdMbw2mLSCq Vgig== X-Forwarded-Encrypted: i=1; AJvYcCVFgKofj69lhp8JXSgqLn4HDdLK+zl/pYHi0TCgZVEd7Ku2In4XrL4ECM7EvIcQCF1Vs6R+ynXuovtm0VU=@vger.kernel.org X-Gm-Message-State: AOJu0Yya9TVPt+EpraRJE+WQLp6triZCJre02Ozju2GFkRga5hWJsllM dXQQVW4y84/O/uck1XgII8GM5FCZZQr5MJTMSjcl6sTrGgIMGwc7hv3Z7aE7CItTzA== X-Gm-Gg: ASbGncsMBf7F25ops9HK1SM6jQI16scqc0HzpXfMjv8Qq3G8J2QGOb3OGNmhFVYMUk1 IJNyINxfo+xNoVQT5iK38Wv1V5h0vrZXRnIr7nBfOMqT8fRT4KX0ZBMcfOgRm93Y4sADT/qhOmJ qbj2ktkJIBtZXr8OI06fHvONQ9lp2TNfyXmw6KbQ4MzS9ZL0N2ASC2wVM+Clv5A/4koHK63Kwb+ ce8PF1FF6LKk4cozr8chqurB8NRyWvdj5612WtOWzuO/EKkOK+4q6b9FSjENri5fOhJmM/BTyk8 BJVKNkSnzAl44AbhvPs5T8CQbhXYaZGLBN/7/61YvU2a4q8wkytzlzy2EutNxeb7MQart1Y/Lve 8gHErnzOV3jdc91ULqq2Q1807GPtYO+LMnC8+UK5+68AZKiqMqpSfmVdTIql/0TdzD0hMK3wPhI adEg== X-Google-Smtp-Source: AGHT+IFSULi7NpOrywI1NGNOQUbBJbkaKZRrtRNyEnHKO4o1kB5FT5TGBNkhNPYRfI8ePxwjL+x0fg== X-Received: by 2002:a05:6512:15a9:b0:57a:2be1:d773 with SMTP id 2adb3069b0e04-582d406b8a4mr1982976e87.53.1758892293940; Fri, 26 Sep 2025 06:11:33 -0700 (PDT) Received: from ribalda.c.googlers.com (64.153.228.35.bc.googleusercontent.com. [35.228.153.64]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-58527c6b014sm123872e87.43.2025.09.26.06.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Sep 2025 06:11:33 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 26 Sep 2025 13:11:31 +0000 Subject: [PATCH v3 07/12] dt-bindings: media: Add usb-camera-module Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250926-uvc-orientation-v3-7-6dc2fa5b4220@chromium.org> References: <20250926-uvc-orientation-v3-0-6dc2fa5b4220@chromium.org> In-Reply-To: <20250926-uvc-orientation-v3-0-6dc2fa5b4220@chromium.org> To: Hans de Goede , Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , "Rafael J. Wysocki" , Len Brown , Robert Moore , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.14.2 For fixed cameras modules the OS needs to know where they are mounted. This information is used to determine if images need to be rotated or not. 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/Devic= e_Configuration.html#pld-physical-location-of-device In DT we have similar properties for video-interface-devices called orientation and rotation: Documentation/devicetree/bindings/media/video-interface-devices.yaml Add a new schema that combines usb/usb-device.yaml and media/video-interface-devices.yaml Signed-off-by: Ricardo Ribalda --- .../bindings/media/usb-camera-module.yaml | 46 ++++++++++++++++++= ++++ MAINTAINERS | 1 + 2 files changed, 47 insertions(+) diff --git a/Documentation/devicetree/bindings/media/usb-camera-module.yaml= b/Documentation/devicetree/bindings/media/usb-camera-module.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e4ad6f557b9151751522e49b72a= e6584deb0c7ba --- /dev/null +++ b/Documentation/devicetree/bindings/media/usb-camera-module.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/usb-camera-module.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB Camera Module + +maintainers: + - Ricardo Ribalda + +description: | + This schema allows for annotating auxiliary information for fixed camera + modules. This information enables the system to determine if incoming fr= ames + require rotation, mirroring, or other transformations. It also describes= the + module's relationship with other hardware elements, such as flash LEDs or + Voice Coil Motors (VCMs). + +allOf: + - $ref: /schemas/usb/usb-device.yaml# + - $ref: /schemas/media/video-interface-devices.yaml# + +properties: + reg: + maxItems: 1 + +required: + - reg + +additionalProperties: true + +examples: + - | + usb@11270000 { + reg =3D <0x11270000 0x1000>; + interrupts =3D <0x0 0x4e 0x0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + device@1 { + compatible =3D "usb123,4567"; + reg =3D <2>; + orientation =3D <0>; + rotation =3D <90>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index ee8cb2db483f6a5e96b62b6f2edd05b1427b69f5..1503502a3aed2625e8ff488456c= cd7305cc74ba7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -26258,6 +26258,7 @@ L: linux-media@vger.kernel.org S: Maintained W: http://www.ideasonboard.org/uvc/ T: git git://linuxtv.org/media.git +F: Documentation/devicetree/bindings/media/usb-camera-module.yaml F: Documentation/userspace-api/media/drivers/uvcvideo.rst F: Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst F: Documentation/userspace-api/media/v4l/metafmt-uvc.rst --=20 2.51.0.536.g15c5d4f767-goog