arm: dart6ul: change compatible string for eeprom
Subsystems (2)
PATCH 1/2 arm: dart6ul: change compatible string for eeprom
From: Marc Ferland <[email protected]>
The eeprom at address 0x50 is a BR24G04NUX-3TTR. It has a 4Kbit (512x8) capacity, change the compatible string to reflect this fact.
Also, add an alias to easily refer to this eeprom with fdt_path_offset() which will be in another commit.
--- arch/arm/dts/imx6ull-dart-6ul.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/dts/imx6ull-dart-6ul.dtsi +7 -2
@@ -14,6 +14,10 @@ chosen { stdout-path = &uart1; }; + + aliases { + eeprom0 = &eeprom_som; + }; }; &fec1 {
@@ -97,9 +101,10 @@ sda-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; status = "okay"; - eeprom at 50 { - compatible = "cat,24c32"; + eeprom_som: eeprom at 50 { + compatible = "atmel,24c04"; reg = <0x50>; + status = "okay"; }; };
Signature · 1 line
2.25.1
PATCH 2/2 arm: dart6ul: read and print SoM info from eeprom on startup
From: Marc Ferland <[email protected]>
The dart6ul has an i2c eeprom at 0x50 which contains, among other things, the manufacturing/revision/options info of the SoM. This patch replaces the current checkboard() implementation with a more exhaustive one based on the content of the eeprom.
Since this code uses the new driver model, some changes were also required in the DTS to make the nodes related to i2c available before relocation.
This code was inspired from the supported u-boot code from Variscite which can be found here:
https://github.com/varigit/uboot-imx/tree/imx_v2018.03_4.14.78_1.0.0_ga_var02
New output example:
Board: PN: VSM-6UL-705B, Assy: AS1812142257, Date: 2019 Feb 17
Storage: eMMC, Wifi: yes, DDR: 1024 MiB, Rev: 2.4G
--- arch/arm/dts/imx6ull-dart-6ul.dtsi | 8 +++ board/variscite/dart_6ul/dart_6ul.c | 104 +++++++++++++++++++++++++++- configs/variscite_dart6ul_defconfig | 2 + 3 files changed, 113 insertions(+), 1 deletion(-)
arch/arm/dts/imx6ull-dart-6ul.dtsi +8 -0
@@ -56,6 +56,10 @@ }; }; +&gpio1 { + u-boot,dm-pre-reloc; +}; + &gpmi { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpmi_nand>;
@@ -100,8 +104,10 @@ scl-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; status = "okay"; + u-boot,dm-pre-reloc; eeprom_som: eeprom at 50 { + u-boot,dm-pre-reloc; compatible = "atmel,24c04"; reg = <0x50>; status = "okay";
@@ -210,6 +216,7 @@ }; pinctrl_i2c2: i2cgrp { + u-boot,dm-pre-reloc; fsl,pins = < MX6UL_PAD_UART5_TX_DATA__I2C2_SCL 0x4001b8b0 MX6UL_PAD_UART5_RX_DATA__I2C2_SDA 0x4001b8b0
@@ -217,6 +224,7 @@ }; pinctrl_i2c2_gpio: i2c2grp_gpio { + u-boot,dm-pre-reloc; fsl,pins = < MX6UL_PAD_UART5_TX_DATA__GPIO1_IO30 0x1b8b0 MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 0x1b8b0
board/variscite/dart_6ul/dart_6ul.c +103 -1
120 lines not on this page · raw message
configs/variscite_dart6ul_defconfig +2 -0
@@ -36,6 +36,8 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_I2C_GPIO=y CONFIG_SYS_I2C_MXC=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y CONFIG_FSL_USDHC=y CONFIG_MTD=y CONFIG_PHYLIB=y
Signature · 1 line
2.25.1
Fabio Estevam
reviewerPATCH 2/2 arm: dart6ul: read and print SoM info from eeprom on startup
Quoted 15 lines · On Tue, Dec 22, 2020 at 4:58 PM <[email protected]> wrote:
From: Marc Ferland <[email protected]>
The dart6ul has an i2c eeprom at
0x50which contains, among other things, the manufacturing/revision/options info of the SoM. This patch replaces the currentcheckboard()implementation with a more exhaustive one based on the content of the eeprom.Since this code uses the new driver model, some changes were also required in the DTS to make the nodes related to i2c available before relocation.
This code was inspired from the supported u-boot code from Variscite which can be found here:
Quoted 8 lines
https://github.com/varigit/uboot-imx/tree/imx_v2018.03_4.14.78_1.0.0_ga_var02
New output example:
Board: PN: VSM-6UL-705B, Assy: AS1812142257, Date: 2019 Feb 17
Storage: eMMC, Wifi: yes, DDR: 1024 MiB, Rev: 2.4GSigned-off-by Marc Ferland <[email protected]>
PATCH 2/2 arm: dart6ul: read and print SoM info from eeprom on startup
In reply to ferlandm at amotus.caQuoted 13 lines
From: Marc Ferland <[email protected]>
The dart6ul has an i2c eeprom at0x50which contains, among other things, the manufacturing/revision/options info of the SoM. This patch replaces the currentcheckboard()implementation with a more exhaustive one based on the content of the eeprom.
Since this code uses the new driver model, some changes were also required in the DTS to make the nodes related to i2c available before relocation.
This code was inspired from the supported u-boot code from Variscite which can be found here:
https://github.com/varigit/uboot-imx/tree/imx_v2018.03_4.14.78_1.0.0_ga_var02
New output example:
Board: PN: VSM-6UL-705B, Assy: AS1812142257, Date: 2019 Feb 17
Quoted 3 lines
Storage: eMMC, Wifi: yes, DDR: 1024 MiB, Rev: 2.4GSigned-off-by Marc Ferland <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Fabio Estevam
reviewerPATCH 1/2 arm: dart6ul: change compatible string for eeprom
In reply to ferlandm at amotus.caQuoted 11 lines · On Tue, Dec 22, 2020 at 4:58 PM <[email protected]> wrote:
From: Marc Ferland <[email protected]>
The eeprom at address
0x50is a BR24G04NUX-3TTR. It has a 4Kbit (512x8) capacity, change the compatible string to reflect this fact.Also, add an alias to easily refer to this eeprom with
fdt_path_offset()which will be in another commit.Signed-off-by Marc Ferland <[email protected]>
PATCH 1/2 arm: dart6ul: change compatible string for eeprom
In reply to ferlandm at amotus.caQuoted 8 lines
From: Marc Ferland <[email protected]>
The eeprom at address0x50is a BR24G04NUX-3TTR. It has a 4Kbit (512x8) capacity, change the compatible string to reflect this fact.
Also, add an alias to easily refer to this eeprom withfdt_path_offset()which will be in another commit.Signed-off-by Marc Ferland <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================