Loading different DTS files from U-Boot
We're at a point where it probably makes sense to separate the generic
"hey, let's experiment with this" Clearfog config from a device-specific
"I'm just a CL-ROADMv2" or "I'm a future SDN ROADM thingy".
The CL-ROADMv2 is branched out in order to cement this legacy, one-off
device in stone. Note that ADT7643 is still being loaded in a crazy way
as explained by https://gerrit.cesnet.cz/483 .
Change-Id: Ie86d37cf94c36077134afa54cacdae6962dd8c11
diff --git a/board/czechlight/clearfog/CL-ROADMv2-clearfog.dts b/board/czechlight/clearfog/CL-ROADMv2-clearfog.dts
new file mode 100644
index 0000000..592b666
--- /dev/null
+++ b/board/czechlight/clearfog/CL-ROADMv2-clearfog.dts
@@ -0,0 +1,16 @@
+#include "armada-388-clearfog-base.dts"
+
+&w25q32 {
+ status = "okay";
+};
+
+/ {
+ soc {
+ internal-regs {
+ sdhci@d8000 {
+ /delete-property/ cd-gpios;
+ broken-cd;
+ };
+ };
+ };
+};
diff --git a/board/czechlight/clearfog/boot.scr.txt b/board/czechlight/clearfog/boot.scr.txt
index cf669ea..2777ba8 100644
--- a/board/czechlight/clearfog/boot.scr.txt
+++ b/board/czechlight/clearfog/boot.scr.txt
@@ -1,4 +1,8 @@
setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight} systemd.machine_id=${machineid} panic=10 oops=panic
-load mmc 0:${rauc_part} ${fdt_addr_r} /boot/czechlight-clearfog.dtb || reset
+if load mmc 0:${rauc_part} ${fdt_addr_r} /boot/${czechlight}-clearfog.dtb; then
+ echo "DTS: ${czechlight}-clearfog"
+else
+ load mmc 0:${rauc_part} ${fdt_addr_r} /boot/czechlight-clearfog.dtb || reset
+fi
load mmc 0:${rauc_part} ${kernel_addr_r} /boot/zImage || reset
bootz ${kernel_addr_r} - ${fdt_addr_r} || reset
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index 8e6d152..5172ccc 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -22,7 +22,7 @@
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/linux.fragment $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/kconfig"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y
-BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/czechlight-clearfog.dts"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/czechlight-clearfog.dts $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/CL-ROADMv2-clearfog.dts"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_LINUX_TOOLS_GPIO=y
BR2_PACKAGE_LINUX_TOOLS_PERF=y