Re: [PATCH 1/8] ARM: imx6: Fix broken DT path in DH board file

2022-05-19 Thread Marek Vasut

On 5/19/22 13:08, Philip Oberfichtner wrote:

In the dhelectronics iMX6 board file fix the outdated eeprom path by


nit: DH electronics


using a DT label instead.

The label has been newly created for all iMX6QDL DHCOM boards.

Signed-off-by: Philip Oberfichtner 


Reviewed-by: Marek Vasut 


[PATCH 1/8] ARM: imx6: Fix broken DT path in DH board file

2022-05-19 Thread Philip Oberfichtner
In the dhelectronics iMX6 board file fix the outdated eeprom path by
using a DT label instead.

The label has been newly created for all iMX6QDL DHCOM boards.

Signed-off-by: Philip Oberfichtner 
---

 arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi | 11 +++
 board/dhelectronics/dh_imx6/dh_imx6.c  |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
index 4c3b5e82d6..91545ab6e9 100644
--- a/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
@@ -3,6 +3,17 @@
  * Copyright (C) 2020 Harald Seiler 
  */
 
+/ {
+   aliases {
+   eeprom0 = 
+   };
+};
+
+ {
+   eeprom0: eeprom@50 {
+   };
+};
+
 _usb_otg_vbus {
gpio = < 31 GPIO_ACTIVE_HIGH>;
enable-active-high;
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c 
b/board/dhelectronics/dh_imx6/dh_imx6.c
index 2969e90a70..6059f96e80 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -100,9 +100,9 @@ static int setup_dhcom_mac_from_fuse(void)
return 0;
}
 
-   eeprom = ofnode_path("/soc/aips-bus@210/i2c@21a8000/eeprom@50");
+   eeprom = ofnode_get_aliases_node("eeprom0");
if (!ofnode_valid(eeprom)) {
-   printf("Invalid hardware path to EEPROM!\n");
+   printf("Can't find eeprom0 alias!\n");
return -ENODEV;
}
 
-- 
2.34.1