ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage its
Subsystems (2)
PATCH 1/1 ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage its
Include both PDK2 and DRC02 DTs in the DHCOM fitImage .its and implement support in SPL to select the correct configuration entry for U-Boot by using the machine compatible string from SPL DT.
--- board/dhelectronics/dh_stm32mp1/board.c | 8 ++++++-- .../dhelectronics/dh_stm32mp1/u-boot-dhcom.its | 18 +++++++++++++++++- .../dhelectronics/dh_stm32mp1/u-boot-dhcor.its | 3 ++- configs/stm32mp15_dhcom_basic_defconfig | 1 + 4 files changed, 26 insertions(+), 4 deletions(-)
board/dhelectronics/dh_stm32mp1/board.c +6 -2
@@ -237,9 +237,13 @@ int board_early_init_f(void)#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match (const char *name) { -char test[20 ]; +const char *compat; +char test[128 ]; -snprintf (test,sizeof (test),"somrev%d_boardrev%d" , somcode, brdcode); + compat =fdt_getprop (gd->fdt_blob,0 ,"compatible" ,NULL ); + +snprintf (test,sizeof (test),"%s_somrev%d_boardrev%d" , + compat, somcode, brdcode);if (!strcmp (name, test))return 0 ;
board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its +17 -1
@@ -23,17 +23,33 @@ arch = "arm"; compression = "none"; }; + + fdt-2 { + description = ".dtb"; + data = /incbin/("arch/arm/dts/stm32mp15xx-dhcom-drc02.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + }; }; configurations { default = "config-1"; config-1 { - description = "somrev0_boardrev0"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-pdk2_somrev0_boardrev0"; loadables = "uboot"; fdt = "fdt-1"; }; + config-2 { + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-drc02_somrev0_boardrev0"; + loadables = "uboot"; + fdt = "fdt-2"; + }; + /* Add 587-100..587-400 with fdt-2..fdt-4 here */ }; };
board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its +2 -1
@@ -29,7 +29,8 @@ default = "config-1"; config-1 { - description = "somrev0_boardrev1"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "arrow,stm32mp15xx-avenger96_somrev0_boardrev1"; loadables = "uboot"; fdt = "fdt-1"; };
configs/stm32mp15_dhcom_basic_defconfig +1 -0
@@ -57,6 +57,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y # CONFIG_SPL_DOS_PARTITION is not set +CONFIG_OF_LIST="stm32mp15xx-dhcom-pdk2 stm32mp15xx-dhcom-drc02" CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-names interrupts-extended interrupt-controller \\\#interrupt-cells interrupt-parent dmas dma-names assigned-clocks assigned-clock-rates assigned-clock-parents hwlocks" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_USE_ENV_SPI_BUS=y
Signature · 1 line
2.27.0
PATCH 1/1 ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage its
Hi Marek
Quoted 92 lines · Marek Vasut
Include both PDK2 and DRC02 DTs in the DHCOM fitImage .its and implement support in SPL to select the correct configuration entry for U-Boot by using the machine compatible string from SPL DT.
Signed-off-by Marek Vasut <[email protected]>Cc Patrice Chotard <[email protected]>Cc Patrick Delaunay <[email protected]>--- board/dhelectronics/dh_stm32mp1/board.c | 8 ++++++-- .../dhelectronics/dh_stm32mp1/u-boot-dhcom.its | 18 +++++++++++++++++- .../dhelectronics/dh_stm32mp1/u-boot-dhcor.its | 3 ++- configs/stm32mp15_dhcom_basic_defconfig | 1 + 4 files changed, 26 insertions(+), 4 deletions(-)board/dhelectronics/dh_stm32mp1/board.c +6
-2@@ -237,9 +237,13 @@ int board_early_init_f(void)#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match (const char *name) { -char test[20 ]; +const char *compat; +char test[128 ]; -snprintf (test,sizeof (test),"somrev%d_boardrev%d" , somcode, brdcode); + compat =fdt_getprop (gd->fdt_blob,0 ,"compatible" ,NULL ); + +snprintf (test,sizeof (test),"%s_somrev%d_boardrev%d" , + compat, somcode, brdcode);if (!strcmp (name, test))return 0 ;board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its +17
-1@@ -23,17 +23,33 @@ arch = "arm"; compression = "none"; }; + + fdt-2 { + description = ".dtb"; + data = /incbin/("arch/arm/dts/stm32mp15xx-dhcom-drc02.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + }; }; configurations { default = "config-1"; config-1 { - description = "somrev0_boardrev0"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-pdk2_somrev0_boardrev0"; loadables = "uboot"; fdt = "fdt-1"; }; + config-2 { + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-drc02_somrev0_boardrev0"; + loadables = "uboot"; + fdt = "fdt-2"; + }; + /* Add 587-100..587-400 with fdt-2..fdt-4 here */ }; };board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its +2
-1@@ -29,7 +29,8 @@ default = "config-1"; config-1 { - description = "somrev0_boardrev1"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "arrow,stm32mp15xx-avenger96_somrev0_boardrev1"; loadables = "uboot"; fdt = "fdt-1"; };configs/stm32mp15_dhcom_basic_defconfig +0
-0
configs/stm32mp15_dhcom_basic_defconfig CONFIG_CMD_REGULATOR=y · line 63
Quoted 7 lines
configs/stm32mp15_dhcom_basic_defconfig +1
-0@@ -57,6 +57,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y # CONFIG_SPL_DOS_PARTITION is not set +CONFIG_OF_LIST="stm32mp15xx-dhcom-pdk2 stm32mp15xx-dhcom-drc02" CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-names interrupts-extended interrupt-controller \\\#interrupt-cells interrupt-parent dmas dma-names assigned-clocks assigned-clock-rates assigned-clock-parents hwlocks" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_USE_ENV_SPI_BUS=y
Thanks
Patrice
PATCH 1/1 ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage its
Quoted 16 lines · Patrice CHOTARD
Hi Marek
Quoted 13 lines · Marek Vasut
Include both PDK2 and DRC02 DTs in the DHCOM fitImage .its and implement support in SPL to select the correct configuration entry for U-Boot by using the machine compatible string from SPL DT.
Signed-off-by Marek Vasut <[email protected]>Cc Patrice Chotard <[email protected]>Cc Patrick Delaunay <[email protected]>--- board/dhelectronics/dh_stm32mp1/board.c | 8 ++++++-- .../dhelectronics/dh_stm32mp1/u-boot-dhcom.its | 18 +++++++++++++++++- .../dhelectronics/dh_stm32mp1/u-boot-dhcor.its | 3 ++- configs/stm32mp15_dhcom_basic_defconfig | 1 + 4 files changed, 26 insertions(+), 4 deletions(-)
Applied on u-boot-stm/master
Thanks
Quoted 91 lines
Quoted 79 lines
board/dhelectronics/dh_stm32mp1/board.c +6
-2@@ -237,9 +237,13 @@ int board_early_init_f(void)#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match (const char *name) { -char test[20 ]; +const char *compat; +char test[128 ]; -snprintf (test,sizeof (test),"somrev%d_boardrev%d" , somcode, brdcode); + compat =fdt_getprop (gd->fdt_blob,0 ,"compatible" ,NULL ); + +snprintf (test,sizeof (test),"%s_somrev%d_boardrev%d" , + compat, somcode, brdcode);if (!strcmp (name, test))return 0 ;board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its +17
-1@@ -23,17 +23,33 @@ arch = "arm"; compression = "none"; }; + + fdt-2 { + description = ".dtb"; + data = /incbin/("arch/arm/dts/stm32mp15xx-dhcom-drc02.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + }; }; configurations { default = "config-1"; config-1 { - description = "somrev0_boardrev0"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-pdk2_somrev0_boardrev0"; loadables = "uboot"; fdt = "fdt-1"; }; + config-2 { + /* DT+SoM+board model */ + description = "dh,stm32mp15xx-dhcom-drc02_somrev0_boardrev0"; + loadables = "uboot"; + fdt = "fdt-2"; + }; + /* Add 587-100..587-400 with fdt-2..fdt-4 here */ }; };board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its +2
-1@@ -29,7 +29,8 @@ default = "config-1"; config-1 { - description = "somrev0_boardrev1"; /* SoM+board model */ + /* DT+SoM+board model */ + description = "arrow,stm32mp15xx-avenger96_somrev0_boardrev1"; loadables = "uboot"; fdt = "fdt-1"; };configs/stm32mp15_dhcom_basic_defconfig +0
-0configs/stm32mp15_dhcom_basic_defconfig CONFIG_CMD_REGULATOR=y · line 63
Quoted 7 lines
configs/stm32mp15_dhcom_basic_defconfig +1
-0@@ -57,6 +57,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y # CONFIG_SPL_DOS_PARTITION is not set +CONFIG_OF_LIST="stm32mp15xx-dhcom-pdk2 stm32mp15xx-dhcom-drc02" CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-names interrupts-extended interrupt-controller \\\#interrupt-cells interrupt-parent dmas dma-names assigned-clocks assigned-clock-rates assigned-clock-parents hwlocks" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_USE_ENV_SPI_BUS=yReviewed-by Patrice Chotard <[email protected]>Thanks
Patrice