From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
devicetree@vger.kernel.org, kernel-list@raspberrypi.com,
linux-arm-kernel@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-rpi-kernel@lists.infradead.org, lukasz@jany.st,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Naushir Patuck <naush@raspberrypi.com>,
robh@kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [RFC PATCH v2 5/7] ARM: dts: bcm2711: Add unicam CSI nodes
Date: Wed, 26 Jan 2022 20:42:44 +0200 [thread overview]
Message-ID: <YfGWJCReevd752++@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAPY8ntDR5AsxGE5fh_KHMonoZait9evxQkpidu10F7EY9CPxZA@mail.gmail.com>
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 <jeanmichel.hautbois@ideasonboard.com>
> > > ---
> > > 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 <dt-bindings/interrupt-controller/arm-gic.h>
> > > #include <dt-bindings/soc/bcm2835-pm.h>
> > > +#include <dt-bindings/power/raspberrypi-power.h>
> > >
> > > / {
> > > compatible = "brcm,bcm2711";
> > > @@ -293,6 +294,36 @@ hvs: hvs@7e400000 {
> > > interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
> > > };
> > >
> > > + 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 = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
> > > + 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 = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> > > + 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
devicetree@vger.kernel.org, kernel-list@raspberrypi.com,
linux-arm-kernel@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-rpi-kernel@lists.infradead.org, lukasz@jany.st,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Naushir Patuck <naush@raspberrypi.com>,
robh@kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [RFC PATCH v2 5/7] ARM: dts: bcm2711: Add unicam CSI nodes
Date: Wed, 26 Jan 2022 20:42:44 +0200 [thread overview]
Message-ID: <YfGWJCReevd752++@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAPY8ntDR5AsxGE5fh_KHMonoZait9evxQkpidu10F7EY9CPxZA@mail.gmail.com>
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 <jeanmichel.hautbois@ideasonboard.com>
> > > ---
> > > 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 <dt-bindings/interrupt-controller/arm-gic.h>
> > > #include <dt-bindings/soc/bcm2835-pm.h>
> > > +#include <dt-bindings/power/raspberrypi-power.h>
> > >
> > > / {
> > > compatible = "brcm,bcm2711";
> > > @@ -293,6 +294,36 @@ hvs: hvs@7e400000 {
> > > interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
> > > };
> > >
> > > + 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 = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
> > > + 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 = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> > > + 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
next prev parent reply other threads:[~2022-01-26 18:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 8:18 [RFC PATCH v2 0/7] Add support for BCM2835 camera interface (unicam) Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 8:18 ` [RFC PATCH v2 1/7] media: v4l: Add V4L2-PIX-FMT-Y12P format Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 8:18 ` [RFC PATCH v2 2/7] media: v4l: Add V4L2-PIX-FMT-Y14P format Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 8:18 ` [RFC PATCH v2 3/7] media: dt-bindings: media: Add bindings for bcm2835-unicam Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 23:27 ` Laurent Pinchart
2022-01-21 23:27 ` Laurent Pinchart
2022-01-22 8:38 ` Jean-Michel Hautbois
2022-01-22 8:38 ` Jean-Michel Hautbois
2022-01-21 8:18 ` [RFC PATCH v2 4/7] media: bcm2835-unicam: Add support for for CCP2/CSI2 camera interface Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-22 23:26 ` Laurent Pinchart
2022-01-24 15:35 ` Dave Stevenson
2022-01-26 14:21 ` Jean-Michel Hautbois
2022-01-26 14:54 ` Jean-Michel Hautbois
2022-01-26 15:03 ` Maxime Ripard
2022-01-26 15:03 ` Maxime Ripard
2022-01-21 8:18 ` [RFC PATCH v2 5/7] ARM: dts: bcm2711: Add unicam CSI nodes Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 22:45 ` Laurent Pinchart
2022-01-21 22:45 ` Laurent Pinchart
2022-01-24 12:31 ` Dave Stevenson
2022-01-24 12:31 ` Dave Stevenson
2022-01-26 18:42 ` Laurent Pinchart [this message]
2022-01-26 18:42 ` Laurent Pinchart
2022-01-21 8:18 ` [RFC PATCH v2 6/7] media: imx219: Add support for multiplexed streams Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 23:34 ` Laurent Pinchart
2022-01-21 23:34 ` Laurent Pinchart
2022-01-21 8:18 ` [RFC PATCH v2 7/7] media: bcm283x: Include the imx219 node Jean-Michel Hautbois
2022-01-21 8:18 ` Jean-Michel Hautbois
2022-01-21 23:30 ` Laurent Pinchart
2022-01-21 23:30 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YfGWJCReevd752++@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=jeanmichel.hautbois@ideasonboard.com \
--cc=kernel-list@raspberrypi.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lukasz@jany.st \
--cc=mchehab@kernel.org \
--cc=naush@raspberrypi.com \
--cc=robh@kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.