All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus
@ 2021-12-31 11:51 ` Uwe Kleine-König
  0 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2021-12-31 11:51 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Rob Herring, devicetree, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-arm-kernel, Stefan Wahren,
	Cyril Brulebois, Dave Stevenson, Maxime Ripard

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>;
+			};
+		};
+	};
+};
+
+&i2c0 {
+	/delete-property/ pinctrl-names;
+	/delete-property/ pinctrl-0;
 };
 
 &ddc0 {

base-commit: fc74e0a40e4f9fd0468e34045b0c45bba11dcbb2
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-02-25  0:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.