From: Marcello Sylvester Bauer <[email protected]>

Enable the board information EEPROM in the GXP device tree to collect
the MAC address, as well as the serial- and part-number.

Signed-off-by: Marcello Sylvester Bauer <[email protected]>
Signed-off-by: Tan Siewert <[email protected]>
---
 arch/arm/dts/hpe-gxp.dtsi | 32 ++++++++++++++++++++++++++++++++
 configs/gxp_defconfig     |  2 ++
 2 files changed, 34 insertions(+)

diff --git a/arch/arm/dts/hpe-gxp.dtsi b/arch/arm/dts/hpe-gxp.dtsi
index cf735b3c4f3..fa174bdc582 100644
--- a/arch/arm/dts/hpe-gxp.dtsi
+++ b/arch/arm/dts/hpe-gxp.dtsi
@@ -45,6 +45,38 @@
                ranges;
                dma-ranges;
 
+               eeprom: eeprom@a0017f00 {
+                       compatible = "hpe,gxp-eeprom";
+                       reg = <0xa0017f00 0x100>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       bootph-all;
+
+                       serial_number: serial-number@1 {
+                               reg = <0x01 0x10>;
+                       };
+
+                       part_number: part-number@6d {
+                               reg = <0x6d 0x10>;
+                       };
+
+                       mac_address0: mac-address@84 {
+                               reg = <0x84 0x6>;
+                       };
+
+                       mac_address1: mac-address@8a {
+                               reg = <0x8a 0x6>;
+                       };
+
+                       pca_serial_number: pca-serial-number@90 {
+                               reg = <0x90 0x10>;
+                       };
+
+                       pca_part_number: pca-part-number@a0 {
+                               reg = <0xa0 0x10>;
+                       };
+               };
+
                L2: cache-controller@b0040000 {
                        compatible = "arm,pl310-cache";
                        reg = <0xb0040000 0x1000>;
diff --git a/configs/gxp_defconfig b/configs/gxp_defconfig
index 7821759f83d..2369b4cd07d 100644
--- a/configs/gxp_defconfig
+++ b/configs/gxp_defconfig
@@ -39,6 +39,8 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_REDUNDANT=y
 CONFIG_NETCONSOLE=y
 CONFIG_MISC=y
+CONFIG_NVMEM=y
+CONFIG_GXP_EEPROM=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y

-- 
2.53.0

Reply via email to