diff mbox series

[v6,13/15] ARM: dts: bcm2711-rpi-cm4-io: Add RTC on I2C0

Message ID 20240301213231.10340-14-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: Add driver for the Raspberry Pi <5 CSI-2 receiver | expand

Commit Message

Laurent Pinchart March 1, 2024, 9:32 p.m. UTC
From: Uwe Kleine-König <uwe@kleine-koenig.org>

The cm4-io board comes with a PCF85063 on I2C0, connected to the GPIO44
and GPIO45 pins. Add it to the device tree.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v4:

- Use the right part number in the compatible string
- Add the quartz-load-femtofarads property

Changes since v3:

- Separate addition of the RTC to a patch of its own
---
 .../boot/dts/broadcom/bcm2711-rpi-cm4-io.dts    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Dave Stevenson March 18, 2024, 2:56 p.m. UTC | #1
On Fri, 1 Mar 2024 at 21:32, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The cm4-io board comes with a PCF85063 on I2C0, connected to the GPIO44
> and GPIO45 pins. Add it to the device tree.
>
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes since v4:
>
> - Use the right part number in the compatible string
> - Add the quartz-load-femtofarads property
>
> Changes since v3:
>
> - Separate addition of the RTC to a patch of its own
> ---
>  .../boot/dts/broadcom/bcm2711-rpi-cm4-io.dts    | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> index d7ba02f586d3..d5ebb535afd2 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> @@ -101,6 +101,23 @@ &genet {
>         status = "okay";
>  };
>
> +&i2c0 {
> +       status = "okay";
> +};

This is already the default from bcm2835-rpi.dtsi

> +
> +&i2c0_1 {
> +       rtc@51 {
> +               /* Attention: An alarm resets the machine */
> +               compatible = "nxp,pcf85063a";
> +               reg = <0x51>;
> +               quartz-load-femtofarads = <7000>;
> +       };
> +};
> +
> +&i2c0mux {
> +       status = "okay";

Default status queried on patch 12/15.

With those clarified:

Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> +};
> +
>  &led_act {
>         gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
>  };
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart March 18, 2024, 7:24 p.m. UTC | #2
Hi Dave,

On Mon, Mar 18, 2024 at 02:56:53PM +0000, Dave Stevenson wrote:
> On Fri, 1 Mar 2024 at 21:32, Laurent Pinchart wrote:
> >
> > From: Uwe Kleine-König <uwe@kleine-koenig.org>
> >
> > The cm4-io board comes with a PCF85063 on I2C0, connected to the GPIO44
> > and GPIO45 pins. Add it to the device tree.
> >
> > Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes since v4:
> >
> > - Use the right part number in the compatible string
> > - Add the quartz-load-femtofarads property
> >
> > Changes since v3:
> >
> > - Separate addition of the RTC to a patch of its own
> > ---
> >  .../boot/dts/broadcom/bcm2711-rpi-cm4-io.dts    | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> > index d7ba02f586d3..d5ebb535afd2 100644
> > --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> > +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> > @@ -101,6 +101,23 @@ &genet {
> >         status = "okay";
> >  };
> >
> > +&i2c0 {
> > +       status = "okay";
> > +};
> 
> This is already the default from bcm2835-rpi.dtsi

Indeed. I probably got lost in the maze of .dtsi files :-) I'll drop
this.

> > +
> > +&i2c0_1 {
> > +       rtc@51 {
> > +               /* Attention: An alarm resets the machine */
> > +               compatible = "nxp,pcf85063a";
> > +               reg = <0x51>;
> > +               quartz-load-femtofarads = <7000>;
> > +       };
> > +};
> > +
> > +&i2c0mux {
> > +       status = "okay";
> 
> Default status queried on patch 12/15.
> 
> With those clarified:
> 
> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> 
> > +};
> > +
> >  &led_act {
> >         gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
> >  };
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
index d7ba02f586d3..d5ebb535afd2 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
+++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
@@ -101,6 +101,23 @@  &genet {
 	status = "okay";
 };
 
+&i2c0 {
+	status = "okay";
+};
+
+&i2c0_1 {
+	rtc@51 {
+		/* Attention: An alarm resets the machine */
+		compatible = "nxp,pcf85063a";
+		reg = <0x51>;
+		quartz-load-femtofarads = <7000>;
+	};
+};
+
+&i2c0mux {
+	status = "okay";
+};
+
 &led_act {
 	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
 };