Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp483946pxv; Thu, 8 Jul 2021 07:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmppeofOWSY+MYYuYEj+9a7f5OPy1QJOMFlmjqHXPUMR6SaninQ3Vb8hGjqeAwf7wvq0Bu X-Received: by 2002:a92:d10c:: with SMTP id a12mr16130556ilb.100.1625753032057; Thu, 08 Jul 2021 07:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625753032; cv=none; d=google.com; s=arc-20160816; b=m0ocOVoPcugJB4dftQ4HMQYL83FJBRfD7kpozeex63TE4QH2Zg1HXSFI+ZathPK+4f EIlyd/hkVhAKLtPkBkOxRnq0PvHj9/jZXeIqHm1kJXrlJJTpVHXLqAhpHcrnpXQB+aWq C7xxPqT38blUTPBYn6MBN8G+89F3iszVFtV4JqG+nyPsmpT9Gb5g7CuClAGysilja2A1 He9dNWfqCQ0jeb625mJQ/25Cn8IOaKqaQ5LwIZG7kuj4t8jnSxjecKj9sI7LoJBvOHqm Wb8ri5DXtbawM+83FH+e+pfluJV/foGsEbpxoBR1PGNmH0uQqxwzgCpCy7Dssuy1EzBn p9AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=s0/tsVaRnBsLJhPx7fcUAx/yg+ZtRx88NuLnXd2vk4g=; b=ufDeV+kblEBlDQ0KvZBgvD1mQJL8xs+hLEnipOtGjiMfrKSSwBBW4r+ZxNhIHF2boP Wh+YsXohi3mH+GwKL+dWTQT0o4WnbkOl2DobWoVYCL91CNLCizmDFQi49JSOBJpkzBR6 eYZ7qk/12yrfKb2E29IGlILAejGDa5zDswUg/0LjM5QFagpkRNOLVRk/uuCDq9PZzNYh 0BL5YhgROkt7ni2JvF1MBsY0psEl4uZhNERHOVSNRp1ZWD/Gsi7h1Nq9lsvv6OgC+4PI hlN97uSSwqu9mH3PSpNZrKvj2VKCSTcWsfz8UxOPTWiy4WqLEJXxswiFW6KZTfDS9VkA eY0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si3015642iow.52.2021.07.08.07.03.32; Thu, 08 Jul 2021 07:03:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231875AbhGHOFX (ORCPT + 99 others); Thu, 8 Jul 2021 10:05:23 -0400 Received: from mga14.intel.com ([192.55.52.115]:53497 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbhGHOFV (ORCPT ); Thu, 8 Jul 2021 10:05:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10038"; a="209326210" X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="209326210" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 07:02:39 -0700 X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="564522640" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 07:02:37 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 34A7D20345; Thu, 8 Jul 2021 17:02:35 +0300 (EEST) Date: Thu, 8 Jul 2021 17:02:35 +0300 From: "sakari.ailus@linux.intel.com" To: Stefan =?iso-8859-1?Q?Riedm=FCller?= Cc: "mchehab@kernel.org" , "laurent.pinchart@ideasonboard.com" , "devicetree@vger.kernel.org" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" Subject: Re: [PATCH v4 5/6] media: dt-bindings: mt9p031: Convert bindings to yaml Message-ID: <20210708140235.GB3@paasikivi.fi.intel.com> References: <20210708091922.5508-1-s.riedmueller@phytec.de> <20210708091922.5508-6-s.riedmueller@phytec.de> <20210708112313.GA3@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stefan, On Thu, Jul 08, 2021 at 01:34:17PM +0000, Stefan Riedm?ller wrote: > Hi Sakari, > > On Thu, 2021-07-08 at 14:23 +0300, Sakari Ailus wrote: > > Hi Stefan, > > > > Thanks for the patch. > > Thanks for your feedback! You're welcome! > > > > > On Thu, Jul 08, 2021 at 11:19:21AM +0200, Stefan Riedmueller wrote: > > > Convert mt9p031 sensor bindings to yaml schema. Also update the > > > MAINTAINERS entry. > > > > > > Signed-off-by: Stefan Riedmueller > > > --- > > > .../bindings/media/i2c/aptina,mt9p031.yaml | 75 +++++++++++++++++++ > > > .../devicetree/bindings/media/i2c/mt9p031.txt | 40 ---------- > > > MAINTAINERS | 1 + > > > 3 files changed, 76 insertions(+), 40 deletions(-) > > > create mode 100644 > > > Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml > > > delete mode 100644 > > > Documentation/devicetree/bindings/media/i2c/mt9p031.txt > > > > > > diff --git > > > a/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml > > > b/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml > > > new file mode 100644 > > > index 000000000000..7de62e339895 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml > > > @@ -0,0 +1,75 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/media/i2c/mt9p031.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Aptina 1/2.5-Inch 5Mp CMOS Digital Image Sensor > > > + > > > +maintainers: > > > + - Laurent Pinchart > > > + > > > +description: | > > > + The Aptina MT9P031 is a 1/2.5-inch CMOS active pixel digital image > > > sensor > > > + with an active array size of 2592H x 1944V. It is programmable through > > > a > > > + simple two-wire serial interface. > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - aptina,mt9p031 > > > + - aptina,mt9p031m > > > + > > > + reg: > > > + description: I2C device address > > > + maxItems: 1 > > > + > > > + reset-gpios: > > > + maxItems: 1 > > > + description: Chip reset GPIO > > > + > > > + port: > > > + $ref: /schemas/graph.yaml#/properties/port > > > > This should probably be: > > > > $ref: /schemas/graph.yaml#/$defs/port-base > > I actually was not sure which one of these to use because I found both in > existing bindings. Also /schemas/graph.yaml#/properties/port has a reference > to $defs/port-base. It would be nice if you or someone else could give me a > hint why /schemas/graph.yaml#/$defs/port-base would be the correct one here. I haven't dug into the details but: > > > > > > + addittionalProeprties: false > > > > Could you run > > > > make dt_binding_check > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.y > > aml > > > > please? > > Sorry, I totally forgot about this. I'll do so before sending the next > version. No worries. > > > > > > + > > > + properties: > > > + endpoint: > > > + $ref: /schemas/media/video-interfaces.yaml# > > > + unevaluatedProperties: false > > > + > > > + properties: > > > + input-clock-frequency: true > > > + pixel-clock-frequency: true > > > > These two legacy properties were not in the endpoint previously. > > That's right, but they are being parsed from the endpoint so I figured they > belong here. Should I mention this in the commit message? Please do. I missed the driver did this. Ideally the driver would use the common properties but it's old and unlikely to be used in new boards anyway I guess. > > Thanks, > Stefan > > > > > > + > > > + required: > > > + - input-clock-frequency > > > + - pixel-clock-frequency > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - port > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + i2c0 { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + mt9p031@5d { > > > + compatible = "aptina,mt9p031"; > > > + reg = <0x5d>; > > > + reset-gpios = <&gpio_sensor 0 0>; > > > + > > > + port { > > > + mt9p031_1: endpoint { > > > + input-clock-frequency = <6000000>; > > > + pixel-clock-frequency = <96000000>; > > > + }; > > > + }; > > > + }: > > > + }; > > > + > > > +... > > > diff --git a/Documentation/devicetree/bindings/media/i2c/mt9p031.txt > > > b/Documentation/devicetree/bindings/media/i2c/mt9p031.txt > > > deleted file mode 100644 > > > index cb60443ff78f..000000000000 > > > --- a/Documentation/devicetree/bindings/media/i2c/mt9p031.txt > > > +++ /dev/null > > > @@ -1,40 +0,0 @@ > > > -* Aptina 1/2.5-Inch 5Mp CMOS Digital Image Sensor > > > - > > > -The Aptina MT9P031 is a 1/2.5-inch CMOS active pixel digital image sensor > > > with > > > -an active array size of 2592H x 1944V. It is programmable through a > > > simple > > > -two-wire serial interface. > > > - > > > -Required Properties: > > > -- compatible: value should be either one among the following > > > - (a) "aptina,mt9p031" for mt9p031 sensor > > > - (b) "aptina,mt9p031m" for mt9p031m sensor > > > - > > > -- input-clock-frequency: Input clock frequency. > > > - > > > -- pixel-clock-frequency: Pixel clock frequency. > > > - > > > -Optional Properties: > > > -- reset-gpios: Chip reset GPIO > > > - > > > -For further reading on port node refer to > > > -Documentation/devicetree/bindings/media/video-interfaces.txt. > > > - > > > -Example: > > > - > > > - i2c0@1c22000 { > > > - ... > > > - ... > > > - mt9p031@5d { > > > - compatible = "aptina,mt9p031"; > > > - reg = <0x5d>; > > > - reset-gpios = <&gpio3 30 0>; > > > - > > > - port { > > > - mt9p031_1: endpoint { > > > - input-clock-frequency = <6000000>; > > > - pixel-clock-frequency = <96000000>; > > > - }; > > > - }; > > > - }; > > > - ... > > > - }; > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index c7456776ace5..f2123226baae 100644 > > > --- a/MAINTAINERS > > > +++ b/MAINTAINERS > > > @@ -12610,6 +12610,7 @@ M: Laurent Pinchart < > > > laurent.pinchart@ideasonboard.com> > > > L: linux-media@vger.kernel.org > > > S: Maintained > > > T: git git://linuxtv.org/media_tree.git > > > +F: Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml > > > F: drivers/media/i2c/mt9p031.c > > > F: include/media/i2c/mt9p031.h > > > -- Regards, Sakari Ailus