* [PATCH 0/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
@ 2025-09-21 21:01 Aurelien Jarno
2025-09-21 21:01 ` [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter " Aurelien Jarno
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-21 21:01 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
The BPI-F3 board has a 24c02 eeprom connected to the i2c bus #2. It
holds board data. This patchset adds support for it.
Aurelien Jarno (3):
riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
riscv: dts: spacemit: add i2c aliases on BPI-F3
.../boot/dts/spacemit/k1-bananapi-f3.dts | 19 ++++++++++++++++++-
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 13 +++++++++++++
3 files changed, 38 insertions(+), 1 deletion(-)
--
2.47.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
2025-09-21 21:01 [PATCH 0/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3 Aurelien Jarno
@ 2025-09-21 21:01 ` Aurelien Jarno
2025-09-23 1:32 ` Troy Mitchell
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
2025-09-21 21:01 ` [PATCH 3/3] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
2 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-21 21:01 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Define properties for the I2C adapter, and enable it on the BPI-F3. It
will be used by the 24c02 eeprom.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 6 ++++++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 13 +++++++++++++
3 files changed, 26 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 66375fd1e9974..3b6e4f52e9aad 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -111,6 +111,12 @@ rgmii1: phy@1 {
};
};
+&i2c2 {
+ pinctrl-0 = <&i2c2_0_cfg>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&i2c8 {
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
index c9e9a844d2b1c..d565882c46dd7 100644
--- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
@@ -92,6 +92,13 @@ gmac1-pins {
};
};
+ i2c2_0_cfg: i2c2-0-cfg {
+ i2c2-0-pins {
+ pinmux = <K1_PADCONF(84, 4)>, /* I2C2_SCL */
+ <K1_PADCONF(85, 4)>; /* I2C2_SDA */
+ };
+ };
+
i2c8_cfg: i2c8-cfg {
i2c8-0-pins {
pinmux = <K1_PADCONF(93, 0)>, /* PWR_SCL */
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index bc61a380baca8..d4f38ded52c93 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -497,6 +497,19 @@ pwm7: pwm@d401bc00 {
status = "disabled";
};
+ i2c2: i2c@d4012000 {
+ compatible = "spacemit,k1-i2c";
+ reg = <0x0 0xd4012000 0x0 0x38>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&syscon_apbc CLK_TWSI2>,
+ <&syscon_apbc CLK_TWSI2_BUS>;
+ clock-names = "func", "bus";
+ clock-frequency = <400000>;
+ interrupts = <38>;
+ status = "disabled";
+ };
+
i2c8: i2c@d401d800 {
compatible = "spacemit,k1-i2c";
reg = <0x0 0xd401d800 0x0 0x38>;
--
2.47.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-21 21:01 [PATCH 0/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3 Aurelien Jarno
2025-09-21 21:01 ` [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter " Aurelien Jarno
@ 2025-09-21 21:01 ` Aurelien Jarno
2025-09-22 3:21 ` Yixun Lan
` (2 more replies)
2025-09-21 21:01 ` [PATCH 3/3] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
2 siblings, 3 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-21 21:01 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
The BPI-F3 contains a 24c02 eeprom, that contains among other things the
MAC addresses of the two network interfaces. For this reason, mark it as
read-only.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 3b6e4f52e9aad..574d10fdf9b82 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -115,6 +115,15 @@ &i2c2 {
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
+
+ eeprom@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ vcc-supply = <&vcc1v8_sys>;
+ pagesize = <16>;
+ read-only;
+ size = <256>;
+ };
};
&i2c8 {
@@ -143,7 +152,7 @@ buck2 {
regulator-always-on;
};
- buck3 {
+ vcc1v8_sys: buck3 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
--
2.47.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/3] riscv: dts: spacemit: add i2c aliases on BPI-F3
2025-09-21 21:01 [PATCH 0/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3 Aurelien Jarno
2025-09-21 21:01 ` [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter " Aurelien Jarno
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
@ 2025-09-21 21:01 ` Aurelien Jarno
2 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-21 21:01 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Add i2c aliases for i2c2 and i2c8 on BPI-F3. This is useful to keep a
stable number for the /dev entries after loading the i2c-dev module.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 574d10fdf9b82..a71eaf1c65deb 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -14,6 +14,8 @@ aliases {
ethernet0 = ð0;
ethernet1 = ð1;
serial0 = &uart0;
+ i2c2 = &i2c2;
+ i2c8 = &i2c8;
};
chosen {
--
2.47.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
@ 2025-09-22 3:21 ` Yixun Lan
2025-09-22 4:49 ` Aurelien Jarno
2025-09-23 2:00 ` Troy Mitchell
2025-09-23 6:32 ` Vivian Wang
2 siblings, 1 reply; 18+ messages in thread
From: Yixun Lan @ 2025-09-22 3:21 UTC (permalink / raw)
To: Aurelien Jarno
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 23:01 Sun 21 Sep , Aurelien Jarno wrote:
> The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> MAC addresses of the two network interfaces. For this reason, mark it as
> read-only.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> index 3b6e4f52e9aad..574d10fdf9b82 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -115,6 +115,15 @@ &i2c2 {
> pinctrl-0 = <&i2c2_0_cfg>;
> pinctrl-names = "default";
> status = "okay";
> +
> + eeprom@50 {
> + compatible = "atmel,24c02";
> + reg = <0x50>;
> + vcc-supply = <&vcc1v8_sys>;
> + pagesize = <16>;
..
> + read-only;
so you're sure there is no demand to write data to eeprom?
(update info at linux env)
> + size = <256>;
> + };
> };
>
> &i2c8 {
> @@ -143,7 +152,7 @@ buck2 {
> regulator-always-on;
> };
>
> - buck3 {
> + vcc1v8_sys: buck3 {
I'm not sure if adding an alias here is a good idea, it occurs buck3
serve the suppy for many devices, besides, to me it's more proper to
name it as eeprom_vcc1v8 for the eeprom according to schematics in
this case..
> regulator-min-microvolt = <500000>;
> regulator-max-microvolt = <1800000>;
> regulator-ramp-delay = <5000>;
> --
> 2.47.2
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-22 3:21 ` Yixun Lan
@ 2025-09-22 4:49 ` Aurelien Jarno
2025-09-22 8:01 ` Yixun Lan
2025-09-23 1:42 ` Troy Mitchell
0 siblings, 2 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-22 4:49 UTC (permalink / raw)
To: Yixun Lan
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi,
On 2025-09-22 11:21, Yixun Lan wrote:
> Hi Aurelien,
>
> On 23:01 Sun 21 Sep , Aurelien Jarno wrote:
> > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > MAC addresses of the two network interfaces. For this reason, mark it as
> > read-only.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > @@ -115,6 +115,15 @@ &i2c2 {
> > pinctrl-0 = <&i2c2_0_cfg>;
> > pinctrl-names = "default";
> > status = "okay";
> > +
> > + eeprom@50 {
> > + compatible = "atmel,24c02";
> > + reg = <0x50>;
> > + vcc-supply = <&vcc1v8_sys>;
> > + pagesize = <16>;
> ..
> > + read-only;
> so you're sure there is no demand to write data to eeprom?
> (update info at linux env)
It seems to only contains board infos (mac addresses), but if there are
other use cases, that can indeed be dropped.
> > + size = <256>;
> > + };
> > };
> >
> > &i2c8 {
> > @@ -143,7 +152,7 @@ buck2 {
> > regulator-always-on;
> > };
> >
> > - buck3 {
> > + vcc1v8_sys: buck3 {
> I'm not sure if adding an alias here is a good idea, it occurs buck3
> serve the suppy for many devices, besides, to me it's more proper to
> name it as eeprom_vcc1v8 for the eeprom according to schematics in
> this case..
We need to add a label to be able to reference it for the eeprom
vcc-supply, but we'll have to also reference it for other devices (e.g.
emmc, wifi, phys, etc... It tried to choose a common name, ie the right
most one on the schematics. Another option could be to call it buck3,
but other name suggestions are welcome.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-22 4:49 ` Aurelien Jarno
@ 2025-09-22 8:01 ` Yixun Lan
2025-09-22 21:00 ` Aurelien Jarno
2025-09-23 1:42 ` Troy Mitchell
1 sibling, 1 reply; 18+ messages in thread
From: Yixun Lan @ 2025-09-22 8:01 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 06:49 Mon 22 Sep , Aurelien Jarno wrote:
> Hi,
>
> On 2025-09-22 11:21, Yixun Lan wrote:
> > Hi Aurelien,
> >
> > On 23:01 Sun 21 Sep , Aurelien Jarno wrote:
> > > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > > MAC addresses of the two network interfaces. For this reason, mark it as
> > > read-only.
> > >
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > ---
> > > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > > 1 file changed, 10 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > @@ -115,6 +115,15 @@ &i2c2 {
> > > pinctrl-0 = <&i2c2_0_cfg>;
> > > pinctrl-names = "default";
> > > status = "okay";
> > > +
> > > + eeprom@50 {
> > > + compatible = "atmel,24c02";
> > > + reg = <0x50>;
> > > + vcc-supply = <&vcc1v8_sys>;
> > > + pagesize = <16>;
> > ..
> > > + read-only;
> > so you're sure there is no demand to write data to eeprom?
> > (update info at linux env)
>
> It seems to only contains board infos (mac addresses), but if there are
> other use cases, that can indeed be dropped.
>
On my second thought, I'm ok with it being "read-only", as we flash these
infos during firmware burning stage, then never alter them later.
> > > + size = <256>;
> > > + };
> > > };
> > >
> > > &i2c8 {
> > > @@ -143,7 +152,7 @@ buck2 {
> > > regulator-always-on;
> > > };
> > >
> > > - buck3 {
> > > + vcc1v8_sys: buck3 {
> > I'm not sure if adding an alias here is a good idea, it occurs buck3
> > serve the suppy for many devices, besides, to me it's more proper to
> > name it as eeprom_vcc1v8 for the eeprom according to schematics in
> > this case..
>
> We need to add a label to be able to reference it for the eeprom
> vcc-supply, but we'll have to also reference it for other devices (e.g.
> emmc, wifi, phys, etc... It tried to choose a common name, ie the right
> most one on the schematics. Another option could be to call it buck3,
> but other name suggestions are welcome.
how about simply making it "buck3_1v8", then probably add a comment
later in the eeprom node? to mapping to the shecmatics
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net http://aurel32.net
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-22 8:01 ` Yixun Lan
@ 2025-09-22 21:00 ` Aurelien Jarno
0 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-22 21:00 UTC (permalink / raw)
To: Yixun Lan
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
On 2025-09-22 16:01, Yixun Lan wrote:
> Hi Aurelien,
>
> On 06:49 Mon 22 Sep , Aurelien Jarno wrote:
> > Hi,
> >
> > On 2025-09-22 11:21, Yixun Lan wrote:
> > > Hi Aurelien,
> > >
> > > On 23:01 Sun 21 Sep , Aurelien Jarno wrote:
> > > > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > > > MAC addresses of the two network interfaces. For this reason, mark it as
> > > > read-only.
> > > >
> > > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > > ---
> > > > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > > > 1 file changed, 10 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > > > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > > @@ -115,6 +115,15 @@ &i2c2 {
> > > > pinctrl-0 = <&i2c2_0_cfg>;
> > > > pinctrl-names = "default";
> > > > status = "okay";
> > > > +
> > > > + eeprom@50 {
> > > > + compatible = "atmel,24c02";
> > > > + reg = <0x50>;
> > > > + vcc-supply = <&vcc1v8_sys>;
> > > > + pagesize = <16>;
> > > ..
> > > > + read-only;
> > > so you're sure there is no demand to write data to eeprom?
> > > (update info at linux env)
> >
> > It seems to only contains board infos (mac addresses), but if there are
> > other use cases, that can indeed be dropped.
> >
> On my second thought, I'm ok with it being "read-only", as we flash these
> infos during firmware burning stage, then never alter them later.
>
> > > > + size = <256>;
> > > > + };
> > > > };
> > > >
> > > > &i2c8 {
> > > > @@ -143,7 +152,7 @@ buck2 {
> > > > regulator-always-on;
> > > > };
> > > >
> > > > - buck3 {
> > > > + vcc1v8_sys: buck3 {
> > > I'm not sure if adding an alias here is a good idea, it occurs buck3
> > > serve the suppy for many devices, besides, to me it's more proper to
> > > name it as eeprom_vcc1v8 for the eeprom according to schematics in
> > > this case..
> >
> > We need to add a label to be able to reference it for the eeprom
> > vcc-supply, but we'll have to also reference it for other devices (e.g.
> > emmc, wifi, phys, etc... It tried to choose a common name, ie the right
> > most one on the schematics. Another option could be to call it buck3,
> > but other name suggestions are welcome.
> how about simply making it "buck3_1v8", then probably add a comment
> later in the eeprom node? to mapping to the shecmatics
> vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
Thanks that sounds good. I'll send an updated patchset with that change.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
2025-09-21 21:01 ` [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter " Aurelien Jarno
@ 2025-09-23 1:32 ` Troy Mitchell
2025-09-23 19:16 ` Aurelien Jarno
0 siblings, 1 reply; 18+ messages in thread
From: Troy Mitchell @ 2025-09-23 1:32 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yixun Lan
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support, Troy Mitchell
On Sun, Sep 21, 2025 at 11:01:41PM +0200, Aurelien Jarno wrote:
> Define properties for the I2C adapter, and enable it on the BPI-F3. It
> will be used by the 24c02 eeprom.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> @@ -92,6 +92,13 @@ gmac1-pins {
> };
> };
>
> + i2c2_0_cfg: i2c2-0-cfg {
Should this be i2c2_4_cfg here?
From what I see, in the initial version the second cell was meant
to be the function number rather than the serial index.
It looks like the pwm part is also incorrect.
- Troy
> + i2c2-0-pins {
> + pinmux = <K1_PADCONF(84, 4)>, /* I2C2_SCL */
> + <K1_PADCONF(85, 4)>; /* I2C2_SDA */
> + };
> + };
> +
> i2c8_cfg: i2c8-cfg {
> i2c8-0-pins {
> pinmux = <K1_PADCONF(93, 0)>, /* PWR_SCL */
> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
> index bc61a380baca8..d4f38ded52c93 100644
> --- a/arch/riscv/boot/dts/spacemit/k1.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
> @@ -497,6 +497,19 @@ pwm7: pwm@d401bc00 {
> status = "disabled";
> };
>
> + i2c2: i2c@d4012000 {
> + compatible = "spacemit,k1-i2c";
> + reg = <0x0 0xd4012000 0x0 0x38>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&syscon_apbc CLK_TWSI2>,
> + <&syscon_apbc CLK_TWSI2_BUS>;
> + clock-names = "func", "bus";
> + clock-frequency = <400000>;
> + interrupts = <38>;
> + status = "disabled";
> + };
> +
> i2c8: i2c@d401d800 {
> compatible = "spacemit,k1-i2c";
> reg = <0x0 0xd401d800 0x0 0x38>;
> --
> 2.47.2
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-22 4:49 ` Aurelien Jarno
2025-09-22 8:01 ` Yixun Lan
@ 2025-09-23 1:42 ` Troy Mitchell
2025-09-23 19:38 ` Aurelien Jarno
1 sibling, 1 reply; 18+ messages in thread
From: Troy Mitchell @ 2025-09-23 1:42 UTC (permalink / raw)
To: Yixun Lan, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Cc: Troy Mitchell
On Mon, Sep 22, 2025 at 06:49:35AM +0200, Aurelien Jarno wrote:
> Hi,
>
> On 2025-09-22 11:21, Yixun Lan wrote:
> > Hi Aurelien,
> >
> > On 23:01 Sun 21 Sep , Aurelien Jarno wrote:
> > > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > > MAC addresses of the two network interfaces. For this reason, mark it as
> > > read-only.
> > >
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > ---
> > > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > > 1 file changed, 10 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > > @@ -115,6 +115,15 @@ &i2c2 {
> > > pinctrl-0 = <&i2c2_0_cfg>;
> > > pinctrl-names = "default";
> > > status = "okay";
> > > +
> > > + eeprom@50 {
> > > + compatible = "atmel,24c02";
> > > + reg = <0x50>;
> > > + vcc-supply = <&vcc1v8_sys>;
> > > + pagesize = <16>;
> > ..
> > > + read-only;
> > so you're sure there is no demand to write data to eeprom?
> > (update info at linux env)
>
> It seems to only contains board infos (mac addresses), but if there are
> other use cases, that can indeed be dropped.
Then you can split the EEPROM into different parts.
Each part can be described as an individual nvmem cell in the device tree.
Some of them can be marked as read-only, while others remain writable.
Documentation/devicetree/bindings/eeprom/at24.yaml +15:
```
- $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml
```
- Troy
>
> > > + size = <256>;
> > > + };
> > > };
> > >
> > > &i2c8 {
> > > @@ -143,7 +152,7 @@ buck2 {
> > > regulator-always-on;
> > > };
> > >
> > > - buck3 {
> > > + vcc1v8_sys: buck3 {
> > I'm not sure if adding an alias here is a good idea, it occurs buck3
> > serve the suppy for many devices, besides, to me it's more proper to
> > name it as eeprom_vcc1v8 for the eeprom according to schematics in
> > this case..
>
> We need to add a label to be able to reference it for the eeprom
> vcc-supply, but we'll have to also reference it for other devices (e.g.
> emmc, wifi, phys, etc... It tried to choose a common name, ie the right
> most one on the schematics. Another option could be to call it buck3,
> but other name suggestions are welcome.
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net http://aurel32.net
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
2025-09-22 3:21 ` Yixun Lan
@ 2025-09-23 2:00 ` Troy Mitchell
2025-09-23 19:21 ` Aurelien Jarno
2025-09-23 6:32 ` Vivian Wang
2 siblings, 1 reply; 18+ messages in thread
From: Troy Mitchell @ 2025-09-23 2:00 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yixun Lan
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support, Troy Mitchell
On Sun, Sep 21, 2025 at 11:01:42PM +0200, Aurelien Jarno wrote:
> The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> MAC addresses of the two network interfaces. For this reason, mark it as
> read-only.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> index 3b6e4f52e9aad..574d10fdf9b82 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -115,6 +115,15 @@ &i2c2 {
> pinctrl-0 = <&i2c2_0_cfg>;
> pinctrl-names = "default";
> status = "okay";
> +
> + eeprom@50 {
> + compatible = "atmel,24c02";
> + reg = <0x50>;
> + vcc-supply = <&vcc1v8_sys>;
> + pagesize = <16>;
I'm not sure this is 16..
Could you double check it?
- Troy
> + read-only;
> + size = <256>;
> + };
> };
>
> &i2c8 {
> @@ -143,7 +152,7 @@ buck2 {
> regulator-always-on;
> };
>
> - buck3 {
> + vcc1v8_sys: buck3 {
> regulator-min-microvolt = <500000>;
> regulator-max-microvolt = <1800000>;
> regulator-ramp-delay = <5000>;
> --
> 2.47.2
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
2025-09-22 3:21 ` Yixun Lan
2025-09-23 2:00 ` Troy Mitchell
@ 2025-09-23 6:32 ` Vivian Wang
2025-09-23 19:30 ` Aurelien Jarno
2 siblings, 1 reply; 18+ messages in thread
From: Vivian Wang @ 2025-09-23 6:32 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yixun Lan
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 9/22/25 05:01, Aurelien Jarno wrote:
> The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> MAC addresses of the two network interfaces. For this reason, mark it as
> read-only.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> index 3b6e4f52e9aad..574d10fdf9b82 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -115,6 +115,15 @@ &i2c2 {
> pinctrl-0 = <&i2c2_0_cfg>;
> pinctrl-names = "default";
> status = "okay";
> +
> + eeprom@50 {
> + compatible = "atmel,24c02";
> + reg = <0x50>;
> + vcc-supply = <&vcc1v8_sys>;
> + pagesize = <16>;
> + read-only;
> + size = <256>;
> + };
> };
>
I wonder if it would possibly make sense to specify a nvmem-layout here.
The BPI-F3 I have here has this in the 24c02:
00000000 54 6c 76 49 6e 66 6f 00 01 00 20 24 06 fe fe fe |TlvInfo... $....|
00000010 XX XX XX 2a 02 00 02 23 0c XX XX XX XX XX XX XX |...*...#.XXXXXXX|
00000020 XX XX XX XX XX fe 04 XX XX XX XX ff ff ff ff ff |XXXXX..XXXX.....|
00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00000100
(... with variable parts replaced with X)
And, AFAICT, this is a "onie,tlv-layout" with fields:
0x24 mac-adddress
0x2a num-macs
0x23 serial-number
0xfe crc32
As you can see the mac-address assignment looks bogus with fe:fe:fe (it
is used by vendor code though, so at least it seems to be intended). It
does appear at least to have useful information.
Can you confirm on your hardware? What do you think about this: should
we add it now or add it when we have users?
Vivian "dramforever" Wang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
2025-09-23 1:32 ` Troy Mitchell
@ 2025-09-23 19:16 ` Aurelien Jarno
2025-09-24 3:13 ` Troy Mitchell
0 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-23 19:16 UTC (permalink / raw)
To: Troy Mitchell
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Troy,
Thanks for the review.
On 2025-09-23 09:32, Troy Mitchell wrote:
> On Sun, Sep 21, 2025 at 11:01:41PM +0200, Aurelien Jarno wrote:
> > Define properties for the I2C adapter, and enable it on the BPI-F3. It
> > will be used by the 24c02 eeprom.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > @@ -92,6 +92,13 @@ gmac1-pins {
> > };
> > };
> >
> > + i2c2_0_cfg: i2c2-0-cfg {
> Should this be i2c2_4_cfg here?
> From what I see, in the initial version the second cell was meant
> to be the function number rather than the serial index.
Ok, I wasn't aware of that convention, I just reused the same numbering
of the downstream 6.6 kernel. I'll fix that and use i2c2_4_cfg.
> It looks like the pwm part is also incorrect.
Yes, and also the submitted PCIE patches.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-23 2:00 ` Troy Mitchell
@ 2025-09-23 19:21 ` Aurelien Jarno
0 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-23 19:21 UTC (permalink / raw)
To: Troy Mitchell
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi,
On 2025-09-23 10:00, Troy Mitchell wrote:
> On Sun, Sep 21, 2025 at 11:01:42PM +0200, Aurelien Jarno wrote:
> > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > MAC addresses of the two network interfaces. For this reason, mark it as
> > read-only.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > @@ -115,6 +115,15 @@ &i2c2 {
> > pinctrl-0 = <&i2c2_0_cfg>;
> > pinctrl-names = "default";
> > status = "okay";
> > +
> > + eeprom@50 {
> > + compatible = "atmel,24c02";
> > + reg = <0x50>;
> > + vcc-supply = <&vcc1v8_sys>;
> > + pagesize = <16>;
> I'm not sure this is 16..
> Could you double check it?
Yes, this matches the datasheet:
https://www.giantec-semi.com/juchen1123/uploads/pdf/GT24C02_DS_Au.pdf
It says "Page Size: 16 bytes"
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-23 6:32 ` Vivian Wang
@ 2025-09-23 19:30 ` Aurelien Jarno
0 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-23 19:30 UTC (permalink / raw)
To: Vivian Wang
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Vivian,
On 2025-09-23 14:32, Vivian Wang wrote:
> Hi Aurelien,
>
> On 9/22/25 05:01, Aurelien Jarno wrote:
> > The BPI-F3 contains a 24c02 eeprom, that contains among other things the
> > MAC addresses of the two network interfaces. For this reason, mark it as
> > read-only.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > index 3b6e4f52e9aad..574d10fdf9b82 100644
> > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > @@ -115,6 +115,15 @@ &i2c2 {
> > pinctrl-0 = <&i2c2_0_cfg>;
> > pinctrl-names = "default";
> > status = "okay";
> > +
> > + eeprom@50 {
> > + compatible = "atmel,24c02";
> > + reg = <0x50>;
> > + vcc-supply = <&vcc1v8_sys>;
> > + pagesize = <16>;
> > + read-only;
> > + size = <256>;
> > + };
> > };
> >
>
> I wonder if it would possibly make sense to specify a nvmem-layout here.
> The BPI-F3 I have here has this in the 24c02:
>
> 00000000 54 6c 76 49 6e 66 6f 00 01 00 20 24 06 fe fe fe |TlvInfo... $....|
> 00000010 XX XX XX 2a 02 00 02 23 0c XX XX XX XX XX XX XX |...*...#.XXXXXXX|
> 00000020 XX XX XX XX XX fe 04 XX XX XX XX ff ff ff ff ff |XXXXX..XXXX.....|
> 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
> *
> 00000100
>
> (... with variable parts replaced with X)
>
> And, AFAICT, this is a "onie,tlv-layout" with fields:
>
> 0x24 mac-adddress
> 0x2a num-macs
> 0x23 serial-number
> 0xfe crc32
>
> As you can see the mac-address assignment looks bogus with fe:fe:fe (it
> is used by vendor code though, so at least it seems to be intended). It
> does appear at least to have useful information.
The reason I initially tried to dump the content of the eeprom was to
check the MAC addresses provided to the kernel by u-boot at they looked
strange to me starting with fe:fe:fe... But at least they match.
> Can you confirm on your hardware? What do you think about this: should
> we add it now or add it when we have users?
I also have the TlvInfo data on my board, but it misses the
serial-number field.
This is a good idea to use the "onie,tlv-layout" layout, I'll do that in
the V2.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3
2025-09-23 1:42 ` Troy Mitchell
@ 2025-09-23 19:38 ` Aurelien Jarno
0 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-23 19:38 UTC (permalink / raw)
To: Troy Mitchell
Cc: Yixun Lan, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Troy,
On 2025-09-23 09:42, Troy Mitchell wrote:
> On Mon, Sep 22, 2025 at 06:49:35AM +0200, Aurelien Jarno wrote:
> > On 2025-09-22 11:21, Yixun Lan wrote:
> > It seems to only contains board infos (mac addresses), but if there are
> > other use cases, that can indeed be dropped.
> Then you can split the EEPROM into different parts.
> Each part can be described as an individual nvmem cell in the device tree.
> Some of them can be marked as read-only, while others remain writable.
>
> Documentation/devicetree/bindings/eeprom/at24.yaml +15:
> ```
> - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml
> ```
As pointed by Vivian the best for that is to use "onie,tlv-layout". I'll
do that in the V2.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
2025-09-23 19:16 ` Aurelien Jarno
@ 2025-09-24 3:13 ` Troy Mitchell
2025-09-24 19:11 ` Aurelien Jarno
0 siblings, 1 reply; 18+ messages in thread
From: Troy Mitchell @ 2025-09-24 3:13 UTC (permalink / raw)
To: Troy Mitchell, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yixun Lan,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
On Tue, Sep 23, 2025 at 09:16:50PM +0200, Aurelien Jarno wrote:
> Hi Troy,
>
> Thanks for the review.
>
> On 2025-09-23 09:32, Troy Mitchell wrote:
> > On Sun, Sep 21, 2025 at 11:01:41PM +0200, Aurelien Jarno wrote:
> > > Define properties for the I2C adapter, and enable it on the BPI-F3. It
> > > will be used by the 24c02 eeprom.
> > >
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > ---
> > > --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > > +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > > @@ -92,6 +92,13 @@ gmac1-pins {
> > > };
> > > };
> > >
> > > + i2c2_0_cfg: i2c2-0-cfg {
> > Should this be i2c2_4_cfg here?
> > From what I see, in the initial version the second cell was meant
> > to be the function number rather than the serial index.
>
> Ok, I wasn't aware of that convention, I just reused the same numbering
> of the downstream 6.6 kernel. I'll fix that and use i2c2_4_cfg.
I'm wrong..
The second number isn't function number.
You can find a more detailed discussion here:
(riscv: dts: spacemit: define a SPI controller node)
- Troy
>
> > It looks like the pwm part is also incorrect.
>
> Yes, and also the submitted PCIE patches.
>
> Aurelien
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net http://aurel32.net
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
2025-09-24 3:13 ` Troy Mitchell
@ 2025-09-24 19:11 ` Aurelien Jarno
0 siblings, 0 replies; 18+ messages in thread
From: Aurelien Jarno @ 2025-09-24 19:11 UTC (permalink / raw)
To: Troy Mitchell
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
On 2025-09-24 11:13, Troy Mitchell wrote:
> On Tue, Sep 23, 2025 at 09:16:50PM +0200, Aurelien Jarno wrote:
> > Hi Troy,
> >
> > Thanks for the review.
> >
> > On 2025-09-23 09:32, Troy Mitchell wrote:
> > > On Sun, Sep 21, 2025 at 11:01:41PM +0200, Aurelien Jarno wrote:
> > > > Define properties for the I2C adapter, and enable it on the BPI-F3. It
> > > > will be used by the 24c02 eeprom.
> > > >
> > > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > > ---
> > > > --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > > > +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> > > > @@ -92,6 +92,13 @@ gmac1-pins {
> > > > };
> > > > };
> > > >
> > > > + i2c2_0_cfg: i2c2-0-cfg {
> > > Should this be i2c2_4_cfg here?
> > > From what I see, in the initial version the second cell was meant
> > > to be the function number rather than the serial index.
> >
> > Ok, I wasn't aware of that convention, I just reused the same numbering
> > of the downstream 6.6 kernel. I'll fix that and use i2c2_4_cfg.
> I'm wrong..
> The second number isn't function number.
> You can find a more detailed discussion here:
> (riscv: dts: spacemit: define a SPI controller node)
Ok, I'll revert the change in the V3
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-09-24 19:11 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 21:01 [PATCH 0/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3 Aurelien Jarno
2025-09-21 21:01 ` [PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter " Aurelien Jarno
2025-09-23 1:32 ` Troy Mitchell
2025-09-23 19:16 ` Aurelien Jarno
2025-09-24 3:13 ` Troy Mitchell
2025-09-24 19:11 ` Aurelien Jarno
2025-09-21 21:01 ` [PATCH 2/3] riscv: dts: spacemit: add 24c02 eeprom " Aurelien Jarno
2025-09-22 3:21 ` Yixun Lan
2025-09-22 4:49 ` Aurelien Jarno
2025-09-22 8:01 ` Yixun Lan
2025-09-22 21:00 ` Aurelien Jarno
2025-09-23 1:42 ` Troy Mitchell
2025-09-23 19:38 ` Aurelien Jarno
2025-09-23 2:00 ` Troy Mitchell
2025-09-23 19:21 ` Aurelien Jarno
2025-09-23 6:32 ` Vivian Wang
2025-09-23 19:30 ` Aurelien Jarno
2025-09-21 21:01 ` [PATCH 3/3] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
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).