Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5538862pxb; Wed, 26 Jan 2022 14:29:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmi4fDY5Vx/W7pTMVO4AmISCNb97WEPBivGMt4DC1tcWf3E2lGLnpWbJeSahKrAPdB95/H X-Received: by 2002:a17:906:4acf:: with SMTP id u15mr625861ejt.469.1643236196407; Wed, 26 Jan 2022 14:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643236196; cv=none; d=google.com; s=arc-20160816; b=nvqm9lkhwkrK2iyZmM/AZ3Ad4PLD5QtZfsi/y1BnQL6pFdpcC8igIm6fiqH2bty49p kYGAHwJmXNwWhwieXsmGkW0UyIxW5tP6fLmkpD6SzyQEpYaZLCSfBQ2RVcwZPUp/t/Z6 KoQKTctrxxKoTmZ/FsH0RZnu+aToagO+4snyy8M4DC+rdKzjV+39c0u0WYP85AnVKC5P JQgoJGZerDL7CdbqZdrj0+XXeRi048dm9vUvJbsGQuELP+xuiQeDnyff2P308xmgajH1 KG/d4UE/XDzrhblwdyg5PZVrp1jCUIqSPjYrG8MvLLN8NfOWhNFNYtct3tbjGJRiXj+A oVdA== 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=BC0gTRVkuWynlE4rMiX/SHowk83J15U9hwDMbqtyppk=; b=wxe5yGBfbsTRNPzyptrYfHc14deABi0Xq/EbyeNCV+n0BX8jMcynLUPOOC89ee5VVT k8If28OytwiAHNv9UfTXNMO3KXzV4C0+IQjBRzMKpZXIWvFiu7CiEsQzzWc9Sl0GOJga gcTPiETXLdF2NI/oJORx7m+583LfO1D0ESTaqi5zpTuOKUnWlu1L7SEM7BtrdviRWuAz LXMJBtVUcKRNnmr7sOScWHFqycu9FdkD2f281CsuBY2r++sL76F+eJGMWw/Ufk1+Ftln czQWaVVK2ALBl2r4Iz2AMXMFq1LAwPyJOf/pMSAfgzDI93fMqJdbKinD6Oa68+CchF92 Ip8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=lPr6nQhb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y26si300898edm.375.2022.01.26.14.29.31; Wed, 26 Jan 2022 14:29:56 -0800 (PST) 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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=lPr6nQhb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244268AbiAZSnG (ORCPT + 99 others); Wed, 26 Jan 2022 13:43:06 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:59600 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232675AbiAZSnF (ORCPT ); Wed, 26 Jan 2022 13:43:05 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 98174478; Wed, 26 Jan 2022 19:43:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1643222583; bh=OQdRRRosc11uNWOuLj5jqmGwXoA/tFPMxlELYBf15x8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lPr6nQhbEN9FuSAD0Bq21gKEl98hBluP29CjVbcvdVRKHFOkfj3sqD339dSvZi0Wz K95X6egke6JgCKxKpD5njaIi+vLbYftJ99b07XYd8oJ90yr85HoTcHlJHKJcGThvdd wuB4zJPLLzWemgGZRaubns85RRYuA08eOHvW9mYI= Date: Wed, 26 Jan 2022 20:42:44 +0200 From: Laurent Pinchart To: Dave Stevenson Cc: Jean-Michel Hautbois , devicetree@vger.kernel.org, kernel-list@raspberrypi.com, linux-arm-kernel@lists.infradead.org, LKML , Linux Media Mailing List , linux-rpi-kernel@lists.infradead.org, lukasz@jany.st, Mauro Carvalho Chehab , Naushir Patuck , robh@kernel.org, Tomi Valkeinen Subject: Re: [RFC PATCH v2 5/7] ARM: dts: bcm2711: Add unicam CSI nodes Message-ID: References: <20220121081810.155500-1-jeanmichel.hautbois@ideasonboard.com> <20220121081810.155500-6-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, On Mon, Jan 24, 2022 at 12:31:34PM +0000, Dave Stevenson wrote: > On Fri, 21 Jan 2022 at 22:45, Laurent Pinchart wrote: > > On Fri, Jan 21, 2022 at 09:18:08AM +0100, Jean-Michel Hautbois wrote: > > > Add both MIPI CSI-2 nodes in the core bcm2711 tree. Use the 3-cells > > > interrupt declaration, corresponding clocks and default as disabled. > > > > > > Signed-off-by: Jean-Michel Hautbois > > > --- > > > arch/arm/boot/dts/bcm2711.dtsi | 31 +++++++++++++++++++++++++++++++ > > > 1 file changed, 31 insertions(+) > > > > > > diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi > > > index dff18fc9a906..077141df7024 100644 > > > --- a/arch/arm/boot/dts/bcm2711.dtsi > > > +++ b/arch/arm/boot/dts/bcm2711.dtsi > > > @@ -3,6 +3,7 @@ > > > > > > #include > > > #include > > > +#include > > > > > > / { > > > compatible = "brcm,bcm2711"; > > > @@ -293,6 +294,36 @@ hvs: hvs@7e400000 { > > > interrupts = ; > > > }; > > > > > > + csi0: csi1@7e800000 { > > > > The node name should be csi@7e800000, not csi1@7e800000. Now, this will > > probably cause issues with the firmware that looks for csi1 (and csi0 ?) > > to hand over control of the Unicam CSI-2 receiver to the kernel. I > > wonder if this is something that could be handled by a firmware update, > > to also recognize nodes named "csi" ? > > It already looks for any node starting "csi". If you check the > downstream DT [1], then the nodes are "csi0: csi@7e800000" and "csi1: > csi@7e801000". Oops, indeed. I think I was misled by https://github.com/raspberrypi/linux/blob/rpi-5.10.y/Documentation/devicetree/bindings/media/bcm2835-unicam.txt that mentions "csi0" and "csi1". It's all good then. Jean-Michel, can you update the DT bindings in the next iteration of the series to correct the DT node naming ? > There is no actual action required to hand the peripheral over to the > kernel, it just prevents the firmware from using it and causing > problems (it masks out the interrupt, and that's checked as part of > the firmware initialising the peripheral). > > If using imx219 or one of the other sensors supported by the firmware, > "vcgencmd get_camera" should report that the sensor isn't detected, > and "sudo vcdbg log msg" should have a line similar to > "020174.613: camsubs: Ignoring camera 0 as unicam device not available" > > Dave > > [1] https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/bcm270x.dtsi#L88 > > > > + compatible = "brcm,bcm2835-unicam"; > > > + reg = <0x7e800000 0x800>, > > > + <0x7e802000 0x4>; > > > + interrupts = ; > > > + clocks = <&clocks BCM2835_CLOCK_CAM0>, > > > + <&firmware_clocks 4>; > > > + clock-names = "lp", "vpu"; > > > + power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>; > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + #clock-cells = <1>; > > > > Why do you need #address-cells, #size-cells and #clock-cells ? They're > > not mentioned in the binding. > > > > > + status="disabled"; > > > > Missing spaces around the =. > > > > Same comment for the next node. > > > > > + }; > > > + > > > + csi1: csi1@7e801000 { > > > + compatible = "brcm,bcm2835-unicam"; > > > + reg = <0x7e801000 0x800>, > > > + <0x7e802004 0x4>; > > > + interrupts = ; > > > + clocks = <&clocks BCM2835_CLOCK_CAM1>, > > > + <&firmware_clocks 4>; > > > + clock-names = "lp", "vpu"; > > > + power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>; > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + #clock-cells = <1>; > > > + status="disabled"; > > > + }; > > > + > > > pixelvalve3: pixelvalve@7ec12000 { > > > compatible = "brcm,bcm2711-pixelvalve3"; > > > reg = <0x7ec12000 0x100>; -- Regards, Laurent Pinchart