From 3b7653db7b638c6033ad24f87325a6b4a4895dee Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 10 Jul 2024 09:16:08 +0200 Subject: arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. No functional change, as we currently have rules for producing a foo.dtbo from either foo.dts or foo.dtso. Note that in the linux tree, all device tree overlay sources have been renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Marek Vasut Signed-off-by: Rasmus Villemoes Reviewed-by: Marek Vasut --- .../arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dts | 10 -- .../dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dtso | 10 ++ arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dts | 10 -- arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtso | 10 ++ .../arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dts | 43 ------- .../dts/imx8mp-dhcom-som-overlay-eth1xfast.dtso | 43 +++++++ .../arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dts | 24 ---- .../dts/imx8mp-dhcom-som-overlay-eth2xfast.dtso | 24 ++++ arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts | 133 --------------------- arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dtso | 133 +++++++++++++++++++++ 10 files changed, 220 insertions(+), 220 deletions(-) delete mode 100644 arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dts create mode 100644 arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dtso delete mode 100644 arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dts create mode 100644 arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtso delete mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dts create mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dtso delete mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dts create mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dtso delete mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts create mode 100644 arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dtso diff --git a/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dts b/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dts deleted file mode 100644 index 3b39777692..0000000000 --- a/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dts +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (C) 2023 Marek Vasut - */ -/dts-v1/; -/plugin/; - -ðphypdk { /* Micrel KSZ9131RNXI */ - status = "disabled"; -}; diff --git a/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dtso b/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dtso new file mode 100644 index 0000000000..3b39777692 --- /dev/null +++ b/arch/arm/dts/imx8mp-dhcom-pdk-overlay-eth2xfast.dtso @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) 2023 Marek Vasut + */ +/dts-v1/; +/plugin/; + +ðphypdk { /* Micrel KSZ9131RNXI */ + status = "disabled"; +}; diff --git a/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dts b/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dts deleted file mode 100644 index f27e6429ab..0000000000 --- a/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dts +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (C) 2023 Marek Vasut - */ -/dts-v1/; -/plugin/; - -ðphy0g { - reg = <7>; -}; diff --git a/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtso b/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtso new file mode 100644 index 0000000000..f27e6429ab --- /dev/null +++ b/arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtso @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) 2023 Marek Vasut + */ +/dts-v1/; +/plugin/; + +ðphy0g { + reg = <7>; +}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dts b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dts deleted file mode 100644 index bb5a2b6817..0000000000 --- a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dts +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (C) 2023 Marek Vasut - */ -/dts-v1/; -/plugin/; - -#include - -&eqos { /* First ethernet */ - pinctrl-0 = <&pinctrl_eqos_rmii>; - phy-handle = <ðphy0f>; - phy-mode = "rmii"; - - assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, - <&clk IMX8MP_SYS_PLL2_100M>, - <&clk IMX8MP_SYS_PLL2_50M>; - assigned-clock-rates = <0>, <100000000>, <50000000>; -}; - -ðphy0g { /* Micrel KSZ9131RNXI */ - status = "disabled"; -}; - -ðphy0f { /* SMSC LAN8740Ai */ - status = "okay"; -}; - -&fec { /* Second ethernet -- HS connector not populated on 1x RMII PHY SoM */ - status = "disabled"; -}; - -/* No WiFi/BT chipset on this SoM variant. */ - -&uart2 { - bluetooth { - status = "disabled"; - }; -}; - -&usdhc1 { - status = "disabled"; -}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dtso b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dtso new file mode 100644 index 0000000000..bb5a2b6817 --- /dev/null +++ b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth1xfast.dtso @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) 2023 Marek Vasut + */ +/dts-v1/; +/plugin/; + +#include + +&eqos { /* First ethernet */ + pinctrl-0 = <&pinctrl_eqos_rmii>; + phy-handle = <ðphy0f>; + phy-mode = "rmii"; + + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, + <&clk IMX8MP_SYS_PLL2_100M>, + <&clk IMX8MP_SYS_PLL2_50M>; + assigned-clock-rates = <0>, <100000000>, <50000000>; +}; + +ðphy0g { /* Micrel KSZ9131RNXI */ + status = "disabled"; +}; + +ðphy0f { /* SMSC LAN8740Ai */ + status = "okay"; +}; + +&fec { /* Second ethernet -- HS connector not populated on 1x RMII PHY SoM */ + status = "disabled"; +}; + +/* No WiFi/BT chipset on this SoM variant. */ + +&uart2 { + bluetooth { + status = "disabled"; + }; +}; + +&usdhc1 { + status = "disabled"; +}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dts b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dts deleted file mode 100644 index 82dadcea96..0000000000 --- a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (C) 2023 Marek Vasut - */ -#include "imx8mp-dhcom-som-overlay-eth1xfast.dts" - -/* Dual RMII 100/Full Fast ethernet on this SoM variant. */ - -&fec { /* Second ethernet */ - pinctrl-0 = <&pinctrl_fec_rmii>; - phy-handle = <ðphy1f>; - phy-mode = "rmii"; - status = "okay"; - - assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, - <&clk IMX8MP_SYS_PLL2_100M>, - <&clk IMX8MP_SYS_PLL2_50M>, - <&clk IMX8MP_SYS_PLL2_50M>; - assigned-clock-rates = <0>, <100000000>, <50000000>, <0>; -}; - -ðphy1f { /* SMSC LAN8740Ai */ - status = "okay"; -}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dtso b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dtso new file mode 100644 index 0000000000..f2d768cdf9 --- /dev/null +++ b/arch/arm/dts/imx8mp-dhcom-som-overlay-eth2xfast.dtso @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) 2023 Marek Vasut + */ +#include "imx8mp-dhcom-som-overlay-eth1xfast.dtso" + +/* Dual RMII 100/Full Fast ethernet on this SoM variant. */ + +&fec { /* Second ethernet */ + pinctrl-0 = <&pinctrl_fec_rmii>; + phy-handle = <ðphy1f>; + phy-mode = "rmii"; + status = "okay"; + + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, + <&clk IMX8MP_SYS_PLL2_100M>, + <&clk IMX8MP_SYS_PLL2_50M>, + <&clk IMX8MP_SYS_PLL2_50M>; + assigned-clock-rates = <0>, <100000000>, <50000000>, <0>; +}; + +ðphy1f { /* SMSC LAN8740Ai */ + status = "okay"; +}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts b/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts deleted file mode 100644 index b2154d57e4..0000000000 --- a/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts +++ /dev/null @@ -1,133 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (C) 2023 Marek Vasut - */ -/dts-v1/; -/plugin/; - -#include -#include - -#include "imx8mp-pinfunc.h" - -&brcmf { - reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; -}; - -&eeprom0 { /* EEPROM with EQoS MAC address */ - compatible = "atmel,24c02"; - pagesize = <16>; -}; - -&eeprom1 { /* EEPROM with FEC MAC address */ - compatible = "atmel,24c02"; - pagesize = <16>; -}; - -&eeprom0wl { - status = "disabled"; -}; - -&eeprom1wl { - status = "disabled"; -}; - -ðphy0f { /* SMSC LAN8740Ai */ - pinctrl-0 = <&pinctrl_ethphy0 &pinctrl_ioexp>; - reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; - reg = <0>; -}; - -ðphy0g { /* Micrel KSZ9131RNXI */ - pinctrl-0 = <&pinctrl_ethphy0 &pinctrl_ioexp>; - reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; -}; - -ðphy1f { /* SMSC LAN8740Ai */ - reg = <1>; -}; - -&i2c3 { - adc@48 { - compatible = "ti,tla2024"; - interrupts-extended; - }; -}; - -&ioexp { - status = "disabled"; -}; - -®_eth_vio { - gpio = <&gpio2 10 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pinctrl_enet_vio>; - pinctrl-names = "default"; -}; - -&rv3032 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_rtc>; - interrupts-extended = <&gpio5 5 IRQ_TYPE_LEVEL_LOW>; -}; - -&uart2 { - bluetooth { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart2_bt>; - shutdown-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; - }; -}; - -&usb_dwc3_0 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usb0_vbus>; -}; - -&usdhc1 { - pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_usdhc1_wl_reg_en>; - pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_usdhc1_wl_reg_en>; - pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_usdhc1_wl_reg_en>; -}; - -&iomuxc { - pinctrl-0 = <&pinctrl_hog_base - &pinctrl_dhcom_a &pinctrl_dhcom_b &pinctrl_dhcom_c - &pinctrl_dhcom_d &pinctrl_dhcom_e &pinctrl_dhcom_f - &pinctrl_dhcom_g &pinctrl_dhcom_h &pinctrl_dhcom_i - &pinctrl_dhcom_j &pinctrl_dhcom_k &pinctrl_dhcom_l - /* GPIO_M is connected to CLKOUT2 */ - &pinctrl_dhcom_int>; - - pinctrl_enet_vio: dhcom-enet-vio-grp { - fsl,pins = < - MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x22 - >; - }; - - pinctrl_rtc: dhcom-rtc-grp { - fsl,pins = < - /* RTC_#INT Interrupt */ - MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x400001c6 - >; - }; - - pinctrl_uart2_bt: dhcom-uart2-bt-grp { - fsl,pins = < - /* BT_REG_EN */ - MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x144 - >; - }; - - pinctrl_usb0_vbus: dhcom-usb0-grp { - fsl,pins = < - MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID 0x0 - >; - }; - - pinctrl_usdhc1_wl_reg_en: dhcom-usdhc1-wl-reg-en-grp { - fsl,pins = < - /* WL_REG_EN */ - MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x144 - >; - }; -}; diff --git a/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dtso b/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dtso new file mode 100644 index 0000000000..b2154d57e4 --- /dev/null +++ b/arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dtso @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) 2023 Marek Vasut + */ +/dts-v1/; +/plugin/; + +#include +#include + +#include "imx8mp-pinfunc.h" + +&brcmf { + reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; +}; + +&eeprom0 { /* EEPROM with EQoS MAC address */ + compatible = "atmel,24c02"; + pagesize = <16>; +}; + +&eeprom1 { /* EEPROM with FEC MAC address */ + compatible = "atmel,24c02"; + pagesize = <16>; +}; + +&eeprom0wl { + status = "disabled"; +}; + +&eeprom1wl { + status = "disabled"; +}; + +ðphy0f { /* SMSC LAN8740Ai */ + pinctrl-0 = <&pinctrl_ethphy0 &pinctrl_ioexp>; + reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; + reg = <0>; +}; + +ðphy0g { /* Micrel KSZ9131RNXI */ + pinctrl-0 = <&pinctrl_ethphy0 &pinctrl_ioexp>; + reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; +}; + +ðphy1f { /* SMSC LAN8740Ai */ + reg = <1>; +}; + +&i2c3 { + adc@48 { + compatible = "ti,tla2024"; + interrupts-extended; + }; +}; + +&ioexp { + status = "disabled"; +}; + +®_eth_vio { + gpio = <&gpio2 10 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&pinctrl_enet_vio>; + pinctrl-names = "default"; +}; + +&rv3032 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rtc>; + interrupts-extended = <&gpio5 5 IRQ_TYPE_LEVEL_LOW>; +}; + +&uart2 { + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2_bt>; + shutdown-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; +}; + +&usb_dwc3_0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb0_vbus>; +}; + +&usdhc1 { + pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_usdhc1_wl_reg_en>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_usdhc1_wl_reg_en>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_usdhc1_wl_reg_en>; +}; + +&iomuxc { + pinctrl-0 = <&pinctrl_hog_base + &pinctrl_dhcom_a &pinctrl_dhcom_b &pinctrl_dhcom_c + &pinctrl_dhcom_d &pinctrl_dhcom_e &pinctrl_dhcom_f + &pinctrl_dhcom_g &pinctrl_dhcom_h &pinctrl_dhcom_i + &pinctrl_dhcom_j &pinctrl_dhcom_k &pinctrl_dhcom_l + /* GPIO_M is connected to CLKOUT2 */ + &pinctrl_dhcom_int>; + + pinctrl_enet_vio: dhcom-enet-vio-grp { + fsl,pins = < + MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x22 + >; + }; + + pinctrl_rtc: dhcom-rtc-grp { + fsl,pins = < + /* RTC_#INT Interrupt */ + MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x400001c6 + >; + }; + + pinctrl_uart2_bt: dhcom-uart2-bt-grp { + fsl,pins = < + /* BT_REG_EN */ + MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x144 + >; + }; + + pinctrl_usb0_vbus: dhcom-usb0-grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID 0x0 + >; + }; + + pinctrl_usdhc1_wl_reg_en: dhcom-usdhc1-wl-reg-en-grp { + fsl,pins = < + /* WL_REG_EN */ + MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x144 + >; + }; +}; -- cgit v1.2.3 From 06518fdf24e5fdf3561eb66c00bd8946cf5b0e58 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 10 Jul 2024 09:16:09 +0200 Subject: kbuild: Allow DTB overlays to built into .dtbo.S files [linux commit 941214a512d8, modified for U-Boot by removing the include of vmlinux.lds.h and replacing STRUCT_ALIGNMENT by 16.] DTB files can be built into the kernel by converting them to assembly files then assembling them into object files. We extend this here for DTB overlays with the .dtso extensions. We change the start and end delimiting tag prefix to make it clear that this data came from overlay files. Signed-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3e68d5aa80..549c361947 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -305,7 +305,7 @@ endif DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) # Generate an assembly file to wrap the output of the device tree compiler -quiet_cmd_dt_S_dtb= DTB $@ +quiet_cmd_dt_S_dtb= DTBS $@ # Modified for U-Boot cmd_dt_S_dtb= \ ( \ @@ -322,6 +322,24 @@ cmd_dt_S_dtb= \ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) +# Generate an assembly file to wrap the output of the device tree compiler +quiet_cmd_dt_S_dtbo= DTBOS $@ +# Modified for U-Boot +cmd_dt_S_dtbo= \ +{ \ + echo '.section .dtb.init.rodata,"a"'; \ + echo '.balign 16'; \ + echo '.global __dtbo_$(subst -,_,$(*F))_begin'; \ + echo '__dtbo_$(subst -,_,$(*F))_begin:'; \ + echo '.incbin "$<" '; \ + echo '__dtbo_$(subst -,_,$(*F))_end:'; \ + echo '.global __dtbo_$(subst -,_,$(*F))_end'; \ + echo '.balign 16'; \ +} > $@ + +$(obj)/%.dtbo.S: $(obj)/%.dtbo + $(call cmd,dt_S_dtbo) + ifeq ($(CONFIG_OF_LIBFDT_OVERLAY),y) DTC_FLAGS += -@ endif -- cgit v1.2.3 From 03e36e38e86a123be148259c7dc97da6ceab700e Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 10 Jul 2024 09:16:10 +0200 Subject: test: overlay: rename overlay source files to .dtso Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. In this case, the files are really meant to be compiled to .dtbo -> .dtbo.S -> .dtbo.o that get embedded in the image, which means that the begin/end symbols generated by the makefile rule changes to __dtbo_ rather than __dtb, so the consuming .c file needs updating, but this should not result in any functional change. Note that in the linux tree, all device tree overlay sources have been renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Maxime Ripard Cc: Simon Glass Signed-off-by: Rasmus Villemoes --- test/overlay/Makefile | 4 +- test/overlay/cmd_ut_overlay.c | 8 +-- test/overlay/test-fdt-overlay-stacked.dts | 20 ------- test/overlay/test-fdt-overlay-stacked.dtso | 20 +++++++ test/overlay/test-fdt-overlay.dts | 95 ------------------------------ test/overlay/test-fdt-overlay.dtso | 95 ++++++++++++++++++++++++++++++ 6 files changed, 121 insertions(+), 121 deletions(-) delete mode 100644 test/overlay/test-fdt-overlay-stacked.dts create mode 100644 test/overlay/test-fdt-overlay-stacked.dtso delete mode 100644 test/overlay/test-fdt-overlay.dts create mode 100644 test/overlay/test-fdt-overlay.dtso diff --git a/test/overlay/Makefile b/test/overlay/Makefile index 2deec929ab..47937e3c10 100644 --- a/test/overlay/Makefile +++ b/test/overlay/Makefile @@ -10,5 +10,5 @@ DTC_FLAGS += -@ # DT overlays obj-y += test-fdt-base.dtb.o -obj-y += test-fdt-overlay.dtb.o -obj-y += test-fdt-overlay-stacked.dtb.o +obj-y += test-fdt-overlay.dtbo.o +obj-y += test-fdt-overlay-stacked.dtbo.o diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c index bcb29a26e2..256afd115d 100644 --- a/test/overlay/cmd_ut_overlay.c +++ b/test/overlay/cmd_ut_overlay.c @@ -21,8 +21,8 @@ #define FDT_COPY_SIZE (4 * SZ_1K) extern u32 __dtb_test_fdt_base_begin; -extern u32 __dtb_test_fdt_overlay_begin; -extern u32 __dtb_test_fdt_overlay_stacked_begin; +extern u32 __dtbo_test_fdt_overlay_begin; +extern u32 __dtbo_test_fdt_overlay_stacked_begin; static void *fdt; @@ -216,8 +216,8 @@ int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) const int n_ents = UNIT_TEST_SUITE_COUNT(overlay_test); struct unit_test_state *uts; void *fdt_base = &__dtb_test_fdt_base_begin; - void *fdt_overlay = &__dtb_test_fdt_overlay_begin; - void *fdt_overlay_stacked = &__dtb_test_fdt_overlay_stacked_begin; + void *fdt_overlay = &__dtbo_test_fdt_overlay_begin; + void *fdt_overlay_stacked = &__dtbo_test_fdt_overlay_stacked_begin; void *fdt_overlay_copy, *fdt_overlay_stacked_copy; int ret = -ENOMEM; diff --git a/test/overlay/test-fdt-overlay-stacked.dts b/test/overlay/test-fdt-overlay-stacked.dts deleted file mode 100644 index 6411adec53..0000000000 --- a/test/overlay/test-fdt-overlay-stacked.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2016 NextThing Co - * Copyright (c) 2016 Free Electrons - * Copyright (c) 2018 Konsulko Group - */ - -/dts-v1/; -/plugin/; - -/ { - /* Test that we can reference an overlay symbol */ - fragment@0 { - target = <&local>; - - __overlay__ { - stacked-test-int-property = <43>; - }; - }; -}; diff --git a/test/overlay/test-fdt-overlay-stacked.dtso b/test/overlay/test-fdt-overlay-stacked.dtso new file mode 100644 index 0000000000..6411adec53 --- /dev/null +++ b/test/overlay/test-fdt-overlay-stacked.dtso @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2016 NextThing Co + * Copyright (c) 2016 Free Electrons + * Copyright (c) 2018 Konsulko Group + */ + +/dts-v1/; +/plugin/; + +/ { + /* Test that we can reference an overlay symbol */ + fragment@0 { + target = <&local>; + + __overlay__ { + stacked-test-int-property = <43>; + }; + }; +}; diff --git a/test/overlay/test-fdt-overlay.dts b/test/overlay/test-fdt-overlay.dts deleted file mode 100644 index 5a21b346d0..0000000000 --- a/test/overlay/test-fdt-overlay.dts +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2016 NextThing Co - * Copyright (c) 2016 Free Electrons - */ - -/dts-v1/; -/plugin/; - -/ { - /* Test that we can change an int by another */ - fragment@0 { - target = <&test>; - - __overlay__ { - test-int-property = <43>; - }; - }; - - /* Test that we can replace a string by a longer one */ - fragment@1 { - target = <&test>; - - __overlay__ { - test-str-property = "foobar"; - }; - }; - - /* Test that we add a new property */ - fragment@2 { - target = <&test>; - - __overlay__ { - test-str-property-2 = "foobar2"; - }; - }; - - /* Test that we add a new node (by phandle) */ - fragment@3 { - target = <&test>; - - __overlay__ { - new-node { - new-property; - }; - }; - }; - - /* Test that we add a new node (by path) */ - fragment@4 { - target-path = "/"; - - __overlay__ { - new-node { - new-property; - }; - }; - }; - - fragment@5 { - target-path = "/"; - - __overlay__ { - local: new-local-node { - new-property; - }; - }; - }; - - fragment@6 { - target-path = "/"; - - __overlay__ { - test-phandle = <&test>, <&local>; - }; - }; - - fragment@7 { - target-path = "/"; - - __overlay__ { - test-several-phandle = <&local>, <&local>; - }; - }; - - fragment@8 { - target = <&test>; - - __overlay__ { - sub-test-node { - new-sub-test-property; - }; - }; - }; -}; diff --git a/test/overlay/test-fdt-overlay.dtso b/test/overlay/test-fdt-overlay.dtso new file mode 100644 index 0000000000..5a21b346d0 --- /dev/null +++ b/test/overlay/test-fdt-overlay.dtso @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2016 NextThing Co + * Copyright (c) 2016 Free Electrons + */ + +/dts-v1/; +/plugin/; + +/ { + /* Test that we can change an int by another */ + fragment@0 { + target = <&test>; + + __overlay__ { + test-int-property = <43>; + }; + }; + + /* Test that we can replace a string by a longer one */ + fragment@1 { + target = <&test>; + + __overlay__ { + test-str-property = "foobar"; + }; + }; + + /* Test that we add a new property */ + fragment@2 { + target = <&test>; + + __overlay__ { + test-str-property-2 = "foobar2"; + }; + }; + + /* Test that we add a new node (by phandle) */ + fragment@3 { + target = <&test>; + + __overlay__ { + new-node { + new-property; + }; + }; + }; + + /* Test that we add a new node (by path) */ + fragment@4 { + target-path = "/"; + + __overlay__ { + new-node { + new-property; + }; + }; + }; + + fragment@5 { + target-path = "/"; + + __overlay__ { + local: new-local-node { + new-property; + }; + }; + }; + + fragment@6 { + target-path = "/"; + + __overlay__ { + test-phandle = <&test>, <&local>; + }; + }; + + fragment@7 { + target-path = "/"; + + __overlay__ { + test-several-phandle = <&local>, <&local>; + }; + }; + + fragment@8 { + target = <&test>; + + __overlay__ { + sub-test-node { + new-sub-test-property; + }; + }; + }; +}; -- cgit v1.2.3 From 7c996f244374ef7a3dac6d8effe1152ee21b9ef6 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 10 Jul 2024 09:16:11 +0200 Subject: test/py: efi_capsule: rename device tree overlay source to .dtso Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. Note that in the linux tree, all device tree overlay sources have been renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources, and eventually eliminating all .dts -> .dtbo instances. This also matches the documentation update done in commit 4fb7e570d6b. Cc: Masahisa Kojima Signed-off-by: Rasmus Villemoes --- test/py/tests/test_efi_capsule/conftest.py | 6 +++--- test/py/tests/test_efi_capsule/version.dts | 24 ------------------------ test/py/tests/test_efi_capsule/version.dtso | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 test/py/tests/test_efi_capsule/version.dts create mode 100644 test/py/tests/test_efi_capsule/version.dtso diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index 80b12977d6..61eab5112a 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -53,7 +53,7 @@ def efi_capsule_data(request, u_boot_config): # Update dtb to add the version information check_call('cd %s; ' - 'cp %s/test/py/tests/test_efi_capsule/version.dts .' + 'cp %s/test/py/tests/test_efi_capsule/version.dtso .' % (data_dir, u_boot_config.source_dir), shell=True) if capsule_auth_enabled: @@ -61,13 +61,13 @@ def efi_capsule_data(request, u_boot_config): 'cp %s/arch/sandbox/dts/test.dtb test_sig.dtb' % (data_dir, u_boot_config.build_dir), shell=True) check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' + 'dtc -@ -I dts -O dtb -o version.dtbo version.dtso; ' 'fdtoverlay -i test_sig.dtb ' '-o test_ver.dtb version.dtbo' % (data_dir), shell=True) else: check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' + 'dtc -@ -I dts -O dtb -o version.dtbo version.dtso; ' 'fdtoverlay -i %s/arch/sandbox/dts/test.dtb ' '-o test_ver.dtb version.dtbo' % (data_dir, u_boot_config.build_dir), shell=True) diff --git a/test/py/tests/test_efi_capsule/version.dts b/test/py/tests/test_efi_capsule/version.dts deleted file mode 100644 index 07850cc606..0000000000 --- a/test/py/tests/test_efi_capsule/version.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; -/plugin/; - -&{/} { - firmware-version { - image1 { - lowest-supported-version = <3>; - image-index = <1>; - image-type-id = "09D7CF52-0720-4710-91D1-08469B7FE9C8"; - }; - image2 { - lowest-supported-version = <7>; - image-index = <2>; - image-type-id = "5A7021F5-FEF2-48B4-AABA-832E777418C0"; - }; - image3 { - lowest-supported-version = <3>; - image-index = <1>; - image-type-id = "3673B45D-6A7C-46F3-9E60-ADABB03F7937"; - }; - }; -}; diff --git a/test/py/tests/test_efi_capsule/version.dtso b/test/py/tests/test_efi_capsule/version.dtso new file mode 100644 index 0000000000..07850cc606 --- /dev/null +++ b/test/py/tests/test_efi_capsule/version.dtso @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; +/plugin/; + +&{/} { + firmware-version { + image1 { + lowest-supported-version = <3>; + image-index = <1>; + image-type-id = "09D7CF52-0720-4710-91D1-08469B7FE9C8"; + }; + image2 { + lowest-supported-version = <7>; + image-index = <2>; + image-type-id = "5A7021F5-FEF2-48B4-AABA-832E777418C0"; + }; + image3 { + lowest-supported-version = <3>; + image-index = <1>; + image-type-id = "3673B45D-6A7C-46F3-9E60-ADABB03F7937"; + }; + }; +}; -- cgit v1.2.3 From e1ad98ed9b2868f0f2930738f63e4e58b0de9b04 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 10 Jul 2024 09:16:12 +0200 Subject: kbuild: Disallow DTB overlays to built from .dts named source files [equivalent to linux commit 81d362732bac] As a follow up to the series allowing DTB overlays to built from .dtso files. Now that all overlays have been renamed, remove the ability to build from overlays from .dts files to prevent any files with the old name from accidental being added. Signed-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 549c361947..d6fbf9a765 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -416,9 +416,6 @@ cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE - $(call if_changed_dep,dtco) - $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE $(call if_changed_dep,dtco) -- cgit v1.2.3