[PATCH] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on i2c0
Cyril Brulebois
cyril at debamax.com
Mon Nov 22 08:08:47 PST 2021
Uwe Kleine-König <uwe at kleine-koenig.org> (2021-11-22):
> The cm4-io board comes with an PCF85063. Add it to the device tree to make
> it usable.
>
> Signed-off-by: Uwe Kleine-König <uwe at kleine-koenig.org>
> ---
> arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 11 +++++++++++
> 1 file changed, 11 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..1b67ad65e228 100644
> --- a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
> @@ -20,6 +20,17 @@ led-pwr {
> };
> };
>
> +&i2c0 {
> + pinctrl-0 = <&i2c0_gpio44>;
> + status = "okay";
> +
> + rtc at 51 {
> + /* Attention: An alarm resets the machine */
> + compatible = "nxp,pcf85063";
> + reg = <0x51>;
> + };
> +};
> +
> &ddc0 {
> status = "okay";
> };
>
> base-commit: 8ab774587903771821b59471cc723bba6d893942
I had come up with the pinctrl-0 setting on my own, making sure i2c0 was
visible in userland (via i2c-2; i2c-0 and i2c-1 being the internal ones,
for HDMI outputs), and I toyed with rtc at 51 via an overlay to enable the
RTC automatically (instead of toying with new_device under /sys/class).
My next step was checking whether having both i2c0 wired properly and
the RTC enabled made sense for mainline, and apparently Uwe agrees. :)
This patch looks good to me, and seems to work fine:
Tested-by: Cyril Brulebois <cyril at debamax.com>
Checking arch/arm64/boot/dts/broadcom/.bcm2711-rpi-cm4-io.dtb.dts.tmp,
it looks like i2c0 was already getting enabled anyway, but wired to
i2c0_gpio0 instead:
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_gpio0>;
status = "okay";
clock-frequency = <100000>;
};
Cheers,
--
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211122/77b3fe79/attachment.sig>
More information about the linux-arm-kernel
mailing list