TQMa6UL: read module data from EEPROM
Subsystems (3)
cover TQMa6UL: read module data from EEPROM
Reading TQMa6UL module data from the module EEPROM using the tq-EEPROM-sysinfo driver.
Max Merchel (4):
sysinfo: tq_eeprom: select NVMEM
arm: dts: tqma6ul: add eeprom nvmem-layout
arm: dts: tqma6ul: integrate tq,eeprom sysinfo driver
boards: tqma6ul: select TQ_COMMON_SYSINFO
arch/arm/dts/imx6ul-tqma6ul-common-u-boot.dtsi | 18 ++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 1 + drivers/sysinfo/Kconfig | 1 + 3 files changed, 20 insertions(+)
base-commit: 298d44464dc63a4f3f5489150acd7958f359f9bd
Signature · 1 line
2.43.0
PATCH 1/4 sysinfo: tq_eeprom: select NVMEM
The SYSINFO_TQ_EEPROM driver requires NVMEM to access the SoM EEPROM.
--- drivers/sysinfo/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/sysinfo/Kconfig +1 -0
@@ -63,6 +63,7 @@ config SYSINFO_TQ_EEPROM bool "Enable TQ-Systems EEPROM sysinfo driver" depends on I2C_EEPROM depends on SPL_I2C_EEPROM || !SPL_SYSINFO + select NVMEM help Support querying EEPROM of TQ-Systems SOMs to determine board information.
Signature · 1 line
2.43.0
PATCH 2/4 arm: dts: tqma6ul: add eeprom nvmem-layout
In reply to Max MerchelTQMa6UL has board-information located in EEPROM at offset 0x20. Add necessary nodes and properties for nvmem-cells.
Revert this commit once the upstream linux device trees are accepted and synchronized.
--- arch/arm/dts/imx6ul-tqma6ul-common-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/dts/imx6ul-tqma6ul-common-u-boot.dtsi +12 -0
@@ -24,6 +24,18 @@ bootph-pre-ram; }; +&m24c64_50 { + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + module_info: module-info@20 { + reg = <0x20 0x60>; + }; + }; +}; + &osc { bootph-pre-ram; };
Signature · 1 line
2.43.0
PATCH 3/4 arm: dts: tqma6ul: integrate tq,eeprom sysinfo driver
In reply to Max MerchelAdd sysinfo node for tq,eeprom sysinfo driver.
--- arch/arm/dts/imx6ul-tqma6ul-common-u-boot.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/dts/imx6ul-tqma6ul-common-u-boot.dtsi +6 -0
@@ -14,6 +14,12 @@ u-boot,mmc-env-offset = <0x100000>; u-boot,mmc-env-offset-redundant = <0x110000>; }; + + sysinfo: sysinfo { + compatible = "tq,eeprom-sysinfo"; + nvmem-cells = <&module_info>; + nvmem-cell-names = "device_info"; + }; }; &clks {
Signature · 1 line
2.43.0
PATCH 4/4 boards: tqma6ul: select TQ_COMMON_SYSINFO
In reply to Max MerchelSelect TQ_COMMON_SYSINFO to use the tq_eeprom sysinfo driver to read and print module EEPROM data.
--- arch/arm/mach-imx/mx6/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/mx6/Kconfig +1 -0
@@ -637,6 +637,7 @@ config TARGET_TQMA6UL bool "TQ-Systems TQMa6UL[L]x" depends on MX6UL || MX6ULL select TQ_COMMON_SOM + select TQ_COMMON_SYSINFO select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select OF_SYSTEM_SETUP
Signature · 1 line
2.43.0