From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "Jean-Michel Hautbois" <jeanmichel.hautbois@ideasonboard.com>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Nicolas Saenz Julienne" <nsaenz@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"Stefan Wahren" <stefan.wahren@i2se.com>,
"Cyril Brulebois" <kibi@debian.org>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maxime Ripard" <maxime@cerno.tech>
Subject: Re: [PATCH v3] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus
Date: Tue, 18 Jan 2022 22:47:53 +0200 [thread overview]
Message-ID: <YecnebByrBplFEsU@pendragon.ideasonboard.com> (raw)
In-Reply-To: <397bf7c2-da9f-a993-f8bb-5d6cbc6e87eb@gmail.com>
Hi Florian,
On Tue, Jan 18, 2022 at 12:00:50PM -0800, Florian Fainelli wrote:
> On 1/18/22 11:45 AM, Jean-Michel Hautbois wrote:
> > On 31/12/2021 12:51, Uwe Kleine-König wrote:
> >> The cm4-io board comes with an PCF85063. Add it to the device tree to
> >> make
> >> it usable. The i2c0 bus can use two different pinmux settings to use
> >> different pins. To keep the bus appearing on the usual pin pair (gpio0 +
> >> gpio1) use a pinctrl-muxed setting as the vendor dts does.
> >>
> >> Note that if you modified the dts before to add devices to the i2c bus
> >> appearing on pins gpio0 + gpio1 (either directly in the dts or using an
> >> overlay), you have to put these into the i2c@0 node introduced here now.
> >>
> >> Reviewed-by: Maxime Ripard <maxime@cerno.tech>
> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> >> ---
> >> Hello,
> >>
> >> changes since v2 (20211216212948.nrfmm4jpbhoknfr5@pengutronix.de):
> >>
> >> - add Maxime's R-b tag
> >> - change the commit log wording to say vendor dts instead of upstream
> >> dts
> >> - Add a paragraph to the commit log about breakage this commits
> >> introduces.
> >>
> >> Best regards
> >> Uwe
> >>
> >> arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 35 ++++++++++++++++++++++++
> >> 1 file changed, 35 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> index 19600b629be5..5ddad146b541 100644
> >> --- a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> @@ -18,6 +18,41 @@ led-pwr {
> >> linux,default-trigger = "default-on";
> >> };
> >> };
> >> +
> >> + i2c0mux {
> >> + compatible = "i2c-mux-pinctrl";
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> +
> >> + i2c-parent = <&i2c0>;
> >> +
> >> + pinctrl-names = "i2c0", "i2c0-vc";
> >> + pinctrl-0 = <&i2c0_gpio0>;
> >> + pinctrl-1 = <&i2c0_gpio44>;
> >> +
> >> + i2c@0 {
> >> + reg = <0>;
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> + };
> >> +
> >> + i2c@1 {
> >> + reg = <1>;
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> +
> >> + rtc@51 {
> >> + /* Attention: An alarm resets the machine */
> >> + compatible = "nxp,pcf85063";
> >> + reg = <0x51>;
> >> + };
> >> + };
> >> + };
> >> +};
> >
> > This is also needed for camera and display support.
> > I tested it successfully with imx219 + unicam on mainline.
>
> Thanks for testing, can you reply with a Tested-by tag so it could be
> applied to the commit message when this gets picked up?
Well, this also points out that there's an issue: if the mux is needed
for other devices, it shouldn't be in bcm2711-rpi-cm4-io.dts :-) We
could move it to bcm2711-rpi.dtsi (so far all bcm2711-based boards use
either I/O pins 0+1 or 44+45), or move it to per-board files. In the
latter case, instead of duplicating the same block everywhere, it could
be moved to a .dtsi included in those board files. This is what the
downstream kernel does.
--
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: Florian Fainelli <f.fainelli@gmail.com>
Cc: "Jean-Michel Hautbois" <jeanmichel.hautbois@ideasonboard.com>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Nicolas Saenz Julienne" <nsaenz@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"Stefan Wahren" <stefan.wahren@i2se.com>,
"Cyril Brulebois" <kibi@debian.org>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maxime Ripard" <maxime@cerno.tech>
Subject: Re: [PATCH v3] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus
Date: Tue, 18 Jan 2022 22:47:53 +0200 [thread overview]
Message-ID: <YecnebByrBplFEsU@pendragon.ideasonboard.com> (raw)
In-Reply-To: <397bf7c2-da9f-a993-f8bb-5d6cbc6e87eb@gmail.com>
Hi Florian,
On Tue, Jan 18, 2022 at 12:00:50PM -0800, Florian Fainelli wrote:
> On 1/18/22 11:45 AM, Jean-Michel Hautbois wrote:
> > On 31/12/2021 12:51, Uwe Kleine-König wrote:
> >> The cm4-io board comes with an PCF85063. Add it to the device tree to
> >> make
> >> it usable. The i2c0 bus can use two different pinmux settings to use
> >> different pins. To keep the bus appearing on the usual pin pair (gpio0 +
> >> gpio1) use a pinctrl-muxed setting as the vendor dts does.
> >>
> >> Note that if you modified the dts before to add devices to the i2c bus
> >> appearing on pins gpio0 + gpio1 (either directly in the dts or using an
> >> overlay), you have to put these into the i2c@0 node introduced here now.
> >>
> >> Reviewed-by: Maxime Ripard <maxime@cerno.tech>
> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> >> ---
> >> Hello,
> >>
> >> changes since v2 (20211216212948.nrfmm4jpbhoknfr5@pengutronix.de):
> >>
> >> - add Maxime's R-b tag
> >> - change the commit log wording to say vendor dts instead of upstream
> >> dts
> >> - Add a paragraph to the commit log about breakage this commits
> >> introduces.
> >>
> >> Best regards
> >> Uwe
> >>
> >> arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 35 ++++++++++++++++++++++++
> >> 1 file changed, 35 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> index 19600b629be5..5ddad146b541 100644
> >> --- a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> >> @@ -18,6 +18,41 @@ led-pwr {
> >> linux,default-trigger = "default-on";
> >> };
> >> };
> >> +
> >> + i2c0mux {
> >> + compatible = "i2c-mux-pinctrl";
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> +
> >> + i2c-parent = <&i2c0>;
> >> +
> >> + pinctrl-names = "i2c0", "i2c0-vc";
> >> + pinctrl-0 = <&i2c0_gpio0>;
> >> + pinctrl-1 = <&i2c0_gpio44>;
> >> +
> >> + i2c@0 {
> >> + reg = <0>;
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> + };
> >> +
> >> + i2c@1 {
> >> + reg = <1>;
> >> + #address-cells = <1>;
> >> + #size-cells = <0>;
> >> +
> >> + rtc@51 {
> >> + /* Attention: An alarm resets the machine */
> >> + compatible = "nxp,pcf85063";
> >> + reg = <0x51>;
> >> + };
> >> + };
> >> + };
> >> +};
> >
> > This is also needed for camera and display support.
> > I tested it successfully with imx219 + unicam on mainline.
>
> Thanks for testing, can you reply with a Tested-by tag so it could be
> applied to the commit message when this gets picked up?
Well, this also points out that there's an issue: if the mux is needed
for other devices, it shouldn't be in bcm2711-rpi-cm4-io.dts :-) We
could move it to bcm2711-rpi.dtsi (so far all bcm2711-based boards use
either I/O pins 0+1 or 44+45), or move it to per-board files. In the
latter case, instead of duplicating the same block everywhere, it could
be moved to a .dtsi included in those board files. This is what the
downstream kernel does.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2022-01-18 20:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-31 11:51 [PATCH v3] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus Uwe Kleine-König
2021-12-31 11:51 ` Uwe Kleine-König
2022-01-02 4:33 ` Cyril Brulebois
2022-01-02 4:33 ` Cyril Brulebois
2022-01-02 6:34 ` Cyril Brulebois
2022-01-02 6:34 ` Cyril Brulebois
2022-01-18 19:45 ` Jean-Michel Hautbois
2022-01-18 19:45 ` Jean-Michel Hautbois
2022-01-18 20:00 ` Florian Fainelli
2022-01-18 20:00 ` Florian Fainelli
2022-01-18 20:02 ` Jean-Michel Hautbois
2022-01-18 20:02 ` Jean-Michel Hautbois
2022-01-18 20:47 ` Laurent Pinchart [this message]
2022-01-18 20:47 ` Laurent Pinchart
2022-01-18 22:41 ` Uwe Kleine-König
2022-01-18 22:41 ` Uwe Kleine-König
2022-01-18 22:59 ` Laurent Pinchart
2022-01-18 22:59 ` Laurent Pinchart
2022-01-19 9:44 ` Dave Stevenson
2022-01-19 9:44 ` Dave Stevenson
2022-02-25 0:55 ` Florian Fainelli
2022-02-25 0:55 ` Florian Fainelli
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=YecnebByrBplFEsU@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=jeanmichel.hautbois@ideasonboard.com \
--cc=kibi@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=maxime@cerno.tech \
--cc=nsaenz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=stefan.wahren@i2se.com \
--cc=uwe@kleine-koenig.org \
/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.