All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Cc: michael.opdenacker@rootcommit.com
Subject: Re: [RFC PATCH] riscv: dts: spacemit: initial i2c support for OrangePi RV2
Date: Sat, 25 Oct 2025 07:48:45 +0000 (UTC)	[thread overview]
Message-ID: <52bf454f-424a-4824-a3fe-339d411bd664@rootcommit.com> (raw)
In-Reply-To: <20251025074514.642357-1-michael.opdenacker@rootcommit.com>

Greetings,

On 10/25/25 09:45, michael.opdenacker@rootcommit.com wrote:
> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>
> The OrangePi RV2 board exposes i2c2 and i2c8 buses from the Spacemit K1 SoC.
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
> ---
>   arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index 41dc8e35e6eb..c4b25dd30f54 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -17,6 +17,8 @@ aliases {
>   		serial0 = &uart0;
>   		ethernet0 = &eth0;
>   		ethernet1 = &eth1;
> +                i2c2 = &i2c2;
> +                i2c8 = &i2c8;
>   	};
>   
>   	chosen {
> @@ -81,6 +83,18 @@ rgmii1: phy@1 {
>   	};
>   };
>   
> +&i2c2 {
> +	pinctrl-0 = <&i2c2_0_cfg>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&i2c8 {
> +	pinctrl-0 = <&i2c8_cfg>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
>   &pdma {
>   	status = "okay";
>   };


Unfortunately, these changes are not functional yet on OrangePi RV2, 
testing on https://github.com/spacemit-com/linux/commits/k1/dt-for-next

# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n]
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:        [  124.675321] i2c-k1 d4012000.i2c: i2c transfer failed, ret 
-11 err 0x400000
                  -- 09 [  124.686769] i2c-k1 d4012000.i2c: i2c transfer 
failed, ret -11 err 0x400000
-- 0b [  124.695584] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 0d [  124.702945] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 0f
10: [  124.710346] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 err 
0x400000
-- 11 [  124.718221] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 13 [  124.725607] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 15 [  124.732994] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 17 [  124.739480] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 19 [  124.747480] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1b [  124.755108] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1d [  124.762500] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1f
...

I assume the i2c-k1 driver works on BananaPi F3. Any clues why the same 
buses don't work OrangePi RV2?
Thanks in advance
Cheers
Michael.

-- 
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/


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

WARNING: multiple messages have this Message-ID (diff)
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Cc: michael.opdenacker@rootcommit.com
Subject: Re: [RFC PATCH] riscv: dts: spacemit: initial i2c support for OrangePi RV2
Date: Sat, 25 Oct 2025 07:48:45 +0000 (UTC)	[thread overview]
Message-ID: <52bf454f-424a-4824-a3fe-339d411bd664@rootcommit.com> (raw)
In-Reply-To: <20251025074514.642357-1-michael.opdenacker@rootcommit.com>

Greetings,

On 10/25/25 09:45, michael.opdenacker@rootcommit.com wrote:
> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>
> The OrangePi RV2 board exposes i2c2 and i2c8 buses from the Spacemit K1 SoC.
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
> ---
>   arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index 41dc8e35e6eb..c4b25dd30f54 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -17,6 +17,8 @@ aliases {
>   		serial0 = &uart0;
>   		ethernet0 = &eth0;
>   		ethernet1 = &eth1;
> +                i2c2 = &i2c2;
> +                i2c8 = &i2c8;
>   	};
>   
>   	chosen {
> @@ -81,6 +83,18 @@ rgmii1: phy@1 {
>   	};
>   };
>   
> +&i2c2 {
> +	pinctrl-0 = <&i2c2_0_cfg>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&i2c8 {
> +	pinctrl-0 = <&i2c8_cfg>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
>   &pdma {
>   	status = "okay";
>   };


Unfortunately, these changes are not functional yet on OrangePi RV2, 
testing on https://github.com/spacemit-com/linux/commits/k1/dt-for-next

# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n]
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:        [  124.675321] i2c-k1 d4012000.i2c: i2c transfer failed, ret 
-11 err 0x400000
                  -- 09 [  124.686769] i2c-k1 d4012000.i2c: i2c transfer 
failed, ret -11 err 0x400000
-- 0b [  124.695584] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 0d [  124.702945] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 0f
10: [  124.710346] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 err 
0x400000
-- 11 [  124.718221] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 13 [  124.725607] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 15 [  124.732994] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 17 [  124.739480] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 19 [  124.747480] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1b [  124.755108] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1d [  124.762500] i2c-k1 d4012000.i2c: i2c transfer failed, ret -11 
err 0x400000
-- 1f
...

I assume the i2c-k1 driver works on BananaPi F3. Any clues why the same 
buses don't work OrangePi RV2?
Thanks in advance
Cheers
Michael.

-- 
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/


  reply	other threads:[~2025-10-25  7:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-25  7:45 [RFC PATCH] riscv: dts: spacemit: initial i2c support for OrangePi RV2 michael.opdenacker
2025-10-25  7:45 ` michael.opdenacker
2025-10-25  7:48 ` Michael Opdenacker [this message]
2025-10-25  7:48   ` Michael Opdenacker
2025-10-27  1:18   ` Troy Mitchell
2025-10-27  1:18     ` Troy Mitchell
2025-11-03  2:44     ` Troy Mitchell
2025-11-03  2:44       ` Troy Mitchell
2025-11-03 20:51       ` Michael Opdenacker
2025-11-03 20:51         ` Michael Opdenacker
2025-11-04  1:21         ` Troy Mitchell
2025-11-04  1:21           ` Troy Mitchell
2025-11-14 13:33     ` Troy Mitchell
2025-11-14 13:33       ` Troy Mitchell

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=52bf454f-424a-4824-a3fe-339d411bd664@rootcommit.com \
    --to=michael.opdenacker@rootcommit.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=spacemit@lists.linux.dev \
    /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 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.