devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Roth <nicholas@rothemail.net>
To: devicetree@vger.kernel.org
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	Nicholas Roth <nicholas@rothemail.net>
Subject: [PATCH] dt-bindings: media: Add Omnivision ov8858 binding
Date: Mon,  7 Nov 2022 21:38:13 -0600	[thread overview]
Message-ID: <20221108033813.16502-2-nicholas@rothemail.net> (raw)
In-Reply-To: <20221108033813.16502-1-nicholas@rothemail.net>

Add a device tree binding for the Omnivision OV8858 image sensor.
The OV8858 is an 8 megapixel image sensor which provides images in RAW
format over MIPI CSI-2 data bus and is controlled through an
I2C-compatibile SCCB bus.

Tested on PinePhone Pro with libcamera cam and qcam.

Signed-off-by: Nicholas Roth <nicholas@rothemail.net>
---
 .../bindings/i2c/ovti,ov8858-i2c.yaml         | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/ovti,ov8858-i2c.yaml

diff --git a/Documentation/devicetree/bindings/i2c/ovti,ov8858-i2c.yaml b/Documentation/devicetree/bindings/i2c/ovti,ov8858-i2c.yaml
new file mode 100644
index 000000000000..1300c1b6fa17
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ovti,ov8858-i2c.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-imx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Inter IC (I2C) and High Speed Inter IC (HS-I2C) for OV8858
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible: ovti,ov8858
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xvclk
+
+  clock-frequency:
+    minimum: 24000000
+    default: 24000000
+    maximum: 24000000
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c@ff110000 {
+        status = "okay";
+
+        clock-frequency = <400000>;
+        i2c-scl-rising-time-ns = <300>;
+        i2c-scl-falling-time-ns = <15>;
+        
+        pinctrl-0 = <&i2c1_xfer &cif_clkouta>;
+        
+        assigned-clocks = <&cru SCLK_CIF_OUT &cru SCLK_CIF_OUT_SRC>;
+        assigned-clock-parents = <&cru SCLK_CIF_OUT_SRC &cru PLL_GPLL>;
+        assigned-clock-rates = <19200000 0>;
+        ucam: camera@36 {
+            compatible = "ovti,ov8858";
+            reg = <0x36>;
+            pinctrl-names = "default";
+            pinctrl-0 = <&ucam_pdn &ucam_rst>;
+
+            clocks = <&cru SCLK_CIF_OUT>;
+            clock-names = "xvclk";
+
+            dovdd-supply = <&vcc1v8_dvp>;
+            /*XXX: also depends on vcca1v8_codec for I2C bus power */
+
+            reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
+            powerdown-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>;
+
+            rotation = <180>;
+
+            port {
+                ucam_out: endpoint {
+                    remote-endpoint = <&mipi_in_ucam>;
+                    data-lanes = <1 2 3 4>;
+                };
+            };
+        };
+    };
-- 
2.34.1


  reply	other threads:[~2022-11-08  3:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08  3:38 ov8858 device tree addition Nicholas Roth
2022-11-08  3:38 ` Nicholas Roth [this message]
2022-11-08  9:23   ` [PATCH] dt-bindings: media: Add Omnivision ov8858 binding Krzysztof Kozlowski
2022-11-08 12:54   ` Rob Herring
2022-11-09  2:30     ` Nicholas Roth
2022-11-09  8:55       ` Krzysztof Kozlowski

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=20221108033813.16502-2-nicholas@rothemail.net \
    --to=nicholas@rothemail.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).