phyCORE-i.MX8MP Update
Subsystems (3)
v3 cover phyCORE-i.MX8MP Update
Hello,
this is the third version of the phyCORE-i.MX8MP updates. This includes also an update of imx8mp.dtsi from kernel and the introduction of a common imx8mp-u-boot.dtsi.
This version only moves some code from one place/patch to an other. No intentional functional change to the previous version. Changes are listed in patches more detailed.
Changes in v3:
- added Reviewed-by tags.
- [2/9] moved binman nodes to common imx8mp-u-boot.dtsi
- made now all debug uart changes in patch:
[4/9] "board: phytec: phycore_imx8mp: Change debug UART"
Changes in v2:
- [5/9] removed hardcoded serverip in environment
- [5/9] removed not needed fec eth defines in board config include
Teresa
Teresa Remmet (9):
arm: dts: imx8mp: Resync imx8mp device tree include
arm: dts: imx8mp: Add common u-boot dtsi
arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernel
board: phytec: phycore_imx8mp: Change debug UART
board: phytec: phycore_imx8mp: Add fec support
board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95V
board: phytec: phycore-imx8mp: Enable DVS1 control
arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entry
board: phytec: imx8mp-phycore: Switch to binman
arch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 47 +----- arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts | 58 ++++++- arch/arm/dts/imx8mp-phycore-som.dtsi | 2 +- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ arch/arm/dts/imx8mp.dtsi | 146 ++++++++++++++++- arch/arm/mach-imx/imx8m/Kconfig | 1 + .../phytec/phycore_imx8mp/imximage-8mp-sd.cfg | 10 ++ board/phytec/phycore_imx8mp/phycore-imx8mp.c | 14 ++ board/phytec/phycore_imx8mp/spl.c | 23 ++- configs/phycore-imx8mp_defconfig | 12 +- include/configs/phycore_imx8mp.h | 21 ++- 12 files changed, 424 insertions(+), 202 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi create mode 100644 board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg
Signature · 1 line
2.25.1
PATCH v3 1/9 arm: dts: imx8mp: Resync imx8mp device tree include
Sync imx8mp include with kernel commit:d1689cd3c0f4 ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"")
---
No changes in v2 and v3.
arch/arm/dts/imx8mp.dtsi | 146 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 141 insertions(+), 5 deletions(-)
arch/arm/dts/imx8mp.dtsi +141 -5
@@ -18,6 +18,7 @@ aliases { ethernet0 = &fec; + ethernet1 = &eqos; gpio0 = &gpio1; gpio1 = &gpio2; gpio2 = &gpio3;
@@ -218,10 +219,12 @@ }; soc@0 { - compatible = "simple-bus"; + compatible = "fsl,imx8mp-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; + nvmem-cells = <&imx8mp_uid>; + nvmem-cell-names = "soc_unique_id"; aips1: bus@30000000 { compatible = "fsl,aips-bus", "simple-bus";
@@ -266,7 +269,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; - gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 0 144 4>; + gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 26 144 4>; }; gpio4: gpio@30230000 {
@@ -310,6 +313,22 @@ status = "disabled"; }; + wdog2: watchdog@30290000 { + compatible = "fsl,imx8mp-wdt", "fsl,imx21-wdt"; + reg = <0x30290000 0x10000>; + interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX8MP_CLK_WDOG2_ROOT>; + status = "disabled"; + }; + + wdog3: watchdog@302a0000 { + compatible = "fsl,imx8mp-wdt", "fsl,imx21-wdt"; + reg = <0x302a0000 0x10000>; + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX8MP_CLK_WDOG3_ROOT>; + status = "disabled"; + }; + iomuxc: pinctrl@30330000 { compatible = "fsl,imx8mp-iomuxc"; reg = <0x30330000 0x10000>;
@@ -328,9 +347,17 @@ #address-cells = <1>; #size-cells = <1>; + imx8mp_uid: unique-id@420 { + reg = <0x8 0x8>; + }; + cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; }; + + eth_mac1: mac-address@90 { + reg = <0x90 6>; + }; }; anatop: anatop@30360000 {
@@ -762,13 +789,40 @@ assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>, <&clk IMX8MP_CLK_ENET_TIMER>, <&clk IMX8MP_CLK_ENET_REF>, - <&clk IMX8MP_CLK_ENET_TIMER>; + <&clk IMX8MP_CLK_ENET_PHY_REF>; assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, <&clk IMX8MP_SYS_PLL2_100M>, - <&clk IMX8MP_SYS_PLL2_125M>; - assigned-clock-rates = <0>, <0>, <125000000>, <100000000>; + <&clk IMX8MP_SYS_PLL2_125M>, + <&clk IMX8MP_SYS_PLL2_50M>; + assigned-clock-rates = <0>, <100000000>, <125000000>, <0>; fsl,num-tx-queues = <3>; fsl,num-rx-queues = <3>; + nvmem-cells = <ð_mac1>; + nvmem-cell-names = "mac-address"; + fsl,stop-mode = <&gpr 0x10 3>; + nvmem_macaddr_swap; + status = "disabled"; + }; + + eqos: ethernet@30bf0000 { + compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a"; + reg = <0x30bf0000 0x10000>; + interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "eth_wake_irq", "macirq"; + clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>, + <&clk IMX8MP_CLK_QOS_ENET_ROOT>, + <&clk IMX8MP_CLK_ENET_QOS_TIMER>, + <&clk IMX8MP_CLK_ENET_QOS>; + clock-names = "stmmaceth", "pclk", "ptp_ref", "tx"; + assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>, + <&clk IMX8MP_CLK_ENET_QOS_TIMER>, + <&clk IMX8MP_CLK_ENET_QOS>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, + <&clk IMX8MP_SYS_PLL2_100M>, + <&clk IMX8MP_SYS_PLL2_125M>; + assigned-clock-rates = <0>, <100000000>, <125000000>; + intf_mode = <&gpr 0x4>; status = "disabled"; }; };
@@ -788,5 +842,87 @@ reg = <0x3d800000 0x400000>; interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; }; + + usb3_phy0: usb-phy@381f0040 { + compatible = "fsl,imx8mp-usb-phy"; + reg = <0x381f0040 0x40>; + clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; + clock-names = "phy"; + assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + #phy-cells = <0>; + status = "disabled"; + }; + + usb3_0: usb@32f10100 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10100 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "suspend"; + interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x40000000 0x40000000 0xc0000000>; + ranges; + status = "disabled"; + + usb_dwc3_0: usb@38100000 { + compatible = "snps,dwc3"; + reg = <0x38100000 0x10000>; + clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + <&clk IMX8MP_CLK_USB_CORE_REF>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "bus_early", "ref", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; + phys = <&usb3_phy0>, <&usb3_phy0>; + phy-names = "usb2-phy", "usb3-phy"; + snps,dis-u2-freeclk-exists-quirk; + }; + + }; + + usb3_phy1: usb-phy@382f0040 { + compatible = "fsl,imx8mp-usb-phy"; + reg = <0x382f0040 0x40>; + clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; + clock-names = "phy"; + assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + #phy-cells = <0>; + }; + + usb3_1: usb@32f10108 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10108 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "suspend"; + interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x40000000 0x40000000 0xc0000000>; + ranges; + status = "disabled"; + + usb_dwc3_1: usb@38200000 { + compatible = "snps,dwc3"; + reg = <0x38200000 0x10000>; + clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + <&clk IMX8MP_CLK_USB_CORE_REF>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "bus_early", "ref", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; + phys = <&usb3_phy1>, <&usb3_phy1>; + phy-names = "usb2-phy", "usb3-phy"; + snps,dis-u2-freeclk-exists-quirk; + }; + }; }; };
Signature · 1 line
2.25.1
PATCH v3 1/9 arm: dts: imx8mp: Resync imx8mp device tree include
Quoted 5 lines
Sync imx8mp include with kernel commit:
d1689cd3c0f4("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"")Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 1/9 arm: dts: imx8mp: Resync imx8mp device tree include
In reply to Teresa RemmetQuoted 5 lines
Sync imx8mp include with kernel commit:
d1689cd3c0f4("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"")Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 2/9 arm: dts: imx8mp: Add common u-boot dtsi
In reply to Teresa RemmetFactor out the common node settings for dm-spl and dm-pre-reloc and move them to imx8mp-u-boot.dtsi
---
Changes in v3:
- Moved binman nodes to common imx8mp-u-boot.dtsi
Changes in v2:
- none
arch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi
arch/arm/dts/imx8mp-evk-u-boot.dtsi +2 -141
@@ -3,11 +3,9 @@ * Copyright 2019 NXP */ -/ { - binman: binman { - multiple-images; - }; +#include "imx8mp-u-boot.dtsi" +/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;
@@ -21,43 +19,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,off-on-delay-us = <20000>; };
@@ -156,104 +117,4 @@ phy-reset-post-delay = <100>; }; -&binman { - u-boot-spl-ddr { - filename = "u-boot-spl-ddr.bin"; - pad-byte = <0xff>; - align-size = <4>; - align = <4>; - u-boot-spl { - align-end = <4>; - }; - - blob_1: blob-ext@1 { - filename = "lpddr4_pmu_train_1d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_2: blob-ext@2 { - filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; - size = <0x4000>; - }; - - blob_3: blob-ext@3 { - filename = "lpddr4_pmu_train_2d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_4: blob-ext@4 { - filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; - size = <0x4000>; - }; - }; - - - flash { - mkimage { - args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000"; - - blob { - filename = "u-boot-spl-ddr.bin"; - }; - }; - }; - - itb { - filename = "u-boot.itb"; - - fit { - description = "Configuration to load ATF before U-Boot"; - #address-cells = <1>; - fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; - - uboot_blob: blob-ext { - filename = "u-boot-nodtb.bin"; - }; - }; - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - load = <0x970000>; - entry = <0x970000>; - - atf_blob: blob-ext { - filename = "bl31.bin"; - }; - }; - - fdt { - description = "NAME"; - type = "flat_dt"; - compression = "none"; - - uboot_fdt_blob: blob-ext { - filename = "u-boot.dtb"; - }; - }; - }; - - configurations { - default = "conf"; - - conf { - description = "NAME"; - firmware = "uboot"; - loadables = "atf"; - fdt = "fdt"; - }; - }; - }; - }; -};
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi +2 -37
@@ -4,6 +4,8 @@ * Author: Teresa Remmet <[email protected]> */ +#include "imx8mp-u-boot.dtsi" + / { wdt-reboot { compatible = "wdt-reboot";
@@ -12,43 +14,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,dm-spl; };
arch/arm/dts/imx8mp-u-boot.dtsi new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Quoted 399 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsiarch/arm/dts/imx8mp-evk-u-boot.dtsi +2
-141@@ -3,11 +3,9 @@ * Copyright 2019 NXP */ -/ { - binman: binman { - multiple-images; - }; +#include "imx8mp-u-boot.dtsi" +/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;@@ -21,43 +19,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,off-on-delay-us = <20000>; };@@ -156,104 +117,4 @@ phy-reset-post-delay = <100>; }; -&binman { - u-boot-spl-ddr { - filename = "u-boot-spl-ddr.bin"; - pad-byte = <0xff>; - align-size = <4>; - align = <4>; - u-boot-spl { - align-end = <4>; - }; - - blob_1: blob-ext@1 { - filename = "lpddr4_pmu_train_1d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_2: blob-ext@2 { - filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; - size = <0x4000>; - }; - - blob_3: blob-ext@3 { - filename = "lpddr4_pmu_train_2d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_4: blob-ext@4 { - filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; - size = <0x4000>; - }; - }; - - - flash { - mkimage { - args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000"; - - blob { - filename = "u-boot-spl-ddr.bin"; - }; - }; - }; - - itb { - filename = "u-boot.itb"; - - fit { - description = "Configuration to load ATF before U-Boot"; - #address-cells = <1>; - fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; - - uboot_blob: blob-ext { - filename = "u-boot-nodtb.bin"; - }; - }; - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - load = <0x970000>; - entry = <0x970000>; - - atf_blob: blob-ext { - filename = "bl31.bin"; - }; - }; - - fdt { - description = "NAME"; - type = "flat_dt"; - compression = "none"; - - uboot_fdt_blob: blob-ext { - filename = "u-boot.dtb"; - }; - }; - }; - - configurations { - default = "conf"; - - conf { - description = "NAME"; - firmware = "uboot"; - loadables = "atf"; - fdt = "fdt"; - }; - }; - }; - }; -};arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi +2
-37@@ -4,6 +4,8 @@ * Author: Teresa Remmet <[email protected]> */ +#include "imx8mp-u-boot.dtsi" + / { wdt-reboot { compatible = "wdt-reboot";@@ -12,43 +14,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,dm-spl; };arch/arm/dts/imx8mp-u-boot.dtsi new file +149
-1@@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2021 PHYTEC Messtechnik GmbH + * Author: Teresa Remmet <[email protected]> + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +&{/soc@0} { + u-boot,dm-pre-reloc; + u-boot,dm-spl; +}; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&osc_32k { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips1 { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips2 { + u-boot,dm-spl; +}; + +&aips3 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&binman { + u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + + blob_1: blob-ext@1 { + filename = "lpddr4_pmu_train_1d_imem_202006.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; + size = <0x4000>; + }; + + blob_3: blob-ext@3 { + filename = "lpddr4_pmu_train_2d_imem_202006.bin"; + size = <0x8000>; + }; + + blob_4: blob-ext@4 { + filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; + size = <0x4000>; + }; + }; + + flash { + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000"; + + blob { + filename = "u-boot-spl-ddr.bin"; + }; + }; + }; + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + #address-cells = <1>; + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SYS_TEXT_BASE>; + + uboot_blob: blob-ext { + filename = "u-boot-nodtb.bin"; + }; + }; + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <0x970000>; + entry = <0x970000>; + + atf_blob: blob-ext { + filename = "bl31.bin"; + }; + }; + + fdt { + description = "NAME"; + type = "flat_dt"; + compression = "none"; + + uboot_fdt_blob: blob-ext { + filename = "u-boot.dtb"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + description = "NAME"; + firmware = "uboot"; + loadables = "atf"; + fdt = "fdt"; + }; + }; + }; + }; +}; --
Quoted 2 lines
2.25.1
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with imx8mm_evk for example when it switched to binman.
What are the benefits to using binman?
Thanks,
Tim
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hello Tim,
Quoted 405 lines · Tim Harvey
Quoted 399 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsiarch/arm/dts/imx8mp-evk-u-boot.dtsi +2
-141@@ -3,11 +3,9 @@ * Copyright 2019 NXP */ -/ { - binman: binman { - multiple-images; - }; +#include "imx8mp-u-boot.dtsi" +/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;@@ -21,43 +19,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,off-on-delay-us = <20000>; };@@ -156,104 +117,4 @@ phy-reset-post-delay = <100>; }; -&binman { - u-boot-spl-ddr { - filename = "u-boot-spl-ddr.bin"; - pad-byte = <0xff>; - align-size = <4>; - align = <4>; - u-boot-spl { - align-end = <4>; - }; - - blob_1: blob-ext@1 { - filename = "lpddr4_pmu_train_1d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_2: blob-ext@2 { - filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; - size = <0x4000>; - }; - - blob_3: blob-ext@3 { - filename = "lpddr4_pmu_train_2d_imem_202006.bin"; - size = <0x8000>; - }; - - blob_4: blob-ext@4 { - filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; - size = <0x4000>; - }; - }; - - - flash { - mkimage { - args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000"; - - blob { - filename = "u-boot-spl-ddr.bin"; - }; - }; - }; - - itb { - filename = "u-boot.itb"; - - fit { - description = "Configuration to load ATF before U-Boot"; - #address-cells = <1>; - fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; - - uboot_blob: blob-ext { - filename = "u-boot-nodtb.bin"; - }; - }; - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - load = <0x970000>; - entry = <0x970000>; - - atf_blob: blob-ext { - filename = "bl31.bin"; - }; - }; - - fdt { - description = "NAME"; - type = "flat_dt"; - compression = "none"; - - uboot_fdt_blob: blob-ext { - filename = "u-boot.dtb"; - }; - }; - }; - - configurations { - default = "conf"; - - conf { - description = "NAME"; - firmware = "uboot"; - loadables = "atf"; - fdt = "fdt"; - }; - }; - }; - }; -};arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi +2
-37@@ -4,6 +4,8 @@ * Author: Teresa Remmet <[email protected]> */ +#include "imx8mp-u-boot.dtsi" + / { wdt-reboot { compatible = "wdt-reboot";@@ -12,43 +14,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_32k { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - -&iomuxc { - u-boot,dm-spl; -}; - ®_usdhc2_vmmc { u-boot,dm-spl; };arch/arm/dts/imx8mp-u-boot.dtsi new file +149
-1@@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2021 PHYTEC Messtechnik GmbH + * Author: Teresa Remmet <[email protected]> + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +&{/soc@0} { + u-boot,dm-pre-reloc; + u-boot,dm-spl; +}; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&osc_32k { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips1 { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips2 { + u-boot,dm-spl; +}; + +&aips3 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&binman { + u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + + blob_1: blob-ext@1 { + filename = "lpddr4_pmu_train_1d_imem_202006.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; + size = <0x4000>; + }; + + blob_3: blob-ext@3 { + filename = "lpddr4_pmu_train_2d_imem_202006.bin"; + size = <0x8000>; + }; + + blob_4: blob-ext@4 { + filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; + size = <0x4000>; + }; + }; + + flash { + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x920000"; + + blob { + filename = "u-boot-spl-ddr.bin"; + }; + }; + }; + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + #address-cells = <1>; + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SYS_TEXT_BASE>; + + uboot_blob: blob-ext { + filename = "u-boot-nodtb.bin"; + }; + }; + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <0x970000>; + entry = <0x970000>; + + atf_blob: blob-ext { + filename = "bl31.bin"; + }; + }; + + fdt { + description = "NAME"; + type = "flat_dt"; + compression = "none"; + + uboot_fdt_blob: blob-ext { + filename = "u-boot.dtb"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + description = "NAME"; + firmware = "uboot"; + loadables = "atf"; + fdt = "fdt"; + }; + }; + }; + }; +}; --Quoted 2 lines
2.25.1
Teresa,
Quoted 6 lines
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi
<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.
Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over tools/binman/binman.rst so I'm assuming you mean what is described there as benefits.
How do you get all the details needed for signing the image from binman?
If I make imx8mm_evk_defconfig which produces via binman flash.bin and u-boot.itb I get the following:
$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in image
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
Thanks,
Tim
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Tim,
Quoted 58 lines · Tim Harvey
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over
tools/binman/binman.rstso I'm assuming you mean what is described there as benefits.How do you get all the details needed for signing the image from binman?
Quoted 7 lines
If I make
imx8mm_evk_defconfigwhich produces via binman flash.bin and u-boot.itb I get the following:$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in image
As the message says, you need an 'fdtmap' in the image:
fdtmap {
}:Quoted 3 lines
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
You should be able to add signing support to binman for your use case. See for example how vblock.py works.
Regards,
Simon
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Quoted 70 lines · Simon Glass
Hi Tim,
Quoted 58 lines · Tim Harvey
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over
tools/binman/binman.rstso I'm assuming you mean what is described there as benefits.How do you get all the details needed for signing the image from binman?
Quoted 7 lines
If I make
imx8mm_evk_defconfigwhich produces via binman flash.bin and u-boot.itb I get the following:$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in image
Quoted 5 lines
As the message says, you need an 'fdtmap' in the image:
fdtmap { }:
Simon,
Sorry I still don't quite understand:
(quoted diff) +0 -0
b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
index f200afac9f..c6d8932fa4 100644
arch/arm/dts/imx8mm-evk-u-boot.dtsi +3 -0
@@ -163,6 +163,9 @@ itb { filename = "u-boot.itb"; + fdtmap { + }; + fit { description = "Configuration to load ATF before U-Boot"; #address-cells = <1>;
$ make imx8mm_evk_defconfig $ make $ ./tools/binman/binman ls -i u-boot.itb Name Image-pos Size Entry-type Offset Uncomp-size ------------------------------------------------------------------ main-section 0 a3875 section 0 fdtmap 0 48d fdtmap 0 fit 48d a33e8 fit 48d
For signing we need the loadaddr/offset/size of the components within the FIT image. Since binman is calling mkimage to create FIT images it seems outside the scope of binman to be able to dump details on the actual FIT image. Perhaps mkimage or another tool is to be used for that detail?
Quoted 6 lines
Quoted 3 lines
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
You should be able to add signing support to binman for your use case. See for example how
vblock.pyworks.
I see... so your saying instead of using an external tool to generate a txt template with the offset/size values for the various blobs instead we need to implement for example a habv4.py to add a habv4 entry and the python class would have access to the content handles to determine the addr/size in order to create the text template file fed to the NXP code signing tool?
Regards,
Tim
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Tim,
Quoted 108 lines · Tim Harvey
Quoted 70 lines · Simon Glass
Hi Tim,
Quoted 58 lines · Tim Harvey
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over
tools/binman/binman.rstso I'm assuming you mean what is described there as benefits.How do you get all the details needed for signing the image from binman?
Quoted 7 lines
If I make
imx8mm_evk_defconfigwhich produces via binman flash.bin and u-boot.itb I get the following:$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in imageQuoted 5 lines
As the message says, you need an 'fdtmap' in the image:
fdtmap { }:Simon,
Sorry I still don't quite understand:
arch/arm/dts/imx8mm-evk-u-boot.dtsi +3
-0@@ -163,6 +163,9 @@ itb { filename = "u-boot.itb"; + fdtmap { + }; + fit { description = "Configuration to load ATF before U-Boot"; #address-cells = <1>;$ make imx8mm_evk_defconfig $ make $ ./tools/binman/binman ls -i u-boot.itb Name Image-pos Size Entry-type Offset Uncomp-size ------------------------------------------------------------------ main-section 0 a3875 section 0 fdtmap 0 48d fdtmap 0 fit 48d a33e8 fit 48d
Quoted 5 lines
For signing we need the loadaddr/offset/size of the components within the FIT image. Since binman is calling mkimage to create FIT images it seems outside the scope of binman to be able to dump details on the actual FIT image. Perhaps mkimage or another tool is to be used for that detail?
Yes, binman does not look inside FITs at presnt. You may want to look at dump_image?
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
You should be able to add signing support to binman for your use case. See for example how
vblock.pyworks.
Quoted 6 lines
I see... so your saying instead of using an external tool to generate a txt template with the offset/size values for the various blobs instead we need to implement for example a
habv4.pyto add a habv4 entry and the python class would have access to the content handles to determine the addr/size in order to create the text template file fed to the NXP code signing tool?
Yes that should work. It is in fact what binman is designed for (producing images, with all the signing, etc.)
Regards,
Simon
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Tim, Simon,
Quoted 135 lines · Simon Glass
Hi Tim,
Quoted 108 lines · Tim Harvey
Quoted 70 lines · Simon Glass
Hi Tim,
Quoted 58 lines · Tim Harvey
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over
tools/binman/binman.rstso I'm assuming you mean what is described there as benefits.How do you get all the details needed for signing the image from binman?
Quoted 7 lines
If I make
imx8mm_evk_defconfigwhich produces via binman flash.bin and u-boot.itb I get the following:$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in imageQuoted 5 lines
As the message says, you need an 'fdtmap' in the image:
fdtmap { }:Simon,
Sorry I still don't quite understand:
arch/arm/dts/imx8mm-evk-u-boot.dtsi +3
-0@@ -163,6 +163,9 @@ itb { filename = "u-boot.itb"; + fdtmap { + }; + fit { description = "Configuration to load ATF before U-Boot"; #address-cells = <1>;$ make imx8mm_evk_defconfig $ make $ ./tools/binman/binman ls -i u-boot.itb Name Image-pos Size Entry-type Offset Uncomp-size ------------------------------------------------------------------ main-section 0 a3875 section 0 fdtmap 0 48d fdtmap 0 fit 48d a33e8 fit 48dQuoted 5 lines
For signing we need the loadaddr/offset/size of the components within the FIT image. Since binman is calling mkimage to create FIT images it seems outside the scope of binman to be able to dump details on the actual FIT image. Perhaps mkimage or another tool is to be used for that detail?
Yes, binman does not look inside FITs at presnt. You may want to look at
dump_image?Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
You should be able to add signing support to binman for your use case. See for example how
vblock.pyworks.Quoted 6 lines
I see... so your saying instead of using an external tool to generate a txt template with the offset/size values for the various blobs instead we need to implement for example a
habv4.pyto add a habv4 entry and the python class would have access to the content handles to determine the addr/size in order to create the text template file fed to the NXP code signing tool?
Quoted 2 lines
Yes that should work. It is in fact what binman is designed for (producing images, with all the signing, etc.)
Ah, sounds interesting!
@Tim: Do you have time to look into this topic?
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
In reply to Tim HarveyHello Tim,
Quoted 47 lines · Tim Harvey
Quoted 24 lines · Heiko Schocher
Hello Tim,
Quoted 20 lines · Tim Harvey
Quoted 19 lines · Teresa Remmet
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>---
Changes in v3:
- Moved binman nodes to commonimx8mp-u-boot.dtsi
Changes in v2:
- nonearch/arm/dts/imx8mp-evk-u-boot.dtsi | 143 +---------------- .../imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 39 +---- arch/arm/dts/imx8mp-u-boot.dtsi | 149 ++++++++++++++++++ 3 files changed, 153 insertions(+), 178 deletions(-) create mode 100644 arch/arm/dts/imx8mp-u-boot.dtsi<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Teresa,
I've noticed many of the imx8m boards migrating to using binman for image packaging.
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Quoted 9 lines
Yes, but you can easy generate there a single image again.
Quoted 1 line
What are the benefits to using binman?
Beside the pros from binmal in general, I see the benefit in special for imx8mp, that you can get all infos you need for signing the image from within the image. No need to save some log output from U-Boot build and parse this output ...
Quoted 7 lines
(+cc Simon)
Heiko,
And what are the pros from binman in general? I've read over
tools/binman/binman.rstso I'm assuming you mean what is described there as benefits.
Yes!
Quoted 1 line
How do you get all the details needed for signing the image from binman?
Not from binman directly, instead for getting the offset and length of the images you want to sign, I simply used "fdtget" to read them from the u-boot image:
(extract from my yocto class... WIP also):
dec2hex() {
echo 0x$(printf '%x' $1)
}# $1 ... fit image name
# $2 ... part of fit image
fit_get_off() {
val=$(fdtget $1 /images/$2 data-position)
# dec -> hex
dec2hex $val
}# $1 ... fit image name
# $2 ... part of fit image
fit_get_len() {
val=$(fdtget $1 /images/$2 data-size)
dec2hex $val
}example for atf:
off=$(fit_get_off u-boot.itb atf)
len=$(fit_get_len u-boot.itb atf)
Hope this helps?
Quoted 8 lines
If I make
imx8mm_evk_defconfigwhich produces via binman flash.bin and u-boot.itb I get the following:$ ./tools/binman/binman ls -i flash.bin binman: Cannot find FDT map in image $ ./tools/binman/binman ls -i u-boot.itb binman: Cannot find FDT map in image
Quoted 7 lines
I would very much like to understand how to use binman to get the various offsets needed for signing an IMX image for use with HAB.
Thanks,
Tim
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Fabio Estevam
reviewerRe: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
In reply to Heiko SchocherHi Heiko,
Quoted 5 lines · Heiko Schocher
Quoted 3 lines
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.Yes, but you can easy generate there a single image again.
Yes, that would be preferable
Any suggestions on how we can have a single bootable image again?
Thanks,
Fabio Estevam
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hello Fabio,
Quoted 8 lines · Fabio Estevam
Hi Heiko,
Quoted 4 lines · Heiko Schocher
Quoted 3 lines
Doesn't this change from having a single flash.bin encompasing the SPL and U-Boot proper to having split files? I noticed that happened with
imx8mm_evkfor example when it switched to binman.
Quoted 5 lines
Quoted 1 line
Yes, but you can easy generate there a single image again.
Yes, that would be preferable
Any suggestions on how we can have a single bootable image again?
I am not a binman expert, but may you try to add in your u-boot.dtsi in your "binman" node at the end:
imx-boot {
filename = "imx-boot.bin";
pad-byte = <0x00>;
spl: blob-ext@1 {
offset = <0x0>;
filename = "flash.bin";
};
uboot: blob-ext@2 {
offset = <0x59000>;
filename = "u-boot.itb";
};
};bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Fabio Estevam
reviewerRe: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Heiko,
Quoted 15 lines · Heiko Schocher
I am not a binman expert, but may you try to add in your
u-boot.dtsiin your "binman" node at the end:imx-boot { filename = "imx-boot.bin"; pad-byte = <0x00>; spl: blob-ext@1 { offset = <0x0>; filename = "flash.bin"; }; uboot: blob-ext@2 { offset = <0x59000>; filename = "u-boot.itb"; };
This helped!
I had to change the offset and now I can flash only flash.bin and it boots fine:
arch/arm/dts/imx8mm-evk-u-boot.dtsi +14 -0
@@ -217,4 +217,18 @@ }; }; }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "flash.bin"; + }; + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; };
I will submit the patch shortly.
Thanks
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Fabio,
Quoted 47 lines · Fabio Estevam
Hi Heiko,
Quoted 15 lines · Heiko Schocher
I am not a binman expert, but may you try to add in your
u-boot.dtsiin your "binman" node at the end:imx-boot { filename = "imx-boot.bin"; pad-byte = <0x00>; spl: blob-ext@1 { offset = <0x0>; filename = "flash.bin"; }; uboot: blob-ext@2 { offset = <0x59000>; filename = "u-boot.itb"; };This helped!
I had to change the offset and now I can flash only flash.bin and it boots fine:
arch/arm/dts/imx8mm-evk-u-boot.dtsi +14
-0@@ -217,4 +217,18 @@ }; }; }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "flash.bin"; + }; + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; };
Quoted 1 line
I will submit the patch shortly.
If you prepare a patch I would prefer to have separate names for the SPL image and the final concatenated image. So we don't overwrite the SPL image and can still use it on its own if needed. But rather than choosing a new name for the complete image (as Heiko did above), I would like to rename the SPL image to something more meaningful like spl.bin first and then use flash.bin for the full image. What do you think?
Thanks
Frieder
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Quoted 50 lines · Frieder Schrempf
Hi Fabio,
Quoted 47 lines · Fabio Estevam
Hi Heiko,
Quoted 15 lines · Heiko Schocher
I am not a binman expert, but may you try to add in your
u-boot.dtsiin your "binman" node at the end:imx-boot { filename = "imx-boot.bin"; pad-byte = <0x00>; spl: blob-ext@1 { offset = <0x0>; filename = "flash.bin"; }; uboot: blob-ext@2 { offset = <0x59000>; filename = "u-boot.itb"; };This helped!
I had to change the offset and now I can flash only flash.bin and it boots fine:
arch/arm/dts/imx8mm-evk-u-boot.dtsi +14
-0@@ -217,4 +217,18 @@ }; }; }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "flash.bin"; + }; + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; };
Quoted 5 lines
Quoted 1 line
I will submit the patch shortly.
If you prepare a patch I would prefer to have separate names for the SPL image and the final concatenated image. So we don't overwrite the SPL image and can still use it on its own if needed. But rather than choosing a new name for the complete image (as Heiko did above), I would like to rename the SPL image to something more meaningful like spl.bin first and then use flash.bin for the full image. What do you think?
And it would also be nice if we could share the common parts of the binman config between the different boards to avoid having this in each boards dtsi and to avoid having diverging configurations, where e. g. flash.bin refers to different kinds of images.
Fabio Estevam
reviewerRe: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Frieder,
Quoted 3 lines · Frieder Schrempf
Quoted 3 lines
If you prepare a patch I would prefer to have separate names for the SPL image and the final concatenated image. So we don't overwrite the SPL image and can still use it on its own if needed. But rather than choosing a new name for the complete image (as Heiko did above), I would like to rename the SPL image to something more meaningful like spl.bin first and then use flash.bin for the full image. What do you think?
It seems we cannot rename the SPL to spl.bin as this would cause breakage to i.MX8MM boards that do not use binman, such as verdin-imx8mm_defconfig.
Quoted 1 line
And it would also be nice if we could share the common parts of the binman config between the different boards to avoid having this in each boards dtsi and to avoid having diverging configurations, where e. g. flash.bin refers to different kinds of images.
Agreed.
Let me try to send a proposal for imx8mm-evk first. If it gets accepted, then I can try to make a common approach.
Regards,
Fabio Estevam
Re: [PATCH v3 2/9] arm: dts: imx8mp: Add common u-boot dtsi
Hi Fabio and Frieder
Quoted 11 lines · Fabio Estevam
Hi Frieder,
Quoted 5 lines · Frieder Schrempf
Quoted 5 lines
If you prepare a patch I would prefer to have separate names for the SPL image and the final concatenated image. So we don't overwrite the SPL image and can still use it on its own if needed. But rather than choosing a new name for the complete image (as Heiko did above), I would like to rename the SPL image to something more meaningful like spl.bin first and then use flash.bin for the full image. What do you think?
Quoted 3 lines
It seems we cannot rename the SPL to spl.bin as this would cause breakage to i.MX8MM boards that do not use binman, such as verdin-imx8mm_defconfig.
I am actually just about to send our conversion to using binman for this as well (;-p).
Quoted 5 lines
Quoted 3 lines
And it would also be nice if we could share the common parts of the binman config between the different boards to avoid having this in each boards dtsi and to avoid having diverging configurations, where e. g. flash.bin refers to different kinds of images.
Agreed.
I am also all in for this idea. Should I still be sending my patch set converting Verdin iMX8M Mini separately first? Maybe that would be the easiest and we could then transition them all to a common approach, not?
Quoted 2 lines
Let me try to send a proposal for imx8mm-evk first. If it gets accepted, then I can try to make a common approach.
Yes, that's kinda what I was thinking. Thanks!
Quoted 3 lines
Regards,
Fabio Estevam
Cheers
Marcel
PATCH v3 2/9 arm: dts: imx8mp: Add common u-boot dtsi
In reply to Teresa RemmetQuoted 5 lines
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 2/9 arm: dts: imx8mp: Add common u-boot dtsi
In reply to Teresa RemmetQuoted 5 lines
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to
imx8mp-u-boot.dtsiSigned-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 3/9 arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernel
In reply to Teresa RemmetThis update includes eqos support and some minor changes.
Synced with kernel commit412627f6ffe3 ("arm64: dts: imx8mp-phyboard-pollux-rdk: Add missing pinctrl entry")
---
Changes in v3:
- Don't sync the debug uart changes here as they are made now in separate patch
Changes in v2:
- none
arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts | 46 ++++++++++++++++++++- arch/arm/dts/imx8mp-phycore-som.dtsi | 2 +- 2 files changed, 46 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts +45 -1
@@ -33,9 +33,33 @@ }; }; +&eqos { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_eqos>; + phy-mode = "rgmii-id"; + phy-handle = <ðphy0>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x1>; + ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>; + ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>; + ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; + ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>; + enet-phy-lane-no-swap; + }; + }; +}; + &i2c2 { clock-frequency = <400000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c2>; pinctrl-1 = <&pinctrl_i2c2_gpio>; sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
@@ -90,6 +114,26 @@ }; &iomuxc { + pinctrl_eqos: eqosgrp { + fsl,pins = < + MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x3 + MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x3 + MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x91 + MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x91 + MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x91 + MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x91 + MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x91 + MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x91 + MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x1f + MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x1f + MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x1f + MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x1f + MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x1f + MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x1f + MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20 0x10 + >; + }; + pinctrl_i2c2: i2c2grp { fsl,pins = < MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL 0x400001c3
arch/arm/dts/imx8mp-phycore-som.dtsi +1 -1
@@ -67,7 +67,7 @@ &i2c1 { clock-frequency = <400000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c1>; pinctrl-1 = <&pinctrl_i2c1_gpio>; sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
Signature · 1 line
2.25.1
PATCH v3 3/9 arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernel
Quoted 6 lines
This update includes eqos support and some minor changes.
Synced with kernel commit412627f6ffe3("arm64: dts: imx8mp-phyboard-pollux-rdk: Add missing pinctrl entry")Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 3/9 arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernel
In reply to Teresa RemmetQuoted 6 lines
This update includes eqos support and some minor changes.
Synced with kernel commit412627f6ffe3("arm64: dts: imx8mp-phyboard-pollux-rdk: Add missing pinctrl entry")Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 4/9 board: phytec: phycore_imx8mp: Change debug UART
In reply to Teresa RemmetWith the first redesign the debug UART had changed from UART2 to UART1.
As the first hardware revision is considered as alpha and will not be supported in future. The old setup will not be preserved.
---
Changes v3:
- Added imx8mp-phyboard-pollux-rdk.dts debug uart changes to this patch
Changes v2:
- none
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 4 ++-- arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts | 12 ++++++------ board/phytec/phycore_imx8mp/spl.c | 6 +++--- include/configs/phycore_imx8mp.h | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-)
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi +2 -2
@@ -18,7 +18,7 @@ u-boot,dm-spl; }; -&pinctrl_uart2 { +&pinctrl_uart1 { u-boot,dm-spl; };
@@ -54,7 +54,7 @@ u-boot,dm-spl; }; -&uart2 { +&uart1 { u-boot,dm-spl; };
arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts +6 -6
@@ -16,7 +16,7 @@ "phytec,imx8mp-phycore-som", "fsl,imx8mp"; chosen { - stdout-path = &uart2; + stdout-path = &uart1; }; reg_usdhc2_vmmc: regulator-usdhc2 {
@@ -95,9 +95,9 @@ }; /* debug console */ -&uart2 { +&uart1 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart2>; + pinctrl-0 = <&pinctrl_uart1>; status = "okay"; };
@@ -154,10 +154,10 @@ >; }; - pinctrl_uart2: uart2grp { + pinctrl_uart1: uart1grp { fsl,pins = < - MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x49 - MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x49 + MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x49 + MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x49 >; };
board/phytec/phycore_imx8mp/spl.c +3 -3
@@ -80,8 +80,8 @@ int board_fit_config_name_match(const char *name)#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)static iomux_v3_cfg_t const uart_pads[] = { -MX8MP_PAD_UART2_RXD__UART2_DCE_RX |MUX_PAD_CTRL (UART_PAD_CTRL ), -MX8MP_PAD_UART2_TXD__UART2_DCE_TX |MUX_PAD_CTRL (UART_PAD_CTRL ), +MX8MP_PAD_UART1_RXD__UART1_DCE_RX |MUX_PAD_CTRL (UART_PAD_CTRL ), +MX8MP_PAD_UART1_TXD__UART1_DCE_TX |MUX_PAD_CTRL (UART_PAD_CTRL ), };static iomux_v3_cfg_t const wdog_pads[] = {
@@ -107,7 +107,7 @@ void board_init_f(ulong dummy)arch_cpu_init (); -init_uart_clk (1 ); +init_uart_clk (0 );board_early_init_f ();
include/configs/phycore_imx8mp.h +2 -2
@@ -39,7 +39,7 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "image=Image\0" \ - "console=ttymxc1,115200\0" \ + "console=ttymxc0,115200\0" \ "fdt_addr=0x48000000\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
@@ -87,7 +87,7 @@#define PHYS_SDRAM_SIZE 0x80000000/* UART */ -#define CONFIG_MXC_UART_BASE UART2_BASE_ADDR +#define CONFIG_MXC_UART_BASE UART1_BASE_ADDR/* Monitor Command Prompt */ #define CONFIG_SYS_CBSIZE SZ_2K
Signature · 1 line
2.25.1
PATCH v3 4/9 board: phytec: phycore_imx8mp: Change debug UART
Quoted 8 lines
With the first redesign the debug UART had changed from UART2 to UART1.
As the first hardware revision is considered as alpha and will not be supported in future. The old setup will not be preserved.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 4/9 board: phytec: phycore_imx8mp: Change debug UART
In reply to Teresa RemmetQuoted 8 lines
With the first redesign the debug UART had changed from UART2 to UART1.
As the first hardware revision is considered as alpha and will not be supported in future. The old setup will not be preserved.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 5/9 board: phytec: phycore_imx8mp: Add fec support
In reply to Teresa RemmetEnable support for the fec ethernet on phyCORE-i.MX8MP.
---
Changes in v3:
- none
Changes in v2:
- removed hardcoded serverip in environment
- removed not needed fec eth defines in board config include
board/phytec/phycore_imx8mp/phycore-imx8mp.c | 14 ++++++++++++++ configs/phycore-imx8mp_defconfig | 7 +++++++ include/configs/phycore_imx8mp.h | 17 +++++++++++++++++ 3 files changed, 38 insertions(+)
board/phytec/phycore_imx8mp/phycore-imx8mp.c +14 -0
@@ -10,11 +10,25 @@#include <asm/io.h> #include <asm/mach-imx/boot_mode.h> #include <env.h> +#include <miiphy.h> DECLARE_GLOBAL_DATA_PTR ; +static int setup_fec (void ) +{ +struct iomuxc_gpr_base_regs *gpr = + (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR ; + +/* Use 125M anatop REF_CLK1 for ENET1, not from external */ +clrsetbits_le32 (&gpr->gpr[1 ],0x2000 ,0 ); + +return 0 ; +} +int board_init (void ) { +setup_fec (); +return 0 ; }
configs/phycore-imx8mp_defconfig +7 -0
@@ -58,6 +58,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=2 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_CLK_COMPOSITE_CCF=y CONFIG_CLK_IMX8MP=y
@@ -79,7 +80,13 @@ CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_ES_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_ESDHC_IMX=y +CONFIG_PHYLIB=y +CONFIG_PHY_TI_DP83867=y CONFIG_DM_ETH=y +CONFIG_DM_ETH_PHY=y +CONFIG_FEC_MXC=y +CONFIG_RGMII=y +CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y
include/configs/phycore_imx8mp.h +17 -0
@@ -42,6 +42,7 @@"console=ttymxc0,115200\0" \"fdt_addr=0x48000000\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ +"ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \"mmcroot=2\0" \
@@ -57,6 +58,22 @@"else " \"echo WARN: Cannot load the DT; " \"fi;\0 " \ +"nfsroot=/nfs\0" \ +"netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp " \ +"nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +"netboot=echo Booting from net ...; " \ +"run netargs; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${loadaddr} ${image}; " \ +"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +"booti ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"echo WARN: Cannot load the DT; " \ +"fi;\0" \ #define CONFIG_BOOTCOMMAND \"mmc dev ${mmcdev}; if mmc rescan; then " \
Signature · 1 line
2.25.1
PATCH v3 5/9 board: phytec: phycore_imx8mp: Add fec support
Quoted 4 lines
Enable support for the fec ethernet on phyCORE-i.MX8MP.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 5/9 board: phytec: phycore_imx8mp: Add fec support
In reply to Teresa RemmetQuoted 4 lines
Enable support for the fec ethernet on phyCORE-i.MX8MP.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 6/9 board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95V
In reply to Teresa RemmetIncrease VDD_ARM to prevent timing issues as VDD_SOC is used in OD mode. Also increase GIC clock.
---
No changes in v2 or v3.
board/phytec/phycore_imx8mp/spl.c | 11 ++++++++++- configs/phycore-imx8mp_defconfig | 1 + 2 files changed, 11 insertions(+), 1 deletion(-)
board/phytec/phycore_imx8mp/spl.c +10 -1
@@ -62,7 +62,8 @@ int power_init_board(void)/* BUCKxOUT_DVS0/1 control BUCK123 output */ pmic_reg_write (p,PCA9450_BUCK123_DVS ,0x29 ); -/* increase VDD_SOC to typical value 0.95V */ +/* Increase VDD_SOC and VDD_ARM to OD voltage 0.95V */ +pmic_reg_write (p,PCA9450_BUCK1OUT_DVS0 ,0x1C );pmic_reg_write (p,PCA9450_BUCK2OUT_DVS0 ,0x1C );/* set WDOG_B_CFG to cold reset */
@@ -71,6 +72,14 @@ int power_init_board(void)return 0 ; } +void spl_board_init (void ) +{ +/* Set GIC clock to 500Mhz for OD VDD_SOC. */ +clock_enable (CCGR_GIC ,0 ); +clock_set_target_val (GIC_CLK_ROOT ,CLK_ROOT_ON |CLK_ROOT_SOURCE_SEL (5 )); +clock_enable (CCGR_GIC ,1 ); +} +int board_fit_config_name_match (const char *name) {return 0 ;
configs/phycore-imx8mp_defconfig +1 -0
@@ -25,6 +25,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg" CONFIG_DEFAULT_FDT_FILE="oftree" CONFIG_BOARD_LATE_INIT=y +CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y
Signature · 1 line
2.25.1
PATCH v3 6/9 board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95V
Quoted 4 lines
Increase
VDD_ARMto prevent timing issues asVDD_SOCis used in OD mode. Also increase GIC clock.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 6/9 board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95V
In reply to Teresa RemmetQuoted 4 lines
Increase
VDD_ARMto prevent timing issues asVDD_SOCis used in OD mode. Also increase GIC clock.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 7/9 board: phytec: phycore-imx8mp: Enable DVS1 control
In reply to Teresa RemmetEnable DVS1 control through PMIC_STBY_REQ.
---
No changes in v2 or v3.
board/phytec/phycore_imx8mp/spl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
board/phytec/phycore_imx8mp/spl.c +5 -1
@@ -66,7 +66,11 @@ int power_init_board(void)pmic_reg_write (p,PCA9450_BUCK1OUT_DVS0 ,0x1C );pmic_reg_write (p,PCA9450_BUCK2OUT_DVS0 ,0x1C ); -/* set WDOG_B_CFG to cold reset */ +/* Set BUCK1 DVS1 to suspend controlled through PMIC_STBY_REQ */ +pmic_reg_write (p,PCA9450_BUCK1OUT_DVS1 ,0x14 ); +pmic_reg_write (p,PCA9450_BUCK1CTRL ,0x59 ); + +/* Set WDOG_B_CFG to cold reset */ pmic_reg_write (p,PCA9450_RESET_CTRL ,0xA1 );return 0 ;
Signature · 1 line
2.25.1
PATCH v3 7/9 board: phytec: phycore-imx8mp: Enable DVS1 control
Quoted 3 lines
Enable DVS1 control through
PMIC_STBY_REQ.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 7/9 board: phytec: phycore-imx8mp: Enable DVS1 control
In reply to Teresa RemmetQuoted 3 lines
Enable DVS1 control through
PMIC_STBY_REQ.Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 8/9 arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entry
In reply to Teresa RemmetAdd missing pinctrl entry in spl.
---
No changes in v2 or v3.
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi +4 -0
@@ -34,6 +34,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &gpio1 { u-boot,dm-spl; };
Signature · 1 line
2.25.1
PATCH v3 8/9 arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entry
Quoted 3 lines
Add missing pinctrl entry in spl.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 8/9 arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entry
In reply to Teresa RemmetQuoted 3 lines
Add missing pinctrl entry in spl.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 9/9 board: phytec: imx8mp-phycore: Switch to binman
In reply to Teresa RemmetUse now binman for image creation.
---
Changes in v3:
- binman nodes have been moved to common dtsi so removed from this patch Changes in v2:
- none
arch/arm/mach-imx/imx8m/Kconfig | 1 + board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg | 10 ++++++++++ configs/phycore-imx8mp_defconfig | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg
arch/arm/mach-imx/imx8m/Kconfig +1 -0
@@ -127,6 +127,7 @@ config TARGET_PHYCORE_IMX8MM config TARGET_PHYCORE_IMX8MP bool "PHYTEC PHYCORE i.MX8MP" + select BINMAN select IMX8MP select SUPPORT_SPL select IMX8M_LPDDR4
board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +ROM_VERSION v2 +BOOT_FROM sd +LOADER mkimage.flash.mkimage 0x920000
configs/phycore-imx8mp_defconfig +2 -2
@@ -20,9 +20,9 @@ CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000 CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +# CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg" CONFIG_DEFAULT_FDT_FILE="oftree" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y
Signature · 1 line
2.25.1
PATCH v3 9/9 board: phytec: imx8mp-phycore: Switch to binman
Quoted 4 lines
Use now binman for image creation.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v3 9/9 board: phytec: imx8mp-phycore: Switch to binman
In reply to Teresa RemmetQuoted 4 lines
Use now binman for image creation.
Signed-off-by Teresa Remmet <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================