Skip to contentSkip to conversation

sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

PATCH New Martin Kelly 3 participants 10 messages Jun 1, 2018 – Jun 11, 2018 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

---
This patch is against u-boot master and thus conflicts with u-boot sunxi patch 31510b41f6b736fd03e2779a2585f85df39e667f ("sunxi: allow CONFIG_DEFAULT_FDT_FILE override"). If you would like me to apply this against the sunxi tree instead, I would be happy to do so and resend it.

Obviously, I cannot test a change like this on every board. Here's the tests I did:

- Booted on the nanopi neo plus2 (the board I do have).
- Compile-tested every affected config.
- To avoid missing anything I generated the config changes with the following Python script. This script mimics what the preprocessor was doing, but encodes it explicitly in the config. Reviewing the script is probably easier than reviewing each individual file:

#!/usr/bin/python3

import os

root = '/home/martin/u-boot/configs'
for name in os.listdir(root):
path = os.path.join(root, name)
with open(path, 'r') as f:
contents = f.read()
if 'CONFIG_ARCH_SUNXI=y' not in contents:
continue
if 'CONFIG_DEFAULT_FDT_FILE=' in contents:
# Make the script idempotent.
continue

if 'CONFIG_MACH_SUN50I=y' in contents or 'CONFIG_MACH_SUN50I_H5=y' in contents:
arm64 = True
else:
arm64 = False

lines = []
for line in contents.split('\n'):
if line.startswith('CONFIG_DEFAULT_DEVICE_TREE='):
split = line.split('=') assert(len(split) == 2)
dtb = split[1]

if dtb[0] == '"' and dtb[-1] == '"':
# Dequotify.
dtb = dtb[1:-1]

dtb = '%s.dtb' % dtb
if arm64:
dtb = 'allwinner/%s' % dtb

lines.append('CONFIG_DEFAULT_FDT_FILE="%s"' % dtb)
lines.append(line)

with open(path, 'w') as f:
f.write('\n'.join(lines))

[end script]

 configs/A10-OLinuXino-Lime_defconfig           | 1 +
 configs/A10s-OLinuXino-M_defconfig             | 1 +
 configs/A13-OLinuXinoM_defconfig               | 1 +
 configs/A13-OLinuXino_defconfig                | 1 +
 configs/A20-OLinuXino-Lime2-eMMC_defconfig     | 1 +
 configs/A20-OLinuXino-Lime2_defconfig          | 1 +
 configs/A20-OLinuXino-Lime_defconfig           | 1 +
 configs/A20-OLinuXino_MICRO-eMMC_defconfig     | 1 +
 configs/A20-OLinuXino_MICRO_defconfig          | 1 +
 configs/A20-Olimex-SOM-EVB_defconfig           | 1 +
 configs/A20-Olimex-SOM204-EVB-eMMC_defconfig   | 1 +
 configs/A20-Olimex-SOM204-EVB_defconfig        | 1 +
 configs/A33-OLinuXino_defconfig                | 1 +
 configs/Ainol_AW1_defconfig                    | 1 +
 configs/Ampe_A76_defconfig                     | 1 +
 configs/Auxtek-T003_defconfig                  | 1 +
 configs/Auxtek-T004_defconfig                  | 1 +
 configs/Bananapi_M2_Ultra_defconfig            | 1 +
 configs/Bananapi_defconfig                     | 1 +
 configs/Bananapi_m2m_defconfig                 | 1 +
 configs/Bananapro_defconfig                    | 1 +
 configs/CHIP_defconfig                         | 1 +
 configs/CHIP_pro_defconfig                     | 1 +
 configs/CSQ_CS908_defconfig                    | 1 +
 configs/Chuwi_V7_CW0825_defconfig              | 1 +
 configs/Colombus_defconfig                     | 1 +
 configs/Cubieboard2_defconfig                  | 1 +
 configs/Cubieboard4_defconfig                  | 1 +
 configs/Cubieboard_defconfig                   | 1 +
 configs/Cubietruck_defconfig                   | 1 +
 configs/Cubietruck_plus_defconfig              | 1 +
 configs/Empire_electronix_d709_defconfig       | 1 +
 configs/Empire_electronix_m712_defconfig       | 1 +
 configs/Hummingbird_A31_defconfig              | 1 +
 configs/Hyundai_A7HD_defconfig                 | 1 +
 configs/Itead_Ibox_A20_defconfig               | 1 +
 configs/Lamobo_R1_defconfig                    | 1 +
 configs/LicheePi_Zero_defconfig                | 1 +
 configs/Linksprite_pcDuino3_Nano_defconfig     | 1 +
 configs/Linksprite_pcDuino3_defconfig          | 1 +
 configs/Linksprite_pcDuino_defconfig           | 1 +
 configs/MK808C_defconfig                       | 1 +
 configs/MSI_Primo73_defconfig                  | 1 +
 configs/MSI_Primo81_defconfig                  | 1 +
 configs/Marsboard_A10_defconfig                | 1 +
 configs/Mele_A1000G_quad_defconfig             | 1 +
 configs/Mele_A1000_defconfig                   | 1 +
 configs/Mele_I7_defconfig                      | 1 +
 configs/Mele_M3_defconfig                      | 1 +
 configs/Mele_M5_defconfig                      | 1 +
 configs/Mele_M9_defconfig                      | 1 +
 configs/Merrii_A80_Optimus_defconfig           | 1 +
 configs/Mini-X_defconfig                       | 1 +
 configs/Nintendo_NES_Classic_Edition_defconfig | 1 +
 configs/Orangepi_defconfig                     | 1 +
 configs/Orangepi_mini_defconfig                | 1 +
 configs/Sinlinx_SinA31s_defconfig              | 1 +
 configs/Sinlinx_SinA33_defconfig               | 1 +
 configs/Sinovoip_BPI_M2_Plus_defconfig         | 1 +
 configs/Sinovoip_BPI_M2_defconfig              | 1 +
 configs/Sinovoip_BPI_M3_defconfig              | 1 +
 configs/Sunchip_CX-A99_defconfig               | 1 +
 configs/UTOO_P66_defconfig                     | 1 +
 configs/Wexler_TAB7200_defconfig               | 1 +
 configs/Wits_Pro_A20_DKT_defconfig             | 1 +
 configs/Wobo_i5_defconfig                      | 1 +
 configs/Yones_Toptech_BD1078_defconfig         | 1 +
 configs/Yones_Toptech_BS1078_V2_defconfig      | 1 +
 configs/a64-olinuxino_defconfig                | 1 +
 configs/ba10_tv_box_defconfig                  | 1 +
 configs/bananapi_m1_plus_defconfig             | 1 +
 configs/bananapi_m2_berry_defconfig            | 1 +
 configs/bananapi_m64_defconfig                 | 1 +
 configs/colorfly_e708_q1_defconfig             | 1 +
 configs/difrnce_dit4350_defconfig              | 1 +
 configs/dserve_dsrv9703c_defconfig             | 1 +
 configs/ga10h_v1_1_defconfig                   | 1 +
 configs/gt90h_v4_defconfig                     | 1 +
 configs/h8_homlet_v2_defconfig                 | 1 +
 configs/i12-tvbox_defconfig                    | 1 +
 configs/iNet_3F_defconfig                      | 1 +
 configs/iNet_3W_defconfig                      | 1 +
 configs/iNet_86VS_defconfig                    | 1 +
 configs/iNet_D978_rev2_defconfig               | 1 +
 configs/icnova-a20-swac_defconfig              | 1 +
 configs/inet1_defconfig                        | 1 +
 configs/inet86dz_defconfig                     | 1 +
 configs/inet97fv2_defconfig                    | 1 +
 configs/inet98v_rev2_defconfig                 | 1 +
 configs/inet9f_rev03_defconfig                 | 1 +
 configs/inet_q972_defconfig                    | 1 +
 configs/jesurun_q5_defconfig                   | 1 +
 configs/libretech_all_h3_cc_h2_plus_defconfig  | 1 +
 configs/libretech_all_h3_cc_h3_defconfig       | 1 +
 configs/libretech_all_h3_cc_h5_defconfig       | 1 +
 configs/mixtile_loftq_defconfig                | 1 +
 configs/mk802_a10s_defconfig                   | 1 +
 configs/mk802_defconfig                        | 1 +
 configs/mk802ii_defconfig                      | 1 +
 configs/nanopi_a64_defconfig                   | 1 +
 configs/nanopi_m1_defconfig                    | 1 +
 configs/nanopi_m1_plus_defconfig               | 1 +
 configs/nanopi_neo2_defconfig                  | 1 +
 configs/nanopi_neo_air_defconfig               | 1 +
 configs/nanopi_neo_defconfig                   | 1 +
 configs/nanopi_neo_plus2_defconfig             | 1 +
 configs/orangepi_2_defconfig                   | 1 +
 configs/orangepi_lite_defconfig                | 1 +
 configs/orangepi_one_defconfig                 | 1 +
 configs/orangepi_pc2_defconfig                 | 1 +
 configs/orangepi_pc_defconfig                  | 1 +
 configs/orangepi_pc_plus_defconfig             | 1 +
 configs/orangepi_plus2e_defconfig              | 1 +
 configs/orangepi_plus_defconfig                | 1 +
 configs/orangepi_prime_defconfig               | 1 +
 configs/orangepi_win_defconfig                 | 1 +
 configs/orangepi_zero_defconfig                | 1 +
 configs/orangepi_zero_plus2_defconfig          | 1 +
 configs/parrot_r16_defconfig                   | 1 +
 configs/pine64_plus_defconfig                  | 1 +
 configs/polaroid_mid2407pxe03_defconfig        | 1 +
 configs/polaroid_mid2809pxe04_defconfig        | 1 +
 configs/pov_protab2_ips9_defconfig             | 1 +
 configs/q8_a13_tablet_defconfig                | 1 +
 configs/q8_a23_tablet_800x480_defconfig        | 1 +
 configs/q8_a33_tablet_1024x600_defconfig       | 1 +
 configs/q8_a33_tablet_800x480_defconfig        | 1 +
 configs/r7-tv-dongle_defconfig                 | 1 +
 configs/sopine_baseboard_defconfig             | 1 +
 configs/sun8i_a23_evb_defconfig                | 1 +
 configs/sunxi_Gemei_G9_defconfig               | 1 +
 configs/tbs_a711_defconfig                     | 1 +
 include/configs/sunxi-common.h                 | 8 +-------
 133 files changed, 133 insertions(+), 7 deletions(-)
configs/A10-OLinuXino-Lime_defconfig +1 -0
index feb1173c0b..83c7813999 100644
@@ -8,6 +8,7 @@ CONFIG_SYS_CLK_FREQ=912000000
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-olinuxino-lime.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A10s-OLinuXino-M_defconfig +1 -0
index 9498a6d752..6ec7641f29 100644
@@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PG1"
 CONFIG_MMC1_CD_PIN="PG13"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 CONFIG_USB1_VBUS_PIN="PB10"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-olinuxino-micro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/A13-OLinuXinoM_defconfig +1 -0
index ed507cdf0b..654a2ad59e 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_VGA_VIA_LCD=y
 CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y
 CONFIG_VIDEO_LCD_POWER="PB10"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-olinuxino-micro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/A13-OLinuXino_defconfig +1 -0
index 8e160d7cc4..d9b0b99aca 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_VGA_VIA_LCD=y
 CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-olinuxino.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/A20-OLinuXino-Lime2-eMMC_defconfig +1 -0
index 9d043e856a..6b5ccfb888 100644
@@ -9,6 +9,7 @@ CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olinuxino-lime2-emmc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-OLinuXino-Lime2_defconfig +1 -0
index f2997c6fe5..15c085bd32 100644
@@ -8,6 +8,7 @@ CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olinuxino-lime2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-OLinuXino-Lime_defconfig +1 -0
index b7c13a6932..a4efb7642b 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olinuxino-lime.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-OLinuXino_MICRO-eMMC_defconfig +1 -0
index f7e7cbab0a..f0ff837718 100644
@@ -8,6 +8,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_I2C1_ENABLE=y
 CONFIG_VIDEO_VGA=y
 CONFIG_SATAPWR="PB8"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olinuxino-micro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-OLinuXino_MICRO_defconfig +1 -0
index 8dcbdc08f9..a5881577fa 100644
@@ -9,6 +9,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_I2C1_ENABLE=y
 CONFIG_VIDEO_VGA=y
 CONFIG_SATAPWR="PB8"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olinuxino-micro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-Olimex-SOM-EVB_defconfig +1 -0
index a06499e2d0..589a59f981 100644
@@ -10,6 +10,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_SATAPWR="PC3"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olimex-som-evb.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-Olimex-SOM204-EVB-eMMC_defconfig +1 -0
index 847945b649..110b4f1838 100644
@@ -10,6 +10,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
 CONFIG_GMAC_TX_DELAY=4
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olimex-som204-evb-emmc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som204-evb-emmc"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A20-Olimex-SOM204-EVB_defconfig +1 -0
index e56f2c7110..5b00887d1a 100644
@@ -9,6 +9,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_I2C1_ENABLE=y
 CONFIG_SATAPWR="PC3"
 CONFIG_GMAC_TX_DELAY=4
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-olimex-som204-evb.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som204-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/A33-OLinuXino_defconfig +1 -0
index 744e7ef511..1a55292370 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:16,ri:209,up:22,lo
 CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_BL_EN="PB2"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-olinuxino.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Ainol_AW1_defconfig +1 -0
index 3e47ca2466..70b4ee180a 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:40000,le:87,ri:112,up:38,lo
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-ainol-aw1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-ainol-aw1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Ampe_A76_defconfig +1 -0
index b0d6047789..97f3b55105 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:82,up:22,lo:
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-ampe-a76.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Auxtek-T003_defconfig +1 -0
index ce4806cf5e..3b07eb8dc0 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=408
 CONFIG_DRAM_EMR1=0
 CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-auxtek-t003.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t003"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Auxtek-T004_defconfig +1 -0
index 5faf45c3d7..e957d90b48 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_CLK=432
 CONFIG_USB1_VBUS_PIN="PG13"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-auxtek-t004.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t004"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Bananapi_M2_Ultra_defconfig +1 -0
index 37cc2df5dc..d5098cb436 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC0_CD_PIN="PH13"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="sun8i-r40-bananapi-m2-ultra.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-r40-bananapi-m2-ultra"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Bananapi_defconfig +1 -0
index 7a9b5fe0e5..5703ef18b0 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=432
 CONFIG_MACPWR="PH23"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-bananapi.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Bananapi_m2m_defconfig +1 -0
index 2032a4aef8..5b97fa12f3 100644
@@ -8,6 +8,7 @@ CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_DEFAULT_FDT_FILE="sun8i-r16-bananapi-m2m.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-r16-bananapi-m2m"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Bananapro_defconfig +1 -0
index 5a8ded0493..0cad1583dc 100644
@@ -8,6 +8,7 @@ CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-bananapro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/CHIP_defconfig +1 -0
index c122944881..6e46310d7a 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun5i-r8-chip.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_CMD_DFU=y
configs/CHIP_pro_defconfig +1 -0
index 5d63fadef5..d6692588db 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
+CONFIG_DEFAULT_FDT_FILE="sun5i-gr8-chip-pro.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-gr8-chip-pro"
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_FLASH is not set
configs/CSQ_CS908_defconfig +1 -0
index b103e7e00d..3c50d8e17b 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_CLK=432
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-cs908.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-cs908"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Chuwi_V7_CW0825_defconfig +1 -0
index 645a759fc2..68fb6e2be0 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-chuwi-v7-cw0825.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-chuwi-v7-cw0825"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Colombus_defconfig +1 -0
index c85e47cb11..dc8de80807 100644
@@ -15,6 +15,7 @@ CONFIG_VIDEO_LCD_BL_PWM="PH13"
 CONFIG_VIDEO_LCD_PANEL_I2C_SDA="PA23"
 CONFIG_VIDEO_LCD_PANEL_I2C_SCL="PA24"
 CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804=y
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-colombus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-colombus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Cubieboard2_defconfig +1 -0
index 418da63ba8..8d0dbf39b8 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_SATAPWR="PB8"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-cubieboard2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubieboard2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Cubieboard4_defconfig +1 -0
index 16b1862334..fce80a8a11 100644
@@ -11,6 +11,7 @@ CONFIG_USB0_ID_DET="PH16"
 CONFIG_USB1_VBUS_PIN="PH14"
 CONFIG_USB3_VBUS_PIN="PH15"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun9i-a80-cubieboard4.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun9i-a80-cubieboard4"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_SPL_DOS_PARTITION is not set
configs/Cubieboard_defconfig +1 -0
index 27223d201e..2de3b22539 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DRAM_CLK=480
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_SATAPWR="PB8"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-cubieboard.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Cubietruck_defconfig +1 -0
index f0bb4c9d5c..9ac131296f 100644
@@ -10,6 +10,7 @@ CONFIG_USB0_ID_DET="PH19"
 CONFIG_VIDEO_VGA=y
 CONFIG_SATAPWR="PH12"
 CONFIG_GMAC_TX_DELAY=1
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-cubietruck.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubietruck"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Cubietruck_plus_defconfig +1 -0
index d76bc6748b..7c0d8f12ea 100644
@@ -13,6 +13,7 @@ CONFIG_USB1_VBUS_PIN="PD29"
 CONFIG_USB2_VBUS_PIN="PL6"
 CONFIG_I2C0_ENABLE=y
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-a83t-cubietruck-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-cubietruck-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/Empire_electronix_d709_defconfig +1 -0
index bac5859130..df45dda8ff 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:210,up:22,lo
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-empire-electronix-d709.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Empire_electronix_m712_defconfig +1 -0
index 47f3fe7e2e..737a41f5f9 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:82,up:22,lo:
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-empire-electronix-m712.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-m712"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Hummingbird_A31_defconfig +1 -0
index 24126fde28..afc4cf5555 100644
@@ -7,6 +7,7 @@ CONFIG_USB1_VBUS_PIN="PH24"
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_VIDEO_VGA_VIA_LCD=y
 CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-hummingbird.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-hummingbird"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Hyundai_A7HD_defconfig +1 -0
index 72327c90fc..63b4b51906 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_BL_EN="PH9"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 # CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-hyundai-a7hd.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-hyundai-a7hd"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Itead_Ibox_A20_defconfig +1 -0
index dfef071476..39901ddffc 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_SATAPWR="PB8"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-itead-ibox.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-itead-ibox"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Lamobo_R1_defconfig +1 -0
index 9ed1f02d52..dd6409bfd0 100644
@@ -7,6 +7,7 @@ CONFIG_MACPWR="PH23"
 CONFIG_MMC0_CD_PIN="PH10"
 CONFIG_SATAPWR="PB3"
 CONFIG_GMAC_TX_DELAY=4
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-lamobo-r1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/LicheePi_Zero_defconfig +1 -0
index 6cf0940776..44b30e19f2 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN8I_V3S=y
 CONFIG_DRAM_CLK=360
 CONFIG_DRAM_ZQ=14779
+CONFIG_DEFAULT_FDT_FILE="sun8i-v3s-licheepi-zero.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-v3s-licheepi-zero"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_SPL_DOS_PARTITION is not set
configs/Linksprite_pcDuino3_Nano_defconfig +1 -0
index 2df6761455..7958117e13 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=122
 CONFIG_USB1_VBUS_PIN="PH11"
 CONFIG_SATAPWR="PH2"
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-pcduino3-nano.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3-nano"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Linksprite_pcDuino3_defconfig +1 -0
index d7e9c26cbf..385d8a28cc 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=122
 CONFIG_SATAPWR="PH2"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-pcduino3.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Linksprite_pcDuino_defconfig +1 -0
index 500f885599..a3269f03f1 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN4I=y
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-pcduino.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/MK808C_defconfig +1 -0
index 62768b8656..e0e5a0beae 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-mk808c.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-mk808c"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/MSI_Primo73_defconfig +1 -0
index 309b384a4e..faef2a6885 100644
@@ -8,6 +8,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-primo73.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-primo73"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/MSI_Primo81_defconfig +1 -0
index 04b0b63259..8d4c5d1ced 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:768,y:1024,depth:18,pclk_khz:66000,le:56,ri:60,up:30,lo
 CONFIG_VIDEO_LCD_BL_EN="PA25"
 CONFIG_VIDEO_LCD_BL_PWM="PH13"
 CONFIG_VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828=y
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-primo81.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-primo81"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Marsboard_A10_defconfig +1 -0
index 55c27b8435..9e109b8723 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN4I=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-marsboard.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-marsboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Mele_A1000G_quad_defconfig +1 -0
index e084454293..f696eed503 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_ZQ=120
 CONFIG_INITIAL_USB_SCAN_DELAY=2000
 CONFIG_USB1_VBUS_PIN="PC27"
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-mele-a1000g-quad.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mele-a1000g-quad"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Mele_A1000_defconfig +1 -0
index 367f2aaf7a..f25d791f2c 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN4I=y
 CONFIG_MACPWR="PH15"
 CONFIG_VIDEO_VGA=y
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-a1000.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-a1000"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Mele_I7_defconfig +1 -0
index 4fa61d311f..fc81bd4ca5 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_ZQ=120
 CONFIG_USB1_VBUS_PIN="PC27"
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-i7.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-i7"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Mele_M3_defconfig +1 -0
index 9f48bd91e0..e06fd05f15 100644
@@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_VIDEO_VGA=y
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-m3.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Mele_M5_defconfig +1 -0
index 6b198be6f6..123fdc9a85 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=432
 CONFIG_DRAM_ZQ=122
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-m5.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m5"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Mele_M9_defconfig +1 -0
index af89c50ee1..eb44ab3509 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_ZQ=120
 CONFIG_USB1_VBUS_PIN="PC27"
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-m9.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-m9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Merrii_A80_Optimus_defconfig +1 -0
index 329362d336..8a4dfccedf 100644
@@ -11,6 +11,7 @@ CONFIG_USB0_ID_DET="PH3"
 CONFIG_USB1_VBUS_PIN="PH4"
 CONFIG_USB3_VBUS_PIN="PH5"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun9i-a80-optimus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun9i-a80-optimus"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_SPL_DOS_PARTITION is not set
configs/Mini-X_defconfig +1 -0
index e32935e132..37580609ba 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN4I=y
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-mini-xplus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mini-xplus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Nintendo_NES_Classic_Edition_defconfig +1 -0
index 990bb25c41..4d2cb43a3b 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_DRAM_ODT_EN=y
 CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-r16-nintendo-nes-classic-edition.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-r16-nintendo-nes-classic-edition"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Orangepi_defconfig +1 -0
index 88e55495d5..fe650c2ff5 100644
@@ -9,6 +9,7 @@ CONFIG_USB2_VBUS_PIN="PH22"
 CONFIG_VIDEO_VGA=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-orangepi.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Orangepi_mini_defconfig +1 -0
index 46f27be254..38745dfc1c 100644
@@ -11,6 +11,7 @@ CONFIG_USB1_VBUS_PIN="PH26"
 CONFIG_USB2_VBUS_PIN="PH22"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-orangepi-mini.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi-mini"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Sinlinx_SinA31s_defconfig +1 -0
index 9744aef096..88cc35d8c6 100644
@@ -9,6 +9,7 @@ CONFIG_MMC3_PINS="PC"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-sina31s.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sina31s"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Sinlinx_SinA33_defconfig +1 -0
index 9e6267200b..14ae36a60b 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo
 CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-sinlinx-sina33.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CMD_DFU=y
configs/Sinovoip_BPI_M2_Plus_defconfig +1 -0
index da5620a770..73c4b7a6c4 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-bananapi-m2-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-bananapi-m2-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Sinovoip_BPI_M2_defconfig +1 -0
index 65d81a5284..de4c00b5fc 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_CLK=432
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-sinovoip-bpi-m2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sinovoip-bpi-m2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/Sinovoip_BPI_M3_defconfig +1 -0
index 479dd05dfb..8ed6463b4f 100644
@@ -14,6 +14,7 @@ CONFIG_USB0_ID_DET="PH11"
 CONFIG_USB1_VBUS_PIN="PD24"
 CONFIG_AXP_GPIO=y
 CONFIG_SATAPWR="PD25"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a83t-bananapi-m3.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-bananapi-m3"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/Sunchip_CX-A99_defconfig +1 -0
index 008af068d4..ef5a845e68 100644
@@ -10,6 +10,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_VBUS_PIN="PH15"
 CONFIG_USB1_VBUS_PIN="PL7"
 CONFIG_USB3_VBUS_PIN="PL8"
+CONFIG_DEFAULT_FDT_FILE="sun9i-a80-cx-a99.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun9i-a80-cx-a99"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/UTOO_P66_defconfig +1 -0
index a666e419db..d2c2ce6c88 100644
@@ -18,6 +18,7 @@ CONFIG_VIDEO_LCD_RESET="PG11"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_TL059WV5C0=y
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-utoo-p66.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-utoo-p66"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Wexler_TAB7200_defconfig +1 -0
index 9a431ee4cd..0542f7530d 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:210,up:22,lo
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-wexler-tab7200.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wexler-tab7200"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Wits_Pro_A20_DKT_defconfig +1 -0
index 8065ca2629..baeba63caf 100644
@@ -9,6 +9,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-wits-pro-a20-dkt.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wits-pro-a20-dkt"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/Wobo_i5_defconfig +1 -0
index 88ccfd406e..4ab93ad6dd 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_CLK=432
 CONFIG_MMC0_CD_PIN="PB3"
 CONFIG_USB1_VBUS_PIN="PG12"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-wobo-i5.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-wobo-i5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Yones_Toptech_BD1078_defconfig +1 -0
index c49cbcbc3c..146c936962 100644
@@ -17,6 +17,7 @@ CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 # CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-yones-toptech-bd1078.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-yones-toptech-bd1078"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/Yones_Toptech_BS1078_V2_defconfig +1 -0
index 87c13b0ea8..34e11c3bee 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_BL_EN="PA25"
 CONFIG_VIDEO_LCD_BL_PWM="PH13"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-yones-toptech-bs1078-v2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-yones-toptech-bs1078-v2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/a64-olinuxino_defconfig +1 -0
index b32df990a0..32448a226b 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-olinuxino.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/ba10_tv_box_defconfig +1 -0
index 88199c8e78..f48f2c35f9 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_EMR1=4
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-ba10-tvbox.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/bananapi_m1_plus_defconfig +1 -0
index 539ed73495..ba25bb1bb7 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=432
 CONFIG_MACPWR="PH23"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-bananapi-m1-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi-m1-plus"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/bananapi_m2_berry_defconfig +1 -0
index 9d75108d04..2bc9a4b022 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=576
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC0_CD_PIN="PH13"
+CONFIG_DEFAULT_FDT_FILE="sun8i-v40-bananapi-m2-berry.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-v40-bananapi-m2-berry"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/bananapi_m64_defconfig +1 -0
index 47f31c6d9d..3ab3866650 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
 CONFIG_MMC0_CD_PIN="PH13"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-bananapi-m64.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-bananapi-m64"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/colorfly_e708_q1_defconfig +1 -0
index e9c82674a2..c2ebe1561d 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_BL_EN="PA25"
 CONFIG_VIDEO_LCD_BL_PWM="PH13"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-colorfly-e708-q1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-colorfly-e708-q1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/difrnce_dit4350_defconfig +1 -0
index a7cdf0fbf7..4764d52036 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:480,y:272,depth:18,pclk_khz:12000,le:1,ri:43,up:1,lo:12
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-difrnce-dit4350.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-difrnce-dit4350"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/dserve_dsrv9703c_defconfig +1 -0
index 8f469fbc34..1fd5e847ce 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-dserve-dsrv9703c.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-dserve-dsrv9703c"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/ga10h_v1_1_defconfig +1 -0
index 02cc9677aa..dd1c803379 100644
@@ -15,6 +15,7 @@ CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-ga10h-v1.1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-ga10h-v1.1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/gt90h_v4_defconfig +1 -0
index caff63eb59..419f0d3437 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-gt90h-v4.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-gt90h-v4"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/h8_homlet_v2_defconfig +1 -0
index 80bdb20e8a..2b4434dd26 100644
@@ -8,6 +8,7 @@ CONFIG_DRAM_ODT_EN=y
 CONFIG_USB0_VBUS_PIN="PL5"
 CONFIG_USB1_VBUS_PIN="PL6"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-a83t-allwinner-h8homlet-v2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-allwinner-h8homlet-v2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/i12-tvbox_defconfig +1 -0
index a3c4b0e76c..eb369ea003 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MACPWR="PH21"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-i12-tvbox.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-i12-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/iNet_3F_defconfig +1 -0
index b1d6ed11f1..cabc5c9335 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-inet-3f.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3f"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/iNet_3W_defconfig +1 -0
index bfd8f002e1..871bc16b1e 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:24,pclk_khz:65000,le:159,ri:160,up:22,
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-inet-3w.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3w"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/iNet_86VS_defconfig +1 -0
index b370eacc05..8c3a50d610 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:209,up:22,lo
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-inet-86vs.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-86vs"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/iNet_D978_rev2_defconfig +1 -0
index 29f807ab97..e3f71726be 100644
@@ -15,6 +15,7 @@ CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-inet-d978-rev2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-inet-d978-rev2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/icnova-a20-swac_defconfig +1 -0
index 8fca6e81ed..02efaf208b 100644
@@ -11,6 +11,7 @@ CONFIG_USB1_VBUS_PIN="PG10"
 CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0"
 CONFIG_VIDEO_LCD_POWER="PH22"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun7i-a20-icnova-swac.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/inet1_defconfig +1 -0
index 100d075960..c0f464fab9 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-inet1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/inet86dz_defconfig +1 -0
index 9d6e340f08..bb8b34103f 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-inet86dz.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-inet86dz"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/inet97fv2_defconfig +1 -0
index 4caf3075cd..43b7cdd0fd 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:209,up:22,lo
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-inet97fv2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet97fv2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/inet98v_rev2_defconfig +1 -0
index 1eea0c66a5..8523919a85 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:209,up:22,lo
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-inet-98v-rev2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-98v-rev2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/inet9f_rev03_defconfig +1 -0
index 46fa4ee775..017467d4d0 100644
@@ -11,6 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:209,up:22,lo
 CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-inet9f-rev03.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet9f-rev03"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/inet_q972_defconfig +1 -0
index b928622813..752378dc3f 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:18,pclk_khz:65000,le:280,ri:20,up:22,l
 CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_BL_EN="PA25"
 CONFIG_VIDEO_LCD_BL_PWM="PH13"
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31s-inet-q972.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-inet-q972"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/jesurun_q5_defconfig +1 -0
index 00bb745be2..0b93d60f34 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=312
 CONFIG_MACPWR="PH19"
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-jesurun-q5.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-jesurun-q5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/libretech_all_h3_cc_h2_plus_defconfig +1 -0
index 0cbcd48aad..3e3963ba46 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h2-plus-libretech-all-h3-cc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/libretech_all_h3_cc_h3_defconfig +1 -0
index 185facdf3e..ea7e0e0712 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-libretech-all-h3-cc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/libretech_all_h3_cc_h5_defconfig +1 -0
index 061bddc8fd..abf9b3831a 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-libretech-all-h3-cc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/mixtile_loftq_defconfig +1 -0
index 79d984ba7b..df9a4a0db4 100644
@@ -7,6 +7,7 @@ CONFIG_MACPWR="PA21"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB1_VBUS_PIN="PH24"
 CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_FDT_FILE="sun6i-a31-mixtile-loftq.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mixtile-loftq"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/mk802_a10s_defconfig +1 -0
index 5129b49506..1002877ec5 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_CLK=432
 CONFIG_DRAM_EMR1=0
 CONFIG_USB1_VBUS_PIN="PB10"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-mk802.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/mk802_defconfig +1 -0
index 81d121fb84..e0991cda99 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN4I=y
 CONFIG_USB2_VBUS_PIN="PH12"
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-mk802.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/mk802ii_defconfig +1 -0
index 84ae234fdc..ed8c6a0609 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN4I=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-mk802ii.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802ii"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/nanopi_a64_defconfig +1 -0
index 0a04911c81..0ed962bbab 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-nanopi-a64.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-nanopi-a64"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/nanopi_m1_defconfig +1 -0
index e0ae3c7c60..9324d7fceb 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=408
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-nanopi-m1.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/nanopi_m1_plus_defconfig +1 -0
index ee22364760..ebd06dd011 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC0_CD_PIN="PH13"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-nanopi-m1-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/nanopi_neo2_defconfig +1 -0
index 35058186f5..eb5ed4d1f4 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881977
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-nanopi-neo2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/nanopi_neo_air_defconfig +1 -0
index f953b71f03..8b50ffe2a4 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=408
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 # CONFIG_VIDEO_DE2 is not set
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-nanopi-neo-air.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo-air"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/nanopi_neo_defconfig +1 -0
index 66919e5a2b..f7da36a757 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=408
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 # CONFIG_VIDEO_DE2 is not set
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-nanopi-neo.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/nanopi_neo_plus2_defconfig +1 -0
index 70798a8e9f..c0945299a4 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=408
 CONFIG_DRAM_ZQ=3881977
 CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-nanopi-neo-plus2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo-plus2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_2_defconfig +1 -0
index 577a32255b..7a92fa6fae 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_USB1_VBUS_PIN="PG13"
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/orangepi_lite_defconfig +1 -0
index f3fd864a6d..d359212de0 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-lite.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_one_defconfig +1 -0
index 23f4973e5b..8f4a52699e 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-one.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_pc2_defconfig +1 -0
index dd5f2c78ab..4037458377 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881977
 CONFIG_MACPWR="PD6"
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-orangepi-pc2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_pc_defconfig +1 -0
index 134db79e72..76a590618d 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=624
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-pc.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-pc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/orangepi_pc_plus_defconfig +1 -0
index 01c1cd7736..c809d9c6a5 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=624
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-pc-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-pc-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/orangepi_plus2e_defconfig +1 -0
index a6e61a5065..15ba27fdc6 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-plus2e.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus2e"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/orangepi_plus_defconfig +1 -0
index 8e32b0af32..385a8026b2 100644
@@ -9,6 +9,7 @@ CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB1_VBUS_PIN="PG13"
 CONFIG_SATAPWR="PG11"
+CONFIG_DEFAULT_FDT_FILE="sun8i-h3-orangepi-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/orangepi_prime_defconfig +1 -0
index df39caa903..d985638453 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881977
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-orangepi-prime.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_win_defconfig +1 -0
index d7211b5823..e4f9431ca4 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-orangepi-win.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-orangepi-win"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/orangepi_zero_defconfig +1 -0
index 6afd4a3bfa..8a95a80e8f 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
 # CONFIG_VIDEO_DE2 is not set
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-h2-plus-orangepi-zero.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
configs/orangepi_zero_plus2_defconfig +1 -0
index fdb6bb4ed9..905ef7aa70 100644
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881977
 CONFIG_MMC0_CD_PIN="PH13"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-h5-orangepi-zero-plus2.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/parrot_r16_defconfig +1 -0
index 991e9b99aa..143c03e4bb 100644
@@ -10,6 +10,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PD10"
 CONFIG_USB1_VBUS_PIN="PD12"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-r16-parrot.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-r16-parrot"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/pine64_plus_defconfig +1 -0
index 21ce06f370..9c4680d81b 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-pine64-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/polaroid_mid2407pxe03_defconfig +1 -0
index 03931c8f05..86aece2e00 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-polaroid-mid2407pxe03.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-polaroid-mid2407pxe03"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/polaroid_mid2809pxe04_defconfig +1 -0
index f6ba2370db..23ab12e74c 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-polaroid-mid2809pxe04.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-polaroid-mid2809pxe04"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/pov_protab2_ips9_defconfig +1 -0
index fd829f57ea..36176b55af 100644
@@ -12,6 +12,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-pov-protab2-ips9.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pov-protab2-ips9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/q8_a13_tablet_defconfig +1 -0
index 0ef7e2c473..2c9c4cc3d2 100644
@@ -13,6 +13,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:
 CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a13-q8-tablet.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/q8_a23_tablet_800x480_defconfig +1 -0
index 18e0849853..40d735bed6 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-q8-tablet.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/q8_a33_tablet_1024x600_defconfig +1 -0
index 0b3973dadc..965eb779f9 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-q8-tablet.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/q8_a33_tablet_800x480_defconfig +1 -0
index 322d01d8a4..a5d9888b3d 100644
@@ -14,6 +14,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
 CONFIG_VIDEO_LCD_POWER="PH7"
 CONFIG_VIDEO_LCD_BL_EN="PH6"
 CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a33-q8-tablet.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/r7-tv-dongle_defconfig +1 -0
index 9a66ee90f9..ec0b9f15d8 100644
@@ -4,6 +4,7 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_CLK=384
 CONFIG_USB1_VBUS_PIN="PG13"
+CONFIG_DEFAULT_FDT_FILE="sun5i-a10s-r7-tv-dongle.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-r7-tv-dongle"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/sopine_baseboard_defconfig +1 -0
index 05436a1b43..c5cf267693 100644
@@ -10,6 +10,7 @@ CONFIG_DRAM_ODT_EN=y
 CONFIG_MMC0_CD_PIN=""
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_DEFAULT_FDT_FILE="allwinner/sun50i-a64-pine64-plus.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/sun8i_a23_evb_defconfig +1 -0
index 4cb2798ce7..cb4cad3117 100644
@@ -7,6 +7,7 @@ CONFIG_DRAM_ZQ=63351
 CONFIG_USB0_VBUS_PIN="axp_drivebus"
 CONFIG_USB0_VBUS_DET="axp_vbus_detect"
 CONFIG_USB1_VBUS_PIN="PH7"
+CONFIG_DEFAULT_FDT_FILE="sun8i-a23-evb.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-evb"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/sunxi_Gemei_G9_defconfig +1 -0
index d88dd4ebad..431f3ceffc 100644
@@ -9,6 +9,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
 CONFIG_VIDEO_LCD_BL_EN="PH7"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_FDT_FILE="sun4i-a10-gemei-g9.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-gemei-g9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C_SUPPORT=y
configs/tbs_a711_defconfig +1 -0
index 3e3de4fbb3..882897fe38 100644
@@ -11,6 +11,7 @@ CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
 CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
 CONFIG_USB0_ID_DET="PH11"
 CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_FDT_FILE="sun8i-a83t-tbs-a711.dtb"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-tbs-a711"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
include/configs/sunxi-common.h +1 -7
index b515e9bb1f..2bd814ef9f 100644
@@ -500,17 +500,11 @@ extern int soft_i2c_gpio_scl;
 	CONSOLE_STDIN_SETTINGS \
 	CONSOLE_STDOUT_SETTINGS
 
-#ifdef CONFIG_ARM64
-#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
-#else
-#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb"
-#endif
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
 	DFU_ALT_INFO_RAM \
-	"fdtfile=" FDTFILE "\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"console=ttyS0,115200\0" \
 	SUNXI_MTDIDS_DEFAULT \
 	SUNXI_MTDPARTS_DEFAULT \
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 72 lines · Martin Kelly

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

---
This patch is against u-boot master and thus conflicts with u-boot sunxi patch 31510b41f6b736fd03e2779a2585f85df39e667f ("sunxi: allow CONFIG_DEFAULT_FDT_FILE override"). If you would like me to apply this against the sunxi tree instead, I would be happy to do so and resend it.

Obviously, I cannot test a change like this on every board. Here's the tests I did:

- Booted on the nanopi neo plus2 (the board I do have).
- Compile-tested every affected config.
- To avoid missing anything I generated the config changes with the following Python script. This script mimics what the preprocessor was doing, but encodes it explicitly in the config. Reviewing the script is probably easier than reviewing each individual file:

#!/usr/bin/python3

import os

root = '/home/martin/u-boot/configs'
for name in os.listdir(root):
path = os.path.join(root, name)
with open(path, 'r') as f:
contents = f.read()
if 'CONFIG_ARCH_SUNXI=y' not in contents:
continue
if 'CONFIG_DEFAULT_FDT_FILE=' in contents:
# Make the script idempotent.
continue

   if 'CONFIG_MACH_SUN50I=y' in contents or 'CONFIG_MACH_SUN50I_H5=y' in contents:
       arm64 = True
   else:
       arm64 = False

   lines = []
   for line in contents.split('\n'):
       if line.startswith('CONFIG_DEFAULT_DEVICE_TREE='):
           split = line.split('=')
           assert(len(split) == 2)
           dtb = split[1]

           if dtb[0] == '"' and dtb[-1] == '"':
               # Dequotify.
               dtb = dtb[1:-1]

           dtb = '%s.dtb' % dtb
           if arm64:
               dtb = 'allwinner/%s' % dtb

           lines.append('CONFIG_DEFAULT_FDT_FILE="%s"' % dtb)
       lines.append(line)

   with open(path, 'w') as f:
       f.write('\n'.join(lines))
Quoted 1 line

[end script]

Looks fine to me.
My only note would be that your script adds CONFIG_DEFAULT_FDT_FILE at a different line as when generated by savedefconfig.

#2 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 69 lines · klaus.goger at theobroma-systems.com
Quoted 69 lines · Martin Kelly

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

---
This patch is against u-boot master and thus conflicts with u-boot sunxi patch 31510b41f6b736fd03e2779a2585f85df39e667f ("sunxi: allow CONFIG_DEFAULT_FDT_FILE override"). If you would like me to apply this against the sunxi tree instead, I would be happy to do so and resend it.

Obviously, I cannot test a change like this on every board. Here's the tests I did:

- Booted on the nanopi neo plus2 (the board I do have).
- Compile-tested every affected config.
- To avoid missing anything I generated the config changes with the following Python script. This script mimics what the preprocessor was doing, but encodes it explicitly in the config. Reviewing the script is probably easier than reviewing each individual file:

#!/usr/bin/python3

import os

root = '/home/martin/u-boot/configs'
for name in os.listdir(root):
path = os.path.join(root, name)
with open(path, 'r') as f:
contents = f.read()
if 'CONFIG_ARCH_SUNXI=y' not in contents:
continue
if 'CONFIG_DEFAULT_FDT_FILE=' in contents:
# Make the script idempotent.
continue

if 'CONFIG_MACH_SUN50I=y' in contents or 'CONFIG_MACH_SUN50I_H5=y' in contents:
arm64 = True
else:
arm64 = False

lines = []
for line in contents.split('\n'):
if line.startswith('CONFIG_DEFAULT_DEVICE_TREE='):
split = line.split('=') assert(len(split) == 2)
dtb = split[1]

if dtb[0] == '"' and dtb[-1] == '"':
# Dequotify.
dtb = dtb[1:-1]

dtb = '%s.dtb' % dtb
if arm64:
dtb = 'allwinner/%s' % dtb

lines.append('CONFIG_DEFAULT_FDT_FILE="%s"' % dtb)
lines.append(line)

Quoted 9 lines
Quoted 4 lines

with open(path, 'w') as f:
f.write('\n'.join(lines))

[end script]

Looks fine to me.
My only note would be that your script adds CONFIG_DEFAULT_FDT_FILE at a different line as when generated by savedefconfig.

Good point. I might as well change that to avoid unnecessary churn when you run savedefconfig.

#3 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

In reply to Martin Kelly
Quoted 11 lines · Martin Kelly

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

I'd really prefer not to do that. There's going to be a long trail of defconfig that will be sent at pretty much the same time that are not going to have it and that will go unnotice for some time.

And there's obviously the useless churn in all the defconfig that are not in the case where it makes sense to override DEFAULT_FDT_FILE.

Why not create a Kconfig boolean that allows to select whether or not you want DEFAULT_FDT_FILE to be DEFAULT_DEVICE_TREE + .dtb or a custom value.

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180601/62595c74/attachment-0001.sig>
#4 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 17 lines · Maxime Ripard
Quoted 11 lines · Martin Kelly

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

I'd really prefer not to do that. There's going to be a long trail of defconfig that will be sent at pretty much the same time that are not going to have it and that will go unnotice for some time.

Quoted 9 lines

And there's obviously the useless churn in all the defconfig that are not in the case where it makes sense to override DEFAULT_FDT_FILE.

Why not create a Kconfig boolean that allows to select whether or not you want DEFAULT_FDT_FILE to be DEFAULT_DEVICE_TREE + .dtb or a custom value.

Maxime

I can see the issues with new defconfigs, but I'm not sure if it will really be that bad. If we apply this patch against sunxi master, then shouldn't new patches get tested and rebased against it? In that case, if they have not set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the mistake must be fixed prior to merging.

Alternatively if we add the Kconfig boolean, we need to worry about what happens when people have DEFAULT_FDT_FILE set already. I guess we would need to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

Personally, though I think it could be a bit painful through the next merge window, I think fixing this to operate the same way as the rest of the boards is the right long-term decision.

That said, I'll add the boolean if others disagree and we figure out the right default value to avoid breaking existing configs.

#5 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 25 lines · Martin Kelly
Quoted 17 lines · Maxime Ripard
Quoted 11 lines · Martin Kelly

Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different.

Fix this to use only CONFIG_DEFAULT_FDT_FILE as other boards do, and set CONFIG_DEFAULT_FDT_FILE in board files to be the same as the current fdtfile= setting.

I'd really prefer not to do that. There's going to be a long trail of defconfig that will be sent at pretty much the same time that are not going to have it and that will go unnotice for some time.

Quoted 6 lines

And there's obviously the useless churn in all the defconfig that are not in the case where it makes sense to override DEFAULT_FDT_FILE.

Why not create a Kconfig boolean that allows to select whether or not you want DEFAULT_FDT_FILE to be DEFAULT_DEVICE_TREE + .dtb or a custom value.

Quoted 5 lines

I can see the issues with new defconfigs, but I'm not sure if it will really be that bad. If we apply this patch against sunxi master, then shouldn't new patches get tested and rebased against it? In that case, if they have not set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the mistake must be fixed prior to merging.

Unless one has tested it with a version prior to your patch, and sends it. Not a lot of people are testing with the next branch in the various trees.

Quoted 7 lines

Alternatively if we add the Kconfig boolean, we need to worry about what happens when people have DEFAULT_FDT_FILE set already. I guess we would need to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

config DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE
bool "whatever"
default y if ARCH_ROCKCHIP
default y if ARCH_SUNXI

and in the headers

#ifdef CONFIG_DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE #define CONFIG_DEFAULT_FDT_FILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif

And that's done.

Quoted 3 lines

Personally, though I think it could be a bit painful through the next merge window, I think fixing this to operate the same way as the rest of the boards is the right long-term decision.

So far, I've seen two platforms using this, the two representing a significant part of the total defconfig number, using the exact same value for both. Surely that means there's room for improvement.

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180604/ff986f62/attachment.sig>
#6 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

[snip as the thread is getting long]

Quoted 26 lines · Maxime Ripard
Quoted 7 lines · Martin Kelly

On 06/01/2018 04:05 AM, Maxime Ripard wrote:

I can see the issues with new defconfigs, but I'm not sure if it will really be that bad. If we apply this patch against sunxi master, then shouldn't new patches get tested and rebased against it? In that case, if they have not set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the mistake must be fixed prior to merging.

Unless one has tested it with a version prior to your patch, and sends it. Not a lot of people are testing with the next branch in the various trees.

Quoted 7 lines

Alternatively if we add the Kconfig boolean, we need to worry about what happens when people have DEFAULT_FDT_FILE set already. I guess we would need to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

config DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE
bool "whatever"
default y if ARCH_ROCKCHIP
default y if ARCH_SUNXI

Quoted 8 lines

and in the headers

#ifdef CONFIG_DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE #define CONFIG_DEFAULT_FDT_FILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif

And that's done.

I didn't know Kconfig can set different default values for each architecture like that; that does indeed solve the problem. However, I don't think it's a good idea to have sunxi use an alternate mechanism than the other boards.

To be clear, are you proposing a general config option that would apply to every board? In that case, the header logic would be in a global header rather than a board-specific one.

Quoted 10 lines
Quoted 3 lines

Personally, though I think it could be a bit painful through the next merge window, I think fixing this to operate the same way as the rest of the boards is the right long-term decision.

So far, I've seen two platforms using this, the two representing a significant part of the total defconfig number, using the exact same value for both. Surely that means there's room for improvement.

Maxime

#7 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 37 lines · Martin Kelly

[snip as the thread is getting long]

Quoted 26 lines · Maxime Ripard
Quoted 7 lines · Martin Kelly

On 06/01/2018 04:05 AM, Maxime Ripard wrote:

I can see the issues with new defconfigs, but I'm not sure if it will really be that bad. If we apply this patch against sunxi master, then shouldn't new patches get tested and rebased against it? In that case, if they have not set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the mistake must be fixed prior to merging.

Unless one has tested it with a version prior to your patch, and sends it. Not a lot of people are testing with the next branch in the various trees.

Quoted 7 lines

Alternatively if we add the Kconfig boolean, we need to worry about what happens when people have DEFAULT_FDT_FILE set already. I guess we would need to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

config DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE
bool "whatever"
default y if ARCH_ROCKCHIP
default y if ARCH_SUNXI

Quoted 7 lines

and in the headers

#ifdef CONFIG_DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE #define CONFIG_DEFAULT_FDT_FILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif

And that's done.

Quoted 8 lines

I didn't know Kconfig can set different default values for each architecture like that; that does indeed solve the problem. However, I don't think it's a good idea to have sunxi use an alternate mechanism than the other boards.

To be clear, are you proposing a general config option that would apply to every board? In that case, the header logic would be in a global header rather than a board-specific one.

Yes, that's what I had in mind.

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180606/c5395ef5/attachment.sig>
#8 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

Quoted 43 lines · Maxime Ripard
Quoted 42 lines · Martin Kelly

[snip as the thread is getting long]

Quoted 26 lines · Maxime Ripard
Quoted 7 lines · Martin Kelly

On 06/01/2018 04:05 AM, Maxime Ripard wrote:

I can see the issues with new defconfigs, but I'm not sure if it will really be that bad. If we apply this patch against sunxi master, then shouldn't new patches get tested and rebased against it? In that case, if they have not set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the mistake must be fixed prior to merging.

Unless one has tested it with a version prior to your patch, and sends it. Not a lot of people are testing with the next branch in the various trees.

Quoted 7 lines

Alternatively if we add the Kconfig boolean, we need to worry about what happens when people have DEFAULT_FDT_FILE set already. I guess we would need to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

config DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE
bool "whatever"
default y if ARCH_ROCKCHIP
default y if ARCH_SUNXI

Quoted 7 lines

and in the headers

#ifdef CONFIG_DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE #define CONFIG_DEFAULT_FDT_FILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif

And that's done.

I didn't know Kconfig can set different default values for each architecture like that; that does indeed solve the problem. However, I don't think it's a good idea to have sunxi use an alternate mechanism than the other boards.

Quoted 8 lines
Quoted 3 lines

To be clear, are you proposing a general config option that would apply to every board? In that case, the header logic would be in a global header rather than a board-specific one.

Yes, that's what I had in mind.

Maxime

OK, I can see the merits of that, though I think there's tradeoffs both ways.

Before I go ahead with a patch, Jagan: which approach would you prefer?

#9 lore raw

PATCH 1/1 sunxi: use CONFIG_DEFAULT_FDT_FILE everywhere

(ping Jagan)

Quoted 57 lines · Martin Kelly
Quoted 56 lines · Maxime Ripard
Quoted 44 lines · Martin Kelly

[snip as the thread is getting long]

Quoted 33 lines · Maxime Ripard
Quoted 11 lines · Martin Kelly

On 06/01/2018 04:05 AM, Maxime Ripard wrote:

I can see the issues with new defconfigs, but I'm not sure if it will really
be that bad. If we apply this patch against sunxi master, then shouldn't new
patches get tested and rebased against it? In that case, if they have not
set DEFAULT_FDT_FILE, it will default to "", the boards won't boot, and the
mistake must be fixed prior to merging.

Unless one has tested it with a version prior to your patch, and sends it. Not a lot of people are testing with the next branch in the various trees.

Quoted 10 lines

Alternatively if we add the Kconfig boolean, we need to worry about what
happens when people have DEFAULT_FDT_FILE set already. I guess we would need
to default the new Kconfig boolean to be custom in order to keep those configs from breaking. But if we do that, sunxi will break by default (since
sunxi configs don't have the value set).

What would you suggest the default value of the new boolean to be?

config DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE
    bool "whatever"
    default y if ARCH_ROCKCHIP
    default y if ARCH_SUNXI

Quoted 7 lines

and in the headers

#ifdef CONFIG_DEFAULT_FDT_FILE_USE_DEFAULT_DEVICE_TREE #define CONFIG_DEFAULT_FDT_FILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif

And that's done.

Quoted 8 lines

I didn't know Kconfig can set different default values for each architecture like that; that does indeed solve the problem. However, I don't think it's a good idea to have sunxi use an alternate mechanism than the other boards.

To be clear, are you proposing a general config option that would apply to every board? In that case, the header logic would be in a global header rather than a board-specific one.

Yes, that's what I had in mind.

Quoted 7 lines
Quoted 2 lines

Maxime

OK, I can see the merits of that, though I think there's tradeoffs both ways.

Before I go ahead with a patch, Jagan: which approach would you prefer?

Jagan, do you prefer Maxime's proposed approach, or my original patch? I am happy to go either way but want to confirm before proceeding.