[PATCH v2 4/7] arm: dts: Refactor device trees using "&{/aliases}" syntax
Francesco Dolcini
francesco at dolcini.it
Fri Feb 23 10:11:40 CET 2024
From: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
Use the common syntax to define aliases.
Acked-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler at toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
---
.../dts/imx6dl-colibri-eval-v3-u-boot.dtsi | 18 ++++++++-----
arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi | 26 ++++++++++---------
.../arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi | 10 ++++---
.../dts/imx8mm-verdin-wifi-dev-u-boot.dtsi | 12 ++++-----
.../dts/imx8mp-verdin-wifi-dev-u-boot.dtsi | 12 ++++-----
5 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi b/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi
index 31f3a48dd9f0..0eea4d1862ae 100644
--- a/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi
@@ -5,13 +5,17 @@
#include "imx6qdl-u-boot.dtsi"
-&{/aliases} {
- /* U-Boot won't find PMIC otherwise */
- i2c0 = &i2c3;
- i2c1 = &i2c2;
- /* SDHCI instance order: eMMC, 4-bit SD/MMC (U-Boot won't find ConfigBlock otherwise) */
- mmc0 = &usdhc3;
- mmc1 = &usdhc1;
+/ {
+ aliases {
+ /* U-Boot won't find PMIC otherwise */
+ i2c0 = &i2c3;
+ i2c1 = &i2c2;
+ /* SDHCI instance order: eMMC, 4-bit SD/MMC
+ * (U-Boot won't find ConfigBlock otherwise)
+ */
+ mmc0 = &usdhc3;
+ mmc1 = &usdhc1;
+ };
};
&wdog1 {
diff --git a/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi b/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
index 3d19796cb698..3c6e503d043b 100644
--- a/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
+++ b/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
@@ -5,18 +5,20 @@
#include "imx6qdl-u-boot.dtsi"
-&{/aliases} {
- /* U-Boot won't find PMIC otherwise */
- i2c0 = &i2c1;
- i2c1 = &i2c2;
- i2c2 = &i2c3;
- /*
- * SDHCI instance order: eMMC, 8-bit SD/MMC, 4-bit SD
- * (U-Boot won't find ConfigBlock otherwise)
- */
- mmc0 = &usdhc3;
- mmc1 = &usdhc1;
- mmc2 = &usdhc2;
+/ {
+ aliases {
+ /* U-Boot won't find PMIC otherwise */
+ i2c0 = &i2c1;
+ i2c1 = &i2c2;
+ i2c2 = &i2c3;
+ /*
+ * SDHCI instance order: eMMC, 8-bit SD/MMC, 4-bit SD
+ * (U-Boot won't find ConfigBlock otherwise)
+ */
+ mmc0 = &usdhc3;
+ mmc1 = &usdhc1;
+ mmc2 = &usdhc2;
+ };
};
&wdog1 {
diff --git a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
index 57ca28edb70d..b2c12a413daf 100644
--- a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
@@ -5,10 +5,12 @@
#include "imx7s-u-boot.dtsi"
-&{/aliases} {
- /* SDHCI instance order: eMMC, SD/MMC */
- mmc0 = &usdhc3;
- mmc1 = &usdhc1;
+/ {
+ aliases {
+ /* SDHCI instance order: eMMC, SD/MMC */
+ mmc0 = &usdhc3;
+ mmc1 = &usdhc1;
+ };
};
&lcdif {
diff --git a/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
index 8efa4ddc734a..515f195ab759 100644
--- a/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
@@ -6,6 +6,12 @@
#include "imx8mm-u-boot.dtsi"
/ {
+ aliases {
+ eeprom0 = &eeprom_module;
+ eeprom1 = &eeprom_carrier_board;
+ eeprom2 = &eeprom_display_adapter;
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
bootph-pre-ram;
@@ -13,12 +19,6 @@
};
};
-&{/aliases} {
- eeprom0 = &eeprom_module;
- eeprom1 = &eeprom_carrier_board;
- eeprom2 = &eeprom_display_adapter;
-};
-
&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 25} {
bootph-pre-ram;
};
diff --git a/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
index 2a1aa1935a76..67f1d45ce269 100644
--- a/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
@@ -6,6 +6,12 @@
#include "imx8mp-u-boot.dtsi"
/ {
+ aliases {
+ eeprom0 = &eeprom_module;
+ eeprom1 = &eeprom_carrier_board;
+ eeprom2 = &eeprom_display_adapter;
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
bootph-pre-ram;
@@ -13,12 +19,6 @@
};
};
-&{/aliases} {
- eeprom0 = &eeprom_module;
- eeprom1 = &eeprom_carrier_board;
- eeprom2 = &eeprom_display_adapter;
-};
-
&clk {
bootph-all;
bootph-pre-ram;
--
2.39.2
More information about the U-Boot
mailing list