Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3592347ybb; Tue, 31 Mar 2020 08:13:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfZ0IcWrGiwBdEvLQ5nnLLs73SvpLoAumHSmm5ArEOSNJHCWYr15+H7SwyYyhxKEobzs9y X-Received: by 2002:a4a:d516:: with SMTP id m22mr13560062oos.72.1585667628824; Tue, 31 Mar 2020 08:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585667628; cv=none; d=google.com; s=arc-20160816; b=g/ZYXzMlrnNXbmPK84+/G3O7jCNalBRJuZoXnB3OPegD8cwOZke/Rme2xeEYv8P+JB nWgRES9wI5jwQeYL6hm/bC3j5mYqbGBbdABH5MXIZm5YPk/Hmxh/RnDpIHdipq/7KpZk +LAJt2Jk2j+ORc7BWZU6ZKUDQOzAFDJNjJuYXnsIkmAoap7a8nWYUX+USce8uaNuwVQp xLKK7L/ConCUJLpvmsWBCnls46+vuIkkAII6i1T+aADjsKfwu1FywyzzrJg6VOLw9TnD /4nTNMnrCUT2mx5aYXzQON9X4hCGImCbxGskYIf7lJaVOyFyaRHjc6JImKZDhMmfxDgv DfHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Dp7exrBqiSr4iMXAKcTaMsxIUtJqMs4ozJdBQGgTS7w=; b=bn0BY26BVtinBVMEMKLRRaESZ1h/XlYxSi+W0tDMP8b3jfXWneeaW7v/XTyMlOe74d pZ20vgn8HZGwzwM+NMU++fID8rOzsxHkqLmx0QRqQdX387zV/SaSryE9xszl8ACxwL85 2iTrALPONhJVwe5FudV87m8/SRexxtpwkvbY0EXzeZFYFvH7r2yyzdMhVdlK4qh//PgX rrvek8t+hILlrB5uoaTzRz9U4kADXT4PETOgBwgf8sruAjUYXGxnbol3vIIiRjd3bJDO fazvxcWaXDFfTdRSMPp9CjD2MDO6Or23VWyALadWQjW9sbXeXReI9Ku/V4QMGt4QSivy bSLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si7648743ota.85.2020.03.31.08.13.36; Tue, 31 Mar 2020 08:13:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730664AbgCaPNK (ORCPT + 99 others); Tue, 31 Mar 2020 11:13:10 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:59897 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgCaPNK (ORCPT ); Tue, 31 Mar 2020 11:13:10 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJIZZ-0004xt-9e; Tue, 31 Mar 2020 17:13:01 +0200 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jJIZR-00038u-QY; Tue, 31 Mar 2020 17:12:53 +0200 Date: Tue, 31 Mar 2020 17:12:53 +0200 From: Marco Felsch To: Robert Foss Cc: Dongchun Zhu , Fabio Estevam , Andy Shevchenko , Sakari Ailus , Tomasz Figa , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 1/3] media: dt-bindings: ov8856: Document YAML bindings Message-ID: <20200331151253.q6ody3erhvsabznz@pengutronix.de> References: <20200331133346.372517-1-robert.foss@linaro.org> <20200331133346.372517-2-robert.foss@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331133346.372517-2-robert.foss@linaro.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:59:20 up 137 days, 6:17, 160 users, load average: 0.00, 0.03, 0.03 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On 20-03-31 15:33, Robert Foss wrote: > From: Dongchun Zhu > > This patch adds documentation of device tree in YAML schema for the > OV8856 CMOS image sensor. > > Signed-off-by: Dongchun Zhu > Signed-off-by: Robert Foss > --- > > - Changes since v5: > * Add assigned-clocks and assigned-clock-rates > * robher: dt-schema errors > > - Changes since v4: > * Fabio: Change reset-gpio to GPIO_ACTIVE_LOW, explain in description > * Add clock-lanes property to example > * robher: Fix syntax error in devicetree example > > - Changes since v3: > * robher: Fix syntax error > * robher: Removed maxItems > * Fixes yaml 'make dt-binding-check' errors > > - Changes since v2: > Fixes comments from from Andy, Tomasz, Sakari, Rob. > * Convert text documentation to YAML schema. > > - Changes since v1: > Fixes comments from Sakari, Tomasz > * Add clock-frequency and link-frequencies in DT > > .../devicetree/bindings/media/i2c/ov8856.yaml | 150 ++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 151 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/i2c/ov8856.yaml > > diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml > new file mode 100644 > index 000000000000..beeddfbb8709 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml > @@ -0,0 +1,150 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright (c) 2019 MediaTek Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ov8856.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Omnivision OV8856 CMOS Sensor Device Tree Bindings > + > +maintainers: > + - Ben Kao > + - Dongchun Zhu > + > +description: |- > + The Omnivision OV8856 is a high performance, 1/4-inch, 8 megapixel, CMOS > + image sensor that delivers 3264x2448 at 30fps. It provides full-frame, > + sub-sampled, and windowed 10-bit MIPI images in various formats via the > + Serial Camera Control Bus (SCCB) interface. This chip is programmable > + through I2C and two-wire SCCB. The sensor output is available via CSI-2 > + serial data output (up to 4-lane). > + > +properties: > + compatible: > + const: ovti,ov8856 > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + description: > + Input clock for the sensor. > + items: > + - const: xvclk > + > + clock-frequency: > + description: > + Frequency of the xvclk clock in Hertz. Why do we need this here? > + assigned-clocks: > + description: > + Input clock for the sensor. > + > + assigned-clock-rates: > + description: > + Frequency of the xvclk clock in Hertz. Also this isn't related to the chip. You need this because you are using a qcom platform which provides the clock. IMHO you only need to specify the clock. You can get the frequency with the clk_get_rate() function. > + dovdd-supply: > + description: > + Definition of the regulator used as interface power supply. Phandle to the interface power supply regulator? > + > + avdd-supply: > + description: > + Definition of the regulator used as analog power supply. > + > + dvdd-supply: > + description: > + Definition of the regulator used as digital power supply. > + > + reset-gpios: > + description: > + The phandle and specifier for the GPIO that controls sensor reset. > + This corresponds to the hardware pin XSHUTDOWN which is physically > + active low. > + > + port: > + type: object > + additionalProperties: false > + description: > + A node containing input and output port nodes with endpoint definitions > + as documented in > + Documentation/devicetree/bindings/media/video-interfaces.txt > + > + properties: > + endpoint: > + type: object > + > + properties: > + clock-lanes: > + maxItems: 1 > + > + data-lanes: > + maxItems: 1 > + > + remote-endpoint: true > + > + required: > + - clock-lanes > + - data-lanes > + - remote-endpoint > + > + required: > + - endpoint > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - clock-frequency > + - assigned-clocks > + - assigned-clock-rates > + - dovdd-supply > + - avdd-supply > + - dvdd-supply > + - reset-gpios > + - port > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include IMHO we should avoid examples with hardware specific includes. > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ov8856: camera@10 { > + compatible = "ovti,ov8856"; > + reg = <0x10>; > + > + reset-gpios = <&pio 111 GPIO_ACTIVE_LOW>; > + pinctrl-names = "default"; > + pinctrl-0 = <&clk_24m_cam>; > + > + clocks = <&clock_camcc CAM_CC_MCLK0_CLK>; > + clock-names = "xvclk"; > + clock-frequency = <19200000>; > + assigned-clocks = <&clock_camcc CAM_CC_MCLK0_CLK>; > + assigned-clock-rates = <19200000>; > + > + avdd-supply = <&mt6358_vcama2_reg>; > + dvdd-supply = <&mt6358_vcamd_reg>; > + dovdd-supply = <&mt6358_vcamio_reg>; > + > + port { > + wcam_out: endpoint { > + remote-endpoint = <&mipi_in_wcam>; > + clock-lanes = <0>; > + data-lanes = <1 2 3 4>; > + link-frequencies = /bits/ 64 <360000000 180000000>; Should we add the link-frequencies as optional param? Regards, Marco > + }; > + }; > + }; > + }; > +... > \ No newline at end of file > diff --git a/MAINTAINERS b/MAINTAINERS > index a6fbdf354d34..0f99e863978a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -12355,6 +12355,7 @@ L: linux-media@vger.kernel.org > T: git git://linuxtv.org/media_tree.git > S: Maintained > F: drivers/media/i2c/ov8856.c > +F: Documentation/devicetree/bindings/media/i2c/ov8856.yaml > > OMNIVISION OV9650 SENSOR DRIVER > M: Sakari Ailus > -- > 2.25.1 > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |