Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2010513rwn; Fri, 9 Sep 2022 07:21:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ecNrIpDLSxFioY4fRBpE+vrlndyvl6DMH2wQBRaOHKHgUnqrCRVtjHO1OoQ/YNY3b+zNs X-Received: by 2002:a17:907:7e93:b0:774:e7fb:b59d with SMTP id qb19-20020a1709077e9300b00774e7fbb59dmr6003784ejc.177.1662733284424; Fri, 09 Sep 2022 07:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662733284; cv=none; d=google.com; s=arc-20160816; b=qBrbZnXIDYDeEwHuUsraYOzMgmEoyuFOkw47gYva79DsnbYGXaRtAV51l7HBxtswu7 5T7rRWR6IhAJwaad4krrFSgqf6F6xuegcif/JY9qSNSTldHExkJBSvam51+BAApTUaDm x0X6WLmPJwjSfUpC6PuLuekJDvGfSkprZLOW6HbbanL4bUTdQYOG6AKThaHQmLvfvXYG 6WOKnIRZrgcYkqESIHR1A1HsgOvmbt5HbNvOfNm5T3W7O3nBaIvxuwTjPyeUNIxc77t8 CSFrPXkw4NjBKUPt02t8R5mluCZk4F/OmTw9hTAAOAdm7XO15yNG6D4d+XPAitlzjSE5 W9EQ== 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=gyLP9CmLkcl1bGVvXClRy+vUMLTzbqd++Vuh487Ocsk=; b=i9W+fStBwjhEZ9ZvEBfxFbRmUrgkWsOkJTft7nPDzqDFcqhbMWZWG/7XzgFkd5jTzQ kxa+h567v/5JAz+gj9jnZrhyaIyz9Zpj0prcPvZC5HPDBT6ZcElVxGWrlUU/gux4fb/a EQVaVBh26oemjS/wv2MMkw5a/OBU6Z5bd6JP/HqMGDmWGp7YeJWv/Jpkvub88K2MMVmO hgcfxmipQn3CVT9mSE/iwSZDlnbahMkNxKPOBOIue5116AsMHLQmXTWrMPmqMlH067PV c/PBP2CXTDL1MWXhPlvcgHOGEVLsN97bWzsZ+TyeAyxO0SVpCI1qdmWuizeTXQ9JDB+H FLJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oMQznvKI; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa8-20020a170906fd8800b007394b02127bsi547855ejb.1002.2022.09.09.07.20.58; Fri, 09 Sep 2022 07:21:24 -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=@bootlin.com header.s=gm1 header.b=oMQznvKI; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231804AbiIINqz (ORCPT + 99 others); Fri, 9 Sep 2022 09:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbiIINqp (ORCPT ); Fri, 9 Sep 2022 09:46:45 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7400813A07C; Fri, 9 Sep 2022 06:46:28 -0700 (PDT) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 34A74100018; Fri, 9 Sep 2022 13:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1662731127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gyLP9CmLkcl1bGVvXClRy+vUMLTzbqd++Vuh487Ocsk=; b=oMQznvKITh0Ti9IbYYaYWltTgRzj0erZ3nEh9JkMg6qA15h7sYxX2EF65aX3mmzXRk293A +HG/yTf4Ni6GyAQhiTSga94vVXPypRU6YO2dhOEmwKHjvW4e2RgJ3KykvbG5+Bq6X6jEyI ETn2U854M/fwiHLSqxO073gW3IDHfUl91R5HlwCyyDUkoWQXj3QTvpo/f4V2OkdEO1k/10 bne2wy20JT4FwGDoRvu6Hgc908GM9EdRIGphOPZSOQg72KwYQSDcZjHKR+y2bA3lG1EXtq 0qI8UeLQNX17RDT/fOShMmUi6fowMDBGKoJpGYSEechAQ5GW/WD2J94Mm+AYNg== Date: Fri, 9 Sep 2022 15:45:19 +0200 From: Paul Kocialkowski To: Laurent Pinchart 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 Subject: Re: [PATCH v5 5/6] ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node Message-ID: References: <20220826182803.604563-1-paul.kocialkowski@bootlin.com> <20220826182803.604563-6-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0g1R3vKr/uSZfMdm" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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 --0g1R3vKr/uSZfMdm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Laurent, On Thu 01 Sep 22, 17:21, Laurent Pinchart wrote: > On Thu, Sep 01, 2022 at 04:04:40PM +0200, Paul Kocialkowski wrote: > > Hi Laurent, > >=20 > > On Fri 26 Aug 22, 21:59, Laurent Pinchart wrote: > > > Hi Paul, > > >=20 > > > Thank you for the patch. > > >=20 > > > On Fri, Aug 26, 2022 at 08:28:02PM +0200, Paul Kocialkowski wrote: > > > > MIPI CSI-2 is supported on the A83T with a dedicated controller that > > > > covers both the protocol and D-PHY. It can be connected to the CSI > > > > interface as a V4L2 subdev through the fwnode graph. > > > >=20 > > > > This is not done by default since connecting the bridge without a > > > > subdev attached to it will cause a failure on the CSI driver. > > >=20 > > > No urgency, but would it be possible to fix this so that the CSI-2 > > > receiver can be connected to the CSI unconditionally in DT ? The > > > connection exists at the hardware level in the SoC, and should thus > > > exist here too, regardless of whether or not a sensor is connected. > >=20 > > Yes it's true that having the link always would be legitimate. > >=20 > > For the context, this CSI controller can be switched between the MIPI C= SI-2 > > controller and a parallel sensor input (i.e. it's not dedicated to one = or the > > other like on the V3). > >=20 > > Last time I tried, having the connection between the two always there r= esulted > > in the unability to use a parallel sensor when no sensor is attached to= the > > mipi csi-2 receiver. Probably because the async notifier never complete= s since > > the mipi csi-2's subdev is never registered without a sensor subdev att= ached. > >=20 > > Do you see a way to handle this case properly? >=20 > It sounds like an issue in the CSI-2 receiver driver. If there's no > input device attached to it, it should register its subdev directly, > without its own async notifier. Yes it turns out there was an error on that side, thanks for bringing it up! I have sent a fixup series which takes care of it. Now it becomes possible to always describe the links without downsides. Well, the CSI driver will still wait for the MIPI CSI-2 bridge's subdev when its node is enabled in device-tree, but I think that is expected. Cheers, Paul > > > > Signed-off-by: Paul Kocialkowski > > > > --- > > > > arch/arm/boot/dts/sun8i-a83t.dtsi | 26 ++++++++++++++++++++++++++ > > > > 1 file changed, 26 insertions(+) > > > >=20 > > > > diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/= sun8i-a83t.dtsi > > > > index 82fdb04122ca..ecf9f3b2c0c0 100644 > > > > --- a/arch/arm/boot/dts/sun8i-a83t.dtsi > > > > +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi > > > > @@ -1064,6 +1064,32 @@ csi: camera@1cb0000 { > > > > status =3D "disabled"; > > > > }; > > > > =20 > > > > + mipi_csi2: csi@1cb1000 { > > > > + compatible =3D "allwinner,sun8i-a83t-mipi-csi2"; > > > > + reg =3D <0x01cb1000 0x1000>; > > > > + interrupts =3D ; > > > > + clocks =3D <&ccu CLK_BUS_CSI>, > > > > + <&ccu CLK_CSI_SCLK>, > > > > + <&ccu CLK_MIPI_CSI>, > > > > + <&ccu CLK_CSI_MISC>; > > > > + clock-names =3D "bus", "mod", "mipi", "misc"; > > > > + resets =3D <&ccu RST_BUS_CSI>; > > > > + status =3D "disabled"; > > > > + > > > > + ports { > > > > + #address-cells =3D <1>; > > > > + #size-cells =3D <0>; > > > > + > > > > + mipi_csi2_in: port@0 { > > > > + reg =3D <0>; > > > > + }; > > > > + > > > > + mipi_csi2_out: port@1 { > > > > + reg =3D <1>; > > > > + }; > > > > + }; > > > > + }; > > > > + > > > > hdmi: hdmi@1ee0000 { > > > > compatible =3D "allwinner,sun8i-a83t-dw-hdmi"; > > > > reg =3D <0x01ee0000 0x10000>; >=20 > --=20 > Regards, >=20 > Laurent Pinchart --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --0g1R3vKr/uSZfMdm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmMbQ28ACgkQ3cLmz3+f v9HuxQf/URHJvX9hyDkHJd/fZD6Tl0GkdanL5dUdysUgnQe+i1ceqqoOGzF+ZJpW mv+Rbum00q/RE6nm+lGpFT2ig1SYGuOCxnZrbsXZiSvSzZ8+YY/cB6sRm+ywP7Go QbVk+I+bEky7qtcKIWa3guNbtFBLm3rixBZ6CmjKnxdTXh6vN9lJlTMbbui0pffQ k1QuoQ1Ea9AK7Rxyc4tWIIGK9Ljn96j7cHKqW1/Bi5FQyqDtFWgvwQGA4eiOxWOj RrkwZH7D28Z1mHgUO6Mc8O+z/t2AzE3VvD7hcxt1RtNh1Un6t3YS4I9d6LSNCDyH ylFJhr0z42NWy3mkaxagW6QSEaVn1A== =jCke -----END PGP SIGNATURE----- --0g1R3vKr/uSZfMdm--