Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp683950rwe; Fri, 26 Aug 2022 12:15:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR7TzgKFIiyXA2shRmLNetA0UjZnoy78JMGy9u24RPYVjJkobacIXryDGJiNx3wiK23kvAjg X-Received: by 2002:a05:6402:34ca:b0:446:d718:58be with SMTP id w10-20020a05640234ca00b00446d71858bemr7692661edc.40.1661541327394; Fri, 26 Aug 2022 12:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661541327; cv=none; d=google.com; s=arc-20160816; b=jfRChoyZivjYA5KLa/FJiTkc+TjRsTfRK8+y5+4+RV+E/xC6ZLmkemUNjKMxsQifzP FD3cMKmWnWogcwKAeUx9xb1HrTrrnF0zqb1Qgg8qEi4Gfii+OQPIXt0bVNgU3tS8sSHO QC+87ka2XT6PefoNjzbdpAhWQDfhkDzLEsFJ+4btzKm4qtPRF9Iso8b7WOOkm7+Ftcv6 OoQgMMkDK8KArhmPeOCZH63EZkJpXJzbd7t5sfzbBnSHA65313XrWGDxz9ibmkCf6/cw rd9hbL8uVT84YWcVQR67hGOUCWhdjGzY5oheXo1Mrz5iLLP3/NAtagTQ/ZRhrCn+S0Bz cHbQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7nVxJc+WY9cXOnzVhpsT+SVpWnEu5nv3XV2kwk+D3zI=; b=eCThzSYWAAUlVoufpYfJq/bvxaLQsQchmZV53mXKOncWs02+q9p9BHESfLjyJpWMxe R97GiLgrEzSQnv1QN4eO5ZC52k6/fTgYrCJbn8gMM9kkKc7WzkB/2Gv55W5UiY02d8JA H7bubgUb40pHpvFSoV5+d6Ikon1+jKCwN05qHDz32zLd7ZRqR9V/fY7gof4eY4NgOrxB rkjzURBKbCvKDg03+qbk9/Z/JMfLyuZzxv8JVt07bHbAvpxaI0lYZl1tictj/8SKARW6 gKDHzYGoPsCt8PtRy/C2FCtkuA+tasbs6wC4AadBwmbH0Zc93r5gp/IzTK5qJqTesGMy deoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=GkRyHFtw; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz44-20020a1709077dac00b0073117e47fe5si1773427ejc.997.2022.08.26.12.15.01; Fri, 26 Aug 2022 12:15:27 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=GkRyHFtw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344205AbiHZTIQ (ORCPT + 99 others); Fri, 26 Aug 2022 15:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231585AbiHZTIN (ORCPT ); Fri, 26 Aug 2022 15:08:13 -0400 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 EC823DC5D3; Fri, 26 Aug 2022 12:08:12 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 16817547; Fri, 26 Aug 2022 21:08:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661540891; bh=3x5c84ET66BZj+Rj//NkR71TpQss27e3h7UwwnNl6YA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GkRyHFtwQwQHvovGaGdQVI2oadFmuvach8EPNPJ20on2n6dEdOZNzZja/xZoOibm4 C6uC6mAOX/hxsOp8njVgUgO9Yq0L+5oSAYAVBFTz35thZRW9bfoVTZBF3gAv7IYxc7 IMpr7/u/ar6ar3IcH6YEgxP9ZUQ833aS3rCG2jd4= Date: Fri, 26 Aug 2022 22:08:04 +0300 From: Laurent Pinchart To: Paul Kocialkowski Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Rob Herring , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Michael Turquette , Stephen Boyd , Frank Rowand , Maxime Ripard , Thomas Petazzoni , =?utf-8?B?S8OpdmluIEwnaMO0cGl0YWw=?= Subject: Re: [PATCH NOT FOR MERGE v5 6/6] ARM: dts: sun8i: a83t: bananapi-m3: Enable MIPI CSI-2 with OV8865 Message-ID: References: <20220826182803.604563-1-paul.kocialkowski@bootlin.com> <20220826182803.604563-7-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220826182803.604563-7-paul.kocialkowski@bootlin.com> 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, 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 Hi Paul and Kévin, Thank you for the patch. On Fri, Aug 26, 2022 at 08:28:03PM +0200, Paul Kocialkowski wrote: > From: Kévin L'hôpital > > The Bananapi M3 supports a camera module which includes an OV8865 sensor > connected via the parallel CSI interface and an OV8865 sensor connected > via MIPI CSI-2. > > The I2C2 bus is shared by the two sensors as well as the (active-low) > reset signal, but each sensor has it own shutdown line. I see a single sensor in this file, am I missing something ? Sounds like a perfect candidate for an overlay, it could then be merged upstream. > Signed-off-by: Kévin L'hôpital > Signed-off-by: Paul Kocialkowski > --- > arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 102 +++++++++++++++++++ > 1 file changed, 102 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts > index 5a7e1bd5f825..80fd99cf24b2 100644 > --- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts > +++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts > @@ -85,6 +85,30 @@ led-1 { > }; > }; > > + reg_ov8865_avdd: ov8865-avdd { > + compatible = "regulator-fixed"; > + regulator-name = "ov8865-avdd"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + vin-supply = <®_dldo4>; > + }; > + > + reg_ov8865_dovdd: ov8865-dovdd { > + compatible = "regulator-fixed"; > + regulator-name = "ov8865-dovdd"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + vin-supply = <®_dldo4>; > + }; > + > + reg_ov8865_dvdd: ov8865-dvdd { > + compatible = "regulator-fixed"; > + regulator-name = "ov8865-dvdd"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + vin-supply = <®_eldo1>; > + }; Are those three regulators on the Banana Pi, or on the camera module ? > + > reg_usb1_vbus: reg-usb1-vbus { > compatible = "regulator-fixed"; > regulator-name = "usb1-vbus"; > @@ -115,6 +139,23 @@ &cpu100 { > cpu-supply = <®_dcdc3>; > }; > > +&csi { > + status = "okay"; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@1 { > + reg = <1>; All of this (except the status = "okay") should go to sun8i-a83t.dtsi. > + > + csi_in_mipi_csi2: endpoint { > + remote-endpoint = <&mipi_csi2_out_csi>; > + }; This too actually, once the issue mentioned in patch 5/6 gets fixed. > + }; > + }; > +}; > + > &de { > status = "okay"; > }; > @@ -147,6 +188,36 @@ hdmi_out_con: endpoint { > }; > }; > > +&i2c2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c2_pe_pins>; This looks like a candidate for upstreaming in sun8i-a83t-bananapi-m3.dts, it shouldn't be in the overlay. > + status = "okay"; > + > + ov8865: camera@36 { > + compatible = "ovti,ov8865"; > + reg = <0x36>; > + pinctrl-names = "default"; > + pinctrl-0 = <&csi_mclk_pin>; > + clocks = <&ccu CLK_CSI_MCLK>; > + assigned-clocks = <&ccu CLK_CSI_MCLK>; > + assigned-clock-rates = <24000000>; > + avdd-supply = <®_ov8865_avdd>; > + dovdd-supply = <®_ov8865_dovdd>; > + dvdd-supply = <®_ov8865_dvdd>; > + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_LOW>; /* PE17 */ > + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ > + > + port { > + ov8865_out_mipi_csi2: endpoint { > + data-lanes = <1 2 3 4>; > + link-frequencies = /bits/ 64 <360000000>; > + > + remote-endpoint = <&mipi_csi2_in_ov8865>; > + }; > + }; > + }; > +}; > + > &mdio { > rgmii_phy: ethernet-phy@1 { > compatible = "ethernet-phy-ieee802.3-c22"; > @@ -154,6 +225,24 @@ rgmii_phy: ethernet-phy@1 { > }; > }; > > +&mipi_csi2 { > + status = "okay"; > +}; > + > +&mipi_csi2_in { > + mipi_csi2_in_ov8865: endpoint { > + data-lanes = <1 2 3 4>; > + > + remote-endpoint = <&ov8865_out_mipi_csi2>; > + }; > +}; > + > +&mipi_csi2_out { > + mipi_csi2_out_csi: endpoint { > + remote-endpoint = <&csi_in_mipi_csi2>; > + }; > +}; > + > &mmc0 { > pinctrl-names = "default"; > pinctrl-0 = <&mmc0_pins>; > @@ -327,11 +416,24 @@ ®_dldo3 { > regulator-name = "vcc-pd"; > }; > > +®_dldo4 { > + regulator-always-on; Does it have to be always on ? > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + regulator-name = "avdd-csi"; Doesn't this belong to the base board .dts ? Same below. > +}; > + > ®_drivevbus { > regulator-name = "usb0-vbus"; > status = "okay"; > }; > > +®_eldo1 { > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + regulator-name = "dvdd-csi-r"; > +}; > + > ®_fldo1 { > regulator-min-microvolt = <1080000>; > regulator-max-microvolt = <1320000>; -- Regards, Laurent Pinchart