Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1411200ybx; Thu, 31 Oct 2019 10:11:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHkS4eKa0n0PiHuZU63qvxMkrbyHSpt4FhTbxRrpuUBaz2LIzjQE22LO0DMAPRPPm3/jB7 X-Received: by 2002:a17:906:2615:: with SMTP id h21mr399781ejc.212.1572541903343; Thu, 31 Oct 2019 10:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572541903; cv=none; d=google.com; s=arc-20160816; b=DaWzEgTmrE4E/wXfvmPXq1I6ebY9PCQdT0K/oLVKGnKk6ncyWM9ryi9kqgoGzyagQm Di+NQSqtbFYVGzqsVg1rp8A5km6BvBZgVmNl8eokLZ5fAYDIbblS+m/CPyT5s8E1+N/j 4YvWkxQBrxcG8cR8Ev3UDptJXwmqE8nsXy3N8UP52gaAIwfR/E9vW8gMxd7DSoQik+3u hQ1Sol6615dVfwC9YUjmCNPuMrMSMJepp1gC1oRhDOi29Tcu8N9tuM6IgXvFbOdxoo35 0SXBE828F9LnwU1lZ2PK3I2mMURC7XYXAzkuiza3Ib7SU9FAdoVZn00F0DQuMDEQInwG 7lTA== 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=Y+n8q10F8i4LTZXxgnXNoSLHLUnkysLMYjDZJ8MWSws=; b=oDjqww7hTiEDvg2Lcmei8NvsHtZU0D2/R85n+hHoXD1VE2zyDdKsZJf0AFv46tc6pK G1yLL83SDSRbzZ8dqczeokBIRGRn1r9XZ/UvpAb77e6enZ/9/AXOjVbK7mag31nljGs4 7nBWth6JeqQrRznUhfQMuqhYq1vdCrWhEI4/WK3Xh44QZMxO4WrESypWewXRxNVggz4x 8ZX3QcivBFASXbZDJpCmgX6rtYBqSd8rjvZdbeih8PO9FfDLaEdKFM3zrs1dsufodKyZ PNXNF7yfyCwGDAEXCVEfGDr/gpc13do5b4gEettLIC1wyHG1VuEo59Cn0LiBMwOXMxz9 M4NQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si3803037ejb.67.2019.10.31.10.11.19; Thu, 31 Oct 2019 10:11:43 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbfJaRJd (ORCPT + 99 others); Thu, 31 Oct 2019 13:09:33 -0400 Received: from retiisi.org.uk ([95.216.213.190]:35702 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728474AbfJaRJc (ORCPT ); Thu, 31 Oct 2019 13:09:32 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E1E9E634C87; Thu, 31 Oct 2019 19:08:38 +0200 (EET) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1iQDw5-0001nA-UE; Thu, 31 Oct 2019 19:08:37 +0200 Date: Thu, 31 Oct 2019 19:08:37 +0200 From: Sakari Ailus To: Laurent Pinchart Cc: Manivannan Sadhasivam , mchehab@kernel.org, robh+dt@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, c.barrett@framos.com, a.brela@framos.com, peter.griffin@linaro.org Subject: Re: [PATCH v4 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding Message-ID: <20191031170837.GN6253@valkosipuli.retiisi.org.uk> References: <20191030094902.32582-1-manivannan.sadhasivam@linaro.org> <20191030094902.32582-2-manivannan.sadhasivam@linaro.org> <20191031131538.GA9170@pendragon.ideasonboard.com> <20191031134512.GB24273@mani> <20191031141141.GD5018@pendragon.ideasonboard.com> <20191031142817.GK6253@valkosipuli.retiisi.org.uk> <20191031165444.GE5018@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031165444.GE5018@pendragon.ideasonboard.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Thu, Oct 31, 2019 at 06:54:44PM +0200, Laurent Pinchart wrote: > Hi Sakari, > > On Thu, Oct 31, 2019 at 04:28:17PM +0200, Sakari Ailus wrote: > > On Thu, Oct 31, 2019 at 04:11:41PM +0200, Laurent Pinchart wrote: > > > On Thu, Oct 31, 2019 at 07:15:12PM +0530, Manivannan Sadhasivam wrote: > > >> On Thu, Oct 31, 2019 at 03:15:38PM +0200, Laurent Pinchart wrote: > > >>> On Wed, Oct 30, 2019 at 03:19:01PM +0530, Manivannan Sadhasivam wrote: > > >>>> Add YAML devicetree binding for IMX296 CMOS image sensor. Let's also > > >>>> add MAINTAINERS entry for the binding and driver. > > >>>> > > >>>> Signed-off-by: Manivannan Sadhasivam > > >>>> --- > > >>>> .../devicetree/bindings/media/i2c/imx296.yaml | 94 +++++++++++++++++++ > > >>>> MAINTAINERS | 8 ++ > > >>>> 2 files changed, 102 insertions(+) > > >>>> create mode 100644 Documentation/devicetree/bindings/media/i2c/imx296.yaml > > >>>> > > >>>> diff --git a/Documentation/devicetree/bindings/media/i2c/imx296.yaml b/Documentation/devicetree/bindings/media/i2c/imx296.yaml > > >>>> new file mode 100644 > > >>>> index 000000000000..c04ec2203268 > > >>>> --- /dev/null > > >>>> +++ b/Documentation/devicetree/bindings/media/i2c/imx296.yaml > > >>>> @@ -0,0 +1,94 @@ > > >>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > >>>> +%YAML 1.2 > > >>>> +--- > > >>>> +$id: http://devicetree.org/schemas/media/i2c/imx296.yaml# > > >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > > >>>> + > > >>>> +title: Sony IMX296 1/2.8-Inch CMOS Image Sensor > > >>>> + > > >>>> +maintainers: > > >>>> + - Manivannan Sadhasivam > > >>>> + > > >>>> +description: |- > > >>>> + The Sony IMX296 is a 1/2.9-Inch active pixel type CMOS Solid-state image > > >>>> + sensor with square pixel array and 1.58 M effective pixels. This chip > > >>>> + features a global shutter with variable charge-integration time. It is > > >>>> + programmable through I2C and 4-wire interfaces. The sensor output is > > >>>> + available via CSI-2 serial data output (1 Lane). > > >>>> + > > >>>> +properties: > > >>>> + compatible: > > >>>> + const: sony,imx296 > > >>>> + > > >>>> + reg: > > >>>> + maxItems: 1 > > >>>> + > > >>>> + clocks: > > >>>> + maxItems: 1 > > >>>> + > > >>>> + clock-names: > > >>>> + description: > > >>>> + Input clock for the sensor. > > >>>> + items: > > >>>> + - const: mclk > > >>> > > >>> The pin is named INCK, let's name the clock accordingly. > > >> > > >> Okay, I thought generic names are preferred here! > > >> > > >>>> + clock-frequency: > > >>>> + description: > > >>>> + Frequency of the mclk clock in Hertz. > > >>> > > >>> This shouldn't be needed, you can retrieve the clock frequency at > > >>> runtime from the clock source. > > >> > > >> Unless the clock source is a fixed one! What if the clock source comes from > > >> SoC? We need to set the rate, right? > > > > > > In that case, if you want to hardcode the clock in DT, the preferred way > > > is to use the assigned-clock-rates property. Otherwise, if the driver > > > requires a specific clock frequency, it's better to hardcode it in the > > > driver itself. In this specific case, I think assigned-clock-rates is > > > best as the device can support three different clock frequencies. > > > > Just note that if ACPI support is added to the sensor driver, you'll need > > the clock-frequency property again, for that's the only way how the driver > > will get the clock frequency. > > Why is so ? Why can't we implement of assigned-clock-rates for ACPI ? ACPI doesn't deal with clocks as such. So there's also no ACPI defined way to access clocks specifically, including the frequency --- instead the clock is controlled by an AML methods which implement power on and off sequences for the device. -- Sakari Ailus