Enable eeprom tlv command for SpacemiT K3 in main app
Subsystems (2)
cover Enable eeprom tlv command for SpacemiT K3 in main app
Cherry-pick a few commits that have the required eeprom nodes and enable the eeprom tlv command in SpacemiT K3 config. There's not any SPL in-tree so don't worry yet about implementing such hooks or config options.
Aurelien Jarno (3):
riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board
riscv: dts: spacemit: add 24c02 eeprom on K3 Pico-ITX board
riscv: dts: spacemit: add i2c aliases on K3 Pico-ITX board
E Shattow (1):
configs: spacemit: k3: enable eeprom tlv command in main app
configs/spacemit_k3_defconfig | 2 + .../src/riscv/spacemit/k3-pico-itx.dts | 38 +++++++++++++++++++ .../src/riscv/spacemit/k3-pinctrl.dtsi | 11 ++++++ 3 files changed, 51 insertions(+)
base-commit: 8d534cec0cc0109a37c0ded8854da03f1526dc0e
Signature · 1 line
2.53.0
PATCH 1/4 riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board
From: Aurelien Jarno <[email protected]>
Define I2C2 pinctrl properties, and enable it on the K3 Pico-ITX board. It will be used by the 24c02 eeprom.
[ upstream commit: 48dd3d020528e05795dfa46308ba5b59a1835bba ]
(cherry picked from commit 5b8d10184a9e7fb8b31d279e09e3673b8d69f690)
--- dts/upstream/src/riscv/spacemit/k3-pico-itx.dts | 6 ++++++ dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi | 11 +++++++++++ 2 files changed, 17 insertions(+)
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +6 -0
@@ -43,6 +43,12 @@ }; }; +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_1_cfg>; + status = "okay"; +}; + &i2c8 { pinctrl-names = "default"; pinctrl-0 = <&i2c8_cfg>;
dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi +11 -0
@@ -78,6 +78,17 @@ }; }; + /omit-if-no-ref/ + i2c2_1_cfg: i2c2-1-cfg { + i2c2-1-pins { + pinmux = <K3_PADCONF(46, 5)>, /* i2c2 scl */ + <K3_PADCONF(47, 5)>; /* i2c2 sda */ + + bias-pull-up = <0>; + drive-strength = <25>; + }; + }; + /omit-if-no-ref/ i2c8_cfg: i2c8-cfg { i2c8-pins {
Signature · 1 line
2.53.0
Re: [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board
Quoted 47 lines · E Shattow
From: Aurelien Jarno <[email protected]>
Define I2C2 pinctrl properties, and enable it on the K3 Pico-ITX board. It will be used by the 24c02 eeprom.
Signed-off-by Aurelien Jarno <[email protected]>Reviewed-by Yixun Lan <[email protected]>Signed-off-by Yixun Lan <[email protected]>[ upstream commit:
48dd3d020528e05795dfa46308ba5b59a1835bba](cherry picked from commit
5b8d10184a9e7fb8b31d279e09e3673b8d69f690)--- dts/upstream/src/riscv/spacemit/k3-pico-itx.dts | 6 ++++++ dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi | 11 +++++++++++ 2 files changed, 17 insertions(+)dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +6
-0@@ -43,6 +43,12 @@ }; }; +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_1_cfg>; + status = "okay"; +}; + &i2c8 { pinctrl-names = "default"; pinctrl-0 = <&i2c8_cfg>;dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi +4
-0@@ -78,6 +78,17 @@ }; }; + /omit-if-no-ref/ + i2c2_1_cfg: i2c2-1-cfg { + i2c2-1-pins { + pinmux = <K3_PADCONF(46, 5)>, /* i2c2 scl */
dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi line 94
Quoted 10 lines
dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi +7
-0+ <K3_PADCONF(47, 5)>; /* i2c2 sda */ + + bias-pull-up = <0>; + drive-strength = <25>; + }; + }; + /omit-if-no-ref/ i2c8_cfg: i2c8-cfg { i2c8-pins {
Drop this patch that landed in u-boot dts subtree with devicetree-rebasing v7.3
-E
PATCH 2/4 riscv: dts: spacemit: add 24c02 eeprom on K3 Pico-ITX board
In reply to E ShattowFrom: Aurelien Jarno <[email protected]>
The K3 Pico-ITX board includes a 24c02 eeprom, that stores the product name, the part name, the MAC address of the network interfaces and the board's serial number. These values are also exposed via an onie,tlv-layout nvmem layout.
The eeprom is marked as read-only since its contents are not supposed to be modified.
[ upstream commit: 930491838c55c41317da9f263e3e9b013cb9aaa8 ]
(cherry picked from commit 3146b373c9699a456fa58b56a23d1127096cbc86)
--- .../src/riscv/spacemit/k3-pico-itx.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +30 -0
@@ -47,6 +47,36 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_1_cfg>; status = "okay"; + + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + pagesize = <8>; + read-only; + size = <256>; + status = "okay"; + + nvmem-layout { + compatible = "onie,tlv-layout"; + + mac-address { + #nvmem-cell-cells = <1>; + }; + + num-macs { + }; + + part-number { + }; + + product-name { + }; + + serial-number { + }; + + }; + }; }; &i2c8 {
Signature · 1 line
2.53.0
Re: [PATCH 2/4] riscv: dts: spacemit: add 24c02 eeprom on K3 Pico-ITX board
Quoted 53 lines · E Shattow
From: Aurelien Jarno <[email protected]>
The K3 Pico-ITX board includes a 24c02 eeprom, that stores the product name, the part name, the MAC address of the network interfaces and the board's serial number. These values are also exposed via an onie,tlv-layout nvmem layout.
The eeprom is marked as read-only since its contents are not supposed to be modified.
Signed-off-by Aurelien Jarno <[email protected]>Reviewed-by Yixun Lan <[email protected]>Signed-off-by Yixun Lan <[email protected]>[ upstream commit:
930491838c55c41317da9f263e3e9b013cb9aaa8](cherry picked from commit
3146b373c9699a456fa58b56a23d1127096cbc86)--- .../src/riscv/spacemit/k3-pico-itx.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +23
-0@@ -47,6 +47,36 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_1_cfg>; status = "okay"; + + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + pagesize = <8>; + read-only; + size = <256>; + status = "okay"; + + nvmem-layout { + compatible = "onie,tlv-layout"; + + mac-address { + #nvmem-cell-cells = <1>; + }; + + num-macs { + }; + + part-number { + }; + + product-name {
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts line 82
Quoted 10 lines
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +7
-0+ }; + + serial-number { + }; + + }; + }; }; &i2c8 {
Drop this patch that landed in u-boot dts subtree with devicetree-rebasing v7.3
-E
PATCH 3/4 riscv: dts: spacemit: add i2c aliases on K3 Pico-ITX board
In reply to E ShattowFrom: Aurelien Jarno <[email protected]>
Add i2c aliases for i2c2 and i2c8 on K3 Pico-ITX board. This is useful to keep a stable number for the /dev entries after loading the i2c-dev module.
[ upstream commit: ae4e84366b5d621171da2e9fae2b1f8bea3312b8 ]
(cherry picked from commit e1f4b93f2a556b0ae661285aa72cad07b3c65fa4)
--- dts/upstream/src/riscv/spacemit/k3-pico-itx.dts | 2 ++ 1 file changed, 2 insertions(+)
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +2 -0
@@ -14,6 +14,8 @@ aliases { ethernet0 = ð0; + i2c2 = &i2c2; + i2c8 = &i2c8; serial0 = &uart0; };
Signature · 1 line
2.53.0
Re: [PATCH 3/4] riscv: dts: spacemit: add i2c aliases on K3 Pico-ITX board
Quoted 23 lines · E Shattow
From: Aurelien Jarno <[email protected]>
Add i2c aliases for i2c2 and i2c8 on K3 Pico-ITX board. This is useful to keep a stable number for the /dev entries after loading the i2c-dev module.
Signed-off-by Aurelien Jarno <[email protected]>Reviewed-by Yixun Lan <[email protected]>Signed-off-by Yixun Lan <[email protected]>[ upstream commit:
ae4e84366b5d621171da2e9fae2b1f8bea3312b8](cherry picked from commit
e1f4b93f2a556b0ae661285aa72cad07b3c65fa4)--- dts/upstream/src/riscv/spacemit/k3-pico-itx.dts | 2 ++ 1 file changed, 2 insertions(+)dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +0
-0
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts line 21
Quoted 8 lines
dts/upstream/src/riscv/spacemit/k3-pico-itx.dts +2
-0@@ -14,6 +14,8 @@ aliases { ethernet0 = ð0; + i2c2 = &i2c2; + i2c8 = &i2c8; serial0 = &uart0; };
Drop this patch that landed in u-boot dts subtree with devicetree-rebasing v7.3
-E
PATCH 4/4 configs: spacemit: k3: enable eeprom tlv command in main app
In reply to E ShattowEnable "tlv" command. SPL is not yet upstream so this is only in the main app.
--- configs/spacemit_k3_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/spacemit_k3_defconfig +2 -0
@@ -22,6 +22,7 @@ CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=276 # CONFIG_BOARD_INIT is not set CONFIG_HUSH_PARSER=y +CONFIG_CMD_TLV_EEPROM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_DHCP=y
@@ -44,6 +45,7 @@ CONFIG_SPACEMIT_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_SPACEMIT_K1=y CONFIG_MISC=y +CONFIG_I2C_EEPROM=y CONFIG_PHY_GIGE=y CONFIG_DWC_ETH_QOS=y CONFIG_DWC_ETH_QOS_SPACEMIT=y
Signature · 1 line
2.53.0
Re: [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app
Quoted 21 lines · E Shattow
Enable "tlv" command. SPL is not yet upstream so this is only in the main app.
Signed-off-by E Shattow <[email protected]>--- configs/spacemit_k3_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/spacemit_k3_defconfig +1
-0@@ -22,6 +22,7 @@ CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=276 # CONFIG_BOARD_INIT is not set CONFIG_HUSH_PARSER=y +CONFIG_CMD_TLV_EEPROM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_DHCP=y
configs/spacemit_k3_defconfig CONFIG_SPACEMIT_GPIO=y · line 51
Quoted 7 lines
configs/spacemit_k3_defconfig +1
-0@@ -44,6 +45,7 @@ CONFIG_SPACEMIT_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_SPACEMIT_K1=y CONFIG_MISC=y +CONFIG_I2C_EEPROM=y CONFIG_PHY_GIGE=y CONFIG_DWC_ETH_QOS=y CONFIG_DWC_ETH_QOS_SPACEMIT=y
Re: [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app
In reply to E ShattowHi E Shattow,
Quoted 8 lines · E Shattow
Enable "tlv" command. SPL is not yet upstream so this is only in the main app.
Signed-off-by E Shattow <[email protected]>--- configs/spacemit_k3_defconfig | 2 ++ 1 file changed, 2 insertions(+)
Signature · 1 line
Yixun Lan (dlan)