* [PATCH 0/2] riscv: spacemit: k3: Add I2C support
@ 2026-03-25 9:49 Yixun Lan
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
2026-03-25 9:49 ` [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes Yixun Lan
0 siblings, 2 replies; 15+ messages in thread
From: Yixun Lan @ 2026-03-25 9:49 UTC (permalink / raw)
To: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel,
Yixun Lan
This series try to introduce a compatible string for the I2C
controller found in K3 SoC, and add all devicetree nodes .
Signed-off-by: Yixun Lan <dlan@kernel.org>
---
Yixun Lan (2):
dt-bindings: i2c: spacemit: k3: Add compatible
dts: riscv: spacemit: k3: Add i2c nodes
.../devicetree/bindings/i2c/spacemit,k1-i2c.yaml | 6 +-
arch/riscv/boot/dts/spacemit/k3.dtsi | 98 ++++++++++++++++++++++
2 files changed, 103 insertions(+), 1 deletion(-)
---
base-commit: c68360c0d636dae71f766b7b296ddfcf2827ccc7
change-id: 20260311-02-k3-i2c-6ad52566a9a3
Best regards,
--
Yixun Lan <dlan@kernel.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 9:49 [PATCH 0/2] riscv: spacemit: k3: Add I2C support Yixun Lan
@ 2026-03-25 9:49 ` Yixun Lan
2026-03-25 10:42 ` Troy Mitchell
` (3 more replies)
2026-03-25 9:49 ` [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes Yixun Lan
1 sibling, 4 replies; 15+ messages in thread
From: Yixun Lan @ 2026-03-25 9:49 UTC (permalink / raw)
To: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel,
Yixun Lan
Add a compatible string for the I2C controller found in SpacemiT K3 SoC
which use same I2C IP as K1, so make it fallback to K1 compatible.
Signed-off-by: Yixun Lan <dlan@kernel.org>
---
Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
index 5896fb120501..8c04c675b25e 100644
--- a/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
@@ -14,7 +14,11 @@ allOf:
properties:
compatible:
- const: spacemit,k1-i2c
+ oneOf:
+ - items:
+ - const: spacemit,k3-i2c
+ - const: spacemit,k1-i2c
+ - const: spacemit,k1-i2c
reg:
maxItems: 1
--
2.53.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-25 9:49 [PATCH 0/2] riscv: spacemit: k3: Add I2C support Yixun Lan
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
@ 2026-03-25 9:49 ` Yixun Lan
2026-03-25 10:41 ` Troy Mitchell
2026-03-26 22:22 ` Andi Shyti
1 sibling, 2 replies; 15+ messages in thread
From: Yixun Lan @ 2026-03-25 9:49 UTC (permalink / raw)
To: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel,
Yixun Lan
Populate all I2C devicetree nodes for SpacemiT K3 SoC.
Signed-off-by: Yixun Lan <dlan@kernel.org>
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 98 ++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index a3a8ceddabec..cab72591b7f1 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -438,6 +438,76 @@ soc: soc {
dma-noncoherent;
ranges;
+ i2c0: i2c@d4010800 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4010800 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI0>,
+ <&syscon_apbc CLK_APBC_TWSI0_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@d4011000 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4011000 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI1>,
+ <&syscon_apbc CLK_APBC_TWSI1_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI1>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@d4012000 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4012000 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI2>,
+ <&syscon_apbc CLK_APBC_TWSI2_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI2>;
+ status = "disabled";
+ };
+
+ i2c4: i2c@d4012800 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4012800 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI4>,
+ <&syscon_apbc CLK_APBC_TWSI4_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI4>;
+ status = "disabled";
+ };
+
+ i2c5: i2c@d4013800 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4013800 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <41 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI5>,
+ <&syscon_apbc CLK_APBC_TWSI5_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI5>;
+ status = "disabled";
+ };
+
syscon_apbc: system-controller@d4015000 {
compatible = "spacemit,k3-syscon-apbc";
reg = <0x0 0xd4015000 0x0 0x1000>;
@@ -564,6 +634,20 @@ uart9: serial@d4017800 {
status = "disabled";
};
+ i2c6: i2c@d4018800 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd4018800 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <70 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI6>,
+ <&syscon_apbc CLK_APBC_TWSI6_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI6>;
+ status = "disabled";
+ };
+
gpio: gpio@d4019000 {
compatible = "spacemit,k3-gpio";
reg = <0x0 0xd4019000 0x0 0x100>;
@@ -582,6 +666,20 @@ gpio: gpio@d4019000 {
<&pinctrl 3 0 96 32>;
};
+ i2c8: i2c@d401d800 {
+ compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
+ reg = <0x0 0xd401d800 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TWSI8>,
+ <&syscon_apbc CLK_APBC_TWSI8_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ resets = <&syscon_apbc RESET_APBC_TWSI8>;
+ status = "disabled";
+ };
+
pinctrl: pinctrl@d401e000 {
compatible = "spacemit,k3-pinctrl";
reg = <0x0 0xd401e000 0x0 0x1000>;
--
2.53.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-25 9:49 ` [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes Yixun Lan
@ 2026-03-25 10:41 ` Troy Mitchell
2026-03-26 22:23 ` Andi Shyti
2026-03-26 22:22 ` Andi Shyti
1 sibling, 1 reply; 15+ messages in thread
From: Troy Mitchell @ 2026-03-25 10:41 UTC (permalink / raw)
To: Yixun Lan, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
On Wed Mar 25, 2026 at 5:49 PM CST, Yixun Lan wrote:
> Populate all I2C devicetree nodes for SpacemiT K3 SoC.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
> ---
> arch/riscv/boot/dts/spacemit/k3.dtsi | 98 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 98 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> index a3a8ceddabec..cab72591b7f1 100644
> --- a/arch/riscv/boot/dts/spacemit/k3.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
> @@ -438,6 +438,76 @@ soc: soc {
> dma-noncoherent;
> ranges;
>
> + i2c0: i2c@d4010800 {
> + compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
> + reg = <0x0 0xd4010800 0x0 0x38>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&syscon_apbc CLK_APBC_TWSI0>,
> + <&syscon_apbc CLK_APBC_TWSI0_BUS>;
> + clock-names = "func", "bus";
> + clock-frequency = <400000>;
> + resets = <&syscon_apbc RESET_APBC_TWSI0>;
> + status = "disabled";
> + };
> +
> + i2c1: i2c@d4011000 {
> + compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
> + reg = <0x0 0xd4011000 0x0 0x38>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&syscon_apbc CLK_APBC_TWSI1>,
> + <&syscon_apbc CLK_APBC_TWSI1_BUS>;
> + clock-names = "func", "bus";
> + clock-frequency = <400000>;
> + resets = <&syscon_apbc RESET_APBC_TWSI1>;
> + status = "disabled";
> + };
> +
> + i2c2: i2c@d4012000 {
> + compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
> + reg = <0x0 0xd4012000 0x0 0x38>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&syscon_apbc CLK_APBC_TWSI2>,
> + <&syscon_apbc CLK_APBC_TWSI2_BUS>;
> + clock-names = "func", "bus";
> + clock-frequency = <400000>;
> + resets = <&syscon_apbc RESET_APBC_TWSI2>;
> + status = "disabled";
> + };
I think we should add a comment here to explain why there isn't i2c3.
Otherwise, LGTM.
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
@ 2026-03-25 10:42 ` Troy Mitchell
2026-03-25 13:20 ` Javier Martinez Canillas
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Troy Mitchell @ 2026-03-25 10:42 UTC (permalink / raw)
To: Yixun Lan, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
On Wed Mar 25, 2026 at 5:49 PM CST, Yixun Lan wrote:
> Add a compatible string for the I2C controller found in SpacemiT K3 SoC
> which use same I2C IP as K1, so make it fallback to K1 compatible.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
> ---
> Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
> index 5896fb120501..8c04c675b25e 100644
> --- a/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml
> @@ -14,7 +14,11 @@ allOf:
>
> properties:
> compatible:
> - const: spacemit,k1-i2c
> + oneOf:
> + - items:
> + - const: spacemit,k3-i2c
> + - const: spacemit,k1-i2c
> + - const: spacemit,k1-i2c
>
> reg:
> maxItems: 1
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
2026-03-25 10:42 ` Troy Mitchell
@ 2026-03-25 13:20 ` Javier Martinez Canillas
2026-03-25 18:16 ` Conor Dooley
2026-03-25 18:16 ` Conor Dooley
2026-03-26 22:28 ` Andi Shyti
3 siblings, 1 reply; 15+ messages in thread
From: Javier Martinez Canillas @ 2026-03-25 13:20 UTC (permalink / raw)
To: Yixun Lan, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Troy Mitchell
Cc: linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel,
Yixun Lan
Yixun Lan <dlan@kernel.org> writes:
> Add a compatible string for the I2C controller found in SpacemiT K3 SoC
> which use same I2C IP as K1, so make it fallback to K1 compatible.
>
If is the same IP as K1, shouldn't the "spacemit,k1-i2c" compatible be
used in the k3.dtsi instead? My understanding is that this is the meaning
of compatible, and there's no need to add another compatible string for k3.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 13:20 ` Javier Martinez Canillas
@ 2026-03-25 18:16 ` Conor Dooley
2026-03-26 7:47 ` Javier Martinez Canillas
0 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2026-03-25 18:16 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Yixun Lan, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Troy Mitchell, linux-i2c, devicetree,
linux-riscv, spacemit, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Wed, Mar 25, 2026 at 02:20:13PM +0100, Javier Martinez Canillas wrote:
> Yixun Lan <dlan@kernel.org> writes:
>
> > Add a compatible string for the I2C controller found in SpacemiT K3 SoC
> > which use same I2C IP as K1, so make it fallback to K1 compatible.
> >
>
> If is the same IP as K1, shouldn't the "spacemit,k1-i2c" compatible be
> used in the k3.dtsi instead? My understanding is that this is the meaning
> of compatible, and there's no need to add another compatible string for k3.
Your understanding is incorrect! What Yixun has done here is what we
want people to do, because even if the IP is the same there can be
differences due to integration that are problematic. Having a device
specific compatible allows us to handle these kinds of problems if they
crop up in the future.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
2026-03-25 10:42 ` Troy Mitchell
2026-03-25 13:20 ` Javier Martinez Canillas
@ 2026-03-25 18:16 ` Conor Dooley
2026-03-26 22:28 ` Andi Shyti
3 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2026-03-25 18:16 UTC (permalink / raw)
To: Yixun Lan
Cc: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Troy Mitchell, linux-i2c, devicetree, linux-riscv, spacemit,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
On Wed, Mar 25, 2026 at 09:49:24AM +0000, Yixun Lan wrote:
> Add a compatible string for the I2C controller found in SpacemiT K3 SoC
> which use same I2C IP as K1, so make it fallback to K1 compatible.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 18:16 ` Conor Dooley
@ 2026-03-26 7:47 ` Javier Martinez Canillas
0 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2026-03-26 7:47 UTC (permalink / raw)
To: Conor Dooley
Cc: Yixun Lan, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Troy Mitchell, linux-i2c, devicetree,
linux-riscv, spacemit, linux-kernel
Conor Dooley <conor@kernel.org> writes:
Hello Conor,
> On Wed, Mar 25, 2026 at 02:20:13PM +0100, Javier Martinez Canillas wrote:
>> Yixun Lan <dlan@kernel.org> writes:
>>
>> > Add a compatible string for the I2C controller found in SpacemiT K3 SoC
>> > which use same I2C IP as K1, so make it fallback to K1 compatible.
>> >
>>
>> If is the same IP as K1, shouldn't the "spacemit,k1-i2c" compatible be
>> used in the k3.dtsi instead? My understanding is that this is the meaning
>> of compatible, and there's no need to add another compatible string for k3.
>
> Your understanding is incorrect! What Yixun has done here is what we
> want people to do, because even if the IP is the same there can be
> differences due to integration that are problematic. Having a device
> specific compatible allows us to handle these kinds of problems if they
> crop up in the future.
Thanks for the clarification! It seems the convention changed over the
years then.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-25 9:49 ` [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes Yixun Lan
2026-03-25 10:41 ` Troy Mitchell
@ 2026-03-26 22:22 ` Andi Shyti
2026-03-26 22:24 ` Andi Shyti
1 sibling, 1 reply; 15+ messages in thread
From: Andi Shyti @ 2026-03-26 22:22 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi Yixun,
On Wed, Mar 25, 2026 at 09:49:25AM +0000, Yixun Lan wrote:
> Populate all I2C devicetree nodes for SpacemiT K3 SoC.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
this second patch does not apply on my i2c branch. I'm missing
some other patches on k3.
Can you please rebase it on top of my i2c/i2c-host branch,
otherwise I will need to wait for the merge window to open in
order to take this.
Andi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-25 10:41 ` Troy Mitchell
@ 2026-03-26 22:23 ` Andi Shyti
2026-03-27 2:39 ` Yixun Lan
0 siblings, 1 reply; 15+ messages in thread
From: Andi Shyti @ 2026-03-26 22:23 UTC (permalink / raw)
To: Troy Mitchell
Cc: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi Yixun,
> > + i2c2: i2c@d4012000 {
> > + compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
> > + reg = <0x0 0xd4012000 0x0 0x38>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&syscon_apbc CLK_APBC_TWSI2>,
> > + <&syscon_apbc CLK_APBC_TWSI2_BUS>;
> > + clock-names = "func", "bus";
> > + clock-frequency = <400000>;
> > + resets = <&syscon_apbc RESET_APBC_TWSI2>;
> > + status = "disabled";
> > + };
> I think we should add a comment here to explain why there isn't i2c3.
> Otherwise, LGTM.
are you going to add a comment here?
> Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-26 22:22 ` Andi Shyti
@ 2026-03-26 22:24 ` Andi Shyti
2026-03-27 2:05 ` Yixun Lan
0 siblings, 1 reply; 15+ messages in thread
From: Andi Shyti @ 2026-03-26 22:24 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi agagin,
On Thu, Mar 26, 2026 at 11:22:31PM +0100, Andi Shyti wrote:
> On Wed, Mar 25, 2026 at 09:49:25AM +0000, Yixun Lan wrote:
> > Populate all I2C devicetree nodes for SpacemiT K3 SoC.
> >
> > Signed-off-by: Yixun Lan <dlan@kernel.org>
>
> this second patch does not apply on my i2c branch. I'm missing
> some other patches on k3.
>
> Can you please rebase it on top of my i2c/i2c-host branch,
> otherwise I will need to wait for the merge window to open in
> order to take this.
sorry, this has to go through some other path, I'm going to take
patch 1.
Andi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
` (2 preceding siblings ...)
2026-03-25 18:16 ` Conor Dooley
@ 2026-03-26 22:28 ` Andi Shyti
3 siblings, 0 replies; 15+ messages in thread
From: Andi Shyti @ 2026-03-26 22:28 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi Yixun,
On Wed, Mar 25, 2026 at 09:49:24AM +0000, Yixun Lan wrote:
> Add a compatible string for the I2C controller found in SpacemiT K3 SoC
> which use same I2C IP as K1, so make it fallback to K1 compatible.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
merged to i2c/i2c-host.
Thanks,
Andi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-26 22:24 ` Andi Shyti
@ 2026-03-27 2:05 ` Yixun Lan
0 siblings, 0 replies; 15+ messages in thread
From: Yixun Lan @ 2026-03-27 2:05 UTC (permalink / raw)
To: Andi Shyti
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi Andi,
On 23:24 Thu 26 Mar , Andi Shyti wrote:
> Hi agagin,
>
> On Thu, Mar 26, 2026 at 11:22:31PM +0100, Andi Shyti wrote:
> > On Wed, Mar 25, 2026 at 09:49:25AM +0000, Yixun Lan wrote:
> > > Populate all I2C devicetree nodes for SpacemiT K3 SoC.
> > >
> > > Signed-off-by: Yixun Lan <dlan@kernel.org>
> >
> > this second patch does not apply on my i2c branch. I'm missing
> > some other patches on k3.
> >
> > Can you please rebase it on top of my i2c/i2c-host branch,
> > otherwise I will need to wait for the merge window to open in
> > order to take this.
>
> sorry, this has to go through some other path, I'm going to take
> patch 1.
Right, I will take care of it, DT patch should go via SpacemiT SoC tree.
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes
2026-03-26 22:23 ` Andi Shyti
@ 2026-03-27 2:39 ` Yixun Lan
0 siblings, 0 replies; 15+ messages in thread
From: Yixun Lan @ 2026-03-27 2:39 UTC (permalink / raw)
To: Andi Shyti
Cc: Troy Mitchell, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
linux-i2c, devicetree, linux-riscv, spacemit, linux-kernel
Hi Andi,
On 23:23 Thu 26 Mar , Andi Shyti wrote:
> Hi Yixun,
>
> > > + i2c2: i2c@d4012000 {
> > > + compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
> > > + reg = <0x0 0xd4012000 0x0 0x38>;
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
> > > + clocks = <&syscon_apbc CLK_APBC_TWSI2>,
> > > + <&syscon_apbc CLK_APBC_TWSI2_BUS>;
> > > + clock-names = "func", "bus";
> > > + clock-frequency = <400000>;
> > > + resets = <&syscon_apbc RESET_APBC_TWSI2>;
> > > + status = "disabled";
> > > + };
> > I think we should add a comment here to explain why there isn't i2c3.
> > Otherwise, LGTM.
>
> are you going to add a comment here?
>
I will explain and re-spin a v2, and add a short comment for this:
- i2c3 is reserved for secure domain which not available from linux
- i2c7 simply does not exist from hardware perspective, K3 SoC want to
keep align with K1 to use same index of I2C controller for the pmic
> > Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-03-27 2:39 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 9:49 [PATCH 0/2] riscv: spacemit: k3: Add I2C support Yixun Lan
2026-03-25 9:49 ` [PATCH 1/2] dt-bindings: i2c: spacemit: k3: Add compatible Yixun Lan
2026-03-25 10:42 ` Troy Mitchell
2026-03-25 13:20 ` Javier Martinez Canillas
2026-03-25 18:16 ` Conor Dooley
2026-03-26 7:47 ` Javier Martinez Canillas
2026-03-25 18:16 ` Conor Dooley
2026-03-26 22:28 ` Andi Shyti
2026-03-25 9:49 ` [PATCH 2/2] dts: riscv: spacemit: k3: Add i2c nodes Yixun Lan
2026-03-25 10:41 ` Troy Mitchell
2026-03-26 22:23 ` Andi Shyti
2026-03-27 2:39 ` Yixun Lan
2026-03-26 22:22 ` Andi Shyti
2026-03-26 22:24 ` Andi Shyti
2026-03-27 2:05 ` Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox