Skip to contentSkip to conversation

rockchip: utilize CONFIG_DEFAULT_FDT_FILE

PATCH New Klaus Goger 3 participants 6 messages May 25, 2018 – Jul 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

---

 configs/chromebit_mickey_defconfig  | 1 +
 configs/chromebook_jerry_defconfig  | 1 +
 configs/chromebook_minnie_defconfig | 1 +
 configs/evb-px5_defconfig           | 1 +
 configs/evb-rk3036_defconfig        | 1 +
 configs/evb-rk3128_defconfig        | 1 +
 configs/evb-rk3229_defconfig        | 1 +
 configs/evb-rk3288_defconfig        | 1 +
 configs/evb-rk3328_defconfig        | 1 +
 configs/evb-rk3399_defconfig        | 1 +
 configs/evb-rv1108_defconfig        | 1 +
 configs/fennec-rk3288_defconfig     | 1 +
 configs/firefly-rk3288_defconfig    | 1 +
 configs/firefly-rk3399_defconfig    | 1 +
 configs/geekbox_defconfig           | 1 +
 configs/kylin-rk3036_defconfig      | 1 +
 configs/lion-rk3368_defconfig       | 1 +
 configs/miqi-rk3288_defconfig       | 1 +
 configs/phycore-rk3288_defconfig    | 1 +
 configs/popmetal-rk3288_defconfig   | 1 +
 configs/puma-rk3399_defconfig       | 1 +
 configs/rock2_defconfig             | 1 +
 configs/rock_defconfig              | 1 +
 configs/sheep-rk3368_defconfig      | 1 +
 configs/tinker-rk3288_defconfig     | 1 +
 configs/vyasa-rk3288_defconfig      | 1 +
 include/configs/rk3036_common.h     | 1 +
 include/configs/rk3128_common.h     | 1 +
 include/configs/rk3188_common.h     | 1 +
 include/configs/rk322x_common.h     | 1 +
 include/configs/rk3288_common.h     | 2 +-
 include/configs/rk3328_common.h     | 1 +
 include/configs/rk3368_common.h     | 1 +
 include/configs/rk3399_common.h     | 2 +-
 34 files changed, 34 insertions(+), 2 deletions(-)
configs/chromebit_mickey_defconfig +1 -0
index d1728ef639..27b0dcaac4 100644
@@ -11,6 +11,7 @@ CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3288-veyron-mickey"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_DEFAULT_FDT_FILE="rk3288-veyron-mickey.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/chromebook_jerry_defconfig +1 -0
index 43d93f4637..95fe4bcb26 100644
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-veyron-jerry"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-veyron-jerry.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOARD_EARLY_INIT_F=y
configs/chromebook_minnie_defconfig +1 -0
index 706809ca53..bc3bb292c8 100644
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-veyron-minnie"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-veyron-minnie.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/evb-px5_defconfig +1 -0
index c03682c927..a75c3e047f 100644
@@ -7,6 +7,7 @@ CONFIG_TARGET_EVB_PX5=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3368-px5-evb"
 CONFIG_DEBUG_UART=y
 CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-px5-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_ARCH_EARLY_INIT_R=y
configs/evb-rk3036_defconfig +1 -0
index 33775e8cdd..840c731032 100644
@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3036-sdk"
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x0
 # CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_DEFAULT_FDT_FILE="rk3036-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 # CONFIG_SPL_FRAMEWORK is not set
configs/evb-rk3128_defconfig +1 -0
index 796d0ec92e..f4b132faf7 100644
@@ -5,6 +5,7 @@ CONFIG_ROCKCHIP_RK3128=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3128-evb"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
+CONFIG_DEFAULT_FDT_FILE="rk3128-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_FASTBOOT_BUF_ADDR=0x60800800
configs/evb-rk3229_defconfig +1 -0
index 710b0b4e1a..f6cb5fd897 100644
@@ -10,6 +10,7 @@ CONFIG_TARGET_EVB_RK3229=y
 CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3229-evb"
 CONFIG_DEBUG_UART=y
+CONFIG_DEFAULT_FDT_FILE="rk3229-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/evb-rk3288_defconfig +1 -0
index 7695277daf..3d8789cf36 100644
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-evb"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/evb-rk3328_defconfig +1 -0
index 78ae24b56b..715ac827e2 100644
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3328-evb"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_FIT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_FASTBOOT_BUF_ADDR=0x800800
configs/evb-rk3399_defconfig +1 -0
index 05ad0da336..032aef0cac 100644
@@ -12,6 +12,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/evb-rv1108_defconfig +1 -0
index d72f0d42e8..03ad19e425 100644
@@ -6,6 +6,7 @@ CONFIG_TARGET_EVB_RV1108=y
 CONFIG_DEFAULT_DEVICE_TREE="rv1108-evb"
 CONFIG_DEBUG_UART=y
 # CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_DEFAULT_FDT_FILE="rv1108-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_FASTBOOT_BUF_ADDR=0x62000000
configs/fennec-rk3288_defconfig +1 -0
index efdd583cf6..bad5c49dd7 100644
@@ -11,6 +11,7 @@ CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
 CONFIG_CONSOLE_MUX=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-fennec.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/firefly-rk3288_defconfig +1 -0
index b252d27464..1c83513647 100644
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-firefly.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/firefly-rk3399_defconfig +1 -0
index 19c0b11040..661d6e96eb 100644
@@ -12,6 +12,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-firefly.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/geekbox_defconfig +1 -0
index 4644e8dca5..6c2153a6f2 100644
@@ -6,6 +6,7 @@ CONFIG_ROCKCHIP_RK3368=y
 CONFIG_TARGET_GEEKBOX=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3368-geekbox"
 CONFIG_DEBUG_UART=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-geekbox.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_REGMAP=y
configs/kylin-rk3036_defconfig +1 -0
index ca53005ecb..59c699c3bc 100644
@@ -10,6 +10,7 @@ CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3036-sdk"
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x0
 # CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_DEFAULT_FDT_FILE="rk3036-kylin.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 # CONFIG_SPL_FRAMEWORK is not set
configs/lion-rk3368_defconfig +1 -0
index 0a5e5b3df3..2ba29cbbcb 100644
@@ -25,6 +25,7 @@ CONFIG_BOOTSTAGE=y
 CONFIG_SPL_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_BOOTSTAGE_FDT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-lion-haikou.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_ARCH_EARLY_INIT_R=y
configs/miqi-rk3288_defconfig +1 -0
index f44537c88f..bbd7c28d9f 100644
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-miqi"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-miqi.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/phycore-rk3288_defconfig +1 -0
index d78b6d57b6..663c70f82c 100644
@@ -11,6 +11,7 @@ CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
 CONFIG_CONSOLE_MUX=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-phycore-rdk.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/popmetal-rk3288_defconfig +1 -0
index 2670b4b75a..495bcbb983 100644
@@ -11,6 +11,7 @@ CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
 CONFIG_CONSOLE_MUX=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-popmetal.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/puma-rk3399_defconfig +1 -0
index e6539a7da8..e5753b4f20 100644
@@ -16,6 +16,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_BOARD_INIT=y
configs/rock2_defconfig +1 -0
index cd9a821974..41934ddfeb 100644
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3288-rock2-square"
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-rock2-square.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/rock_defconfig +1 -0
index 00ce9c465a..06287eee97 100644
@@ -10,6 +10,7 @@ CONFIG_TARGET_ROCK=y
 CONFIG_SPL_STACK_R_ADDR=0x60080000
 CONFIG_DEFAULT_DEVICE_TREE="rk3188-radxarock"
 CONFIG_DEBUG_UART=y
+CONFIG_DEFAULT_FDT_FILE="rk3188-radxarock.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/sheep-rk3368_defconfig +1 -0
index 8ada6823d0..6a2aff38a0 100644
@@ -7,6 +7,7 @@ CONFIG_TARGET_SHEEP=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3368-sheep"
 CONFIG_DEBUG_UART=y
 CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-sheep.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CMD_MMC=y
configs/tinker-rk3288_defconfig +1 -0
index fb6bfa57ad..43b53cbe1b 100644
@@ -11,6 +11,7 @@ CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
 CONFIG_CONSOLE_MUX=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
configs/vyasa-rk3288_defconfig +1 -0
index 9e4e96a4f2..6d7b127bcf 100644
@@ -10,6 +10,7 @@ CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3288-vyasa"
 CONFIG_DEBUG_UART=y
 CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-vyasa.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
include/configs/rk3036_common.h +1 -0
index 2009c2dd29..07c54b596b 100644
@@ -56,6 +56,7 @@
 /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
include/configs/rk3128_common.h +1 -0
index cb07466088..94b0ae0d79 100644
@@ -53,6 +53,7 @@
 #include <config_distro_bootcmd.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
+	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	BOOTENV
 
include/configs/rk3188_common.h +1 -0
index d4ffa041f8..1a0f28d2a7 100644
@@ -61,6 +61,7 @@
 /* Linux fails to load the fdt if it's loaded above 256M on a Rock board,
  * so limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_high=0x6fffffff\0" \
 	"initrd_high=0x6fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
include/configs/rk322x_common.h +1 -0
index 1bfcda6701..5b9c4082da 100644
@@ -52,6 +52,7 @@
 /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
include/configs/rk3288_common.h +1 -1
index f8c793f154..71ae3c2316 100644
@@ -69,7 +69,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"fdt_high=0x0fffffff\0" \
 	"initrd_high=0x0fffffff\0" \
-	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
 	ROCKCHIP_DEVICE_SETTINGS \
include/configs/rk3328_common.h +1 -0
index 3bca0f8388..481044dc24 100644
@@ -46,6 +46,7 @@
 #include <config_distro_bootcmd.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	BOOTENV
 
include/configs/rk3368_common.h +1 -0
index 0b07f8dc7a..0e77866b40 100644
@@ -46,6 +46,7 @@
 #include <config_distro_bootcmd.h>
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	ENV_MEM_LAYOUT_SETTINGS	\
 	BOOTENV
 
include/configs/rk3399_common.h +1 -1
index a61e74bc03..ee38107ea5 100644
@@ -55,7 +55,7 @@
 #include <config_distro_bootcmd.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
-	"fdtfile=rockchip/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	BOOTENV
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

Quoted 6 lines · Klaus Goger

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

I did wonder, given that many of these boards the value for CONFIG_DEFAULT_DEVICE_TREE and CONFIG_DEFAULT_FDT_FILE is *nearly* identical, if it wouldn't make sense to derive CONFIG_DEFAULT_FDT_FILE From the value of CONFIG_DEFAULT_DEVICE_TREE by default, only overriding it in the unusual cases.

Though there is a lot to be said about being explicit and not mixing the two similar but not identical values.

Tested on puma-rk3399.

Was hoping to also test on firefly-rk3399, but having difficulty getting u-boot installed unreleated to this patch. Also having troubles with firefly-rk3288 due to mmc hanging the board: https://bugs.debian.org/898520.

live well,
vagrant

Quoted 31 lines
 configs/puma-rk3399_defconfig       | 1 +
 include/configs/rk3399_common.h     | 2 +-
configs/puma-rk3399_defconfig +1 -0
index e6539a7da8..e5753b4f20 100644
@@ -16,6 +16,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_BOARD_INIT=y
include/configs/rk3399_common.h +1 -1
index a61e74bc03..ee38107ea5 100644
@@ -55,7 +55,7 @@
 #include <config_distro_bootcmd.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
-	"fdtfile=rockchip/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	BOOTENV
 
Signature · 1 line
2.11.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180527/ae4d2422/attachment.sig>

#2 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

Quoted 12 lines · Vagrant Cascadian
Quoted 6 lines · Klaus Goger

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is іnternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

Quoted 8 lines

I did wonder, given that many of these boards the value for CONFIG_DEFAULT_DEVICE_TREE and CONFIG_DEFAULT_FDT_FILE is *nearly* identical, if it wouldn't make sense to derive CONFIG_DEFAULT_FDT_FILE From the value of CONFIG_DEFAULT_DEVICE_TREE by default, only overriding it in the unusual cases.

Though there is a lot to be said about being explicit and not mixing the two similar but not identical values.

Would love to to that, but couldn’t find a proper way to do it.
CONFIG_DEFAULT_FDT_FILE is a Kconfig string and therefore always present in the .config. If not set by the user or a defconfig it’s just a empty string (“”). So we can’t do a #ifdef and we can’t do string compares with C macros. An option would be to have DEFAULT_FDT_FILE be hidden behind a Kconfig bool (i.e CONFIG_DEFAULT_FDT_FILE depends on CONFIG_FDT_FILE)
But that change looked a bit to invasive for me.

Quoted 41 lines

Tested on puma-rk3399.

Was hoping to also test on firefly-rk3399, but having difficulty getting u-boot installed unreleated to this patch. Also having troubles with firefly-rk3288 due to mmc hanging the board: https://bugs.debian.org/898520.

live well,
vagrant

Quoted 29 lines

configs/puma-rk3399_defconfig | 1 +
include/configs/rk3399_common.h | 2 +-

configs/puma-rk3399_defconfig +0 -0
index e6539a7da8..e5753b4f20 100644
@@ -16,6 +16,7 @@ CONFIG_DEBUG_UART=y

CONFIG_FIT=y
CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
# CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_BOARD_INIT=y

include/configs/rk3399_common.h +1 -1
index a61e74bc03..ee38107ea5 100644
@@ -55,7 +55,7 @@
 #include <config_distro_bootcmd.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
-	"fdtfile=rockchip/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	BOOTENV
 
Quoted 2 lines
Quoted 2 lines

--
2.11.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180527/47a4b3ea/attachment.sig>

#3 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

In reply to Vagrant Cascadian
Quoted 7 lines · Vagrant Cascadian
Quoted 6 lines · Klaus Goger

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

...

Quoted 6 lines

Tested on puma-rk3399.

Was hoping to also test on firefly-rk3399, but having difficulty getting u-boot installed unreleated to this patch.

Finally was able to test on Firefly-RK3399 applied against u-boot 2018.07-rc2, and it also works correctly.

Are there any outstanding concerns with this patch?

live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180622/ccf5fc95/attachment.sig>

#4 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

Quoted 17 lines · Vagrant Cascadian
Quoted 7 lines · Vagrant Cascadian
Quoted 6 lines · Klaus Goger

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

...

Quoted 4 lines

Tested on puma-rk3399.

Quoted 7 lines
Quoted 2 lines

Was hoping to also test on firefly-rk3399, but having difficulty getting u-boot installed unreleated to this patch.

Finally was able to test on Firefly-RK3399 applied against u-boot 2018.07-rc2, and it also works correctly.

Are there any outstanding concerns with this patch?

There was a similar patch for sunxi[1] and there it was decided to introduce the Kconfig option we talked about. That would make this patch obsolete.

@Jagan, I think Martin is still waiting for an answer from you.

[1] https://patchwork.ozlabs.org/patch/923692/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180622/96b8da31/attachment.sig>

#5 lore raw

PATCH 1/1 rockchip: utilize CONFIG_DEFAULT_FDT_FILE

In reply to Klaus Goger
Quoted 38 lines

Currently the fdtfile environment variable is set to CONFIG_DEFAULT_DEVICE_TREE which is Ñ–nternally used as U-Boot devicetree source. The OS can use a different filename and Kconfig gives us the ability to select a default devicetree via CONFIG_DEFAULT_FDT_FILE. This also gives user configuring U-Boot via menuconfig the behaviour someone would expect.

---

 configs/chromebit_mickey_defconfig  | 1 +
 configs/chromebook_jerry_defconfig  | 1 +
 configs/chromebook_minnie_defconfig | 1 +
 configs/evb-px5_defconfig           | 1 +
 configs/evb-rk3036_defconfig        | 1 +
 configs/evb-rk3128_defconfig        | 1 +
 configs/evb-rk3229_defconfig        | 1 +
 configs/evb-rk3288_defconfig        | 1 +
 configs/evb-rk3328_defconfig        | 1 +
 configs/evb-rk3399_defconfig        | 1 +
 configs/evb-rv1108_defconfig        | 1 +
 configs/fennec-rk3288_defconfig     | 1 +
 configs/firefly-rk3288_defconfig    | 1 +
 configs/firefly-rk3399_defconfig    | 1 +
 configs/geekbox_defconfig           | 1 +
 configs/kylin-rk3036_defconfig      | 1 +
 configs/lion-rk3368_defconfig       | 1 +
 configs/miqi-rk3288_defconfig       | 1 +
 configs/phycore-rk3288_defconfig    | 1 +
 configs/popmetal-rk3288_defconfig   | 1 +
 configs/puma-rk3399_defconfig       | 1 +
 configs/rock2_defconfig             | 1 +
 configs/rock_defconfig              | 1 +
 configs/sheep-rk3368_defconfig      | 1 +
 configs/tinker-rk3288_defconfig     | 1 +
 configs/vyasa-rk3288_defconfig      | 1 +
 include/configs/rk3036_common.h     | 1 +
Quoted 9 lines
 include/configs/rk3128_common.h     | 1 +
 include/configs/rk3188_common.h     | 1 +
 include/configs/rk322x_common.h     | 1 +
 include/configs/rk3288_common.h     | 2 +-
 include/configs/rk3328_common.h     | 1 +
 include/configs/rk3368_common.h     | 1 +
 include/configs/rk3399_common.h     | 2 +-
 34 files changed, 34 insertions(+), 2 deletions(-)

Applied to u-boot-rockchip, thanks!