toradex: common: Add sysinfo driver
This commit introduces support for the Toradex sysinfo driver in U-Boot,
which uses information from Toradex config block to print correct
board model.
In case the Toradex config block is not present sysinfo prints the model
of the board provided by device tree removing per board specific prints.
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
diff --git a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
index c54a59e..d73be74 100644
--- a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
+++ b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
@@ -3,6 +3,12 @@
* Copyright 2019 Toradex AG
*/
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
+
&mu {
bootph-some-ram;
};
diff --git a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
index 6ab6b1f..60c4cd6 100644
--- a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
+++ b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
@@ -3,6 +3,12 @@
* Copyright 2019 Toradex AG
*/
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
+
&{/imx8qx-pm} {
bootph-some-ram;
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 0eea4d1..5a91d0a 100644
--- a/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx6dl-colibri-eval-v3-u-boot.dtsi
@@ -16,6 +16,10 @@
mmc0 = &usdhc3;
mmc1 = &usdhc1;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&wdog1 {
diff --git a/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi b/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
index 3c6e503..5941263 100644
--- a/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
+++ b/arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
@@ -19,6 +19,10 @@
mmc1 = &usdhc1;
mmc2 = &usdhc2;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&wdog1 {
diff --git a/arch/arm/dts/imx6ull-colibri-eval-v3-u-boot.dtsi b/arch/arm/dts/imx6ull-colibri-eval-v3-u-boot.dtsi
index 6823b42..7318142 100644
--- a/arch/arm/dts/imx6ull-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx6ull-colibri-eval-v3-u-boot.dtsi
@@ -9,6 +9,10 @@
usb0 = &usbotg1; /* required for ums */
display0 = &lcdif;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&pinctrl_uart1 {
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 b2c12a4..6814276 100644
--- a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
@@ -11,6 +11,10 @@
mmc0 = &usdhc3;
mmc1 = &usdhc1;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&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 515f195..38db560 100644
--- a/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
@@ -12,6 +12,10 @@
eeprom2 = &eeprom_display_adapter;
};
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
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 67f1d45..03f211d 100644
--- a/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
@@ -12,6 +12,10 @@
eeprom2 = &eeprom_display_adapter;
};
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
bootph-pre-ram;
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
index 02f34c9..28b697b 100644
--- a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
@@ -19,6 +19,10 @@
memory@80000000 {
bootph-all;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&main_timer0 {
diff --git a/arch/arm/dts/tegra124-apalis-u-boot.dtsi b/arch/arm/dts/tegra124-apalis-u-boot.dtsi
new file mode 100644
index 0000000..a3614d2
--- /dev/null
+++ b/arch/arm/dts/tegra124-apalis-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "tegra124-u-boot.dtsi"
+
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
diff --git a/arch/arm/dts/tegra20-colibri-u-boot.dtsi b/arch/arm/dts/tegra20-colibri-u-boot.dtsi
new file mode 100644
index 0000000..d4a669a
--- /dev/null
+++ b/arch/arm/dts/tegra20-colibri-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "tegra20-u-boot.dtsi"
+
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
diff --git a/arch/arm/dts/tegra30-apalis-u-boot.dtsi b/arch/arm/dts/tegra30-apalis-u-boot.dtsi
new file mode 100644
index 0000000..37cbfbc
--- /dev/null
+++ b/arch/arm/dts/tegra30-apalis-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "tegra30-u-boot.dtsi"
+
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
diff --git a/arch/arm/dts/tegra30-colibri-u-boot.dtsi b/arch/arm/dts/tegra30-colibri-u-boot.dtsi
new file mode 100644
index 0000000..37cbfbc
--- /dev/null
+++ b/arch/arm/dts/tegra30-colibri-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "tegra30-u-boot.dtsi"
+
+/ {
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
+};
diff --git a/arch/arm/dts/vf610-colibri-eval-v3-u-boot.dtsi b/arch/arm/dts/vf610-colibri-eval-v3-u-boot.dtsi
index 572d408..8c3b86c 100644
--- a/arch/arm/dts/vf610-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/vf610-colibri-eval-v3-u-boot.dtsi
@@ -7,6 +7,10 @@
soc {
bootph-all;
};
+
+ sysinfo {
+ compatible = "toradex,sysinfo";
+ };
};
&aips0 {