Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Nicolas Saenz Julienne" <nsaenz@kernel.org>
Cc: 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 <mripard@kernel.org>
Subject: Re: [PATCH v2] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus
Date: Thu, 9 Dec 2021 22:21:39 +0100	[thread overview]
Message-ID: <22b563b0-8d9e-52a1-ebdc-e1f75a855d86@kleine-koenig.org> (raw)
In-Reply-To: <20211209181813.1312509-1-u.kleine-koenig@pengutronix.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 2381 bytes --]

Hello,

I used the wrong git wrapper so this patch appeared with the wrong 
sender address. If need be I can resend from the address used in the S-o-b.

On 12/9/21 19:18, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
> 
> 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 upstream dts does.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>   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 {

Just some further information:

Cyril (who I talked to on irc) and I found that not only i2c0 can be 
used to access the gpio bus on pins 44/45 (as I did in v1) but that also 
&i2c1 can drive these pins. However similar to &i2c0, &i2c1 is used on 
pins 2/3 per default and so is also available on the default gpio header.

Also note that this is a breaking change, because overlays that added 
devices to &i2c0 before (expecting them to be accessed via gpio0/1) need 
to modify /i2c0mux/i2c@0 now instead of /soc/i2c@7e205000 (aka &i2c0).

Best regards
Uwe

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

  reply	other threads:[~2021-12-09 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 18:18 [PATCH v2] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus Uwe Kleine-König
2021-12-09 21:21 ` Uwe Kleine-König [this message]
2021-12-13 16:49   ` Maxime Ripard
2021-12-13 20:25     ` Uwe Kleine-König
2021-12-15  9:56       ` Maxime Ripard
2021-12-16 21:29         ` Uwe Kleine-König
2021-12-13 16:46 ` Maxime Ripard

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=22b563b0-8d9e-52a1-ebdc-e1f75a855d86@kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=kibi@debian.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mripard@kernel.org \
    --cc=nsaenz@kernel.org \
    --cc=stefan.wahren@i2se.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox