Message ID | 20221214233825.13050-3-laurent.pinchart+renesas@ideasonboard.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Sakari Ailus |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1p5bKw-00DJEt-U6; Wed, 14 Dec 2022 23:39:01 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiLNXij (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 14 Dec 2022 18:38:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiLNXig (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 14 Dec 2022 18:38:36 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605C631EEA; Wed, 14 Dec 2022 15:38:35 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D7EB987; Thu, 15 Dec 2022 00:38:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671061112; bh=eo/NeYqEer4lhcTGCCxf/wNVfPyqdl/SuDt5MSNwMBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L7E80Pp9Syqj5SPur6rklwWNWu5yZ32yQHvzu/o2uFXiwGLisanfSmFAf/ELkyKHg R/GGiryxhFe+rQBtB7DKCTLHhZC2Hnh3b2CJck6vKYgeeox1G4qeTp1k4niYC5GS+S Oc2NO1aQYsAT6wj4wHwAEvW/rHd7QvOgiZsWTVX8= From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, =?utf-8?q?Niklas_S=C3=B6d?= =?utf-8?q?erlund?= <niklas.soderlund@ragnatech.se>, Thomas Nizan <tnizan@witekio.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org Subject: [PATCH v3 02/12] dt-bindings: media: i2c: max9286: Add property to select I2C speed Date: Thu, 15 Dec 2022 01:38:15 +0200 Message-Id: <20221214233825.13050-3-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221214233825.13050-1-laurent.pinchart+renesas@ideasonboard.com> References: <20221214233825.13050-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
media: i2c: max9286: Small new features
|
|
Commit Message
Laurent Pinchart
Dec. 14, 2022, 11:38 p.m. UTC
The I2C speed on the remote side (the I2C master bus of the connected serializers) is configurable, and doesn't need to match the speed of the local bus (the slave bus of the MAX9286). All remote buses must use the same speed, and the MAX9286 needs to be programmed accordingly. Add a new DT property to select the speed to make it configurable. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Rob Herring <robh@kernel.org> --- Changes since v2: - Rename property to maxim,i2c-remote-bus-hz - Specify the property type --- .../devicetree/bindings/media/i2c/maxim,max9286.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Comments
On Thu, 15 Dec 2022 01:38:15 +0200, Laurent Pinchart wrote: > The I2C speed on the remote side (the I2C master bus of the connected > serializers) is configurable, and doesn't need to match the speed of the > local bus (the slave bus of the MAX9286). All remote buses must use the > same speed, and the MAX9286 needs to be programmed accordingly. Add a > new DT property to select the speed to make it configurable. > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > Reviewed-by: Rob Herring <robh@kernel.org> > --- > Changes since v2: > > - Rename property to maxim,i2c-remote-bus-hz > - Specify the property type > --- > .../devicetree/bindings/media/i2c/maxim,max9286.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-remote-bus-hz: '$ref' should not be valid under {'const': '$ref'} hint: Standard unit suffix properties don't need a type $ref from schema $id: http://devicetree.org/meta-schemas/core.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221214233825.13050-3-laurent.pinchart+renesas@ideasonboard.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Hi Rob, On Thu, Dec 15, 2022 at 07:24:38AM -0600, Rob Herring wrote: > On Thu, 15 Dec 2022 01:38:15 +0200, Laurent Pinchart wrote: > > The I2C speed on the remote side (the I2C master bus of the connected > > serializers) is configurable, and doesn't need to match the speed of the > > local bus (the slave bus of the MAX9286). All remote buses must use the > > same speed, and the MAX9286 needs to be programmed accordingly. Add a > > new DT property to select the speed to make it configurable. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > Reviewed-by: Rob Herring <robh@kernel.org> > > --- > > Changes since v2: > > > > - Rename property to maxim,i2c-remote-bus-hz > > - Specify the property type > > --- > > .../devicetree/bindings/media/i2c/maxim,max9286.yaml | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-remote-bus-hz: '$ref' should not be valid under {'const': '$ref'} > hint: Standard unit suffix properties don't need a type $ref > from schema $id: http://devicetree.org/meta-schemas/core.yaml# I wonder how I missed that, as I've run dt_binding_check before submitting. I'll fix it. I'm a bit surprised though, all unit-suffixed properties use 32-bit integers in the DT schema, while I can imagine that some may need a 64-bit integer. What's the recommendation in that case ? > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221214233825.13050-3-laurent.pinchart+renesas@ideasonboard.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema.
On Thu, Dec 15, 2022 at 03:43:28PM +0200, Laurent Pinchart wrote: > Hi Rob, > > On Thu, Dec 15, 2022 at 07:24:38AM -0600, Rob Herring wrote: > > On Thu, 15 Dec 2022 01:38:15 +0200, Laurent Pinchart wrote: > > > The I2C speed on the remote side (the I2C master bus of the connected > > > serializers) is configurable, and doesn't need to match the speed of the > > > local bus (the slave bus of the MAX9286). All remote buses must use the > > > same speed, and the MAX9286 needs to be programmed accordingly. Add a > > > new DT property to select the speed to make it configurable. > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > Reviewed-by: Rob Herring <robh@kernel.org> > > > --- > > > Changes since v2: > > > > > > - Rename property to maxim,i2c-remote-bus-hz > > > - Specify the property type > > > --- > > > .../devicetree/bindings/media/i2c/maxim,max9286.yaml | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > yamllint warnings/errors: > > > > dtschema/dtc warnings/errors: > > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-remote-bus-hz: '$ref' should not be valid under {'const': '$ref'} > > hint: Standard unit suffix properties don't need a type $ref > > from schema $id: http://devicetree.org/meta-schemas/core.yaml# > > I wonder how I missed that, as I've run dt_binding_check before > submitting. I'll fix it. > > I'm a bit surprised though, all unit-suffixed properties use 32-bit > integers in the DT schema, while I can imagine that some may need a > 64-bit integer. What's the recommendation in that case ? Use -mhz. Anything outside the norm we have to special case in property-units.yaml. Rob
Hi Rob, On Thu, Dec 15, 2022 at 10:22:16AM -0600, Rob Herring wrote: > On Thu, Dec 15, 2022 at 03:43:28PM +0200, Laurent Pinchart wrote: > > On Thu, Dec 15, 2022 at 07:24:38AM -0600, Rob Herring wrote: > > > On Thu, 15 Dec 2022 01:38:15 +0200, Laurent Pinchart wrote: > > > > The I2C speed on the remote side (the I2C master bus of the connected > > > > serializers) is configurable, and doesn't need to match the speed of the > > > > local bus (the slave bus of the MAX9286). All remote buses must use the > > > > same speed, and the MAX9286 needs to be programmed accordingly. Add a > > > > new DT property to select the speed to make it configurable. > > > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > > Reviewed-by: Rob Herring <robh@kernel.org> > > > > --- > > > > Changes since v2: > > > > > > > > - Rename property to maxim,i2c-remote-bus-hz > > > > - Specify the property type > > > > --- > > > > .../devicetree/bindings/media/i2c/maxim,max9286.yaml | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > > > yamllint warnings/errors: > > > > > > dtschema/dtc warnings/errors: > > > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml: properties:maxim,i2c-remote-bus-hz: '$ref' should not be valid under {'const': '$ref'} > > > hint: Standard unit suffix properties don't need a type $ref > > > from schema $id: http://devicetree.org/meta-schemas/core.yaml# > > > > I wonder how I missed that, as I've run dt_binding_check before > > submitting. I'll fix it. > > > > I'm a bit surprised though, all unit-suffixed properties use 32-bit > > integers in the DT schema, while I can imagine that some may need a > > 64-bit integer. What's the recommendation in that case ? > > Use -mhz. I expected that answer :-) It's not an issue with this specific property, so I'm fine. If I ever run into the need of a 64-bit Hz value to have both range and precision, we'll talk about it then :-) I don't expect that to be very common. > Anything outside the norm we have to special case in > property-units.yaml.
diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml index 4f28690eabcd..315a6eef6198 100644 --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml @@ -50,6 +50,14 @@ properties: '#gpio-cells': const: 2 + maxim,i2c-remote-bus-hz: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 8470, 28300, 84700, 105000, 173000, 339000, 533000, 837000 ] + default: 105000 + description: | + The I2C clock frequency for the remote I2C buses. The value must match + the configuration of the remote serializers. + maxim,reverse-channel-microvolt: minimum: 30000 maximum: 200000