Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35718498rwd; Mon, 10 Jul 2023 11:26:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtYLKIsiZ8gdhrH1MeT+RuEoddEuiVMijwyqLOChKnd5brdYATms3ZFAbDc8HSKXtusrdj X-Received: by 2002:aa7:cb52:0:b0:51e:4bd6:ce4a with SMTP id w18-20020aa7cb52000000b0051e4bd6ce4amr8475816edt.11.1689013602019; Mon, 10 Jul 2023 11:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689013601; cv=none; d=google.com; s=arc-20160816; b=CLaDlFlBRo6hBy8CfBm4E4p1r0MneJLhM/ghUHzQxQN/+PQhPmE5cgSJ/0qIiO4lS7 QkTghwF98kd4GwkHhFprsv9+mk3n+kAHWkoIGTMEDQWG4AD/eY0cNiKp+u9LX3hjlODw EMvGWmcPLpj52S76HIHyCLWkvCu5xL+5VihPmg0/UaIiNEj3rnBlOCdDEd725ex1R3wd k8Qa1092olsA3/Vhx+m9d7agQv7Ku2WR1AoPv69yM40sjy4Uiom3UTt/MInDaKTB8+XK AagQxEs/CVuygFcmOK0mjV66f5X+dX4u6KBAcw3m+sZhmPdmk3PA1GywieLoMF1DdVwn Yf9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JE/oYNmijQt5k0sNNaOwyw1TzE9SeOhXpUsQJRfVs4M=; fh=LlpEM0wPpQd0kfj6ukWkKfNwsS5XbLJByh+nB455+tw=; b=p2+xT90mQM8DX4Y2YKeCmFDoAlzE3TIprFQf2DyXJvqDJgZSu+gFYcf1Rkq0krVDpK Zcp2phXtBpNSFj0TG1QIWzX72iv/7V67um7dGcUwiZuMJ1E/9B5OUxjtXMJXeoClYoPU G+DiDu1SHrFhi0zheQWaLYyNAE7WCkv5y0TMnIjXxGykhhMivl6obrLW4/jkS/ue2E8L BPxuStob7XIHXaWQXK+D7GDeqDKg6hl7QCMyJXUulwRrfDa1yidvGFr9viWXHjCgtFpr AjsP40S3jli7TJRc2UIG+q0PgDwTMHh7+hJdJy5ZycEhW8T2rx5kqTkZ596Ncy3nfUkk R6BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5WSKl2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a056402161600b0051e0d950edbsi85051edv.296.2023.07.10.11.26.16; Mon, 10 Jul 2023 11:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5WSKl2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232288AbjGJR5E (ORCPT + 99 others); Mon, 10 Jul 2023 13:57:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjGJR5D (ORCPT ); Mon, 10 Jul 2023 13:57:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DC611B; Mon, 10 Jul 2023 10:57:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5359D6117A; Mon, 10 Jul 2023 17:57:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09A8BC433C7; Mon, 10 Jul 2023 17:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689011820; bh=Px7QK0/CIhxyfFoDIS5WoyTBeFeYYT4CZjAXRojlvr8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l5WSKl2QJCawfVz0mI2LQ3iM6ykcZAPrC4ZYoJ6NSX3c2uGhqbQGKGTUloALL+lbo 33xaWsLy3gwx3c2CHtDmmM52fzr4aUauxQWOU8uGhsI1p+tPSMB1g42o69EuX+nLf4 TTz2gxm+OBuSXKW+ncijFQu5kUH2BRAw7lMciCaezZ3d9JTbcGc6koTenOTIHFX45P aUi85m2narwsC/MCxa27q4Gf8/axd6ETd19twX/NzF566cUECYTZVWyNvtl7DxGk1T HF3w55otnCNeeRnNb8V6WE6O2gPntxC59BmmSMeJ5p3jmI+OTRV0xJTvMO0Lc2PYWx dS8aM9sV3I2MQ== Date: Mon, 10 Jul 2023 18:56:56 +0100 From: Conor Dooley To: Rob Herring Cc: Mauro Carvalho Chehab , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: dt-bindings: Convert Omnivision OV7251 to DT schema Message-ID: <20230710-underling-angelfish-c47d363a59f5@spud> References: <20230707210646.868758-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PyGC2IQryHzgfMSp" Content-Disposition: inline In-Reply-To: <20230707210646.868758-1-robh@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org --PyGC2IQryHzgfMSp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 07, 2023 at 03:06:46PM -0600, Rob Herring wrote: > Convert the OmniVision OV7251 Image Sensor binding to DT schema format. >=20 > vddd-supply was listed as required, but the example and actual user > don't have it. Also, the data brief says it has an internal regulator, > so perhaps it is truly optional. ov7251.c: ov7251->core_regulator =3D devm_regulator_get(dev, "vddd"); if (IS_ERR(ov7251->core_regulator)) { dev_err(dev, "cannot get core regulator\n"); return PTR_ERR(ov7251->core_regulator); } Looks like the driver's probe function disagrees? I was going to ask how it worked, but the one user has status =3D "disabled"... /shrug, what's here looks fine to me, whatever Qualcomm person cares about the driver can make sure it works for them I guess. Reviewed-by: Conor Dooley Cheers, Conor. >=20 > Signed-off-by: Rob Herring > --- > .../devicetree/bindings/media/i2c/ov7251.txt | 52 --------- > .../bindings/media/i2c/ovti,ov7251.yaml | 105 ++++++++++++++++++ > 2 files changed, 105 insertions(+), 52 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/media/i2c/ov7251.txt > create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov72= 51.yaml >=20 > diff --git a/Documentation/devicetree/bindings/media/i2c/ov7251.txt b/Doc= umentation/devicetree/bindings/media/i2c/ov7251.txt > deleted file mode 100644 > index 8281151f7493..000000000000 > --- a/Documentation/devicetree/bindings/media/i2c/ov7251.txt > +++ /dev/null > @@ -1,52 +0,0 @@ > -* Omnivision 1/7.5-Inch B&W VGA CMOS Digital Image Sensor > - > -The Omnivision OV7251 is a 1/7.5-Inch CMOS active pixel digital image se= nsor > -with an active array size of 640H x 480V. It is programmable through a s= erial > -I2C interface. > - > -Required Properties: > -- compatible: Value should be "ovti,ov7251". > -- clocks: Reference to the xclk clock. > -- clock-names: Should be "xclk". > -- clock-frequency: Frequency of the xclk clock. > -- enable-gpios: Chip enable GPIO. Polarity is GPIO_ACTIVE_HIGH. This cor= responds > - to the hardware pin XSHUTDOWN which is physically active low. > -- vdddo-supply: Chip digital IO regulator. > -- vdda-supply: Chip analog regulator. > -- vddd-supply: Chip digital core regulator. > - > -The device node shall contain one 'port' child node with a single 'endpo= int' > -subnode for its digital output video port, in accordance with the video > -interface bindings defined in > -Documentation/devicetree/bindings/media/video-interfaces.txt. > - > -Example: > - > - &i2c1 { > - ... > - > - ov7251: camera-sensor@60 { > - compatible =3D "ovti,ov7251"; > - reg =3D <0x60>; > - > - enable-gpios =3D <&gpio1 6 GPIO_ACTIVE_HIGH>; > - pinctrl-names =3D "default"; > - pinctrl-0 =3D <&camera_bw_default>; > - > - clocks =3D <&clks 200>; > - clock-names =3D "xclk"; > - clock-frequency =3D <24000000>; > - > - vdddo-supply =3D <&camera_dovdd_1v8>; > - vdda-supply =3D <&camera_avdd_2v8>; > - vddd-supply =3D <&camera_dvdd_1v2>; > - > - port { > - ov7251_ep: endpoint { > - clock-lanes =3D <1>; > - data-lanes =3D <0>; > - remote-endpoint =3D <&csi0_ep>; > - }; > - }; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov7251.yaml= b/Documentation/devicetree/bindings/media/i2c/ovti,ov7251.yaml > new file mode 100644 > index 000000000000..8d939858d950 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov7251.yaml > @@ -0,0 +1,105 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ovti,ov7251.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: OmniVision OV7251 Image Sensor > + > +description: > + The Omnivision OV7251 is a 1/7.5-Inch CMOS active pixel digital image = sensor > + with an active array size of 640H x 480V. It is programmable through a= serial > + I2C interface. > + > +maintainers: > + - Todor Tomov > + > +properties: > + compatible: > + const: ovti,ov7251 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: XCLK Input Clock > + > + clock-names: > + const: xclk > + > + clock-frequency: > + description: Frequency of the xclk clock in Hz. > + > + vdda-supply: > + description: Analog voltage supply, 2.8 volts > + > + vddd-supply: > + description: Digital core voltage supply, 1.2 volts > + > + vdddo-supply: > + description: Digital I/O voltage supply, 1.8 volts > + > + enable-gpios: > + maxItems: 1 > + description: > + Reference to the GPIO connected to the XSHUTDOWN pin, if any. Pola= rity > + is GPIO_ACTIVE_HIGH. > + > + port: > + description: Digital Output Port > + $ref: /schemas/graph.yaml#/$defs/port-base > + additionalProperties: false > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + clock-lanes: > + maximum: 1 > + > + data-lanes: > + maxItems: 1 > + > + required: > + - data-lanes > + > +required: > + - compatible > + - reg > + - clocks > + - vdddo-supply > + - vdda-supply > + - port > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + i2c { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + camera@3c { > + compatible =3D "ovti,ov7251"; > + reg =3D <0x3c>; > + clocks =3D <&clks 1>; > + clock-frequency =3D <24000000>; > + vdddo-supply =3D <&ov7251_vdddo_1v8>; > + vdda-supply =3D <&ov7251_vdda_2v8>; > + vddd-supply =3D <&ov7251_vddd_1v5>; > + enable-gpios =3D <&gpio1 19 GPIO_ACTIVE_HIGH>; > + > + port { > + ov7251_ep: endpoint { > + remote-endpoint =3D <&csi0_ep>; > + clock-lanes =3D <1>; > + data-lanes =3D <0>; > + }; > + }; > + }; > + }; > +... > --=20 > 2.40.1 >=20 --PyGC2IQryHzgfMSp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZKxGaAAKCRB4tDGHoIJi 0o+TAQDMgP01G5qDmyjHDrR0Md9+bWv1tOgbiBNn2qOuo17xVwEAhPC40p7RB0rF qg3uSSnzkBNHuXXYu9TlUA17W+ILDAM= =Zopw -----END PGP SIGNATURE----- --PyGC2IQryHzgfMSp--