* [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B
@ 2025-11-20 19:00 Michael Opdenacker
2025-11-21 21:45 ` Heiko Stuebner
2025-11-26 8:40 ` Jonas Karlman
0 siblings, 2 replies; 4+ messages in thread
From: Michael Opdenacker @ 2025-11-20 19:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Michael Opdenacker
Enable the "i2c2" bus on header pins 3 (I2C_SDA_M1)
and 5 (I2C2_SCL_M1) of the Orange Pi 3B board.
As documented on http://www.orangepi.org/img/pi3b/0719-pi3b-19.png,
such pins are the only ones offering I2C functionality
without conflicting with other SoC blocks.
Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
---
arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
index d539570f531e..e2f0ccc6dbe7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
@@ -435,6 +435,11 @@ regulator-state-mem {
};
};
+&i2c2 {
+ pinctrl-0 = <&i2c2m1_xfer>;
+ status = "okay";
+};
+
&i2s0_8ch {
status = "okay";
};
---
base-commit: 8e621c9a337555c914cf1664605edfaa6f839774
change-id: 20251120-orangepi3-enable-i2c2-fe6d25ec681a
Best regards,
--
Michael Opdenacker <michael.opdenacker@rootcommit.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B
2025-11-20 19:00 [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B Michael Opdenacker
@ 2025-11-21 21:45 ` Heiko Stuebner
2025-11-26 8:40 ` Jonas Karlman
1 sibling, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2025-11-21 21:45 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Michael Opdenacker
Cc: Heiko Stuebner, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
On Thu, 20 Nov 2025 19:00:34 +0000, Michael Opdenacker wrote:
> Enable the "i2c2" bus on header pins 3 (I2C_SDA_M1)
> and 5 (I2C2_SCL_M1) of the Orange Pi 3B board.
>
> As documented on http://www.orangepi.org/img/pi3b/0719-pi3b-19.png,
> such pins are the only ones offering I2C functionality
> without conflicting with other SoC blocks.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B
commit: b92c4eae75468d5b7ad49fc0d1de76a7f0fa0bdb
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B
2025-11-20 19:00 [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B Michael Opdenacker
2025-11-21 21:45 ` Heiko Stuebner
@ 2025-11-26 8:40 ` Jonas Karlman
2025-11-26 8:49 ` Michael Opdenacker
1 sibling, 1 reply; 4+ messages in thread
From: Jonas Karlman @ 2025-11-26 8:40 UTC (permalink / raw)
To: Michael Opdenacker, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Hi Michael,
On 11/20/2025 8:00 PM, Michael Opdenacker wrote:
> Enable the "i2c2" bus on header pins 3 (I2C_SDA_M1)
> and 5 (I2C2_SCL_M1) of the Orange Pi 3B board.
>
> As documented on http://www.orangepi.org/img/pi3b/0719-pi3b-19.png
> such pins are the only ones offering I2C functionality
> without conflicting with other SoC blocks.
This is strictly not true, these pins are by default used as GPIO, this
patch change them to use the I2C2 func, something that should normally
be enabled in an overlay.
Functions for these pins:
func 0 func 1
GPIO4_B4_d I2C2_SDA_M1
GPIO4_B5_d I2C2_SCL_M1
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
> index d539570f531e..e2f0ccc6dbe7 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
> @@ -435,6 +435,11 @@ regulator-state-mem {
> };
> };
>
> +&i2c2 {
> + pinctrl-0 = <&i2c2m1_xfer>;
pinctrl-names should also be added here.
> + status = "okay";
As mentioned above, this should be enabled in an DT overlay not in the
board DT.
Regards,
Jonas
> +};
> +
> &i2s0_8ch {
> status = "okay";
> };
>
> ---
> base-commit: 8e621c9a337555c914cf1664605edfaa6f839774
> change-id: 20251120-orangepi3-enable-i2c2-fe6d25ec681a
>
> Best regards,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B
2025-11-26 8:40 ` Jonas Karlman
@ 2025-11-26 8:49 ` Michael Opdenacker
0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2025-11-26 8:49 UTC (permalink / raw)
To: Jonas Karlman, Heiko Stuebner
Cc: michael.opdenacker, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Hi Jonas
Thanks for the review!
On 11/26/25 09:40, Jonas Karlman wrote:
> Hi Michael,
>
> On 11/20/2025 8:00 PM, Michael Opdenacker wrote:
>> Enable the "i2c2" bus on header pins 3 (I2C_SDA_M1)
>> and 5 (I2C2_SCL_M1) of the Orange Pi 3B board.
>>
>> As documented on http://www.orangepi.org/img/pi3b/0719-pi3b-19.png
>> such pins are the only ones offering I2C functionality
>> without conflicting with other SoC blocks.
> This is strictly not true, these pins are by default used as GPIO, this
> patch change them to use the I2C2 func, something that should normally
> be enabled in an overlay.
>
> Functions for these pins:
>
> func 0 func 1
>
> GPIO4_B4_d I2C2_SDA_M1
> GPIO4_B5_d I2C2_SCL_M1
Correct. My idea was that GPIOs are easy to get on other pins, and I
found that I2C2 on such pins would be a convenient default.
>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>> ---
>> arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
>> index d539570f531e..e2f0ccc6dbe7 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dtsi
>> @@ -435,6 +435,11 @@ regulator-state-mem {
>> };
>> };
>>
>> +&i2c2 {
>> + pinctrl-0 = <&i2c2m1_xfer>;
> pinctrl-names should also be added here.
Actually, the "pinctrl-names" property is already available in the
definition of i2c2. That's why I didn't add it again.
>
>> + status = "okay";
> As mentioned above, this should be enabled in an DT overlay not in the
> board DT.
I don't mind if my patch is removed, no hard feelings :)
BTW, is there a convenient location for sharing overlays like these?
Some overlays are sometimes tricky to develop, and sharing them with
others is useful for the community. I guess the question was asked
before, but I don't know its answer :)
Thanks again
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-26 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 19:00 [PATCH] arm64: dts: rockchip: Enable i2c2 on Orange Pi 3B Michael Opdenacker
2025-11-21 21:45 ` Heiko Stuebner
2025-11-26 8:40 ` Jonas Karlman
2025-11-26 8:49 ` Michael Opdenacker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).