From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52320C433EF for ; Fri, 3 Sep 2021 19:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34C1460F92 for ; Fri, 3 Sep 2021 19:39:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349387AbhICTkK (ORCPT ); Fri, 3 Sep 2021 15:40:10 -0400 Received: from mail-ot1-f42.google.com ([209.85.210.42]:46665 "EHLO mail-ot1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348976AbhICTkK (ORCPT ); Fri, 3 Sep 2021 15:40:10 -0400 Received: by mail-ot1-f42.google.com with SMTP id v33-20020a0568300921b0290517cd06302dso304394ott.13; Fri, 03 Sep 2021 12:39:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vxZ7/IKrYvf4sUb2KR1Kn4kmKcTB6a6zAmQiBxZJvPI=; b=qwoP63LCsXGkqGdS1U0ZCaHRQouTUW2Y1uFRgVrZfelLi6z2atsU79Kn1pRvQvmtfC kvahrwZ1lbdaNseSgNHyks2ixQxT/ysYMabcR97jr65DiJE6L5ILlZW10NrCVqMPoeW5 ZAzmwQJdxw975xDKQzr4wHksIpYArQZrOP2Tp00foEe9Jyohg5HbiWg3A5cxH5ktsn+F N18gFeia4LENzFZy/xh+Q7LEa+IS56LDtIUg0DSw88ODluSHM8SySE0aYujZ3eVXaZav huPr/XSW724m2XtiAPdeCY4A3nEs6hB2Lr/d8Ln+VywG976QtPioEhJQ9xnIOnEr4R2+ Z80A== X-Gm-Message-State: AOAM5328Ce1l9xyxjbTWcOt4RloM9Wh6fJh0HpSz+Nxcc3IhRkwLne4+ k4PAYdW115akBo3+WI5b6Q== X-Google-Smtp-Source: ABdhPJw289gJj0AxbR/U4vPg1x2vnJnuLUfNi/ZoXa1/Ea0jhSY6OEDLdCxXKDBhd4uMjneW5xEv2Q== X-Received: by 2002:a05:6830:70d:: with SMTP id y13mr606742ots.278.1630697949687; Fri, 03 Sep 2021 12:39:09 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id y26sm67318oih.2.2021.09.03.12.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 12:39:09 -0700 (PDT) Received: (nullmailer pid 3331121 invoked by uid 1000); Fri, 03 Sep 2021 19:39:08 -0000 Date: Fri, 3 Sep 2021 14:39:08 -0500 From: Rob Herring To: Maxime Ripard Cc: devicetree@vger.kernel.org, Frank Rowand , Chen-Yu Tsai , Jernej =?utf-8?Q?=C5=A0krabec?= , linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-media@vger.kernel.org, Mauro Carvalho Chehab , Steve Longerbeam Subject: Re: [PATCH v2 27/52] dt-bindings: media: Convert OV5640 binding to a schema Message-ID: References: <20210901091852.479202-1-maxime@cerno.tech> <20210901091852.479202-28-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210901091852.479202-28-maxime@cerno.tech> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Sep 01, 2021 at 11:18:27AM +0200, Maxime Ripard wrote: > The Omnivision OV5640 is supported by Linux thanks to its device tree > binding. > > Now that we have the DT validation in place, let's convert the device > tree bindings for that driver over to a YAML schema. > > Cc: linux-media@vger.kernel.org > Cc: Mauro Carvalho Chehab > Cc: Steve Longerbeam > Signed-off-by: Maxime Ripard > --- > .../devicetree/bindings/media/i2c/ov5640.txt | 92 ----------- > .../bindings/media/i2c/ovti,ov5640.yaml | 154 ++++++++++++++++++ > 2 files changed, 154 insertions(+), 92 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/media/i2c/ov5640.txt > create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > > diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.txt b/Documentation/devicetree/bindings/media/i2c/ov5640.txt > deleted file mode 100644 > index c97c2f2da12d..000000000000 > --- a/Documentation/devicetree/bindings/media/i2c/ov5640.txt > +++ /dev/null > @@ -1,92 +0,0 @@ > -* Omnivision OV5640 MIPI CSI-2 / parallel sensor > - > -Required Properties: > -- compatible: should be "ovti,ov5640" > -- clocks: reference to the xclk input clock. > -- clock-names: should be "xclk". > -- DOVDD-supply: Digital I/O voltage supply, 1.8 volts > -- AVDD-supply: Analog voltage supply, 2.8 volts > -- DVDD-supply: Digital core voltage supply, 1.5 volts > - > -Optional Properties: > -- reset-gpios: reference to the GPIO connected to the reset pin, if any. > - This is an active low signal to the OV5640. > -- powerdown-gpios: reference to the GPIO connected to the powerdown pin, > - if any. This is an active high signal to the OV5640. > -- rotation: as defined in > - Documentation/devicetree/bindings/media/video-interfaces.txt, > - valid values are 0 (sensor mounted upright) and 180 (sensor > - mounted upside down). > - > -The device node must contain one 'port' child node for its digital output > -video port, in accordance with the video interface bindings defined in > -Documentation/devicetree/bindings/media/video-interfaces.txt. > - > -OV5640 can be connected to a MIPI CSI-2 bus or a parallel bus endpoint. > - > -Endpoint node required properties for CSI-2 connection are: > -- remote-endpoint: a phandle to the bus receiver's endpoint node. > -- clock-lanes: should be set to <0> (clock lane on hardware lane 0) > -- data-lanes: should be set to <1> or <1 2> (one or two CSI-2 lanes supported) > - > -Endpoint node required properties for parallel connection are: > -- remote-endpoint: a phandle to the bus receiver's endpoint node. > -- bus-width: shall be set to <8> for 8 bits parallel bus > - or <10> for 10 bits parallel bus > -- data-shift: shall be set to <2> for 8 bits parallel bus > - (lines 9:2 are used) or <0> for 10 bits parallel bus > -- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively. > -- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively. > -- pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock > - signal. > - > -Examples: > - > -&i2c1 { > - ov5640: camera@3c { > - compatible = "ovti,ov5640"; > - pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_ov5640>; > - reg = <0x3c>; > - clocks = <&clks IMX6QDL_CLK_CKO>; > - clock-names = "xclk"; > - DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > - AVDD-supply = <&vgen3_reg>; /* 2.8v */ > - DVDD-supply = <&vgen2_reg>; /* 1.5v */ > - powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; > - reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; > - rotation = <180>; > - > - port { > - /* MIPI CSI-2 bus endpoint */ > - ov5640_to_mipi_csi2: endpoint { > - remote-endpoint = <&mipi_csi2_from_ov5640>; > - clock-lanes = <0>; > - data-lanes = <1 2>; > - }; > - }; > - }; > -}; > - > -&i2c1 { > - ov5640: camera@3c { > - compatible = "ovti,ov5640"; > - pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_ov5640>; > - reg = <0x3c>; > - clocks = <&clk_ext_camera>; > - clock-names = "xclk"; > - > - port { > - /* Parallel bus endpoint */ > - ov5640_to_parallel: endpoint { > - remote-endpoint = <¶llel_from_ov5640>; > - bus-width = <8>; > - data-shift = <2>; /* lines 9:2 are used */ > - hsync-active = <0>; > - vsync-active = <0>; > - pclk-sample = <1>; > - }; > - }; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > new file mode 100644 > index 000000000000..0283b1895a75 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5640.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: OmniVision OV5640 Image Sensor Device Tree Bindings > + > +maintainers: > + - Steve Longerbeam > + > +allOf: > + - $ref: /schemas/media/video-interface-devices.yaml# > + > +properties: > + compatible: > + const: ovti,ov5640 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: XCLK Input Clock > + > + clock-names: > + const: xclk > + > + AVDD-supply: > + description: Analog voltage supply, 2.8 volts > + > + DVDD-supply: > + description: Digital core voltage supply, 1.5 volts > + > + DOVDD-supply: > + description: Digital I/O voltage supply, 1.8 volts > + > + powerdown-gpios: > + maxItems: 1 > + description: > > + Reference to the GPIO connected to the powerdown pin, if any. > + > + reset-gpios: > + maxItems: 1 > + description: > > + Reference to the GPIO connected to the reset pin, if any. > + > + rotation: > + enum: > + - 0 > + - 180 > + > + port: > + description: Digital Output Port > + $ref: /schemas/graph.yaml#/properties/port This needs to be /schemas/graph.yaml#/$defs/port-base Otherwise, it will fail when we start checking unevaluatedProperties. > + additionalProperties: false > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + clock-lanes: > + const: 0 > + > + data-lanes: > + minItems: 1 > + maxItems: 2 > + items: > + enum: [1, 2] > + > + bus-width: > + enum: [8, 10] > + > + data-shift: > + enum: [0, 2] > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - AVDD-supply > + - DVDD-supply > + - DOVDD-supply > + - port > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + camera@3c { > + compatible = "ovti,ov5640"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen3_reg>; /* 2.8v */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v */ > + powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; > + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; > + rotation = <180>; > + > + port { > + /* MIPI CSI-2 bus endpoint */ > + ov5640_to_mipi_csi2: endpoint { > + remote-endpoint = <&mipi_csi2_from_ov5640>; > + clock-lanes = <0>; > + data-lanes = <1 2>; > + }; > + }; > + }; > + }; > + > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + camera@3c { > + compatible = "ovti,ov5640"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clk_ext_camera>; > + clock-names = "xclk"; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen3_reg>; /* 2.8v */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v */ > + > + port { > + /* Parallel bus endpoint */ > + ov5640_to_parallel: endpoint { > + remote-endpoint = <¶llel_from_ov5640>; > + bus-width = <8>; > + data-shift = <2>; /* lines 9:2 are used */ > + hsync-active = <0>; > + vsync-active = <0>; > + pclk-sample = <1>; > + }; > + }; > + }; > + }; > + > +... > -- > 2.31.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C78A9C433EF for ; Fri, 3 Sep 2021 19:41:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94E2560E0B for ; Fri, 3 Sep 2021 19:41:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 94E2560E0B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nE+Yjie3/IIAjMYA1HrB+p3dJpZeg3ipegkxDXyqpQk=; b=AwIrHKnIHFBvHa okLbWiXu+4X5chh8MUY0ldbjmhqboOnJpcreoNJrqGEEHhsEIFZV6nj9vVMVn45N6uvfrYh9pdw+a GXbwrACETtB4KvkF4TQbiM2thxaJ9gfCQ+uzvi5jrZlg/Tjn6nKgnJ5sTycamO8dBr7L4P2mxp7MR HNfg8vaYZT6hq17xLEcBRkGdfnbcEaT9/scITCNTyMbInFnQ4sr4TuS9JaF98Qyl1tJyf3CYhHdq4 Q3a8+g8nyQR06KNo3Scjt51e0kL74vOl9jxCqmDjS2mVLESiqV8+UaycXO+iO1M9/kaWxNBC6kqDz nbgcd8IuWEV2nRtBwyzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMF1v-00Claa-BH; Fri, 03 Sep 2021 19:39:15 +0000 Received: from mail-ot1-f50.google.com ([209.85.210.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMF1r-00ClZC-0w for linux-arm-kernel@lists.infradead.org; Fri, 03 Sep 2021 19:39:13 +0000 Received: by mail-ot1-f50.google.com with SMTP id m7-20020a9d4c87000000b0051875f56b95so334582otf.6 for ; Fri, 03 Sep 2021 12:39:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vxZ7/IKrYvf4sUb2KR1Kn4kmKcTB6a6zAmQiBxZJvPI=; b=INZPpA0+4U8fejCpn3wUy5Pk8kW1VPDm4AwVYAey5VF3fXQAtp5L+6hydkJBTGUtbS v2RelVE78Fw5UjdT4pRWafRnjsTm45Ol88a4ZTKAsj6CxMejVQUP2vBo9G1705JeHRe3 T2fvYu9o4XThk3sPfl2d6Y6BXCfCQDg7KgAdHLmznCR0hf2uy3yPNMIMXHLst9MAFYe3 68bUJHxS/py3e1WEPd7zKIp+QKafwYIneKP15BTaMpj3ItF9k2Khu90USOhJb6Sjm52s DpnCTiIiXtI83m42No5tjeqQhfAUjqxszkVNFwN66SF6hmUIzT/f8+UVoZLKAwTvZhBz 7vog== X-Gm-Message-State: AOAM530plQ/VqtHVFMDuB9UpokSS11Dpe0nqV9wzRDElIgQ9pDYqZnCf ljGdr20DMG+MahrEPLNN5g== X-Google-Smtp-Source: ABdhPJw289gJj0AxbR/U4vPg1x2vnJnuLUfNi/ZoXa1/Ea0jhSY6OEDLdCxXKDBhd4uMjneW5xEv2Q== X-Received: by 2002:a05:6830:70d:: with SMTP id y13mr606742ots.278.1630697949687; Fri, 03 Sep 2021 12:39:09 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id y26sm67318oih.2.2021.09.03.12.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 12:39:09 -0700 (PDT) Received: (nullmailer pid 3331121 invoked by uid 1000); Fri, 03 Sep 2021 19:39:08 -0000 Date: Fri, 3 Sep 2021 14:39:08 -0500 From: Rob Herring To: Maxime Ripard Cc: devicetree@vger.kernel.org, Frank Rowand , Chen-Yu Tsai , Jernej =?utf-8?Q?=C5=A0krabec?= , linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-media@vger.kernel.org, Mauro Carvalho Chehab , Steve Longerbeam Subject: Re: [PATCH v2 27/52] dt-bindings: media: Convert OV5640 binding to a schema Message-ID: References: <20210901091852.479202-1-maxime@cerno.tech> <20210901091852.479202-28-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210901091852.479202-28-maxime@cerno.tech> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210903_123911_127170_BC083672 X-CRM114-Status: GOOD ( 31.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 01, 2021 at 11:18:27AM +0200, Maxime Ripard wrote: > The Omnivision OV5640 is supported by Linux thanks to its device tree > binding. > > Now that we have the DT validation in place, let's convert the device > tree bindings for that driver over to a YAML schema. > > Cc: linux-media@vger.kernel.org > Cc: Mauro Carvalho Chehab > Cc: Steve Longerbeam > Signed-off-by: Maxime Ripard > --- > .../devicetree/bindings/media/i2c/ov5640.txt | 92 ----------- > .../bindings/media/i2c/ovti,ov5640.yaml | 154 ++++++++++++++++++ > 2 files changed, 154 insertions(+), 92 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/media/i2c/ov5640.txt > create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > > diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.txt b/Documentation/devicetree/bindings/media/i2c/ov5640.txt > deleted file mode 100644 > index c97c2f2da12d..000000000000 > --- a/Documentation/devicetree/bindings/media/i2c/ov5640.txt > +++ /dev/null > @@ -1,92 +0,0 @@ > -* Omnivision OV5640 MIPI CSI-2 / parallel sensor > - > -Required Properties: > -- compatible: should be "ovti,ov5640" > -- clocks: reference to the xclk input clock. > -- clock-names: should be "xclk". > -- DOVDD-supply: Digital I/O voltage supply, 1.8 volts > -- AVDD-supply: Analog voltage supply, 2.8 volts > -- DVDD-supply: Digital core voltage supply, 1.5 volts > - > -Optional Properties: > -- reset-gpios: reference to the GPIO connected to the reset pin, if any. > - This is an active low signal to the OV5640. > -- powerdown-gpios: reference to the GPIO connected to the powerdown pin, > - if any. This is an active high signal to the OV5640. > -- rotation: as defined in > - Documentation/devicetree/bindings/media/video-interfaces.txt, > - valid values are 0 (sensor mounted upright) and 180 (sensor > - mounted upside down). > - > -The device node must contain one 'port' child node for its digital output > -video port, in accordance with the video interface bindings defined in > -Documentation/devicetree/bindings/media/video-interfaces.txt. > - > -OV5640 can be connected to a MIPI CSI-2 bus or a parallel bus endpoint. > - > -Endpoint node required properties for CSI-2 connection are: > -- remote-endpoint: a phandle to the bus receiver's endpoint node. > -- clock-lanes: should be set to <0> (clock lane on hardware lane 0) > -- data-lanes: should be set to <1> or <1 2> (one or two CSI-2 lanes supported) > - > -Endpoint node required properties for parallel connection are: > -- remote-endpoint: a phandle to the bus receiver's endpoint node. > -- bus-width: shall be set to <8> for 8 bits parallel bus > - or <10> for 10 bits parallel bus > -- data-shift: shall be set to <2> for 8 bits parallel bus > - (lines 9:2 are used) or <0> for 10 bits parallel bus > -- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively. > -- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively. > -- pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock > - signal. > - > -Examples: > - > -&i2c1 { > - ov5640: camera@3c { > - compatible = "ovti,ov5640"; > - pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_ov5640>; > - reg = <0x3c>; > - clocks = <&clks IMX6QDL_CLK_CKO>; > - clock-names = "xclk"; > - DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > - AVDD-supply = <&vgen3_reg>; /* 2.8v */ > - DVDD-supply = <&vgen2_reg>; /* 1.5v */ > - powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; > - reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; > - rotation = <180>; > - > - port { > - /* MIPI CSI-2 bus endpoint */ > - ov5640_to_mipi_csi2: endpoint { > - remote-endpoint = <&mipi_csi2_from_ov5640>; > - clock-lanes = <0>; > - data-lanes = <1 2>; > - }; > - }; > - }; > -}; > - > -&i2c1 { > - ov5640: camera@3c { > - compatible = "ovti,ov5640"; > - pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_ov5640>; > - reg = <0x3c>; > - clocks = <&clk_ext_camera>; > - clock-names = "xclk"; > - > - port { > - /* Parallel bus endpoint */ > - ov5640_to_parallel: endpoint { > - remote-endpoint = <¶llel_from_ov5640>; > - bus-width = <8>; > - data-shift = <2>; /* lines 9:2 are used */ > - hsync-active = <0>; > - vsync-active = <0>; > - pclk-sample = <1>; > - }; > - }; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > new file mode 100644 > index 000000000000..0283b1895a75 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5640.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: OmniVision OV5640 Image Sensor Device Tree Bindings > + > +maintainers: > + - Steve Longerbeam > + > +allOf: > + - $ref: /schemas/media/video-interface-devices.yaml# > + > +properties: > + compatible: > + const: ovti,ov5640 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: XCLK Input Clock > + > + clock-names: > + const: xclk > + > + AVDD-supply: > + description: Analog voltage supply, 2.8 volts > + > + DVDD-supply: > + description: Digital core voltage supply, 1.5 volts > + > + DOVDD-supply: > + description: Digital I/O voltage supply, 1.8 volts > + > + powerdown-gpios: > + maxItems: 1 > + description: > > + Reference to the GPIO connected to the powerdown pin, if any. > + > + reset-gpios: > + maxItems: 1 > + description: > > + Reference to the GPIO connected to the reset pin, if any. > + > + rotation: > + enum: > + - 0 > + - 180 > + > + port: > + description: Digital Output Port > + $ref: /schemas/graph.yaml#/properties/port This needs to be /schemas/graph.yaml#/$defs/port-base Otherwise, it will fail when we start checking unevaluatedProperties. > + additionalProperties: false > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + clock-lanes: > + const: 0 > + > + data-lanes: > + minItems: 1 > + maxItems: 2 > + items: > + enum: [1, 2] > + > + bus-width: > + enum: [8, 10] > + > + data-shift: > + enum: [0, 2] > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - AVDD-supply > + - DVDD-supply > + - DOVDD-supply > + - port > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + camera@3c { > + compatible = "ovti,ov5640"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen3_reg>; /* 2.8v */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v */ > + powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; > + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; > + rotation = <180>; > + > + port { > + /* MIPI CSI-2 bus endpoint */ > + ov5640_to_mipi_csi2: endpoint { > + remote-endpoint = <&mipi_csi2_from_ov5640>; > + clock-lanes = <0>; > + data-lanes = <1 2>; > + }; > + }; > + }; > + }; > + > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + camera@3c { > + compatible = "ovti,ov5640"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clk_ext_camera>; > + clock-names = "xclk"; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen3_reg>; /* 2.8v */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v */ > + > + port { > + /* Parallel bus endpoint */ > + ov5640_to_parallel: endpoint { > + remote-endpoint = <¶llel_from_ov5640>; > + bus-width = <8>; > + data-shift = <2>; /* lines 9:2 are used */ > + hsync-active = <0>; > + vsync-active = <0>; > + pclk-sample = <1>; > + }; > + }; > + }; > + }; > + > +... > -- > 2.31.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel