mbox series

[0/4] Add support for I2C Legacy/FRU decoding

Message ID cover.1603205426.git.michal.simek@xilinx.com
Headers show
Series Add support for I2C Legacy/FRU decoding | expand

Message

Michal Simek Oct. 20, 2020, 2:50 p.m. UTC
Hi,

the whole series add support for I2C based FRU eeprom board identification.
EEPROMs are referenced by nvmem alias which was suggested by Rob Herring
(dt maintainer). Previous code was using chosen xlnx,eeprom property.
And because no platform is setting up nvmem alias the code is doing nothing
on all boards.

If you want to try it and test it just choose board and define nvmem
aliases and you should see similar logs like this.

zcu104 with legacy format and FRU on FMC

U-Boot 2020.10-00835-g819dc03ff784 (Oct 20 2020 - 12:48:12 +0200)

Model: ZynqMP ZCU104 RevC
Board: Xilinx ZynqMP
DRAM:  2 GiB
PMUFW:  v1.1
Xilinx I2C Legacy format at nvmem0:
 Board name:    zcu104
 Board rev:     c
 Board SN:      895527361843-94820
 Ethernet mac:  00:0a:35:04:eb:93
Xilinx I2C FRU format at nvmem1:
 Manufacturer Name: XILINX
 Product Name: XXX-XXX
 Serial No: 1231
 Part Number: dd
 File ID: U-Boot generator
 Revision Number: rev_A
EL Level:       EL2
Chip ID:        zu7e
WDT:   Started with servicing (60s timeout)
NAND:  0 MiB
MMC:   mmc@ff170000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Bootmode: LVL_SHFT_SD_MODE1
Reset reason:   EXTERNAL
Net:
ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 12, interface rgmii-id
eth0: ethernet@ff0e0000
Hit any key to stop autoboot:  0
ZynqMP>

Based on https://lists.denx.de/pipermail/u-boot/2020-October/429382.html

Thanks,
Michal


Michal Simek (3):
  xilinx: common: Add Makefile to common folder
  xilinx: cmd: Add basic fru format generator
  xilinx: board: Add FRU decoder support

Siva Durga Prasad Paladugu (1):
  xilinx: cmd: Add support for FRU commands

 board/xilinx/Kconfig            |   8 +
 board/xilinx/common/Makefile    |  10 +
 board/xilinx/common/board.c     |  83 +++++++-
 board/xilinx/common/fru.c       |  91 ++++++++
 board/xilinx/common/fru.h       |  83 ++++++++
 board/xilinx/common/fru_ops.c   | 362 ++++++++++++++++++++++++++++++++
 board/xilinx/versal/Makefile    |   1 -
 board/xilinx/zynq/Makefile      |   1 -
 board/xilinx/zynqmp/MAINTAINERS |   1 +
 board/xilinx/zynqmp/Makefile    |   1 -
 10 files changed, 637 insertions(+), 4 deletions(-)
 create mode 100644 board/xilinx/common/Makefile
 create mode 100644 board/xilinx/common/fru.c
 create mode 100644 board/xilinx/common/fru.h
 create mode 100644 board/xilinx/common/fru_ops.c

Comments

Michal Simek Oct. 27, 2020, 7:25 a.m. UTC | #1
Ășt 20. 10. 2020 v 16:50 odesĂ­latel Michal Simek
<michal.simek@xilinx.com> napsal:
>
> Hi,
>
> the whole series add support for I2C based FRU eeprom board identification.
> EEPROMs are referenced by nvmem alias which was suggested by Rob Herring
> (dt maintainer). Previous code was using chosen xlnx,eeprom property.
> And because no platform is setting up nvmem alias the code is doing nothing
> on all boards.
>
> If you want to try it and test it just choose board and define nvmem
> aliases and you should see similar logs like this.
>
> zcu104 with legacy format and FRU on FMC
>
> U-Boot 2020.10-00835-g819dc03ff784 (Oct 20 2020 - 12:48:12 +0200)
>
> Model: ZynqMP ZCU104 RevC
> Board: Xilinx ZynqMP
> DRAM:  2 GiB
> PMUFW:  v1.1
> Xilinx I2C Legacy format at nvmem0:
>  Board name:    zcu104
>  Board rev:     c
>  Board SN:      895527361843-94820
>  Ethernet mac:  00:0a:35:04:eb:93
> Xilinx I2C FRU format at nvmem1:
>  Manufacturer Name: XILINX
>  Product Name: XXX-XXX
>  Serial No: 1231
>  Part Number: dd
>  File ID: U-Boot generator
>  Revision Number: rev_A
> EL Level:       EL2
> Chip ID:        zu7e
> WDT:   Started with servicing (60s timeout)
> NAND:  0 MiB
> MMC:   mmc@ff170000: 0
> Loading Environment from FAT... *** Warning - bad CRC, using default environment
>
> In:    serial@ff000000
> Out:   serial@ff000000
> Err:   serial@ff000000
> Bootmode: LVL_SHFT_SD_MODE1
> Reset reason:   EXTERNAL
> Net:
> ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 12, interface rgmii-id
> eth0: ethernet@ff0e0000
> Hit any key to stop autoboot:  0
> ZynqMP>
>
> Based on https://lists.denx.de/pipermail/u-boot/2020-October/429382.html
>
> Thanks,
> Michal
>
>
> Michal Simek (3):
>   xilinx: common: Add Makefile to common folder
>   xilinx: cmd: Add basic fru format generator
>   xilinx: board: Add FRU decoder support
>
> Siva Durga Prasad Paladugu (1):
>   xilinx: cmd: Add support for FRU commands
>
>  board/xilinx/Kconfig            |   8 +
>  board/xilinx/common/Makefile    |  10 +
>  board/xilinx/common/board.c     |  83 +++++++-
>  board/xilinx/common/fru.c       |  91 ++++++++
>  board/xilinx/common/fru.h       |  83 ++++++++
>  board/xilinx/common/fru_ops.c   | 362 ++++++++++++++++++++++++++++++++
>  board/xilinx/versal/Makefile    |   1 -
>  board/xilinx/zynq/Makefile      |   1 -
>  board/xilinx/zynqmp/MAINTAINERS |   1 +
>  board/xilinx/zynqmp/Makefile    |   1 -
>  10 files changed, 637 insertions(+), 4 deletions(-)
>  create mode 100644 board/xilinx/common/Makefile
>  create mode 100644 board/xilinx/common/fru.c
>  create mode 100644 board/xilinx/common/fru.h
>  create mode 100644 board/xilinx/common/fru_ops.c
>
> --
> 2.28.0
>

Applied.
M