Initial support for SolidRun LX2160A-CEX7
v2 cover Initial support for SolidRun LX2160A-CEX7
Hello,
This series aims to introduce basic initial support for the CX LX2 and HoneyComb LX2 boards by SolidRun (both of which are based on the LX2160A-CEX7 SoM):
https://shop.solid-run.com/product/SRLX216S00D00GE064C08CH/
https://shop.solid-run.com/product/SRLX216S00D00GE064H09CH/
Although I also work at NXP, I am submitting this in a personal capacity, and for personal use.
Patch 1/11 performs an uprev of existing NXP Layerscape BSP packages to the latest tag. This is necessary because packages such as the RCW do not permit versioning per board defconfig like Linux/U-Boot/ATF do, instead the version is global. I've tested the uprev on an LS1028A-RDB.
Patches 2-5/11 add extra packages which are critical for the operation of the NXP LX2160A SoC.
Patch 6/11 introduces the board files for the new platform, excepting patches for the firmware components, which are separated out to 7-10/11 (for mailing list filtering reasons).
In my use case, Buildroot makes the firmware and recovery Linux rootfs for the main Debian operating system.
Note that the platform doesn't achieve everything that I wish just yet. For example, U-Boot doesn't boot properly from a USB stick with a Debian installer on it.
To launch the Debian installer, U-Boot attempts to push its own device tree to Linux (and that doesn't go very well, because they have partially incompatible formats). Thus, one would need to uprev the bootloader to the current upstream master branch, rather than continue developing on top of NXP Linux Factory tags, then sync the U-Boot device trees with Linux, and upstream that work.
For this reason, the entire effort should be considered WIP, though in itself, it is bootable and usable. I am submitting relatively early because the speed of development in Buildroot appears fast, and the existing work would go out of sync quickly. I intend to work with Josua Mayer for developing further U-Boot/ATF patches, and including them in Buildroot only once they are available through
https://github.com/SolidRun/lx2160a_build/, rather than Buildroot behaving as its own upstream of sorts.
Finally, patch 11/11 is a cleanup made as I noticed that board/freescale/common/patches has become a leftover since I started working on the LX2160ACEX7 support.
Change logs are in individual patches.
Vladimir Oltean (11):
platform/layerscape: bump Linux Factory tag to lf-6.6.36-2.1.0 package/qoriq-ddr-phy-binary: new package package/qoriq-mc-binary: new package package/qoriq-mc-utils: new package package/qoriq-restool: new package board/lx2160acex7: new platform
board/lx2160acex7: add Arm Trusted Firmware patches board/lx2160acex7: Add qoriq-mc-utils patches board/lx2160acex7: add qoriq-rcw patches board/lx2160acex7: add u-boot patches board/freescale: get rid of common patch folder
DEVELOPERS | 6 +
...Makefile-Suppress-array-bounds-error.patch | 51 -
.../arm-trusted-firmware.hash | 2 +-
.../ls1028ardb/patches/linux/linux.hash | 2 +-
.../ls1028ardb/patches/uboot/uboot.hash | 2 +-
board/freescale/ls1028ardb/readme.txt | 27 +-
.../arm-trusted-firmware.hash | 2 +-
.../ls1046a-frwy/patches/linux/linux.hash | 2 +-
.../ls1046a-frwy/patches/uboot/uboot.hash | 2 +-
board/freescale/ls1046a-frwy/readme.txt | 31 +-
board/solidrun/lx2160acex7/extlinux.conf | 4 +
board/solidrun/lx2160acex7/genimage.cfg | 54 +
board/solidrun/lx2160acex7/linux.config | 5 +
.../0001-plat-nxp-lx2160a-auto-boot.patch | 219 +
...ccount-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch | 85 +
...sert-SUS_S5-GPIO-to-poweroff-the-COM.patch | 29 +
...assert-IRQ0-GPIO-to-poweroff-the-EVB.patch | 29 +
...ptional-S5-gpio-from-Makefile-consta.patch | 63 +
...te-platform-for-solidrun-cex7-module.patch | 418 ++
...flexible-value-for-CONFIG_DDR_NODIMM.patch | 33 +
...tform-for-solidrun-internal-cex6-eva.patch | 544 +++
...ort-flushing-i2c-bus-before-ddr-init.patch | 365 ++
...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 +
...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 +
...-building-without-NXP_NV_SW_MAINT_LA.patch | 49 +
...-boot-without-spi-flash-disable-non-.patch | 33 +
...te-platform-for-solidrun-lx2162a-som.patch | 597 +++
...ddr-configuration-for-pcb-v1.2-with-.patch | 127 +
...g-output-for-dimm-parameters-parsed-.patch | 83 +
...dq-mapping-and-remove-invalid-spd-ee.patch | 36 +
...d-support-for-new-binutils-versions.patch} | 0
.../arm-trusted-firmware.hash | 2 +
.../patches/linux-headers/linux-headers.hash | 1 +
.../lx2160acex7/patches/linux/linux.hash | 2 +
...x2160-cex7-based-clearfog-cx-dpl-dpc.patch | 937 +++++
...160-cex6-based-evaluation-board-dpl-.patch | 1454 +++++++
...n-for-lx2162a-som-and-clearfog-board.patch | 3622 +++++++++++++++++
...som-clearfog-enable-dpni-connections.patch | 188 +
...rfog-cx-configure-qsfp-ports-type-ph.patch | 52 +
...n-solidrun-lx2160a-cex-7-on-clearfog.patch | 950 +++++
...-MEM_PLL_CFG-into-ddr-speed-specific.patch | 112 +
...separate-configurations-for-flexspi-.patch | 894 ++++
...me-sdhc1-config-to-generic-sdhc-for-.patch | 149 +
...c-jumpc-and-jump-to-pbi-instructions.patch | 55 +
...add-configuration-for-both-sdhc-xspi.patch | 836 ++++
...ootlocptr-reduce-size-of-pbi-section.patch | 90 +
...ge-2.2GHz-configuration-platform-clo.patch | 475 +++
...configuration-for-fraction-ddr-speed.patch | 420 ++
...n-solidrun-internal-lx2160a-cex6-eva.patch | 220 +
...le-A-050426-workaround-for-silicon-o.patch | 35 +
...le-pci-errata-workarounds-for-all-ac.patch | 87 +
...-configuration-for-2.2GHz-binned-soc.patch | 42 +
.../0014-lx2162aqds-re-enable-dpmac11.patch | 27 +
...n-for-lx2162a-som-and-clearfog-evalu.patch | 532 +++
...rfog-cx-add-configuration-for-serdes.patch | 2000 +++++++++
...configuration-for-serdes-1-protocol-.patch | 49 +
...ipt-generating-configs-from-template.patch | 1476 +++++++
...rfog-cx-add-configuration-for-serdes.patch | 1611 ++++++++
...add-configuration-for-each-ddr-speed.patch | 285 ++
...d-solidrun-lx2160-cex7-board-support.patch | 1342 ++++++
...ait-100ms-for-Link-Up-in-ls_pcie_g4_.patch | 65 +
...t-100ms-for-Link-Up-in-ls_pcie_probe.patch | 64 +
...-calculation-of-ddr-clock-rate-to-in.patch | 63 +
...able-workaround-for-SPI-erratum-A-05.patch | 102 +
...x2160-cex7-enable-additional-drivers.patch | 96 +
...on-t-fail-boot-when-reading-eeprom-f.patch | 32 +
...x2160-cex7-fixup-u-boot-dts-dpmac-by.patch | 389 ++
...x2160acex7-enable-reading-tlv-eeprom.patch | 40 +
...x2160acex7-disable-second-usb-on-lx2.patch | 32 +
...x2160acex7-allocate-memory-before-pa.patch | 39 +
...upport-specifying-tlv-eeprom-in-DT-a.patch | 58 +
...x2160acex7-use-dt-alias-for-tlv-eepr.patch | 90 +
...om-fix-alias-access-to-second-eeprom.patch | 32 +
.../lx2160acex7/patches/uboot/uboot.hash | 2 +
board/solidrun/lx2160acex7/post-build.sh | 8 +
board/solidrun/lx2160acex7/readme.txt | 112 +
.../udev/rules.d/74-dpaa2-networking.rules | 12 +
.../lx2160acex7/u-boot-environment-sd.txt | 96 +
configs/ls1028ardb_defconfig | 6 +-
configs/ls1046a-frwy_defconfig | 6 +-
configs/solidrun_lx2160acex7_defconfig | 53 +
package/Config.in | 4 +
package/fmc/fmc.hash | 2 +-
package/fmc/fmc.mk | 2 +-
package/fmlib/fmlib.hash | 2 +-
package/fmlib/fmlib.mk | 2 +-
.../qoriq-cadence-dp-firmware.hash | 2 +-
.../qoriq-cadence-dp-firmware.mk | 10 +-
package/qoriq-ddr-phy-binary/Config.in | 6 +
.../qoriq-ddr-phy-binary.hash | 3 +
.../qoriq-ddr-phy-binary.mk | 18 +
package/qoriq-fm-ucode/qoriq-fm-ucode.hash | 2 +-
package/qoriq-fm-ucode/qoriq-fm-ucode.mk | 2 +-
package/qoriq-mc-binary/Config.in | 48 +
package/qoriq-mc-binary/qoriq-mc-binary.hash | 3 +
package/qoriq-mc-binary/qoriq-mc-binary.mk | 22 +
package/qoriq-mc-utils/Config.in | 35 +
package/qoriq-mc-utils/qoriq-mc-utils.hash | 3 +
package/qoriq-mc-utils/qoriq-mc-utils.mk | 22 +
package/qoriq-rcw/qoriq-rcw.hash | 2 +-
package/qoriq-rcw/qoriq-rcw.mk | 2 +-
package/qoriq-restool/Config.in | 21 +
package/qoriq-restool/qoriq-restool.hash | 3 +
package/qoriq-restool/qoriq-restool.mk | 24 +
104 files changed, 22446 insertions(+), 96 deletions(-)
delete mode 100644 board/freescale/common/patches/arm-trusted-firmware/0002-LF-7968-01-fix-Makefile-Suppress-array-bounds-error.patch
create mode 100644 board/solidrun/lx2160acex7/extlinux.conf
create mode 100644 board/solidrun/lx2160acex7/genimage.cfg
create mode 100644 board/solidrun/lx2160acex7/linux.config
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0001-plat-nxp-lx2160a-auto-boot.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0002-dcfg-Take-into-account-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0003-lx2160acex7-assert-SUS_S5-GPIO-to-poweroff-the-COM.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0004-lx2160acex6-assert-IRQ0-GPIO-to-poweroff-the-EVB.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0005-lx2160a-assert-optional-S5-gpio-from-Makefile-consta.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0006-add-separate-platform-for-solidrun-cex7-module.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0007-lx2160a-support-flexible-value-for-CONFIG_DDR_NODIMM.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0008-add-separate-platform-for-solidrun-internal-cex6-eva.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0009-lx2160a-support-flushing-i2c-bus-before-ddr-init.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0010-lx2160acex6-flush-i2c-bus-with-spd-eeprom-before-ddr.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0011-lx2160acex7-flush-i2c-bus-with-spd-eeprom-before-ddr.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0012-plat-lx2160a-fix-building-without-NXP_NV_SW_MAINT_LA.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0013-plat-lx2160a-fix-boot-without-spi-flash-disable-non-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0014-add-separate-platform-for-solidrun-lx2162a-som.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0015-lx2160acex6-add-ddr-configuration-for-pcb-v1.2-with-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0016-nxp-ddr-add-debug-output-for-dimm-parameters-parsed-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0017-lx2160acex6-fix-dq-mapping-and-remove-invalid-spd-ee.patch
rename board/{freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch => solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch} (100%)
create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/arm-trusted-firmware.hash
create mode 120000 board/solidrun/lx2160acex7/patches/linux-headers/linux-headers.hash
create mode 100644 board/solidrun/lx2160acex7/patches/linux/linux.hash
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0001-add-solidrun-lx2160-cex7-based-clearfog-cx-dpl-dpc.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0002-add-solidrun-lx2160-cex6-based-evaluation-board-dpl-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0003-add-configuration-for-lx2162a-som-and-clearfog-board.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0004-lx2162-som-clearfog-enable-dpni-connections.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0005-lx2160acex7-clearfog-cx-configure-qsfp-ports-type-ph.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0001-add-configuration-solidrun-lx2160a-cex-7-on-clearfog.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0002-lx2160acex7-move-MEM_PLL_CFG-into-ddr-speed-specific.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0003-lx2160acex7-add-separate-configurations-for-flexspi-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0004-lx2160acex7-rename-sdhc1-config-to-generic-sdhc-for-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0005-add-loadc-jumpc-and-jump-to-pbi-instructions.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0006-lx2160acex7-add-configuration-for-both-sdhc-xspi.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0007-bootlocptr-reduce-size-of-pbi-section.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0008-lx2160acex7-change-2.2GHz-configuration-platform-clo.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0009-lx2160acex7-add-configuration-for-fraction-ddr-speed.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0010-add-configuration-solidrun-internal-lx2160a-cex6-eva.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0011-lx2160acex7-enable-A-050426-workaround-for-silicon-o.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0012-lx2160acex6-enable-pci-errata-workarounds-for-all-ac.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0013-lx2160acex6-add-configuration-for-2.2GHz-binned-soc.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0014-lx2162aqds-re-enable-dpmac11.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0015-add-configuration-for-lx2162a-som-and-clearfog-evalu.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0016-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0017-lx2160acex7-add-configuration-for-serdes-1-protocol-.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0018-solidrun-add-script-generating-configs-from-template.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0019-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch
create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0020-lx2160acex6-add-configuration-for-each-ddr-speed.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0001-add-solidrun-lx2160-cex7-board-support.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0002-pci-ls_pcie_g4-Wait-100ms-for-Link-Up-in-ls_pcie_g4_.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0003-pci-ls_pcie-Wait-100ms-for-Link-Up-in-ls_pcie_probe.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0004-fsl-lsch3-update-calculation-of-ddr-clock-rate-to-in.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0005-armv8-lx2160a-enable-workaround-for-SPI-erratum-A-05.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0006-configs-lx2160-cex7-enable-additional-drivers.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0007-cmd-tlv_eeprom-don-t-fail-boot-when-reading-eeprom-f.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0008-board-solidrun-lx2160-cex7-fixup-u-boot-dts-dpmac-by.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0009-board-solidrun-lx2160acex7-enable-reading-tlv-eeprom.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0010-board-solidrun-lx2160acex7-disable-second-usb-on-lx2.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0011-board-solidrun-lx2160acex7-allocate-memory-before-pa.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0012-cmd-tlv_eeprom-support-specifying-tlv-eeprom-in-DT-a.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0013-board-solidrun-lx2160acex7-use-dt-alias-for-tlv-eepr.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0014-cmd-tlv_eeprom-fix-alias-access-to-second-eeprom.patch
create mode 100644 board/solidrun/lx2160acex7/patches/uboot/uboot.hash
create mode 100755 board/solidrun/lx2160acex7/post-build.sh
create mode 100644 board/solidrun/lx2160acex7/readme.txt
create mode 100644 board/solidrun/lx2160acex7/rootfs_overlay/etc/udev/rules.d/74-dpaa2-networking.rules
create mode 100644 board/solidrun/lx2160acex7/u-boot-environment-sd.txt
create mode 100644 configs/solidrun_lx2160acex7_defconfig
create mode 100644 package/qoriq-ddr-phy-binary/Config.in
create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash
create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk
create mode 100644 package/qoriq-mc-binary/Config.in
create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.hash
create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.mk
create mode 100644 package/qoriq-mc-utils/Config.in
create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.hash
create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.mk
create mode 100644 package/qoriq-restool/Config.in
create mode 100644 package/qoriq-restool/qoriq-restool.hash
create mode 100644 package/qoriq-restool/qoriq-restool.mkSignature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/11 platform/layerscape: bump Linux Factory tag to lf-6.6.36-2.1.0
Update the following packages to the latest Linux Factory tag:
- qoriq-cadence-dp-firmware
- the updated download path was taken from the Yocto BSP at
https://github.com/nxp-qoriq/yocto-sdk.
- the recipe is here:
https://github.com/Freescale/meta-freescale/blob/master/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_22.04.bb
- arm-trusted-firmware
- linux
- u-boot
- fmc
- fmlib
- qoriq-rcw
---v1->v2:
- reference LDLSDKUG instead of LLDPUG which is now apparently obsolete.
- explain relationship to Linux Factory
.../arm-trusted-firmware.hash | 2 +- .../ls1028ardb/patches/linux/linux.hash | 2 +- .../ls1028ardb/patches/uboot/uboot.hash | 2 +- board/freescale/ls1028ardb/readme.txt | 27 ++++++++++------ .../arm-trusted-firmware.hash | 2 +- .../ls1046a-frwy/patches/linux/linux.hash | 2 +- .../ls1046a-frwy/patches/uboot/uboot.hash | 2 +- board/freescale/ls1046a-frwy/readme.txt | 31 +++++++++++++------ configs/ls1028ardb_defconfig | 6 ++-- configs/ls1046a-frwy_defconfig | 6 ++-- package/fmc/fmc.hash | 2 +- package/fmc/fmc.mk | 2 +- package/fmlib/fmlib.hash | 2 +- package/fmlib/fmlib.mk | 2 +- .../qoriq-cadence-dp-firmware.hash | 2 +- .../qoriq-cadence-dp-firmware.mk | 10 +++--- package/qoriq-fm-ucode/qoriq-fm-ucode.hash | 2 +- package/qoriq-fm-ucode/qoriq-fm-ucode.mk | 2 +- package/qoriq-rcw/qoriq-rcw.hash | 2 +- package/qoriq-rcw/qoriq-rcw.mk | 2 +- 20 files changed, 65 insertions(+), 45 deletions(-)
board/freescale/ls1028ardb/patches/arm-trusted-firmware/arm-trusted-firmware.hash +1 -1
@@ -1,2 +1,2 @@ # Locally calculated -sha256 4f4dc78bfb5b7391a65ae0f83856661071f666ac2bf6a9380fddbe376a8bdaaa atf-lf-6.6.23-2.0.0.tar.gz +sha256 4562efdc08efae7d36f3ee481871aac8ed0c856f8023d2186e4affdc5b768270 atf-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1028ardb/patches/linux/linux.hash +1 -1
@@ -1,2 +1,2 @@ # Locally computed -sha256 6d592722e004516309f8ce33e654f1322e4d1f0f33567acb86ca19229176fd9e linux-lf-6.6.23-2.0.0.tar.gz +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1028ardb/patches/uboot/uboot.hash +1 -1
@@ -1,2 +1,2 @@ # Locally computed -sha256 a2bcd7a34d4908ffbadfea731d0f0fd20f19a31cff6ff6310980e7f6743ceb24 u-boot-lf-6.6.23-2.0.0.tar.gz +sha256 51adf233d53af875f70cf451e5950dd0b6af09ff35e546eacc4ec6998454c7eb u-boot-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1028ardb/readme.txt +18 -9
@@ -4,19 +4,28 @@ NXP LS1028ARDB This file documents the Buildroot support for the LS1028A Reference Design Board. -for more details about the board and the QorIQ Layerscape SoC, see the following pages: +For more details about the board and the QorIQ Layerscape SoC, see the following pages: - https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1028a-reference-design-board:LS1028ARDB - https://www.nxp.com/LS1028A -for the software NXP LSDK (Layerscape Software Development Kit), see - - https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf +Layerscape platforms are officially supported by NXP under the Layerscape +Debian Linux SDK (LDLSDK). This uses components from Linux Factory, currently +tag lf-6.6.3_1.0.0, a few releases behind the latest lf-6.6.36-2.1.0. +In Buildroot, the latest Linux Factory release tag is used. -the components from NXP are: - - rcw, lf-6.6.23-2.0.0 - - atf (fork), lf-6.6.23-2.0.0 - - uboot (fork), lf-6.6.23-2.0.0 - - cadence-dp-firmware (blob), LSDK 20.12 - - linux (fork), lf-6.6.23-2.0.0 +For the software Layerscape Debian Linux SDK User Guide, see: + - https://docs.nxp.com/bundle/UG10143/page/topics/about_this_document.html + - https://www.nxp.com/docs/en/user-guide/UG10143.pdf + +Note: the latest Linux Factory release may contain features which are not yet +documented in the LDLSDKUG. + +The components from NXP are: + - rcw, lf-6.6.36-2.1.0 + - atf (fork), lf-6.6.36-2.1.0 + - uboot (fork), lf-6.6.36-2.1.0 + - cadence-dp-firmware (blob), lf-6.6.36-2.1.0 + - linux (fork), lf-6.6.36-2.1.0 Build =====
board/freescale/ls1046a-frwy/patches/arm-trusted-firmware/arm-trusted-firmware.hash +1 -1
@@ -1,2 +1,2 @@ # Locally calculated -sha256 4f4dc78bfb5b7391a65ae0f83856661071f666ac2bf6a9380fddbe376a8bdaaa atf-lf-6.6.23-2.0.0.tar.gz +sha256 4562efdc08efae7d36f3ee481871aac8ed0c856f8023d2186e4affdc5b768270 atf-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1046a-frwy/patches/linux/linux.hash +1 -1
@@ -1,2 +1,2 @@ # Locally computed -sha256 6d592722e004516309f8ce33e654f1322e4d1f0f33567acb86ca19229176fd9e linux-lf-6.6.23-2.0.0.tar.gz +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1046a-frwy/patches/uboot/uboot.hash +1 -1
@@ -1,2 +1,2 @@ # Locally computed -sha256 a2bcd7a34d4908ffbadfea731d0f0fd20f19a31cff6ff6310980e7f6743ceb24 u-boot-lf-6.6.23-2.0.0.tar.gz +sha256 51adf233d53af875f70cf451e5950dd0b6af09ff35e546eacc4ec6998454c7eb u-boot-lf-6.6.36-2.1.0.tar.gz
board/freescale/ls1046a-frwy/readme.txt +21 -10
@@ -4,20 +4,31 @@ NXP LS1046A-FRWY This file documents the Buildroot support for the LS1046A Freeway Board. -for more details about the board and the QorIQ Layerscape SoC, see the following pages: +For more details about the board and the QorIQ Layerscape SoC, see the following pages: - https://www.nxp.com/design/software/qoriq-developer-resources/ls1046a-freeway-board:FRWY-LS1046A - https://www.nxp.com/FRWY-LS1046A - https://www.nxp.com/docs/en/quick-reference-guide/FRWY-LS1046AGSG.pdf -for the software NXP LSDK (Layerscape Software Development Kit), see - - https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf - -the components from NXP are: - - rcw, lf-6.6.23-2.0.0 - - atf (fork), lf-6.6.23-2.0.0 - - uboot (fork), lf-6.6.23-2.0.0 - - qoriq-fm-ucode (blob), lf-6.6.23-2.0.0 - - linux (fork), lf-6.6.23-2.0.0 +Layerscape platforms are officially supported by NXP under the Layerscape +Debian Linux SDK (LDLSDK). This uses components from Linux Factory, currently +tag lf-6.6.3_1.0.0, a few releases behind the latest lf-6.6.36-2.1.0. +In Buildroot, the latest Linux Factory release tag is used. + +For the software Layerscape Debian Linux SDK User Guide, see: + - https://docs.nxp.com/bundle/UG10143/page/topics/about_this_document.html + - https://www.nxp.com/docs/en/user-guide/UG10143.pdf + +Note: the latest Linux Factory release may contain features which are not yet +documented in the LDLSDKUG. + +The components from NXP are: + - rcw, lf-6.6.36-2.1.0 + - atf (fork), lf-6.6.36-2.1.0 + - uboot (fork), lf-6.6.36-2.1.0 + - qoriq-fm-ucode (blob), lf-6.6.36-2.1.0 + - linux (fork), lf-6.6.36-2.1.0 + - fmlib, lf-6.6.36-2.1.0 + - fmc, lf-6.6.36-2.1.0 Build =====
configs/ls1028ardb_defconfig +3 -3
@@ -12,7 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/ls1028ardb/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.23-2.0.0)/linux-lf-6.6.23-2.0.0.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.36-2.1.0)/linux-lf-6.6.36-2.1.0.tar.gz" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y
@@ -25,7 +25,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="128M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ARM_TRUSTED_FIRMWARE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.23-2.0.0)/atf-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.36-2.1.0)/atf-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb" BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
@@ -35,7 +35,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.23-2.0.0)/u-boot-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.36-2.1.0)/u-boot-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ls1028ardb_tfa" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_PACKAGE_HOST_GENIMAGE=y
configs/ls1046a-frwy_defconfig +3 -3
@@ -12,7 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/ls1046a-frwy/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.23-2.0.0)/linux-lf-6.6.23-2.0.0.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.36-2.1.0)/linux-lf-6.6.36-2.1.0.tar.gz" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y
@@ -25,7 +25,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="128M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ARM_TRUSTED_FIRMWARE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.23-2.0.0)/atf-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.36-2.1.0)/atf-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1046afrwy" BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
@@ -35,7 +35,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.23-2.0.0)/u-boot-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.36-2.1.0)/u-boot-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ls1046afrwy_tfa" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_PACKAGE_HOST_GENIMAGE=y
package/fmc/fmc.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 a58514816108a16d07307f924ebceb67c7d61709e4449978763fc44ed6e1fc44 fmc-LSDK-21.08.tar.gz +sha256 a58514816108a16d07307f924ebceb67c7d61709e4449978763fc44ed6e1fc44 fmc-lf-6.6.36-2.1.0.tar.gz sha256 f92862ceb95db5492f50a59d7c799c9395b714db88db92d11891dc0233e2ac42 COPYING
package/fmc/fmc.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -FMC_VERSION = LSDK-21.08 +FMC_VERSION = lf-6.6.36-2.1.0 FMC_SITE = $(call github,nxp-qoriq,fmc,$(FMC_VERSION)) FMC_LICENSE = MIT FMC_LICENSE_FILES = COPYING
package/fmlib/fmlib.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed -sha256 64dc76c0adc3aa58bce6aba470dee7dee001d4964ccb1958e899a59d9917b21d fmlib-LSDK-21.08.tar.gz +sha256 64dc76c0adc3aa58bce6aba470dee7dee001d4964ccb1958e899a59d9917b21d fmlib-lf-6.6.36-2.1.0.tar.gz sha256 5d7770fa9f70f0c6f0b4784bbca8401811259a4b1e03455dbd863ffd0d34d2ca COPYING
package/fmlib/fmlib.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -FMLIB_VERSION = LSDK-21.08 +FMLIB_VERSION = lf-6.6.36-2.1.0 FMLIB_SITE = $(call github,nxp-qoriq,fmlib,$(FMLIB_VERSION)) FMLIB_LICENSE = BSD-3-Clause FMLIB_LICENSE_FILES = COPYING
package/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash +1 -1
@@ -1,5 +1,5 @@ # Locally calculated -sha256 e267655a47fbe118f6960bca7994bd6b8986ef955344fe006a424be96f868602 firmware-cadence-lsdk2012.bin +sha256 65f829a9e2597bffc58a680aaefa638122144a083633d1ae09b3aec1d9f8ab84 firmware-imx-8.16.bin sha256 9c16421e7c702f56756650b8ac954d34556327e598a8666e6e8f4eb3a1aa95f1 COPYING sha256 72edc2072c86d93aa1993d15d4d19d96270af3749b0108995ad50c81d1461f52 EULA sha256 53e3eb0b2bd81c171fa04c17514e20b39b7bb1fe1224c593f7717f615fb9d52b EULA.txt
package/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk +5 -5
@@ -4,9 +4,9 @@ # ################################################################################ -QORIQ_CADENCE_DP_FIRMWARE_VERSION = lsdk2012 -QORIQ_CADENCE_DP_FIRMWARE_SITE = http://www.nxp.com/lgfiles/sdk/$(QORIQ_CADENCE_DP_FIRMWARE_VERSION) -QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-cadence-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin +QORIQ_CADENCE_DP_FIRMWARE_VERSION = 8.16 +QORIQ_CADENCE_DP_FIRMWARE_SITE = https://www.nxp.com/lgfiles/NMG/MAD/YOCTO +QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-imx-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin QORIQ_CADENCE_DP_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement QORIQ_CADENCE_DP_FIRMWARE_LICENSE_FILES = COPYING EULA EULA.txt QORIQ_CADENCE_DP_FIRMWARE_REDISTRIBUTE = NO
@@ -20,11 +20,11 @@ define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS endef define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(TARGET_DIR)/boot/ls1028a-dp-fw.bin + $(INSTALL) -D -m 0644 $(@D)/firmware/hdmi/cadence/dp_ls1028a.bin $(TARGET_DIR)/boot/ls1028a-dp-fw.bin endef define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin + $(INSTALL) -D -m 0644 $(@D)/firmware/hdmi/cadence/dp_ls1028a.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin endef $(eval $(generic-package))
package/qoriq-fm-ucode/qoriq-fm-ucode.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 c994367c74dd2ff6cd70ea269cf1bc775c5f4e11294a8db414491ce6c2eb9dc3 qoriq-fm-ucode-lf-6.6.23-2.0.0.tar.gz +sha256 2c6b69c34cf689178f8ee7db312c1bfd0e5e4d12dfe1e7f097ab35212f7776b0 qoriq-fm-ucode-lf-6.6.36-2.1.0.tar.gz sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSE
package/qoriq-fm-ucode/qoriq-fm-ucode.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -QORIQ_FM_UCODE_VERSION = lf-6.6.23-2.0.0 +QORIQ_FM_UCODE_VERSION = lf-6.6.36-2.1.0 QORIQ_FM_UCODE_SITE = $(call github,nxp-qoriq,qoriq-fm-ucode,$(QORIQ_FM_UCODE_VERSION)) QORIQ_FM_UCODE_LICENSE = NXP Binary EULA QORIQ_FM_UCODE_LICENSE_FILES = LICENSE
package/qoriq-rcw/qoriq-rcw.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 52dfb95a3d8e811609dd8a982a5c6f3ba88fac096ea8448a27b571b7c25e3a83 qoriq-rcw-lf-6.6.23-2.0.0.tar.gz +sha256 ed952fa73b290cff67603aeb6a37970d69ea56b66656f002f531912782416a35 qoriq-rcw-lf-6.6.36-2.1.0.tar.gz sha256 68f4b15ecc085729419bc60ca6eeadca5af0237bbfec791e8a79da9c943d42e9 LICENSE
package/qoriq-rcw/qoriq-rcw.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -QORIQ_RCW_VERSION = lf-6.6.23-2.0.0 +QORIQ_RCW_VERSION = lf-6.6.36-2.1.0 QORIQ_RCW_SITE = $(call github,nxp-qoriq,rcw,$(QORIQ_RCW_VERSION)) QORIQ_RCW_LICENSE = BSD-3-Clause QORIQ_RCW_LICENSE_FILES = LICENSE
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 01/11] platform/layerscape: bump Linux Factory tag to lf-6.6.36-2.1.0
Hello Vladimir, All,
Instead of "platform/layerscape" I would suggest using this:
configs/{ls1028ardb,ls1046a-frwy}_defconfig
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 8 lines
Update the following packages to the latest Linux Factory tag:
- qoriq-cadence-dp-firmware
- the updated download path was taken from the Yocto BSP at
https://github.com/nxp-qoriq/yocto-sdk.
- the recipe is here:
https://github.com/Freescale/meta-freescale/blob/master/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_22.04.bb
Quoted 4 lines
- arm-trusted-firmware
- linux
- u-boot
- fmc
fmc package doesn't seems to be selected by any layerscape defconfig. Either it's missing or optionnal at runtime.
Also we prefer if each packages version bump can be done in a separate commit, see previous version bump (It's slightly easier to review):
package/fmc: bump to version LSDK-21.08:
https://gitlab.com/buildroot.org/buildroot/-/commit/c943cb38e4174cd349b4bb80e5e16269b25079d2
package/fmlib: bump to version LSDK-21.08:
https://gitlab.com/buildroot.org/buildroot/-/commit/1b68271287d470f4dfeab074a1222da869328f4e
Quoted 110 lines
- fmlib
- qoriq-rcwSigned-off-by Vladimir Oltean <[email protected]>---
v1->v2:
- reference LDLSDKUG instead of LLDPUG which is now apparently obsolete.
- explain relationship to Linux Factory.../arm-trusted-firmware.hash | 2 +- .../ls1028ardb/patches/linux/linux.hash | 2 +- .../ls1028ardb/patches/uboot/uboot.hash | 2 +- board/freescale/ls1028ardb/readme.txt | 27 ++++++++++------ .../arm-trusted-firmware.hash | 2 +- .../ls1046a-frwy/patches/linux/linux.hash | 2 +- .../ls1046a-frwy/patches/uboot/uboot.hash | 2 +- board/freescale/ls1046a-frwy/readme.txt | 31 +++++++++++++------ configs/ls1028ardb_defconfig | 6 ++-- configs/ls1046a-frwy_defconfig | 6 ++-- package/fmc/fmc.hash | 2 +- package/fmc/fmc.mk | 2 +- package/fmlib/fmlib.hash | 2 +- package/fmlib/fmlib.mk | 2 +- .../qoriq-cadence-dp-firmware.hash | 2 +- .../qoriq-cadence-dp-firmware.mk | 10 +++--- package/qoriq-fm-ucode/qoriq-fm-ucode.hash | 2 +- package/qoriq-fm-ucode/qoriq-fm-ucode.mk | 2 +- package/qoriq-rcw/qoriq-rcw.hash | 2 +- package/qoriq-rcw/qoriq-rcw.mk | 2 +- 20 files changed, 65 insertions(+), 45 deletions(-)board/freescale/ls1028ardb/patches/arm-trusted-firmware/arm-trusted-firmware.hash +1
-1@@ -1,2 +1,2 @@ # Locally calculated -sha256 4f4dc78bfb5b7391a65ae0f83856661071f666ac2bf6a9380fddbe376a8bdaaa atf-lf-6.6.23-2.0.0.tar.gz +sha256 4562efdc08efae7d36f3ee481871aac8ed0c856f8023d2186e4affdc5b768270 atf-lf-6.6.36-2.1.0.tar.gzboard/freescale/ls1028ardb/patches/linux/linux.hash +1
-1@@ -1,2 +1,2 @@ # Locally computed -sha256 6d592722e004516309f8ce33e654f1322e4d1f0f33567acb86ca19229176fd9e linux-lf-6.6.23-2.0.0.tar.gz +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gzboard/freescale/ls1028ardb/patches/uboot/uboot.hash +1
-1@@ -1,2 +1,2 @@ # Locally computed -sha256 a2bcd7a34d4908ffbadfea731d0f0fd20f19a31cff6ff6310980e7f6743ceb24 u-boot-lf-6.6.23-2.0.0.tar.gz +sha256 51adf233d53af875f70cf451e5950dd0b6af09ff35e546eacc4ec6998454c7eb u-boot-lf-6.6.36-2.1.0.tar.gzboard/freescale/ls1028ardb/readme.txt +18
-9@@ -4,19 +4,28 @@ NXP LS1028ARDB This file documents the Buildroot support for the LS1028A Reference Design Board. -for more details about the board and the QorIQ Layerscape SoC, see the following pages: +For more details about the board and the QorIQ Layerscape SoC, see the following pages: - https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1028a-reference-design-board:LS1028ARDB - https://www.nxp.com/LS1028A -for the software NXP LSDK (Layerscape Software Development Kit), see - - https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf +Layerscape platforms are officially supported by NXP under the Layerscape +Debian Linux SDK (LDLSDK). This uses components from Linux Factory, currently +tag lf-6.6.3_1.0.0, a few releases behind the latest lf-6.6.36-2.1.0. +In Buildroot, the latest Linux Factory release tag is used. -the components from NXP are: - - rcw, lf-6.6.23-2.0.0 - - atf (fork), lf-6.6.23-2.0.0 - - uboot (fork), lf-6.6.23-2.0.0 - - cadence-dp-firmware (blob), LSDK 20.12 - - linux (fork), lf-6.6.23-2.0.0 +For the software Layerscape Debian Linux SDK User Guide, see: + - https://docs.nxp.com/bundle/UG10143/page/topics/about_this_document.html + - https://www.nxp.com/docs/en/user-guide/UG10143.pdf + +Note: the latest Linux Factory release may contain features which are not yet +documented in the LDLSDKUG. + +The components from NXP are: + - rcw, lf-6.6.36-2.1.0 + - atf (fork), lf-6.6.36-2.1.0 + - uboot (fork), lf-6.6.36-2.1.0 + - cadence-dp-firmware (blob), lf-6.6.36-2.1.0 + - linux (fork), lf-6.6.36-2.1.0 Build =====board/freescale/ls1046a-frwy/patches/arm-trusted-firmware/arm-trusted-firmware.hash +1
-1@@ -1,2 +1,2 @@ # Locally calculated -sha256 4f4dc78bfb5b7391a65ae0f83856661071f666ac2bf6a9380fddbe376a8bdaaa atf-lf-6.6.23-2.0.0.tar.gz +sha256 4562efdc08efae7d36f3ee481871aac8ed0c856f8023d2186e4affdc5b768270 atf-lf-6.6.36-2.1.0.tar.gzboard/freescale/ls1046a-frwy/patches/linux/linux.hash +0
-0
board/freescale/ls1046a-frwy/patches/linux/linux.hash line 2
Quoted 3 lines
board/freescale/ls1046a-frwy/patches/linux/linux.hash +1
-1@@ -1,2 +1,2 @@ # Locally computed -sha256 6d592722e004516309f8ce33e654f1322e4d1f0f33567acb86ca19229176fd9e linux-lf-6.6.23-2.0.0.tar.gz +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gz
Note: new layerscape defconfigs using linux-lf-6.6.52-2.2.0 were added recently (ls1043a-rdb and ls1046a-rdb), could you resend a new version using the same version?
Best regards,
Romain
Quoted 238 lines
board/freescale/ls1046a-frwy/patches/uboot/uboot.hash +1
-1@@ -1,2 +1,2 @@ # Locally computed -sha256 a2bcd7a34d4908ffbadfea731d0f0fd20f19a31cff6ff6310980e7f6743ceb24 u-boot-lf-6.6.23-2.0.0.tar.gz +sha256 51adf233d53af875f70cf451e5950dd0b6af09ff35e546eacc4ec6998454c7eb u-boot-lf-6.6.36-2.1.0.tar.gzboard/freescale/ls1046a-frwy/readme.txt +21
-10@@ -4,20 +4,31 @@ NXP LS1046A-FRWY This file documents the Buildroot support for the LS1046A Freeway Board. -for more details about the board and the QorIQ Layerscape SoC, see the following pages: +For more details about the board and the QorIQ Layerscape SoC, see the following pages: - https://www.nxp.com/design/software/qoriq-developer-resources/ls1046a-freeway-board:FRWY-LS1046A - https://www.nxp.com/FRWY-LS1046A - https://www.nxp.com/docs/en/quick-reference-guide/FRWY-LS1046AGSG.pdf -for the software NXP LSDK (Layerscape Software Development Kit), see - - https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf - -the components from NXP are: - - rcw, lf-6.6.23-2.0.0 - - atf (fork), lf-6.6.23-2.0.0 - - uboot (fork), lf-6.6.23-2.0.0 - - qoriq-fm-ucode (blob), lf-6.6.23-2.0.0 - - linux (fork), lf-6.6.23-2.0.0 +Layerscape platforms are officially supported by NXP under the Layerscape +Debian Linux SDK (LDLSDK). This uses components from Linux Factory, currently +tag lf-6.6.3_1.0.0, a few releases behind the latest lf-6.6.36-2.1.0. +In Buildroot, the latest Linux Factory release tag is used. + +For the software Layerscape Debian Linux SDK User Guide, see: + - https://docs.nxp.com/bundle/UG10143/page/topics/about_this_document.html + - https://www.nxp.com/docs/en/user-guide/UG10143.pdf + +Note: the latest Linux Factory release may contain features which are not yet +documented in the LDLSDKUG. + +The components from NXP are: + - rcw, lf-6.6.36-2.1.0 + - atf (fork), lf-6.6.36-2.1.0 + - uboot (fork), lf-6.6.36-2.1.0 + - qoriq-fm-ucode (blob), lf-6.6.36-2.1.0 + - linux (fork), lf-6.6.36-2.1.0 + - fmlib, lf-6.6.36-2.1.0 + - fmc, lf-6.6.36-2.1.0 Build =====configs/ls1028ardb_defconfig +3
-3@@ -12,7 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/ls1028ardb/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.23-2.0.0)/linux-lf-6.6.23-2.0.0.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.36-2.1.0)/linux-lf-6.6.36-2.1.0.tar.gz" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y@@ -25,7 +25,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="128M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ARM_TRUSTED_FIRMWARE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.23-2.0.0)/atf-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.36-2.1.0)/atf-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb" BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y@@ -35,7 +35,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.23-2.0.0)/u-boot-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.36-2.1.0)/u-boot-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ls1028ardb_tfa" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_PACKAGE_HOST_GENIMAGE=yconfigs/ls1046a-frwy_defconfig +3
-3@@ -12,7 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/ls1046a-frwy/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.23-2.0.0)/linux-lf-6.6.23-2.0.0.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.36-2.1.0)/linux-lf-6.6.36-2.1.0.tar.gz" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y@@ -25,7 +25,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="128M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ARM_TRUSTED_FIRMWARE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.23-2.0.0)/atf-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-6.6.36-2.1.0)/atf-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1046afrwy" BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y@@ -35,7 +35,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.23-2.0.0)/u-boot-lf-6.6.23-2.0.0.tar.gz" +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-6.6.36-2.1.0)/u-boot-lf-6.6.36-2.1.0.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ls1046afrwy_tfa" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_PACKAGE_HOST_GENIMAGE=ypackage/fmc/fmc.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 a58514816108a16d07307f924ebceb67c7d61709e4449978763fc44ed6e1fc44 fmc-LSDK-21.08.tar.gz +sha256 a58514816108a16d07307f924ebceb67c7d61709e4449978763fc44ed6e1fc44 fmc-lf-6.6.36-2.1.0.tar.gz sha256 f92862ceb95db5492f50a59d7c799c9395b714db88db92d11891dc0233e2ac42 COPYINGpackage/fmc/fmc.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -FMC_VERSION = LSDK-21.08 +FMC_VERSION = lf-6.6.36-2.1.0 FMC_SITE = $(call github,nxp-qoriq,fmc,$(FMC_VERSION)) FMC_LICENSE = MIT FMC_LICENSE_FILES = COPYINGpackage/fmlib/fmlib.hash +1
-1@@ -1,3 +1,3 @@ # Locally computed -sha256 64dc76c0adc3aa58bce6aba470dee7dee001d4964ccb1958e899a59d9917b21d fmlib-LSDK-21.08.tar.gz +sha256 64dc76c0adc3aa58bce6aba470dee7dee001d4964ccb1958e899a59d9917b21d fmlib-lf-6.6.36-2.1.0.tar.gz sha256 5d7770fa9f70f0c6f0b4784bbca8401811259a4b1e03455dbd863ffd0d34d2ca COPYINGpackage/fmlib/fmlib.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -FMLIB_VERSION = LSDK-21.08 +FMLIB_VERSION = lf-6.6.36-2.1.0 FMLIB_SITE = $(call github,nxp-qoriq,fmlib,$(FMLIB_VERSION)) FMLIB_LICENSE = BSD-3-Clause FMLIB_LICENSE_FILES = COPYINGpackage/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash +1
-1@@ -1,5 +1,5 @@ # Locally calculated -sha256 e267655a47fbe118f6960bca7994bd6b8986ef955344fe006a424be96f868602 firmware-cadence-lsdk2012.bin +sha256 65f829a9e2597bffc58a680aaefa638122144a083633d1ae09b3aec1d9f8ab84 firmware-imx-8.16.bin sha256 9c16421e7c702f56756650b8ac954d34556327e598a8666e6e8f4eb3a1aa95f1 COPYING sha256 72edc2072c86d93aa1993d15d4d19d96270af3749b0108995ad50c81d1461f52 EULA sha256 53e3eb0b2bd81c171fa04c17514e20b39b7bb1fe1224c593f7717f615fb9d52b EULA.txtpackage/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk +5
-5@@ -4,9 +4,9 @@ # ################################################################################ -QORIQ_CADENCE_DP_FIRMWARE_VERSION = lsdk2012 -QORIQ_CADENCE_DP_FIRMWARE_SITE = http://www.nxp.com/lgfiles/sdk/$(QORIQ_CADENCE_DP_FIRMWARE_VERSION) -QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-cadence-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin +QORIQ_CADENCE_DP_FIRMWARE_VERSION = 8.16 +QORIQ_CADENCE_DP_FIRMWARE_SITE = https://www.nxp.com/lgfiles/NMG/MAD/YOCTO +QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-imx-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin QORIQ_CADENCE_DP_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement QORIQ_CADENCE_DP_FIRMWARE_LICENSE_FILES = COPYING EULA EULA.txt QORIQ_CADENCE_DP_FIRMWARE_REDISTRIBUTE = NO@@ -20,11 +20,11 @@ define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS endef define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(TARGET_DIR)/boot/ls1028a-dp-fw.bin + $(INSTALL) -D -m 0644 $(@D)/firmware/hdmi/cadence/dp_ls1028a.bin $(TARGET_DIR)/boot/ls1028a-dp-fw.bin endef define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin + $(INSTALL) -D -m 0644 $(@D)/firmware/hdmi/cadence/dp_ls1028a.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin endef $(eval $(generic-package))package/qoriq-fm-ucode/qoriq-fm-ucode.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 c994367c74dd2ff6cd70ea269cf1bc775c5f4e11294a8db414491ce6c2eb9dc3 qoriq-fm-ucode-lf-6.6.23-2.0.0.tar.gz +sha256 2c6b69c34cf689178f8ee7db312c1bfd0e5e4d12dfe1e7f097ab35212f7776b0 qoriq-fm-ucode-lf-6.6.36-2.1.0.tar.gz sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSEpackage/qoriq-fm-ucode/qoriq-fm-ucode.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -QORIQ_FM_UCODE_VERSION = lf-6.6.23-2.0.0 +QORIQ_FM_UCODE_VERSION = lf-6.6.36-2.1.0 QORIQ_FM_UCODE_SITE = $(call github,nxp-qoriq,qoriq-fm-ucode,$(QORIQ_FM_UCODE_VERSION)) QORIQ_FM_UCODE_LICENSE = NXP Binary EULA QORIQ_FM_UCODE_LICENSE_FILES = LICENSEpackage/qoriq-rcw/qoriq-rcw.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 52dfb95a3d8e811609dd8a982a5c6f3ba88fac096ea8448a27b571b7c25e3a83 qoriq-rcw-lf-6.6.23-2.0.0.tar.gz +sha256 ed952fa73b290cff67603aeb6a37970d69ea56b66656f002f531912782416a35 qoriq-rcw-lf-6.6.36-2.1.0.tar.gz sha256 68f4b15ecc085729419bc60ca6eeadca5af0237bbfec791e8a79da9c943d42e9 LICENSEpackage/qoriq-rcw/qoriq-rcw.mk +0
-0
package/qoriq-rcw/qoriq-rcw.mk line 10
Quoted 8 lines
package/qoriq-rcw/qoriq-rcw.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -QORIQ_RCW_VERSION = lf-6.6.23-2.0.0 +QORIQ_RCW_VERSION = lf-6.6.36-2.1.0 QORIQ_RCW_SITE = $(call github,nxp-qoriq,rcw,$(QORIQ_RCW_VERSION)) QORIQ_RCW_LICENSE = BSD-3-Clause QORIQ_RCW_LICENSE_FILES = LICENSE
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/11 package/qoriq-ddr-phy-binary: new package
In reply to Vladimir OlteanThe DDR PHY on the NXP LX2160A SoC needs firmware. This is distributed as prebuilt binaries by NXP through GitHub.
---v1->v2: none
DEVELOPERS | 3 +++ package/Config.in | 1 + package/qoriq-ddr-phy-binary/Config.in | 6 ++++++ .../qoriq-ddr-phy-binary.hash | 3 +++ .../qoriq-ddr-phy-binary.mk | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 package/qoriq-ddr-phy-binary/Config.in create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk
DEVELOPERS +3 -0
@@ -3301,6 +3301,9 @@ N: Vivien Didelot <[email protected]> F: board/technologic/ts5500/ F: configs/ts5500_defconfig +N: Vladimir Oltean <[email protected]> +F: package/qoriq-ddr-phy-binary/ + N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/ F: package/zbar/
package/Config.in +1 -0
@@ -454,6 +454,7 @@ menu "Firmware" source "package/murata-cyw-fw/Config.in" source "package/odroidc2-firmware/Config.in" source "package/qcom-db410c-firmware/Config.in" + source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in"
package/qoriq-ddr-phy-binary/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_QORIQ_DDR_PHY_BINARY + bool "qoriq-ddr-phy-binary" + help + Firmware binary for DDR PHY of NXP LX2160A family of SoCs. + + https://github.com/nxp-qoriq/ddr-phy-binary
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 b49cb34f941f7e534ec31d3d14d18d4e565e4875b690ecb0d7e2992b72c64dc7 qoriq-ddr-phy-binary-lf-6.6.36-2.1.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 NXP-Binary-EULA.txt
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# qoriq-ddr-phy-binary +# +################################################################################ + +QORIQ_DDR_PHY_BINARY_VERSION = lf-6.6.36-2.1.0 +QORIQ_DDR_PHY_BINARY_SITE = $(call github,nxp-qoriq,ddr-phy-binary,$(QORIQ_DDR_PHY_BINARY_VERSION)) +QORIQ_DDR_PHY_BINARY_LICENSE = NXP Binary EULA +QORIQ_DDR_PHY_BINARY_LICENSE_FILES = NXP-Binary-EULA.txt +QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES = YES +QORIQ_DDR_PHY_BINARY_INSTALL_TARGET = NO + +define QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/lx2160a/fip_ddr.bin $(BINARIES_DIR)/fip_ddr.bin +endef + +$(eval $(generic-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 02/11] package/qoriq-ddr-phy-binary: new package
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 4 lines
The DDR PHY on the NXP LX2160A SoC needs firmware. This is distributed as prebuilt binaries by NXP through GitHub.
Signed-off-by Vladimir Oltean <[email protected]>
Best regards,
Romain
Quoted 74 lines
---
v1->v2: noneDEVELOPERS | 3 +++ package/Config.in | 1 + package/qoriq-ddr-phy-binary/Config.in | 6 ++++++ .../qoriq-ddr-phy-binary.hash | 3 +++ .../qoriq-ddr-phy-binary.mk | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 package/qoriq-ddr-phy-binary/Config.in create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mkDEVELOPERS +3
-0@@ -3301,6 +3301,9 @@ N: Vivien Didelot <[email protected]> F: board/technologic/ts5500/ F: configs/ts5500_defconfig +N: Vladimir Oltean <[email protected]> +F: package/qoriq-ddr-phy-binary/ + N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/ F: package/zbar/package/Config.in +1
-0@@ -454,6 +454,7 @@ menu "Firmware" source "package/murata-cyw-fw/Config.in" source "package/odroidc2-firmware/Config.in" source "package/qcom-db410c-firmware/Config.in" + source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in"package/qoriq-ddr-phy-binary/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_QORIQ_DDR_PHY_BINARY + bool "qoriq-ddr-phy-binary" + help + Firmware binary for DDR PHY of NXP LX2160A family of SoCs. + + https://github.com/nxp-qoriq/ddr-phy-binarypackage/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 b49cb34f941f7e534ec31d3d14d18d4e565e4875b690ecb0d7e2992b72c64dc7 qoriq-ddr-phy-binary-lf-6.6.36-2.1.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 NXP-Binary-EULA.txtpackage/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk new file +8
-0@@ -0,0 +1,18 @@ +################################################################################ +# +# qoriq-ddr-phy-binary +# +################################################################################ + +QORIQ_DDR_PHY_BINARY_VERSION = lf-6.6.36-2.1.0 +QORIQ_DDR_PHY_BINARY_SITE = $(call github,nxp-qoriq,ddr-phy-binary,$(QORIQ_DDR_PHY_BINARY_VERSION))
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk line 18
Quoted 10 lines
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk new file +10
-0+QORIQ_DDR_PHY_BINARY_LICENSE = NXP Binary EULA +QORIQ_DDR_PHY_BINARY_LICENSE_FILES = NXP-Binary-EULA.txt +QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES = YES +QORIQ_DDR_PHY_BINARY_INSTALL_TARGET = NO + +define QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/lx2160a/fip_ddr.bin $(BINARIES_DIR)/fip_ddr.bin +endef + +$(eval $(generic-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 02/11] package/qoriq-ddr-phy-binary: new package
In reply to Vladimir OlteanJulien, Romain,
I believe that this package, without the serie can be applied. It has values for any NXP LX2 SoC.
Quoted 5 lines · Vladimir Oltean
The DDR PHY on the NXP LX2160A SoC needs firmware. This is distributed as prebuilt binaries by NXP through GitHub.
Signed-off-by Vladimir Oltean <[email protected]>Reviewed-by Romain Naour <[email protected]>
Best regards,
Vincent
Quoted 74 lines
---
v1->v2: noneDEVELOPERS | 3 +++ package/Config.in | 1 + package/qoriq-ddr-phy-binary/Config.in | 6 ++++++ .../qoriq-ddr-phy-binary.hash | 3 +++ .../qoriq-ddr-phy-binary.mk | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 package/qoriq-ddr-phy-binary/Config.in create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash create mode 100644 package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mkDEVELOPERS +3
-0@@ -3301,6 +3301,9 @@ N: Vivien Didelot <[email protected]> F: board/technologic/ts5500/ F: configs/ts5500_defconfig +N: Vladimir Oltean <[email protected]> +F: package/qoriq-ddr-phy-binary/ + N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/ F: package/zbar/package/Config.in +1
-0@@ -454,6 +454,7 @@ menu "Firmware" source "package/murata-cyw-fw/Config.in" source "package/odroidc2-firmware/Config.in" source "package/qcom-db410c-firmware/Config.in" + source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in"package/qoriq-ddr-phy-binary/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_QORIQ_DDR_PHY_BINARY + bool "qoriq-ddr-phy-binary" + help + Firmware binary for DDR PHY of NXP LX2160A family of SoCs. + + https://github.com/nxp-qoriq/ddr-phy-binarypackage/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 b49cb34f941f7e534ec31d3d14d18d4e565e4875b690ecb0d7e2992b72c64dc7 qoriq-ddr-phy-binary-lf-6.6.36-2.1.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 NXP-Binary-EULA.txtpackage/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk new file +8
-0@@ -0,0 +1,18 @@ +################################################################################ +# +# qoriq-ddr-phy-binary +# +################################################################################ + +QORIQ_DDR_PHY_BINARY_VERSION = lf-6.6.36-2.1.0 +QORIQ_DDR_PHY_BINARY_SITE = $(call github,nxp-qoriq,ddr-phy-binary,$(QORIQ_DDR_PHY_BINARY_VERSION))
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk line 18
Quoted 10 lines
package/qoriq-ddr-phy-binary/qoriq-ddr-phy-binary.mk new file +10
-0+QORIQ_DDR_PHY_BINARY_LICENSE = NXP Binary EULA +QORIQ_DDR_PHY_BINARY_LICENSE_FILES = NXP-Binary-EULA.txt +QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES = YES +QORIQ_DDR_PHY_BINARY_INSTALL_TARGET = NO + +define QORIQ_DDR_PHY_BINARY_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/lx2160a/fip_ddr.bin $(BINARIES_DIR)/fip_ddr.bin +endef + +$(eval $(generic-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/11 package/qoriq-mc-binary: new package
In reply to Vladimir OlteanAdd a package which deploys the NXP MC (Management Complex) firmware to the target. This is necessary for NXP DPAA2 SoCs (LS1088A, LS2080A, LS2088A, LX2160A).
---v1->v2: none
DEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-mc-binary/Config.in | 48 ++++++++++++++++++++ package/qoriq-mc-binary/qoriq-mc-binary.hash | 3 ++ package/qoriq-mc-binary/qoriq-mc-binary.mk | 22 +++++++++ 5 files changed, 75 insertions(+) create mode 100644 package/qoriq-mc-binary/Config.in create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.hash create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.mk
DEVELOPERS +1 -0
@@ -3303,6 +3303,7 @@ F: configs/ts5500_defconfig N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ +F: package/qoriq-mc-binary/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/
package/Config.in +1 -0
@@ -456,6 +456,7 @@ menu "Firmware" source "package/qcom-db410c-firmware/Config.in" source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" + source "package/qoriq-mc-binary/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in"
package/qoriq-mc-binary/Config.in new file +48 -0
48 lines not on this page · raw message
package/qoriq-mc-binary/qoriq-mc-binary.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 912ad8effd5c7b08eb277719b1e021b8b1fe4022dc3d961b419562e1d2d7a860 qoriq-mc-binary-10.39.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSE
package/qoriq-mc-binary/qoriq-mc-binary.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# qoriq-mc-binary +# +################################################################################ + +QORIQ_MC_BINARY_VERSION = 10.39.0 +QORIQ_MC_BINARY_SITE = $(call github,nxp-qoriq,qoriq-mc-binary,mc_release_$(QORIQ_MC_BINARY_VERSION)) +QORIQ_MC_BINARY_LICENSE = NXP Binary EULA +QORIQ_MC_BINARY_LICENSE_FILES = LICENSE +QORIQ_MC_BINARY_INSTALL_IMAGES = YES +QORIQ_MC_BINARY_INSTALL_TARGET = NO + +MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM)) +MC_DIR = $(call qstrip,$(BR2_QORIQ_MC_DIR)) +MC_BIN = mc_$(MC_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itb + +define QORIQ_MC_BINARY_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/${MC_DIR}/${MC_BIN} $(BINARIES_DIR)/mc.itb +endef + +$(eval $(generic-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/qoriq-mc-binary: new package
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 52 lines
Add a package which deploys the NXP MC (Management Complex) firmware to the target. This is necessary for NXP DPAA2 SoCs (LS1088A, LS2080A, LS2088A, LX2160A).
Signed-off-by Vladimir Oltean <[email protected]>---
v1->v2: noneDEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-mc-binary/Config.in | 48 ++++++++++++++++++++ package/qoriq-mc-binary/qoriq-mc-binary.hash | 3 ++ package/qoriq-mc-binary/qoriq-mc-binary.mk | 22 +++++++++ 5 files changed, 75 insertions(+) create mode 100644 package/qoriq-mc-binary/Config.in create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.hash create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.mkDEVELOPERS +1
-0@@ -3303,6 +3303,7 @@ F: configs/ts5500_defconfig N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ +F: package/qoriq-mc-binary/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/package/Config.in +1
-0@@ -456,6 +456,7 @@ menu "Firmware" source "package/qcom-db410c-firmware/Config.in" source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" + source "package/qoriq-mc-binary/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in"package/qoriq-mc-binary/Config.in new file +4
-0@@ -0,0 +1,48 @@ +config BR2_PACKAGE_QORIQ_MC_BINARY + bool "qoriq-mc-binary" + help + The Management Complex (MC) is a key component of the networking
package/qoriq-mc-binary/Config.in line 14
Quoted 10 lines
package/qoriq-mc-binary/Config.in new file +10
-0+ subsystem named DPAA2 (Data Path Acceleration Architecture, second + version) in some NXP Layerscape SoCs. + + The MC coprocessor runs a closed-source, NXP-supplied firmware image + that abstracts and simplifies the allocation and configuration of the + networking hardware primitives into DPAA2 "objects". The MC firmware + exclusively manages the networking control path, and not the data path. + + https://github.com/nxp-qoriq/qoriq-mc-binary + https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in required
There are some style issue reported by check-package:
$ ./utils/check-package package/qoriq-mc-binary/* package/qoriq-mc-binary/Config.in:4: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:5: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:8: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:9: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:10: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:11: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-mc-binary/Config.in:14: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in)
The help text is slightly too long, please fix.
Quoted 55 lines
package/qoriq-mc-binary/Config.in new file +34
-0+ +if BR2_PACKAGE_QORIQ_MC_BINARY +choice + prompt "QorIQ MC Target" + help + Select the target for the QorIQ MC firmware. + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A + bool "ls1088a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A + bool "ls2080a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A + bool "ls2088a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A + bool "lx2160a" + +endchoice + +config BR2_QORIQ_MC_PLATFORM + string + default "ls1088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A + default "ls2080a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A + default "ls2088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A + default "lx2160a" if BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A + +config BR2_QORIQ_MC_DIR + string + default "lx216xa" if BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A + default BR2_QORIQ_MC_PLATFORM + +endifpackage/qoriq-mc-binary/qoriq-mc-binary.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 912ad8effd5c7b08eb277719b1e021b8b1fe4022dc3d961b419562e1d2d7a860 qoriq-mc-binary-10.39.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSEpackage/qoriq-mc-binary/qoriq-mc-binary.mk new file +6
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# qoriq-mc-binary +# +################################################################################ +
package/qoriq-mc-binary/qoriq-mc-binary.mk line 16
Quoted 10 lines
package/qoriq-mc-binary/qoriq-mc-binary.mk new file +10
-0+QORIQ_MC_BINARY_VERSION = 10.39.0 +QORIQ_MC_BINARY_SITE = $(call github,nxp-qoriq,qoriq-mc-binary,mc_release_$(QORIQ_MC_BINARY_VERSION)) +QORIQ_MC_BINARY_LICENSE = NXP Binary EULA +QORIQ_MC_BINARY_LICENSE_FILES = LICENSE +QORIQ_MC_BINARY_INSTALL_IMAGES = YES +QORIQ_MC_BINARY_INSTALL_TARGET = NO + +MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM)) +MC_DIR = $(call qstrip,$(BR2_QORIQ_MC_DIR)) +MC_BIN = mc_$(MC_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itb
Here the same tool (check-package) require to use "QORIQ_MC_BINARY" as prefix for each variable use/defined by this package:
package/qoriq-mc-binary/qoriq-mc-binary.mk:14: possible typo, variable not properly prefixed: MC_PLATFORM -> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)package/qoriq-mc-binary/qoriq-mc-binary.mk:15: possible typo, variable not properly prefixed: MC_DIR -> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)package/qoriq-mc-binary/qoriq-mc-binary.mk:16: possible typo, variable not properly prefixed: MC_BIN -> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)
Try with:QORIQ_MC_BINARY_MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM))
Same for MC_DIR and MC_BIN.
package/qoriq-mc-binary/qoriq-mc-binary.mk line 19
Quoted 3 lines
package/qoriq-mc-binary/qoriq-mc-binary.mk new file +3
-0+ +define QORIQ_MC_BINARY_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/${MC_DIR}/${MC_BIN} $(BINARIES_DIR)/mc.itb
Finally: use $()package/qoriq-mc-binary/qoriq-mc-binary.mk:19: use $() to delimit variables, not ${}
Best regards,
Romain
package/qoriq-mc-binary/qoriq-mc-binary.mk line 22
Quoted 3 lines
package/qoriq-mc-binary/qoriq-mc-binary.mk new file +3
-0+endef + +$(eval $(generic-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/qoriq-mc-binary: new package
Quoted 1 line · Romain Naour
There are some style issue reported by check-package:
Thanks for the review, I didn't know about check-package.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/qoriq-mc-binary: new package
In reply to Romain Naour via buildrootQuoted 51 lines · Romain Naour
Quoted 27 lines
package/qoriq-mc-binary/Config.in new file +27
-0+if BR2_PACKAGE_QORIQ_MC_BINARY +choice + prompt "QorIQ MC Target" + help + Select the target for the QorIQ MC firmware. + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A + bool "ls1088a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A + bool "ls2080a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A + bool "ls2088a" + +config BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A + bool "lx2160a" + +endchoice + +config BR2_QORIQ_MC_PLATFORM + string + default "ls1088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A + default "ls2080a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A + default "ls2088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A + default "lx2160a" if BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A +package/qoriq-mc-binary/Config.in
Quoted 10 lines
package/qoriq-mc-binary/Config.in new file +10
-0+QORIQ_MC_BINARY_VERSION = 10.39.0 +QORIQ_MC_BINARY_SITE = $(call github,nxp-qoriq,qoriq-mc-binary,mc_release_$(QORIQ_MC_BINARY_VERSION)) +QORIQ_MC_BINARY_LICENSE = NXP Binary EULA +QORIQ_MC_BINARY_LICENSE_FILES = LICENSE +QORIQ_MC_BINARY_INSTALL_IMAGES = YES +QORIQ_MC_BINARY_INSTALL_TARGET = NO + +MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM)) +MC_DIR = $(call qstrip,$(BR2_QORIQ_MC_DIR)) +MC_BIN = mc_$(MC_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itbHere the same tool (check-package) require to use "
QORIQ_MC_BINARY" as prefix for each variable use/defined by this package:
package/qoriq-mc-binary/qoriq-mc-binary.mk:14: possible typo, variable not properly prefixed:MC_PLATFORM-> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)package/qoriq-mc-binary/qoriq-mc-binary.mk:15: possible typo, variable not properly prefixed:MC_DIR-> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)package/qoriq-mc-binary/qoriq-mc-binary.mk:16: possible typo, variable not properly prefixed:MC_BIN-> *QORIQ_MC_BINARY_XXXX*
(https://nightly.buildroot.org/#_tips_and_tricks)
Quoted 4 lines
Try with:
QORIQ_MC_BINARY_MC_PLATFORM= $(call qstrip,$(BR2_QORIQ_MC_PLATFORM))Same for
MC_DIRandMC_BIN.
If I were to replace MC_DIR with QORIQ_MC_BINARY_DIR, it would conflict
with package/pkg-generic.mk's use of $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME).
I guess I don't fundamentally understand the best practices of naming private Make variables when I don't want them to collide with the build system's use, and the "tips and tricks" link didn't really cover that. I'd guess you'd recommend renaming "QORIQ_MC_BINARY_DIR" to "QORIQ_MC_BINARY_DIRECTORY" and just "knowing" that the latter is not a variable used by the build system?
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/qoriq-mc-binary: new package
Quoted 1 line · Vladimir Oltean
On Wed, Feb 05, 2025 at 03:45:22PM +0100, Romain Naour wrote:
[snip]
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
package/qoriq-mc-binary/qoriq-mc-binary.mk new file +3
-0+MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM)) +MC_DIR = $(call qstrip,$(BR2_QORIQ_MC_DIR)) +MC_BIN = mc_$(MC_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itb
[snip]
Quoted 5 lines
Quoted 4 lines
Try with:
QORIQ_MC_BINARY_MC_PLATFORM= $(call qstrip,$(BR2_QORIQ_MC_PLATFORM))Same for
MC_DIRandMC_BIN.
Quoted 8 lines
If I were to replace
MC_DIRwithQORIQ_MC_BINARY_DIR, it would conflict
with package/pkg-generic.mk's use of $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME).
I guess I don't fundamentally understand the best practices of naming private Make variables when I don't want them to collide with the build system's use, and the "tips and tricks" link didn't really cover that. I'd guess you'd recommend renaming "QORIQ_MC_BINARY_DIR" to "QORIQ_MC_BINARY_DIRECTORY" and just "knowing" that the latter is not a variable used by the build system?
In general, you have to make sure that all variables begin with the package
name, and that they don't conflict with existing variables. It's unfortunately indeed tricky to do that...
However, in this specific case, you're not doing anything in configure and
build anyway, and you can use the subdir variable:
QORIQ_MC_BINARY_SUBDIR = $(call qstrip,$(BR2_QORIQ_MC_BINARY_DIR)) QORIQ_MC_BINARY_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_BINARY_PLATFORM)) QORIQ_MC_BINARY_BIN = mc_$(QORIQ_MC_BINARY_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itb
define QORIQ_MC_BINARY_INSTALL_IMAGES_CMDS
$(INSTALL) -D $(QORIQ_MC_BINARY_DIR}/$(MC_BIN) $(BINARIES_DIR)/mc.itb
endef
(note that Config.in options also have to begin with the package name, so BR2_QORIQ_MC_BINARY_PLATFORM instead of BR2_QORIQ_MC_PLATFORM).
Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/11 package/qoriq-mc-utils: new package
In reply to Vladimir OlteanThe configuration files for the MC firmware binary are distributed through a separate repository on GitHub, and need a different package. They are licensed differently than the firmware itself, and unlike the firmware, they are customizable.
---v1->v2: none
DEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-mc-utils/Config.in | 35 ++++++++++++++++++++++ package/qoriq-mc-utils/qoriq-mc-utils.hash | 3 ++ package/qoriq-mc-utils/qoriq-mc-utils.mk | 22 ++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 package/qoriq-mc-utils/Config.in create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.hash create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.mk
DEVELOPERS +1 -0
@@ -3304,6 +3304,7 @@ F: configs/ts5500_defconfig N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ F: package/qoriq-mc-binary/ +F: package/qoriq-mc-utils/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/
package/Config.in +1 -0
@@ -457,6 +457,7 @@ menu "Firmware" source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" source "package/qoriq-mc-binary/Config.in" + source "package/qoriq-mc-utils/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in"
package/qoriq-mc-utils/Config.in new file +35 -0
@@ -0,0 +1,35 @@ +config BR2_PACKAGE_QORIQ_MC_UTILS + bool "qoriq-mc-utils" + help + The Management Complex (MC) is a key component of the networking + subsystem named DPAA2 (Data Path Acceleration Architecture, second + version) in some NXP Layerscape SoCs. + + The MC firmware is configured through two distinct files named DPL + and DPC, which are customizable by the end user. Example + configuration files for NXP reference boards are distributed through + this package, and are frequently patched to produce the configuration + required in other scenarios. + + https://github.com/nxp-qoriq/mc-utils + https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in required + +if BR2_PACKAGE_QORIQ_MC_UTILS + +config BR2_PACKAGE_QORIQ_MC_UTILS_DPC + string "Data Path Configuration (DPC) file" + help + The DPC file contains the settings defining the behavior of the MC + firmware. Its source code follows the device tree syntax and is + compiled to a device tree blob, which is the file that must be + specified here. + +config BR2_PACKAGE_QORIQ_MC_UTILS_DPL + string "Data Path Layout (DPL) file" + help + The DPL file contains a description of the initial networking objects + created by the MC firmware when it boots. Its source code follows the + device tree syntax and is compiled to a device tree blob, which is + the file that must be specified here. + +endif
package/qoriq-mc-utils/qoriq-mc-utils.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1d3f4a6b2661cff9cfb5d4fcba3b181eb6febdd88a127fa069e306f51d778fc5 qoriq-mc-utils-10.39.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSE
package/qoriq-mc-utils/qoriq-mc-utils.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# qoriq-mc-utils +# +################################################################################ + +QORIQ_MC_UTILS_VERSION = 10.39.0 +QORIQ_MC_UTILS_SITE = $(call github,nxp-qoriq,mc-utils,mc_release_$(QORIQ_MC_UTILS_VERSION)) +QORIQ_MC_UTILS_LICENSE = BSD-3-Clause +QORIQ_MC_UTILS_INSTALL_IMAGES = YES +QORIQ_MC_UTILS_INSTALL_TARGET = NO + +define QORIQ_MC_UTILS_BUILD_CMDS + $(MAKE) -C $(@D)/config/ +endef + +define QORIQ_MC_UTILS_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC)) $(BINARIES_DIR)/dpc.dtb + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL)) $(BINARIES_DIR)/dpl.dtb +endef + +$(eval $(generic-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] package/qoriq-mc-utils: new package
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 54 lines
The configuration files for the MC firmware binary are distributed through a separate repository on GitHub, and need a different package. They are licensed differently than the firmware itself, and unlike the firmware, they are customizable.
Signed-off-by Vladimir Oltean <[email protected]>---
v1->v2: noneDEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-mc-utils/Config.in | 35 ++++++++++++++++++++++ package/qoriq-mc-utils/qoriq-mc-utils.hash | 3 ++ package/qoriq-mc-utils/qoriq-mc-utils.mk | 22 ++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 package/qoriq-mc-utils/Config.in create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.hash create mode 100644 package/qoriq-mc-utils/qoriq-mc-utils.mkDEVELOPERS +1
-0@@ -3304,6 +3304,7 @@ F: configs/ts5500_defconfig N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ F: package/qoriq-mc-binary/ +F: package/qoriq-mc-utils/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/package/Config.in +1
-0@@ -457,6 +457,7 @@ menu "Firmware" source "package/qoriq-ddr-phy-binary/Config.in" source "package/qoriq-fm-ucode/Config.in" source "package/qoriq-mc-binary/Config.in" + source "package/qoriq-mc-utils/Config.in" source "package/rcw-smarc-sal28/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in"package/qoriq-mc-utils/Config.in new file +5
-0@@ -0,0 +1,35 @@ +config BR2_PACKAGE_QORIQ_MC_UTILS + bool "qoriq-mc-utils" + help + The Management Complex (MC) is a key component of the networking + subsystem named DPAA2 (Data Path Acceleration Architecture, second
package/qoriq-mc-utils/Config.in line 15
Quoted 10 lines
package/qoriq-mc-utils/Config.in new file +10
-0+ version) in some NXP Layerscape SoCs. + + The MC firmware is configured through two distinct files named DPL + and DPC, which are customizable by the end user. Example + configuration files for NXP reference boards are distributed through + this package, and are frequently patched to produce the configuration + required in other scenarios. + + https://github.com/nxp-qoriq/mc-utils + https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in required
$ ./utils/check-package package/qoriq-mc-utils/* package/qoriq-mc-utils/Config.in:4: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in)
package/qoriq-mc-utils/Config.in line 25
Quoted 10 lines
package/qoriq-mc-utils/Config.in new file +10
-0+ +if BR2_PACKAGE_QORIQ_MC_UTILS + +config BR2_PACKAGE_QORIQ_MC_UTILS_DPC + string "Data Path Configuration (DPC) file" + help + The DPC file contains the settings defining the behavior of the MC + firmware. Its source code follows the device tree syntax and is + compiled to a device tree blob, which is the file that must be + specified here.
Same here.
package/qoriq-mc-utils/Config.in line 33
Quoted 8 lines
package/qoriq-mc-utils/Config.in new file +8
-0+ +config BR2_PACKAGE_QORIQ_MC_UTILS_DPL + string "Data Path Layout (DPL) file" + help + The DPL file contains a description of the initial networking objects + created by the MC firmware when it boots. Its source code follows the + device tree syntax and is compiled to a device tree blob, which is + the file that must be specified here.
Same here.
Quoted 26 lines
package/qoriq-mc-utils/Config.in new file +2
-0+ +endifpackage/qoriq-mc-utils/qoriq-mc-utils.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1d3f4a6b2661cff9cfb5d4fcba3b181eb6febdd88a127fa069e306f51d778fc5 qoriq-mc-utils-10.39.0.tar.gz +sha256 7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17 LICENSEpackage/qoriq-mc-utils/qoriq-mc-utils.mk new file +9
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# qoriq-mc-utils +# +################################################################################ + +QORIQ_MC_UTILS_VERSION = 10.39.0 +QORIQ_MC_UTILS_SITE = $(call github,nxp-qoriq,mc-utils,mc_release_$(QORIQ_MC_UTILS_VERSION)) +QORIQ_MC_UTILS_LICENSE = BSD-3-Clause
package/qoriq-mc-utils/qoriq-mc-utils.mk line 19
Quoted 10 lines
package/qoriq-mc-utils/qoriq-mc-utils.mk new file +10
-0+QORIQ_MC_UTILS_INSTALL_IMAGES = YES +QORIQ_MC_UTILS_INSTALL_TARGET = NO + +define QORIQ_MC_UTILS_BUILD_CMDS + $(MAKE) -C $(@D)/config/ +endef + +define QORIQ_MC_UTILS_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC)) $(BINARIES_DIR)/dpc.dtb + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL)) $(BINARIES_DIR)/dpl.dtb
If any of BR2_PACKAGE_QORIQ_MC_UTILS_DPC and BR2_PACKAGE_QORIQ_MC_UTILS_DPL are empty of incorect, the install step will fail.
Can genimage config file used by a specific board can "select" the right binary? Doing so, all binaries built by qoriq-mc-utils can endup in a subdirectory of $(BINARIES_DIR).
Best regards,
Romain
package/qoriq-mc-utils/qoriq-mc-utils.mk line 22
Quoted 3 lines
package/qoriq-mc-utils/qoriq-mc-utils.mk new file +3
-0+endef + +$(eval $(generic-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] package/qoriq-mc-utils: new package
Quoted 6 lines · Romain Naour
package/qoriq-mc-utils/qoriq-mc-utils.mk line 19
Quoted 3 lines
package/qoriq-mc-utils/qoriq-mc-utils.mk new file +3
-0+define QORIQ_MC_UTILS_INSTALL_IMAGES_CMDS + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC)) $(BINARIES_DIR)/dpc.dtb + $(INSTALL) -D $(@D)/config/$(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL)) $(BINARIES_DIR)/dpl.dtbIf any of
BR2_PACKAGE_QORIQ_MC_UTILS_DPCandBR2_PACKAGE_QORIQ_MC_UTILS_DPLare empty of incorect, the install step will fail.
I'm having a hard time trying to understand this.
If the path to these files is wrong, what behavior other than the install step failing would be expected?
Quoted 1 line
Can genimage config file used by a specific board can "select" the right binary?
What do you mean by "select" exactly? Select between multiple fixed options, in a Kconfig sense? (I don't think I could do that) Or just move the file names from the board defconfig to the genimage config template? What would be the difference in terms of "if the file name is wrong, the install step would fail"?
Quoted 2 lines
Doing so, all binaries built by qoriq-mc-utils can endup in a subdirectory of $(BINARIES_DIR).
I could do the latter if it is preferable, but as you mention here, I would have to install all dtb files produced by qoriq-mc-utils to $(BINARIES_DIR). That *.dtb file copy would have to be done explicitly by the package's _INSTALL_IMAGES_CMDS rule, because the upstream project does not provide a "make install" step that I would call. Not to mention, many files would get copied to $(BINARIES_DIR) that would never be used.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/11 package/qoriq-restool: new package
In reply to Vladimir OlteanIntroduce a package for the restool program, which permits the user to modify the network configuration of the DPAA2 subsystem and create one that is adequate to their use case.
---v1->v2: none
DEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-restool/Config.in | 21 +++++++++++++++++++++ package/qoriq-restool/qoriq-restool.hash | 3 +++ package/qoriq-restool/qoriq-restool.mk | 24 ++++++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 package/qoriq-restool/Config.in create mode 100644 package/qoriq-restool/qoriq-restool.hash create mode 100644 package/qoriq-restool/qoriq-restool.mk
DEVELOPERS +1 -0
@@ -3305,6 +3305,7 @@ N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ F: package/qoriq-mc-binary/ F: package/qoriq-mc-utils/ +F: package/qoriq-restool/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/
package/Config.in +1 -0
@@ -599,6 +599,7 @@ endmenu source "package/pru-software-support/Config.in" source "package/pulseview/Config.in" source "package/qoriq-cadence-dp-firmware/Config.in" + source "package/qoriq-restool/Config.in" source "package/raspi-gpio/Config.in" source "package/rdma-core/Config.in" source "package/read-edid/Config.in"
package/qoriq-restool/Config.in new file +21 -0
@@ -0,0 +1,21 @@ +config BR2_PACKAGE_QORIQ_RESTOOL + bool "qoriq-restool" + help + The DPAA2 architecture in Layerscape SoCs consists of + networking resources that can be assembled into various + nuggets of functionality, called "objects" (DPMAC, DPNI, + DPDMUX, DPSW etc), by the Management Complex (MC) firmware. + + The MC firmware reads a file called Data Path Layout (DPL) + which describes the set of networking objects it should + create statically, at boot time. + + The restool program is able to talk to the Management Complex + at runtime and permits the dynamic reconfiguration of + networking objects, as well as saving the current configuration + into a new DPL file. Without the restool program, the only + possible networking configuration is that specified in the + boot-time DPL file. + + https://github.com/nxp-qoriq/restool + https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in required
package/qoriq-restool/qoriq-restool.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 0cfced32caa615266ff633946d40a36660c856d7eb057b81de392570e136c5e5 qoriq-restool-lf-6.6.36-2.1.0.tar.gz +sha256 68f4b15ecc085729419bc60ca6eeadca5af0237bbfec791e8a79da9c943d42e9 LICENSE
package/qoriq-restool/qoriq-restool.mk new file +24 -0
@@ -0,0 +1,24 @@ +############################################################################### +# +# qoriq-restool +# +################################################################################ + +QORIQ_RESTOOL_VERSION = lf-6.6.36-2.1.0 +QORIQ_RESTOOL_SITE = $(call github,nxp-qoriq,restool,$(QORIQ_RESTOOL_VERSION)) +QORIQ_RESTOOL_LICENSE = GPL2.0 +QORIQ_RESTOOL_LICENSE_FILES = COPYING + +QORIQ_RESTOOL_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" + +define QORIQ_RESTOOL_BUILD_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) $(QORIQ_RESTOOL_MAKE_OPTS) +endef + +define QORIQ_RESTOOL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) prefix=/usr install +endef + +$(eval $(generic-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 05/11] package/qoriq-restool: new package
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 56 lines
Introduce a package for the restool program, which permits the user to modify the network configuration of the DPAA2 subsystem and create one that is adequate to their use case.
Signed-off-by Vladimir Oltean <[email protected]>---
v1->v2: noneDEVELOPERS | 1 + package/Config.in | 1 + package/qoriq-restool/Config.in | 21 +++++++++++++++++++++ package/qoriq-restool/qoriq-restool.hash | 3 +++ package/qoriq-restool/qoriq-restool.mk | 24 ++++++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 package/qoriq-restool/Config.in create mode 100644 package/qoriq-restool/qoriq-restool.hash create mode 100644 package/qoriq-restool/qoriq-restool.mkDEVELOPERS +1
-0@@ -3305,6 +3305,7 @@ N: Vladimir Oltean <[email protected]> F: package/qoriq-ddr-phy-binary/ F: package/qoriq-mc-binary/ F: package/qoriq-mc-utils/ +F: package/qoriq-restool/ N: Volkov Viacheslav <[email protected]> F: package/v4l2grab/package/Config.in +1
-0@@ -599,6 +599,7 @@ endmenu source "package/pru-software-support/Config.in" source "package/pulseview/Config.in" source "package/qoriq-cadence-dp-firmware/Config.in" + source "package/qoriq-restool/Config.in" source "package/raspi-gpio/Config.in" source "package/rdma-core/Config.in" source "package/read-edid/Config.in"package/qoriq-restool/Config.in new file +8
-0@@ -0,0 +1,21 @@ +config BR2_PACKAGE_QORIQ_RESTOOL + bool "qoriq-restool" + help + The DPAA2 architecture in Layerscape SoCs consists of + networking resources that can be assembled into various + nuggets of functionality, called "objects" (DPMAC, DPNI, + DPDMUX, DPSW etc), by the Management Complex (MC) firmware. +
package/qoriq-restool/Config.in line 18
Quoted 10 lines
package/qoriq-restool/Config.in new file +10
-0+ The MC firmware reads a file called Data Path Layout (DPL) + which describes the set of networking objects it should + create statically, at boot time. + + The restool program is able to talk to the Management Complex + at runtime and permits the dynamic reconfiguration of + networking objects, as well as saving the current configuration + into a new DPL file. Without the restool program, the only + possible networking configuration is that specified in the + boot-time DPL file.
$ ./utils/check-package package/qoriq-restool/* package/qoriq-restool/Config.in:15: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in) package/qoriq-restool/Config.in:21: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in)
Quoted 18 lines
package/qoriq-restool/Config.in new file +3
-0+ + https://github.com/nxp-qoriq/restool + https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in requiredpackage/qoriq-restool/qoriq-restool.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 0cfced32caa615266ff633946d40a36660c856d7eb057b81de392570e136c5e5 qoriq-restool-lf-6.6.36-2.1.0.tar.gz +sha256 68f4b15ecc085729419bc60ca6eeadca5af0237bbfec791e8a79da9c943d42e9 LICENSEpackage/qoriq-restool/qoriq-restool.mk new file +0
-0
package/qoriq-restool/qoriq-restool.mk line 10
Quoted 10 lines
package/qoriq-restool/qoriq-restool.mk new file +10
-0@@ -0,0 +1,24 @@ +############################################################################### +# +# qoriq-restool +# +################################################################################ + +QORIQ_RESTOOL_VERSION = lf-6.6.36-2.1.0 +QORIQ_RESTOOL_SITE = $(call github,nxp-qoriq,restool,$(QORIQ_RESTOOL_VERSION)) +QORIQ_RESTOOL_LICENSE = GPL2.0 +QORIQ_RESTOOL_LICENSE_FILES = COPYING
The equivalent package from meta-freescale actually advertise a dual license:
"BSD-3-Clause | GPL-2.0-or-later"
Best regards,
Romain
Quoted 4 lines
package/qoriq-restool/qoriq-restool.mk new file +4
-0+ +QORIQ_RESTOOL_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)"
package/qoriq-restool/qoriq-restool.mk line 24
Quoted 10 lines
package/qoriq-restool/qoriq-restool.mk new file +10
-0+ +define QORIQ_RESTOOL_BUILD_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) $(QORIQ_RESTOOL_MAKE_OPTS) +endef + +define QORIQ_RESTOOL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) prefix=/usr install +endef + +$(eval $(generic-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/11 board/lx2160acex7: new platform
In reply to Vladimir OlteanIntroduce the SolidRun LX2160A-CEX7 platform, which uses the NXP LX2160A SoC and much of the infrastructure associated with DPAA2 networking.
This defconfig is not functional yet. Patches on various components have been split out to separate changes, to reduce chances of the mailing list flagging emails due to excessive size.
More details in board/solidrun/lx2160acex7/readme.txt.
---v1->v2:
- split out patches on firmware components to separate changes
- enable more Kconfig options required for this board in board/solidrun/lx2160acex7/linux.config
board/solidrun/lx2160acex7/extlinux.conf | 4 + board/solidrun/lx2160acex7/genimage.cfg | 54 +++++++++ board/solidrun/lx2160acex7/linux.config | 5 + .../arm-trusted-firmware.hash | 2 + .../patches/linux-headers/linux-headers.hash | 1 + .../lx2160acex7/patches/linux/linux.hash | 2 + .../lx2160acex7/patches/uboot/uboot.hash | 2 + board/solidrun/lx2160acex7/post-build.sh | 8 ++ board/solidrun/lx2160acex7/readme.txt | 112 ++++++++++++++++++ .../udev/rules.d/74-dpaa2-networking.rules | 12 ++ .../lx2160acex7/u-boot-environment-sd.txt | 96 +++++++++++++++ configs/solidrun_lx2160acex7_defconfig | 53 +++++++++ 12 files changed, 351 insertions(+) create mode 100644 board/solidrun/lx2160acex7/extlinux.conf create mode 100644 board/solidrun/lx2160acex7/genimage.cfg create mode 100644 board/solidrun/lx2160acex7/linux.config create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/arm-trusted-firmware.hash create mode 120000 board/solidrun/lx2160acex7/patches/linux-headers/linux-headers.hash create mode 100644 board/solidrun/lx2160acex7/patches/linux/linux.hash create mode 100644 board/solidrun/lx2160acex7/patches/uboot/uboot.hash create mode 100755 board/solidrun/lx2160acex7/post-build.sh create mode 100644 board/solidrun/lx2160acex7/readme.txt create mode 100644 board/solidrun/lx2160acex7/rootfs_overlay/etc/udev/rules.d/74-dpaa2-networking.rules create mode 100644 board/solidrun/lx2160acex7/u-boot-environment-sd.txt create mode 100644 configs/solidrun_lx2160acex7_defconfig
board/solidrun/lx2160acex7/extlinux.conf new file +4 -0
@@ -0,0 +1,4 @@ +label Solidrun LX2160A COM Express Type 7 + kernel /boot/Image + devicetree /boot/fsl-lx2160a-clearfog-cx.dtb + append root=PARTUUID=%PARTUUID% rw rootwait cma=256M
board/solidrun/lx2160acex7/genimage.cfg new file +54 -0
54 lines not on this page · raw message
board/solidrun/lx2160acex7/linux.config new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_BLK_DEV_NVME=y +CONFIG_PMBUS=y +CONFIG_SENSORS_AMC6821=y +CONFIG_SENSORS_LTC2978=y +CONFIG_SENSORS_LTC2978_REGULATOR=y
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/arm-trusted-firmware.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 3f7a1239b8a6be011bf85286f37c333110b5404f0711ab85d66f3b1864c9fc65 atf-lf-5.15.71-2.2.0.tar.gz
board/solidrun/lx2160acex7/patches/linux-headers/linux-headers.hash new file +1 -0
@@ -0,0 +1 @@ +../linux/linux.hash
board/solidrun/lx2160acex7/patches/linux/linux.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gz
board/solidrun/lx2160acex7/patches/uboot/uboot.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 3244dd3ae1d1d18ac683e2efc9353d92b496c4b163706b8ea0035344e06554a3 u-boot-lf-5.15.71-2.2.0.tar.gz
board/solidrun/lx2160acex7/post-build.sh new file +8 -0
@@ -0,0 +1,8 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +PARTUUID="$($HOST_DIR/bin/uuidgen)" + +install -d "$TARGET_DIR/boot/extlinux/" +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf" +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
board/solidrun/lx2160acex7/readme.txt new file +112 -0
112 lines not on this page · raw message
board/solidrun/lx2160acex7/rootfs_overlay/etc/udev/rules.d/74-dpaa2-networking.rules new file +12 -0
@@ -0,0 +1,12 @@ +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@1", NAME="endpmac1" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@2", NAME="endpmac2" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@3", NAME="endpmac3" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@4", NAME="endpmac4" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@5", NAME="endpmac5" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@6", NAME="endpmac6" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@7", NAME="endpmac7" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@8", NAME="endpmac8" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@9", NAME="endpmac9" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@a", NAME="endpmac10" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@11", NAME="endpmac17" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@12", NAME="endpmac18"
board/solidrun/lx2160acex7/u-boot-environment-sd.txt new file +96 -0
96 lines not on this page · raw message
configs/solidrun_lx2160acex7_defconfig new file +53 -0
53 lines not on this page · raw message
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 06/11] board/lx2160acex7: new platform
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 161 lines
Introduce the SolidRun LX2160A-CEX7 platform, which uses the NXP LX2160A SoC and much of the infrastructure associated with DPAA2 networking.
This defconfig is not functional yet. Patches on various components have been split out to separate changes, to reduce chances of the mailing list flagging emails due to excessive size.
More details in
board/solidrun/lx2160acex7/readme.txt.Signed-off-by Vladimir Oltean <[email protected]>---
v1->v2:
- split out patches on firmware components to separate changes
- enable moreKconfigoptions required for this board inboard/solidrun/lx2160acex7/linux.configboard/solidrun/lx2160acex7/extlinux.conf | 4 + board/solidrun/lx2160acex7/genimage.cfg | 54 +++++++++ board/solidrun/lx2160acex7/linux.config | 5 + .../arm-trusted-firmware.hash | 2 + .../patches/linux-headers/linux-headers.hash | 1 + .../lx2160acex7/patches/linux/linux.hash | 2 + .../lx2160acex7/patches/uboot/uboot.hash | 2 + board/solidrun/lx2160acex7/post-build.sh | 8 ++ board/solidrun/lx2160acex7/readme.txt | 112 ++++++++++++++++++ .../udev/rules.d/74-dpaa2-networking.rules | 12 ++ .../lx2160acex7/u-boot-environment-sd.txt | 96 +++++++++++++++ configs/solidrun_lx2160acex7_defconfig | 53 +++++++++ 12 files changed, 351 insertions(+) create mode 100644 board/solidrun/lx2160acex7/extlinux.conf create mode 100644 board/solidrun/lx2160acex7/genimage.cfg create mode 100644 board/solidrun/lx2160acex7/linux.config create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/arm-trusted-firmware.hash create mode 120000 board/solidrun/lx2160acex7/patches/linux-headers/linux-headers.hash create mode 100644 board/solidrun/lx2160acex7/patches/linux/linux.hash create mode 100644 board/solidrun/lx2160acex7/patches/uboot/uboot.hash create mode 100755 board/solidrun/lx2160acex7/post-build.sh create mode 100644 board/solidrun/lx2160acex7/readme.txt create mode 100644 board/solidrun/lx2160acex7/rootfs_overlay/etc/udev/rules.d/74-dpaa2-networking.rules create mode 100644 board/solidrun/lx2160acex7/u-boot-environment-sd.txt create mode 100644 configs/solidrun_lx2160acex7_defconfigboard/solidrun/lx2160acex7/extlinux.conf new file +4
-0@@ -0,0 +1,4 @@ +label Solidrun LX2160A COM Express Type 7 + kernel /boot/Image + devicetree /boot/fsl-lx2160a-clearfog-cx.dtb + append root=PARTUUID=%PARTUUID% rw rootwait cma=256Mboard/solidrun/lx2160acex7/genimage.cfg new file +54
-0@@ -0,0 +1,54 @@ +image sdcard.img { + hdimage { + partition-table-type = "gpt" + gpt-location = 6M + } + + partition rcw { + offset = 4K + in-partition-table = "no" + image = "bl2_sd.pbl" + } + + partition u-boot { + offset = 1M + in-partition-table = "no" + image = "fip.bin" + } + + partition u-boot-environment { + in-partition-table = "no" + image = "uboot-env.bin" + offset = 5M + } + + partition ddr-phy { + in-partition-table = "no" + image = "fip_ddr.bin" + offset = 8M + } + + partition dpaa2-mc { + in-partition-table = "no" + image = "mc.itb" + offset = 10M + } + + partition dpaa2-dpl { + in-partition-table = "no" + image = "dpl.dtb" + offset = 13M + } + + partition dpaa2-dpc { + in-partition-table = "no" + image = "dpc.dtb" + offset = 14M + } + + partition rootfs { + bootable = "true" + image = "rootfs.ext4" + partition-uuid = %PARTUUID% + } +}board/solidrun/lx2160acex7/linux.config new file +5
-0@@ -0,0 +1,5 @@ +CONFIG_BLK_DEV_NVME=y +CONFIG_PMBUS=y +CONFIG_SENSORS_AMC6821=y +CONFIG_SENSORS_LTC2978=y +CONFIG_SENSORS_LTC2978_REGULATOR=yboard/solidrun/lx2160acex7/patches/arm-trusted-firmware/arm-trusted-firmware.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 3f7a1239b8a6be011bf85286f37c333110b5404f0711ab85d66f3b1864c9fc65 atf-lf-5.15.71-2.2.0.tar.gzboard/solidrun/lx2160acex7/patches/linux-headers/linux-headers.hash new file +1
-0@@ -0,0 +1 @@ +../linux/linux.hashboard/solidrun/lx2160acex7/patches/linux/linux.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 26e0db3dda786d939269f85df0f605e28cb55646ab8c541fc9bbbb4ab7fd9bf3 linux-lf-6.6.36-2.1.0.tar.gzboard/solidrun/lx2160acex7/patches/uboot/uboot.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 3244dd3ae1d1d18ac683e2efc9353d92b496c4b163706b8ea0035344e06554a3 u-boot-lf-5.15.71-2.2.0.tar.gzboard/solidrun/lx2160acex7/post-build.sh new file +0
-0
board/solidrun/lx2160acex7/post-build.sh line 3
Quoted 3 lines
board/solidrun/lx2160acex7/post-build.sh new file +3
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)"
The check-package use shellcheck:
SC2086: Double quote to prevent globbing and word splitting.
board/solidrun/lx2160acex7/post-build.sh line 4
Quoted 1 line
board/solidrun/lx2160acex7/post-build.sh new file +1
-0+PARTUUID="$($HOST_DIR/bin/uuidgen)"
Same here.
board/solidrun/lx2160acex7/u-boot-environment-sd.txt
Quoted 145 lines
board/solidrun/lx2160acex7/post-build.sh new file +4
-0+ +install -d "$TARGET_DIR/boot/extlinux/" +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf" +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"board/solidrun/lx2160acex7/readme.txt new file +112
-0@@ -0,0 +1,112 @@ +********************* +SolidRun LX2160A-CEx7 +********************* + +This file documents the Buildroot support for the NXP Layerscape CEx7 LX2160A +board made by SolidRun. The CEx7 (COM Express type 7) is a Computer On Module +which can be plugged into different carrier boards. It is sold either +separately, or with the HoneyComb LX2 or Clearfog CX LX2 carrier boards, both +having Mini ITX form factors. + +Both the HoneyComb LX2 and Clearfog CX LX2 carrier boards are targeted towards +networking use cases, with 4 10G-capable SFP+ cages, and the Clearfog +additionally having a 4x25G-capable QSFP28 cage. In addition, the carrier +boards have 4x SATA III interfaces, PCIe Gen 3 x8, 2x USB 3.0, an m.2 slot +compatible with NVMe SSDs, pin headers for traditional PC/NAS cases, and +regular RJ45 1G Ethernet. + +The developer resources for the platform can be found at: + - https://solidrun.atlassian.net/wiki/spaces/developer/pages/197493977/NXP+LX2160A+Based+Products + +SolidRun keeps build scripts for the firmware on GitHub, which track NXP Linux +Factory (LF) releases in the form of patches: + - https://github.com/SolidRun/lx2160a_build + +The most recent functional branch is develop-ls-5.15.71-2.2.0. These patches +are also included into Buildroot, except for the Linux kernel, where the most +recent lf-6.6.36-2.1.0 NXP tag is used directly. + +The Buildroot support is for the maximal configuration, which is the CEX7 +platform on the Clearfog CX LX2 carrier board. + +Build +===== + +First, configure Buildroot for the LX2160A-CEX7 platform: + + make solidrun_lx2160acex7_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl2_sd.pbl - RCW + ATF BL2 stage + - dpc.dtb + - dpl.dtb + - fip.bin - U-Boot packaged as ATF payload + - fip_ddr.bin - DDR PHY firmware + - fsl-lx2160a-clearfog-cx.dtb + - fsl-lx2160a-honeycomb.dtb + - Image + - mc.itb - MC firmware + - PBL.bin + - rootfs.ext2 + - rootfs.ext4 + - sdcard.img + - u-boot.bin + - uboot-env.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/sdX + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/solidrun/lx2160acex7/genimage.cfg. + +Boot the LX2160A-CEX7 board +=========================== + +To boot your newly created system: +- configure the DIP switches for SD boot selection as per SolidRun instructions: + https://solidrun.atlassian.net/wiki/spaces/developer/pages/197494288/HoneyComb+LX2+ClearFog+CX+LX2+Quick+Start+Guide#Boot-Select +- insert the Micro-SD card in the Micro-SD slot of the board +- put a Micro-USB cable into the Micro-USB connector labeled CONSOLE (CON9) + and connect using a terminal emulator at 115200 bps, 8n1. +- power on the board. + +The DPL file only contains a static description for the 1G RGMII RJ45 port +(endpmac17). By default, this will attempt acquire an IP address over DHCP. + +The 4 interfaces routed to the SFP+ cages are endpmac7, endpmac8, endpmac9 and +endpmac10. Among the more usual networking choices, one could create individual +DPNIs for each MAC: + +$ ls-addni dpmac.7 && ls-addni dpmac.8 && ls-addni dpmac.9 && ls-addni dpmac.10 + +or a DPSW object to accelerate L2 forwarding between them: + +$ ls-addsw --num-ifs=4 --max-fdbs=4 --flooding-cfg=DPSW_FLOODING_PER_FDB \ + --broadcast-cfg=DPSW_BROADCAST_PER_FDB dpmac.7 dpmac.8 dpmac.9 dpmac.10 +$ ip link add br0 type bridge vlan_filtering 1 && ip link set br0 up +$ for eth in endpmac7 endpmac8 endpmac9 endpmac10; do \ + ip link set $eth master br0 && ip link set $eth up; done + +Once the runtime configuration is satisfactory, it can be converted back into a +permanent DPL file which can be plugged back into the build system: + +$ restool dprc generate-dpl > dpl-new.dts + +Networking options through the QSFP28 cage have not yet been investigated.board/solidrun/lx2160acex7/rootfs_overlay/etc/udev/rules.d/74-dpaa2-networking.rules new file +12
-0@@ -0,0 +1,12 @@ +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@1", NAME="endpmac1" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@2", NAME="endpmac2" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@3", NAME="endpmac3" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@4", NAME="endpmac4" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@5", NAME="endpmac5" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@6", NAME="endpmac6" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@7", NAME="endpmac7" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@8", NAME="endpmac8" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@9", NAME="endpmac9" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@a", NAME="endpmac10" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@11", NAME="endpmac17" +SUBSYSTEM=="net", ACTION=="add|change|online|offline|change", DRIVERS=="fsl_dpaa2_eth|fsl_dpaa2_switch", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@12", NAME="endpmac18"board/solidrun/lx2160acex7/u-boot-environment-sd.txt new file +0
-0
uboot-env.txt file name seems prefered here.
Quoted 87 lines
board/solidrun/lx2160acex7/u-boot-environment-sd.txt new file +86
-0@@ -0,0 +1,96 @@ +BOARD=lx2160acex7 +arch=arm +baudrate=115200 +board=lx2160a +board_name=lx2160a +boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; env exists secureboot && load ${devtype} ${devnum}:${distro_bootpart} ${scripthdraddr} ${prefix}${boot_script_hdr} && esbc_validate ${scripthdraddr};source ${scriptaddr} +boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi +boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi +boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf} +boot_net_usb_start=usb start +boot_pci_enum=pci enum +boot_prefixes=/ /boot/ +boot_script_dhcp=boot.scr.uimg +boot_scripts=boot.scr.uimg boot.scr +boot_syslinux_conf=extlinux/extlinux.conf +boot_targets=usb0 mmc0 mmc1 scsi0 nvme0 dhcp +bootargs=console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf cma=256M iommu.passthrough=1 arm-smmu.disable_bypass=0 +bootcmd=run distro_bootcmd +bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci; +bootcmd_mmc0=devnum=0; run mmc_boot +bootcmd_mmc1=devnum=1; run mmc_boot +bootcmd_nvme0=devnum=0; run nvme_boot +bootcmd_scsi0=devnum=0; run scsi_boot +bootcmd_usb0=devnum=0; run usb_boot +bootdelay=3 +console=ttyAMA0,115200 +cpu=armv8 +distro_bootcmd=scsi_need_init=; setenv nvme_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done +efi_dtb_prefixes=/ /dtb/ /dtb/current/ +emmc_bootcmd=echo Trying load from emmc card..;mmc dev 1; mmcinfo; mmc read $load_addr $kernel_addr_sd $kernel_size_sd ;env exists secureboot && mmc read $kernelheader_addr_r $kernelhdr_addr_sd $kernelhdr_size_sd && esbc_validate ${kernelheader_addr_r};bootm $load_addr#$BOARD +eth10addr=00:11:22:44:11:4E +eth11addr=00:11:22:44:11:4F +eth12addr=00:11:22:44:11:50 +eth13addr=00:11:22:44:11:51 +eth14addr=00:11:22:44:11:52 +eth15addr=00:11:22:44:11:53 +eth1addr=00:11:22:44:11:45 +eth2addr=00:11:22:44:11:46 +eth3addr=00:11:22:44:11:47 +eth4addr=00:11:22:44:11:48 +eth5addr=00:11:22:44:11:49 +eth6addr=00:11:22:44:11:4A +eth7addr=00:11:22:44:11:4B +eth8addr=00:11:22:44:11:4C +eth9addr=00:11:22:44:11:4D +ethaddr=00:11:22:44:11:44 +ethprime=DPMAC17@rgmii-id +fdt_addr=0x81000000 +fdt_addr_r=0x81000000 +fdt_high=0xa0000000 +fdtfile=fsl-lx2160a-cex7.dtb +fdtheader_addr_r=0x80100000 +hwconfig=fsl_ddr:bank_intlv=auto +initrd_high=0xffffffffffffffff +kernel_addr_r=0x81100000 +kernel_addr_sd=0x8000 +kernel_comp_addr_r=0x9f000000 +kernel_comp_size=0x10000000 +kernel_size=0x2800000 +kernel_size_sd=0x14000 +kernel_start=0x1000000 +kernelhdr_addr_sd=0x3000 +kernelhdr_size_sd=0x20 +kernelheader_addr_r=0x80200000 +kernelheader_size=0x40000 +kernelheader_start=0x600000 +load_addr=0xa0000000 +load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile} +lx2160acex7_vdd_mv=800 +dpl_addr_r=0x80d00000 +mc_fw_addr_r=0x80a00000 +dpc_addr_r=0x80e00000 +mcinitcmd=mmcinfo && mmc read $mc_fw_addr_r 0x5000 0x1200 && mmc read $dpc_addr_r 0x7000 0x800 && mmc read $dpl_addr_r 0x6800 0x800 && fsl_mc start mc $mc_fw_addr_r $dpc_addr_r && fsl_mc lazyapply dpl $dpl_addr_r +mcmemsize=0x70000000 +fsl_bootcmd_mcinitcmd_set=y +mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi +nvme_boot=run boot_pci_enum; run nvme_init; if nvme dev ${devnum}; then devtype=nvme; run scan_dev_for_boot_part; fi +nvme_init=if ${nvme_need_init}; then setenv nvme_need_init false; nvme scan; fi +nvme_need_init=true +ramdisk_addr=0x85100000 +ramdisk_addr_r=0x85100000 +ramdisk_size=0x2000000 +scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; +scan_dev_for_boot_part=part list ${devtype} ${devnum} devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done +scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile +scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
board/solidrun/lx2160acex7/u-boot-environment-sd.txt line 96
Quoted 10 lines
board/solidrun/lx2160acex7/u-boot-environment-sd.txt new file +10
-0+scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done +scriptaddr=0x80000000 +scripthdraddr=0x80080000 +scsi_boot=run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi +scsi_init=if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi +sd_bootcmd=echo Trying load from sd card..;mmcinfo; mmc read $load_addr $kernel_addr_sd $kernel_size_sd ;env exists secureboot && mmc read $kernelheader_addr_r $kernelhdr_addr_sd $kernelhdr_size_sd && esbc_validate ${kernelheader_addr_r};bootm $load_addr#$BOARD +soc=fsl-layerscape +usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi +vendor=solidrun +xspi_bootcmd=echo Trying load from flexspi..;sf probe 0:0 && sf read $load_addr $kernel_start $kernel_size ; env exists secureboot &&sf read $kernelheader_addr_r $kernelheader_start $kernelheader_size && esbc_validate ${kernelheader_addr_r}; bootm $load_addr#$BOARD
it's a pity that u-boot doesn't provide a working variable set by default...
Quoted 23 lines
configs/solidrun_lx2160acex7_defconfig new file +17
-0@@ -0,0 +1,53 @@ +BR2_aarch64=y +BR2_cortex_a72=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y +BR2_GLOBAL_PATCH_DIR="board/solidrun/lx2160acex7/patches" +BR2_DOWNLOAD_FORCE_CHECK_HASHES=y +BR2_TARGET_GENERIC_HOSTNAME="lx2160acex7" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" +BR2_ROOTFS_OVERLAY="board/solidrun/lx2160acex7/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/lx2160acex7/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,linux,lf-6.6.36-2.1.0)/linux-lf-6.6.36-2.1.0.tar.gz" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config board/solidrun/lx2160acex7/linux.config"
configs/solidrun_lx2160acex7_defconfig line 27
Quoted 10 lines
configs/solidrun_lx2160acex7_defconfig new file +10
-0+BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-lx2160a-clearfog-cx freescale/fsl-lx2160a-honeycomb" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="130M" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,atf,lf-5.15.71-2.2.0)/atf-lf-5.15.71-2.2.0.tar.gz"
The ATF custom version seems out of sync, is it intentional ? (lf-6.6 vs lf-5.15) ?
Ok it's intentinal (from the readme):
"The most recent functional branch is develop-ls-5.15.71-2.2.0. These patches are also included into Buildroot, except for the Linux kernel, where the most recent lf-6.6.36-2.1.0 NXP tag is used directly."
Best regards,
Romain
Quoted 16 lines
configs/solidrun_lx2160acex7_defconfig new file +16
-0+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="lx2160acex7" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_MODE=sd" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-qoriq,u-boot,lf-5.15.71-2.2.0)/u-boot-lf-5.15.71-2.2.0.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="lx2160acex7_tfa" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_QORIQ_RCW=y +BR2_PACKAGE_HOST_QORIQ_RCW_INTREE="lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2_sdhc.rcw" +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
configs/solidrun_lx2160acex7_defconfig line 53
Quoted 10 lines
configs/solidrun_lx2160acex7_defconfig new file +10
-0+BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE="board/solidrun/lx2160acex7/u-boot-environment-sd.txt" +BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE="0x2000" +BR2_PACKAGE_QORIQ_DDR_PHY_BINARY=y +BR2_PACKAGE_QORIQ_MC_BINARY=y +BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A=y +BR2_PACKAGE_QORIQ_MC_UTILS=y +BR2_PACKAGE_QORIQ_MC_UTILS_DPL="lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpl.dtb" +BR2_PACKAGE_QORIQ_MC_UTILS_DPC="lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpc.dtb" +BR2_PACKAGE_QORIQ_RESTOOL=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 7/11 board/lx2160acex7: add Arm Trusted Firmware patches
In reply to Vladimir OlteanThese come straight from https://github.com/SolidRun/lx2160a_build/,
commit 497e9ebf0e2a ("atf: update sdram configuration for internal cex6 evb revision 1.2"), and are unmodified.
I've also symlinked the extra patch at board/freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch to avoid this warning treated as error:
$(HOSTDIR)/bin/aarch64-buildroot-linux-gnu-ld: warning:
$(BUILDDIR)/arm-trusted-firmware-custom/build/lx2160acex7/release/bl2/bl2.elf
has a LOAD segment with RWX permissions
make[2]: *** [Makefile:1240: $(BUILDDIR)/arm-trusted-firmware-custom/build/lx2160acex7/release/bl2/bl2.elf] Error 1 make[2]: *** Waiting for unfinished jobs....
Since commit 7cbc240ac2c3 ("configs/ls1028ardb: update to Linux 6.6"), Layerscape platforms no longer use board/freescale/common/patches, and neither do we, here. But we use an older arm-trusted-firmware tag of lf-5.15.71-2.2.0, so we need to selectively include that one patch.
---v1->v2:
- split out from previous [PATCH 6/7] board/lx2160acex7: new platform
- update to latest lx2160a_build HEAD
.../0001-plat-nxp-lx2160a-auto-boot.patch | 219 +++++++ ...ccount-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch | 85 +++ ...sert-SUS_S5-GPIO-to-poweroff-the-COM.patch | 29 + ...assert-IRQ0-GPIO-to-poweroff-the-EVB.patch | 29 + ...ptional-S5-gpio-from-Makefile-consta.patch | 63 ++ ...te-platform-for-solidrun-cex7-module.patch | 418 ++++++++++++ ...flexible-value-for-CONFIG_DDR_NODIMM.patch | 33 + ...tform-for-solidrun-internal-cex6-eva.patch | 544 ++++++++++++++++ ...ort-flushing-i2c-bus-before-ddr-init.patch | 365 +++++++++++ ...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 + ...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 + ...-building-without-NXP_NV_SW_MAINT_LA.patch | 49 ++ ...-boot-without-spi-flash-disable-non-.patch | 33 + ...te-platform-for-solidrun-lx2162a-som.patch | 597 ++++++++++++++++++ ...ddr-configuration-for-pcb-v1.2-with-.patch | 127 ++++ ...g-output-for-dimm-parameters-parsed-.patch | 83 +++ ...dq-mapping-and-remove-invalid-spd-ee.patch | 36 ++ ...dd-support-for-new-binutils-versions.patch | 1 + 18 files changed, 2771 insertions(+) create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0001-plat-nxp-lx2160a-auto-boot.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0002-dcfg-Take-into-account-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0003-lx2160acex7-assert-SUS_S5-GPIO-to-poweroff-the-COM.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0004-lx2160acex6-assert-IRQ0-GPIO-to-poweroff-the-EVB.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0005-lx2160a-assert-optional-S5-gpio-from-Makefile-consta.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0006-add-separate-platform-for-solidrun-cex7-module.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0007-lx2160a-support-flexible-value-for-CONFIG_DDR_NODIMM.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0008-add-separate-platform-for-solidrun-internal-cex6-eva.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0009-lx2160a-support-flushing-i2c-bus-before-ddr-init.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0010-lx2160acex6-flush-i2c-bus-with-spd-eeprom-before-ddr.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0011-lx2160acex7-flush-i2c-bus-with-spd-eeprom-before-ddr.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0012-plat-lx2160a-fix-building-without-NXP_NV_SW_MAINT_LA.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0013-plat-lx2160a-fix-boot-without-spi-flash-disable-non-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0014-add-separate-platform-for-solidrun-lx2162a-som.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0015-lx2160acex6-add-ddr-configuration-for-pcb-v1.2-with-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0016-nxp-ddr-add-debug-output-for-dimm-parameters-parsed-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0017-lx2160acex6-fix-dq-mapping-and-remove-invalid-spd-ee.patch create mode 120000 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0001-plat-nxp-lx2160a-auto-boot.patch new file +219 -0
@@ -0,0 +1,219 @@ +From 5d13f425bd0dea29912bf253a7be83a7cdca591d Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury <[email protected]> +Date: Sun, 28 Nov 2021 14:00:07 +0200 +Subject: [PATCH] plat/nxp: lx2160a auto boot + +This patch adds support to patch RCW that already has SD/eMMC/SPI boot +support embedded with conditional load and jump. +The idea is to look for SD/eMMC/SPI boot, and modify src/dst/size +address with the correct values; rather than adding blockread at the end +of RCW code. + +With this patch images are unified and can be used to boot from SD / +eMMC and SPI. + +Signed-off-by: Rabeeh Khoury <[email protected]> +--- + .../plat_make_helper/plat_common_def.mk | 5 ++ + plat/nxp/soc-lx2160a/lx2160ardb/platform.mk | 3 +- + plat/nxp/soc-lx2160a/soc.mk | 5 ++ + tools/nxp/create_pbl/create_pbl.c | 74 ++++++++++++++++--- + 4 files changed, 76 insertions(+), 11 deletions(-) + +diff --git a/plat/nxp/common/plat_make_helper/plat_common_def.mk b/plat/nxp/common/plat_make_helper/plat_common_def.mk +index 86dacf83d..a1038a073 100644 +--- a/plat/nxp/common/plat_make_helper/plat_common_def.mk ++++ b/plat/nxp/common/plat_make_helper/plat_common_def.mk +@@ -91,6 +91,11 @@ define add_boot_mode_define + else ifeq ($(1),flexspi_nor) + $$(eval $$(call SET_NXP_MAKE_FLAG,XSPI_NEEDED,BL2)) + $$(eval $$(call add_define,FLEXSPI_NOR_BOOT)) ++ else ifeq ($(1),auto) ++ $$(eval $$(call SET_FLAG,SD_MMC_NEEDED,BL2)) ++ $$(eval $$(call add_define,EMMC_BOOT)) ++ $$(eval $$(call SET_FLAG,XSPI_NEEDED,BL2)) ++ $$(eval $$(call add_define,FLEXSPI_NOR_BOOT)) + else + $$(error $(PLAT) Cannot Support Boot Mode: $(BOOT_MODE)) + endif +diff --git a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk b/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk +index ffb5fadee..09c552c72 100644 +--- a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk +@@ -42,7 +42,8 @@ BL2_SOURCES += ${BOARD_PATH}/ddr_init.c\ + + SUPPORTED_BOOT_MODE := flexspi_nor \ + sd \ +- emmc ++ emmc \ ++ auto + + # Adding platform board build info + include plat/nxp/common/plat_make_helper/plat_common_def.mk +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index 239442c20..a72b4113d 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -82,6 +82,11 @@ else + ifeq (${BOOT_MODE}, emmc) + $(eval $(call SET_NXP_MAKE_FLAG,SD_MMC_NEEDED,BL2)) + $(eval $(call add_define,EMMC_BOOT)) ++else ifeq (${BOOT_MODE}, auto) ++$(eval $(call SET_NXP_MAKE_FLAG,SD_MMC_NEEDED,BL2)) ++$(eval $(call add_define,EMMC_BOOT)) ++$(eval $(call SET_NXP_MAKE_FLAG,XSPI_NEEDED,BL2)) ++$(eval $(call add_define,FLEXSPI_NOR_BOOT)) + else + $(error Un-supported Boot Mode = ${BOOT_MODE}) + endif +diff --git a/tools/nxp/create_pbl/create_pbl.c b/tools/nxp/create_pbl/create_pbl.c +index 792747f0e..35cd39b61 100644 +--- a/tools/nxp/create_pbl/create_pbl.c ++++ b/tools/nxp/create_pbl/create_pbl.c +@@ -66,6 +66,7 @@ typedef enum { + FLXSPI_NOR_BOOT, + FLXSPI_NAND_BOOT, + FLXSPI_NAND4K_BOOT, ++ AUTO_BOOT, + MAX_BOOT /* must be last item in list */ + } boot_src_t; + +@@ -140,6 +141,7 @@ char *boot_src_string[] = { + "FLXSPI_NOR_BOOT", + "FLXSPI_NAND_BOOT", + "FLXSPI_NAND4K_BOOT", ++ "AUTO_BOOT", + }; + + enum stop_command { +@@ -193,7 +195,7 @@ struct pbl_image { + #define SOC_LS2088 2088 + #define SOC_LX2160 2160 + +-static uint32_t pbl_size; ++static uint32_t pbl_size = 0; + bool sb_flag; + + /*************************************************************************** +@@ -703,6 +705,8 @@ int main(int argc, char **argv) + int ret = FAILURE; + bool bootptr_flag = false; + enum stop_command flag_stop_cmd = CRC_STOP_COMMAND; ++ int skip = 0; ++ uint32_t saved_src; + + /* Initializing the global structure to zero. */ + memset(&pblimg, 0x0, sizeof(struct pbl_image)); +@@ -802,6 +806,8 @@ int main(int argc, char **argv) + pblimg.boot_src = FLXSPI_NAND_BOOT; + } else if (strcmp(optarg, "flexspi_nand2k") == 0) { + pblimg.boot_src = FLXSPI_NAND4K_BOOT; ++ } else if (strcmp(optarg, "auto") == 0) { ++ pblimg.boot_src = AUTO_BOOT; + } else { + printf("CMD Error: Invalid boot source.\n"); + goto exit_main; +@@ -909,13 +915,14 @@ int main(int argc, char **argv) + printf("%s: Error reading PBI Cmd.\n", __func__); + goto exit_main; + } ++ saved_src = pblimg.src_addr; + while (word != 0x808f0000 && word != 0x80ff0000) { + pbl_size++; + /* 11th words in RCW has PBL length. Update it + * with new length. 2 comamnds get added + * Block copy + CCSR Write/CSF header write + */ +- if (pbl_size == 11) { ++ if ((pbl_size == 11) && (pblimg.boot_src != AUTO_BOOT)) { + word_1 = (word & PBI_LEN_MASK) + + (PBI_LEN_ADD << 20); + word = word & ~PBI_LEN_MASK; +@@ -933,8 +940,50 @@ int main(int argc, char **argv) + goto exit_main; + } + } +- if (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, +- fp_rcw_pbi_op) != NUM_MEM_BLOCK) { ++ if (pblimg.boot_src == AUTO_BOOT) { ++ if (word == 0x80000008) { ++ printf ("Found SD boot at %d\n",pbl_size); ++ pblimg.boot_src = SD_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ if (word == 0x80000009) { ++ printf ("Found eMMC boot at %d\n",pbl_size); ++ pblimg.boot_src = EMMC_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ if (word == 0x8000000f) { ++ printf ("Found SPI boot at %d\n",pbl_size); ++ pblimg.boot_src = FLXSPI_NOR_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ } ++ if (!skip && ++ (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, ++ fp_rcw_pbi_op) != NUM_MEM_BLOCK)) { + printf("%s: [CH3] Error in Writing PBI Words\n", + __func__); + goto exit_main; +@@ -951,8 +1000,11 @@ int main(int argc, char **argv) + } else if (word == STOP_CMD_ARM_CH3) { + flag_stop_cmd = STOP_COMMAND; + } ++ ++ if (skip) ++ skip--; + } +- if (bootptr_flag == true) { ++ if ((pblimg.boot_src != AUTO_BOOT) && (bootptr_flag == true)) { + /* Add command to set boot_loc ptr */ + ret = add_boot_ptr_cmd(fp_rcw_pbi_op); + if (ret != SUCCESS) { +@@ -963,11 +1015,13 @@ int main(int argc, char **argv) + } + + /* Write acs write commands to output file */ +- ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); +- if (ret != SUCCESS) { +- printf("%s: Function add_blk_cpy_cmd return failure.\n", +- __func__); +- goto exit_main; ++ if (pblimg.boot_src != AUTO_BOOT) { ++ ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ if (ret != SUCCESS) { ++ printf("%s: Function add_blk_cpy_cmd return failure.\n", ++ __func__); ++ goto exit_main; ++ } + } + + /* Add stop command after adding pbi commands */ +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0002-dcfg-Take-into-account-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch new file +85 -0
85 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0003-lx2160acex7-assert-SUS_S5-GPIO-to-poweroff-the-COM.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 72557b712198e3292776fbe8697322c68583acf4 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury <[email protected]> +Date: Sun, 28 Nov 2021 13:33:10 +0200 +Subject: [PATCH] lx2160acex7: assert SUS_S5# GPIO to poweroff the COM + +Signed-off-by: Rabeeh Khoury <[email protected]> +--- + plat/nxp/soc-lx2160a/aarch64/lx2160a.S | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +index cc679f2ba..01b3c7ecd 100644 +--- a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S ++++ b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +@@ -563,6 +563,11 @@ endfunc _soc_sys_reset + */ + func _soc_sys_off + ++ /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5) */ ++ mov x3, #NXP_GPIO3_ADDR ++ mov w1, #0x01000000 ++ str w1, [x3] ++ + /* disable sec, QBman, spi and qspi */ + ldr x2, =NXP_DCFG_ADDR + ldr x0, =DCFG_DEVDISR1_OFFSET +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0004-lx2160acex6-assert-IRQ0-GPIO-to-poweroff-the-EVB.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 6bc7cf0b6de6427b230d47ae7ee273175ffe95dd Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Mon, 14 Oct 2024 11:55:03 +0200 +Subject: [PATCH] lx2160acex6: assert IRQ0 GPIO to poweroff the EVB + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/aarch64/lx2160a.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +index 01b3c7ecd..8035b145e 100644 +--- a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S ++++ b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +@@ -563,9 +563,9 @@ endfunc _soc_sys_reset + */ + func _soc_sys_off + +- /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5) */ ++ /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5), GPIO3[0] (IRQ00 - CEX-6 EVB IRQ0) */ + mov x3, #NXP_GPIO3_ADDR +- mov w1, #0x01000000 ++ mov w1, #0x81000000 + str w1, [x3] + + /* disable sec, QBman, spi and qspi */ +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0005-lx2160a-assert-optional-S5-gpio-from-Makefile-consta.patch new file +63 -0
63 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0006-add-separate-platform-for-solidrun-cex7-module.patch new file +418 -0
418 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0007-lx2160a-support-flexible-value-for-CONFIG_DDR_NODIMM.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 92d0a6fab056eb43fa5561fb1888c8c393ebee29 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 18 Oct 2024 21:17:12 +0200 +Subject: [PATCH 7/8] lx2160a: support flexible value for CONFIG_DDR_NODIMM + +Add support for values other than 0 and 1 for CONFIG_DDR_NODIMM. +This macro can be used for both enabling, and selecting a specific +memory configuration at compile-time. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/common/plat_make_helper/plat_common_def.mk | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/common/plat_make_helper/plat_common_def.mk b/plat/nxp/common/plat_make_helper/plat_common_def.mk +index a1038a073..ed6e0bdac 100644 +--- a/plat/nxp/common/plat_make_helper/plat_common_def.mk ++++ b/plat/nxp/common/plat_make_helper/plat_common_def.mk +@@ -39,8 +39,9 @@ ifneq (${NUM_OF_DDRC},) + $(eval $(call add_define_val,NUM_OF_DDRC,${NUM_OF_DDRC})) + endif + +-ifeq (${CONFIG_DDR_NODIMM},1) +-$(eval $(call add_define,CONFIG_DDR_NODIMM)) ++CONFIG_DDR_NODIMM ?= 0 ++ifneq (${CONFIG_DDR_NODIMM},0) ++$(eval $(call add_define_val,CONFIG_DDR_NODIMM,${CONFIG_DDR_NODIMM})) + DDRC_NUM_DIMM := 1 + endif + +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0008-add-separate-platform-for-solidrun-internal-cex6-eva.patch new file +544 -0
544 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0009-lx2160a-support-flushing-i2c-bus-before-ddr-init.patch new file +365 -0
365 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0010-lx2160acex6-flush-i2c-bus-with-spd-eeprom-before-ddr.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 668924da1e8df2036dc05022616eb7d15a8c8727 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 25 Oct 2024 16:43:59 +0200 +Subject: [PATCH 10/11] lx2160acex6: flush i2c bus with spd eeprom before ddr + init + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/platform.mk | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +index 1165cfa09..950207878 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +@@ -29,6 +29,11 @@ CONFIG_DDR_NODIMM := 0 + LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR + LX2160A_S5_GPIO := 0 + ++# I2C Bus Flushing: IIC1 ++LX2160_FLUSH_IIC := 1, ++# I2C Mux Flushing: IIC1: PCA9547@77: Channel 0 (SPD EEPROM) ++LX2160_FLUSH_IIC_MUX := { 1, 0x77, 0x01 }, ++ + # DDR Errata + ERRATA_DDR_A011396 := 1 + ERRATA_DDR_A050450 := 1 +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0011-lx2160acex7-flush-i2c-bus-with-spd-eeprom-before-ddr.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 722e93b7d159dfb9435e642cb0b38c2255a10391 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 25 Oct 2024 18:11:56 +0200 +Subject: [PATCH 11/11] lx2160acex7: flush i2c bus with spd eeprom before ddr + init + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex7/platform.mk | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +index 37598c2d7..0b064bbbf 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +@@ -24,6 +24,11 @@ APPLY_MAX_CDD := yes + LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR + LX2160A_S5_GPIO := 7 + ++# I2C Bus Flushing: IIC1 ++LX2160_FLUSH_IIC := 1, ++# I2C Mux Flushing: IIC1: PCA9547@77: Channel 0 (SPD EEPROM) ++LX2160_FLUSH_IIC_MUX := { 1, 0x77, 0x01 }, ++ + # DDR Errata + ERRATA_DDR_A011396 := 1 + ERRATA_DDR_A050450 := 1 +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0012-plat-lx2160a-fix-building-without-NXP_NV_SW_MAINT_LA.patch new file +49 -0
49 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0013-plat-lx2160a-fix-boot-without-spi-flash-disable-non-.patch new file +33 -0
@@ -0,0 +1,33 @@ +From cbe4212aaa1b934135c8400f16265849d12689c0 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Tue, 30 Jul 2024 17:45:38 +0300 +Subject: [PATCH 13/13] plat: lx2160a: fix boot without spi flash / disable + non-volatile storage + +Watchdog restart function does not require book-keeping on non-volatile +storage. +Remove explicit enabling of NXP_NV_SW_MAINT_LAST_EXEC_DATA. + +This fixed hang during boot where atf gets stuck trying to erase a +sector of spi flash. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/soc.mk | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index fa8c63251..4e864e164 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -28,7 +28,6 @@ NXP_WDOG_RESTART := yes + + # for features enabled above. + ifeq (${NXP_WDOG_RESTART}, yes) +-NXP_NV_SW_MAINT_LAST_EXEC_DATA := yes + LS_EL3_INTERRUPT_HANDLER := yes + $(eval $(call add_define, NXP_WDOG_RESTART)) + endif +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0014-add-separate-platform-for-solidrun-lx2162a-som.patch new file +597 -0
597 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0015-lx2160acex6-add-ddr-configuration-for-pcb-v1.2-with-.patch new file +127 -0
127 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0016-nxp-ddr-add-debug-output-for-dimm-parameters-parsed-.patch new file +83 -0
83 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0017-lx2160acex6-fix-dq-mapping-and-remove-invalid-spd-ee.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 65eaf1b55184950c67cb07156477418e93fa9351 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Tue, 26 Nov 2024 14:37:27 +0100 +Subject: [PATCH 17/17] lx2160acex6: fix dq mapping and remove invalid spd + eeprom addresses + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +index 61acfd7ac..95c0a13cf 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +@@ -112,7 +112,7 @@ static const struct dimm_params static_dimm = { + 0x00, + 0x20, + 0x00, +- 0x02, ++ 0x20, + 0x00, + 0x20, + 0x00, +@@ -200,7 +200,7 @@ int ddr_board_options(struct ddr_info *priv) + + long long init_ddr(void) + { +- int spd_addr[] = { 0x51, 0x52, 0x53, 0x54 }; ++ int spd_addr[] = { 0x51, 0x00, 0x53, 0x00 }; + struct ddr_info info; + struct sysinfo sys; + long long dram_size; +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch new file +1 -0
@@ -0,0 +1 @@ +../../../../freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 07/11] board/lx2160acex7: add Arm Trusted Firmware patches
Hello,
Le 08/12/2024 à 15:37, Vladimir Oltean a écrit :
Quoted 35 lines
These come straight from https://github.com/SolidRun/lx2160a_build/,
commit497e9ebf0e2a("atf: update sdram configuration for internal cex6 evb revision 1.2"), and are unmodified.I've also symlinked the extra patch at
board/freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patchto avoid this warning treated as error:$(HOSTDIR)/bin/aarch64-buildroot-linux-gnu-ld: warning:
$(BUILDDIR)/arm-trusted-firmware-custom/build/lx2160acex7/release/bl2/bl2.elf
has a LOAD segment with RWX permissions
make[2]: *** [Makefile:1240: $(BUILDDIR)/arm-trusted-firmware-custom/build/lx2160acex7/release/bl2/bl2.elf] Error 1 make[2]: *** Waiting for unfinished jobs....Since commit
7cbc240ac2c3("configs/ls1028ardb: update to Linux 6.6"), Layerscape platforms no longer use board/freescale/common/patches, and neither do we, here. But we use an older arm-trusted-firmware tag of lf-5.15.71-2.2.0, so we need to selectively include that one patch.Signed-off-by Vladimir Oltean <[email protected]>---
v1->v2:
- split out from previous [PATCH 6/7] board/lx2160acex7: new platform
- update to latestlx2160a_buildHEAD.../0001-plat-nxp-lx2160a-auto-boot.patch | 219 +++++++ ...ccount-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch | 85 +++ ...sert-SUS_S5-GPIO-to-poweroff-the-COM.patch | 29 + ...assert-IRQ0-GPIO-to-poweroff-the-EVB.patch | 29 + ...ptional-S5-gpio-from-Makefile-consta.patch | 63 ++ ...te-platform-for-solidrun-cex7-module.patch | 418 ++++++++++++ ...flexible-value-for-CONFIG_DDR_NODIMM.patch | 33 + ...tform-for-solidrun-internal-cex6-eva.patch | 544 ++++++++++++++++ ...ort-flushing-i2c-bus-before-ddr-init.patch | 365 +++++++++++ ...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 +
Quoted 8 lines
...h-i2c-bus-with-spd-eeprom-before-ddr.patch | 30 + ...-building-without-NXP_NV_SW_MAINT_LA.patch | 49 ++ ...-boot-without-spi-flash-disable-non-.patch | 33 + ...te-platform-for-solidrun-lx2162a-som.patch | 597 ++++++++++++++++++ ...ddr-configuration-for-pcb-v1.2-with-.patch | 127 ++++ ...g-output-for-dimm-parameters-parsed-.patch | 83 +++ ...dq-mapping-and-remove-invalid-spd-ee.patch | 36 ++ ...dd-support-for-new-binutils-versions.patch | 1 +
We should not carry features patches, especially if they are based on a ATF vendor release atf-lf-5.15.71-2.2.0.tar.gz
Also check-package warn about missing Upstream in the header:
(https://nightly.buildroot.org/#_additional_patch_documentation)
Maybe it would make sens to create a BR2_EXTERNAL for such vendor work?
See:
https://github.com/bootlin/buildroot-external-st
https://github.com/TexasInstruments/buildroot-external-TI
https://github.com/boundarydevices/buildroot-external-boundary
Best regards,
Romain
Quoted 2,898 lines
18 files changed, 2771 insertions(+) create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0001-plat-nxp-lx2160a-auto-boot.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0002-dcfg-Take-into-account-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0003-lx2160acex7-assert-SUS_S5-GPIO-to-poweroff-the-COM.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0004-lx2160acex6-assert-IRQ0-GPIO-to-poweroff-the-EVB.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0005-lx2160a-assert-optional-S5-gpio-from-Makefile-consta.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0006-add-separate-platform-for-solidrun-cex7-module.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0007-lx2160a-support-flexible-value-for-CONFIG_DDR_NODIMM.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0008-add-separate-platform-for-solidrun-internal-cex6-eva.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0009-lx2160a-support-flushing-i2c-bus-before-ddr-init.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0010-lx2160acex6-flush-i2c-bus-with-spd-eeprom-before-ddr.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0011-lx2160acex7-flush-i2c-bus-with-spd-eeprom-before-ddr.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0012-plat-lx2160a-fix-building-without-NXP_NV_SW_MAINT_LA.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0013-plat-lx2160a-fix-boot-without-spi-flash-disable-non-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0014-add-separate-platform-for-solidrun-lx2162a-som.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0015-lx2160acex6-add-ddr-configuration-for-pcb-v1.2-with-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0016-nxp-ddr-add-debug-output-for-dimm-parameters-parsed-.patch create mode 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0017-lx2160acex6-fix-dq-mapping-and-remove-invalid-spd-ee.patch create mode 120000 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patchboard/solidrun/lx2160acex7/patches/arm-trusted-firmware/0001-plat-nxp-lx2160a-auto-boot.patch new file +219
-0@@ -0,0 +1,219 @@ +From 5d13f425bd0dea29912bf253a7be83a7cdca591d Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury <[email protected]> +Date: Sun, 28 Nov 2021 14:00:07 +0200 +Subject: [PATCH] plat/nxp: lx2160a auto boot + +This patch adds support to patch RCW that already has SD/eMMC/SPI boot +support embedded with conditional load and jump. +The idea is to look for SD/eMMC/SPI boot, and modify src/dst/size +address with the correct values; rather than adding blockread at the end +of RCW code. + +With this patch images are unified and can be used to boot from SD / +eMMC and SPI. + +Signed-off-by: Rabeeh Khoury <[email protected]> +--- + .../plat_make_helper/plat_common_def.mk | 5 ++ + plat/nxp/soc-lx2160a/lx2160ardb/platform.mk | 3 +- + plat/nxp/soc-lx2160a/soc.mk | 5 ++ + tools/nxp/create_pbl/create_pbl.c | 74 ++++++++++++++++--- + 4 files changed, 76 insertions(+), 11 deletions(-) + +diff --git a/plat/nxp/common/plat_make_helper/plat_common_def.mk b/plat/nxp/common/plat_make_helper/plat_common_def.mk +index 86dacf83d..a1038a073 100644 +--- a/plat/nxp/common/plat_make_helper/plat_common_def.mk ++++ b/plat/nxp/common/plat_make_helper/plat_common_def.mk +@@ -91,6 +91,11 @@ define add_boot_mode_define + else ifeq ($(1),flexspi_nor) + $$(eval $$(call SET_NXP_MAKE_FLAG,XSPI_NEEDED,BL2)) + $$(eval $$(call add_define,FLEXSPI_NOR_BOOT)) ++ else ifeq ($(1),auto) ++ $$(eval $$(call SET_FLAG,SD_MMC_NEEDED,BL2)) ++ $$(eval $$(call add_define,EMMC_BOOT)) ++ $$(eval $$(call SET_FLAG,XSPI_NEEDED,BL2)) ++ $$(eval $$(call add_define,FLEXSPI_NOR_BOOT)) + else + $$(error $(PLAT) Cannot Support Boot Mode: $(BOOT_MODE)) + endif +diff --git a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk b/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk +index ffb5fadee..09c552c72 100644 +--- a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk +@@ -42,7 +42,8 @@ BL2_SOURCES += ${BOARD_PATH}/ddr_init.c\ + + SUPPORTED_BOOT_MODE := flexspi_nor \ + sd \ +- emmc ++ emmc \ ++ auto + + # Adding platform board build info + include plat/nxp/common/plat_make_helper/plat_common_def.mk +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index 239442c20..a72b4113d 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -82,6 +82,11 @@ else + ifeq (${BOOT_MODE}, emmc) + $(eval $(call SET_NXP_MAKE_FLAG,SD_MMC_NEEDED,BL2)) + $(eval $(call add_define,EMMC_BOOT)) ++else ifeq (${BOOT_MODE}, auto) ++$(eval $(call SET_NXP_MAKE_FLAG,SD_MMC_NEEDED,BL2)) ++$(eval $(call add_define,EMMC_BOOT)) ++$(eval $(call SET_NXP_MAKE_FLAG,XSPI_NEEDED,BL2)) ++$(eval $(call add_define,FLEXSPI_NOR_BOOT)) + else + $(error Un-supported Boot Mode = ${BOOT_MODE}) + endif +diff --git a/tools/nxp/create_pbl/create_pbl.c b/tools/nxp/create_pbl/create_pbl.c +index 792747f0e..35cd39b61 100644 +--- a/tools/nxp/create_pbl/create_pbl.c ++++ b/tools/nxp/create_pbl/create_pbl.c +@@ -66,6 +66,7 @@ typedef enum { + FLXSPI_NOR_BOOT, + FLXSPI_NAND_BOOT, + FLXSPI_NAND4K_BOOT, ++ AUTO_BOOT, + MAX_BOOT /* must be last item in list */ + } boot_src_t; + +@@ -140,6 +141,7 @@ char *boot_src_string[] = { + "FLXSPI_NOR_BOOT", + "FLXSPI_NAND_BOOT", + "FLXSPI_NAND4K_BOOT", ++ "AUTO_BOOT", + }; + + enum stop_command { +@@ -193,7 +195,7 @@ struct pbl_image { + #define SOC_LS2088 2088 + #define SOC_LX2160 2160 + +-static uint32_t pbl_size; ++static uint32_t pbl_size = 0; + bool sb_flag; + + /*************************************************************************** +@@ -703,6 +705,8 @@ int main(int argc, char **argv) + int ret = FAILURE; + bool bootptr_flag = false; + enum stop_command flag_stop_cmd = CRC_STOP_COMMAND; ++ int skip = 0; ++ uint32_t saved_src; + + /* Initializing the global structure to zero. */ + memset(&pblimg, 0x0, sizeof(struct pbl_image)); +@@ -802,6 +806,8 @@ int main(int argc, char **argv) + pblimg.boot_src = FLXSPI_NAND_BOOT; + } else if (strcmp(optarg, "flexspi_nand2k") == 0) { + pblimg.boot_src = FLXSPI_NAND4K_BOOT; ++ } else if (strcmp(optarg, "auto") == 0) { ++ pblimg.boot_src = AUTO_BOOT; + } else { + printf("CMD Error: Invalid boot source.\n"); + goto exit_main; +@@ -909,13 +915,14 @@ int main(int argc, char **argv) + printf("%s: Error reading PBI Cmd.\n", __func__); + goto exit_main; + } ++ saved_src = pblimg.src_addr; + while (word != 0x808f0000 && word != 0x80ff0000) { + pbl_size++; + /* 11th words in RCW has PBL length. Update it + * with new length. 2 comamnds get added + * Block copy + CCSR Write/CSF header write + */ +- if (pbl_size == 11) { ++ if ((pbl_size == 11) && (pblimg.boot_src != AUTO_BOOT)) { + word_1 = (word & PBI_LEN_MASK) + + (PBI_LEN_ADD << 20); + word = word & ~PBI_LEN_MASK; +@@ -933,8 +940,50 @@ int main(int argc, char **argv) + goto exit_main; + } + } +- if (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, +- fp_rcw_pbi_op) != NUM_MEM_BLOCK) { ++ if (pblimg.boot_src == AUTO_BOOT) { ++ if (word == 0x80000008) { ++ printf ("Found SD boot at %d\n",pbl_size); ++ pblimg.boot_src = SD_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ if (word == 0x80000009) { ++ printf ("Found eMMC boot at %d\n",pbl_size); ++ pblimg.boot_src = EMMC_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ if (word == 0x8000000f) { ++ printf ("Found SPI boot at %d\n",pbl_size); ++ pblimg.boot_src = FLXSPI_NOR_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ skip = 4; // skip original blockcopy ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip += 2; // skip original bootlocptr write (low byte only) ++ printf("added bootptr\n"); ++ } ++ } ++ } ++ if (!skip && ++ (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, ++ fp_rcw_pbi_op) != NUM_MEM_BLOCK)) { + printf("%s: [CH3] Error in Writing PBI Words\n", + __func__); + goto exit_main; +@@ -951,8 +1000,11 @@ int main(int argc, char **argv) + } else if (word == STOP_CMD_ARM_CH3) { + flag_stop_cmd = STOP_COMMAND; + } ++ ++ if (skip) ++ skip--; + } +- if (bootptr_flag == true) { ++ if ((pblimg.boot_src != AUTO_BOOT) && (bootptr_flag == true)) { + /* Add command to set boot_loc ptr */ + ret = add_boot_ptr_cmd(fp_rcw_pbi_op); + if (ret != SUCCESS) { +@@ -963,11 +1015,13 @@ int main(int argc, char **argv) + } + + /* Write acs write commands to output file */ +- ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); +- if (ret != SUCCESS) { +- printf("%s: Function add_blk_cpy_cmd return failure.\n", +- __func__); +- goto exit_main; ++ if (pblimg.boot_src != AUTO_BOOT) { ++ ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ if (ret != SUCCESS) { ++ printf("%s: Function add_blk_cpy_cmd return failure.\n", ++ __func__); ++ goto exit_main; ++ } + } + + /* Add stop command after adding pbi commands */ +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0002-dcfg-Take-into-account-MEM_PLL_CFG_SHIFT-for-ddr-fre.patch new file +85
-0@@ -0,0 +1,85 @@ +From f750b41bf323d04791b4b25962f693c1fb43bade Mon Sep 17 00:00:00 2001 +From: Jon Nettleton <[email protected]> +Date: Tue, 8 Oct 2024 04:56:45 +0200 +Subject: [PATCH] dcfg: Take into account MEM_PLL_CFG_SHIFT for ddr frequency + +The base ddr clock frequency is 1/4 the speed of the final +ddr clock frequency. By default the RCW config is setting +the CFG_SHIFT to be a 1/4 divider of the memory speed, +i.e. 3200 / 4 (800MHz). The parent DDRCLK is 100MHz so PLL_RAT +needs to be rounded to 100MHz. However using a divider of / 3 for +a lower speed always us to match industry standard ddr4 speeds +2666 and 2933 (2000 / 3 * 4 = 2666.67) + +This patch takes into account the PLL_CFG_SHIFT divider so these +speeds can be configured in the RCW and then updates the helper +function that reports ddr_clk_freq to properly multiply the +clock fed into the DDRC * 4 to properly reflect the actual MTs +that the memory is being configured for. + +Signed-off-by: Jon Nettleton <[email protected]> +--- + drivers/nxp/dcfg/dcfg.c | 6 ++++++ + drivers/nxp/ddr/nxp-ddr/utility.c | 6 +++--- + include/drivers/nxp/dcfg/dcfg_lsch3.h | 4 ++++ + 3 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/drivers/nxp/dcfg/dcfg.c b/drivers/nxp/dcfg/dcfg.c +index e5c4db437..4a5820a64 100644 +--- a/drivers/nxp/dcfg/dcfg.c ++++ b/drivers/nxp/dcfg/dcfg.c +@@ -104,9 +104,15 @@ int get_clocks(struct sysinfo *sys) + sys->freq_ddr_pll0 *= (gur_in32(rcwsr0) >> + RCWSR0_MEM_PLL_RAT_SHIFT) & + RCWSR0_MEM_PLL_RAT_MASK; ++ sys->freq_ddr_pll0 /= ((gur_in32(rcwsr0) >> ++ RCWSR0_MEM_PLL_CFG_SHIFT) & ++ RCWSR0_MEM_PLL_CFG_MASK) + 1; + sys->freq_ddr_pll1 *= (gur_in32(rcwsr0) >> + RCWSR0_MEM2_PLL_RAT_SHIFT) & + RCWSR0_MEM2_PLL_RAT_MASK; ++ sys->freq_ddr_pll1 /= ((gur_in32(rcwsr0) >> ++ RCWSR0_MEM2_PLL_CFG_SHIFT) & ++ RCWSR0_MEM2_PLL_CFG_MASK) + 1; + if (sys->freq_platform == 0) { + return 1; + } else { +diff --git a/drivers/nxp/ddr/nxp-ddr/utility.c b/drivers/nxp/ddr/nxp-ddr/utility.c +index b6dffc872..3920b4488 100644 +--- a/drivers/nxp/ddr/nxp-ddr/utility.c ++++ b/drivers/nxp/ddr/nxp-ddr/utility.c +@@ -47,11 +47,11 @@ unsigned long get_ddr_freq(struct sysinfo *sys, int ctrl_num) + + switch (ctrl_num) { + case 0: +- return sys->freq_ddr_pll0; ++ return sys->freq_ddr_pll0 * 4; + case 1: +- return sys->freq_ddr_pll0; ++ return sys->freq_ddr_pll0 * 4; + case 2: +- return sys->freq_ddr_pll1; ++ return sys->freq_ddr_pll1 * 4; + } + + return 0; +diff --git a/include/drivers/nxp/dcfg/dcfg_lsch3.h b/include/drivers/nxp/dcfg/dcfg_lsch3.h +index cde86fe19..f9409d1a7 100644 +--- a/include/drivers/nxp/dcfg/dcfg_lsch3.h ++++ b/include/drivers/nxp/dcfg/dcfg_lsch3.h +@@ -53,8 +53,12 @@ + #define RCWSR0_OFFSET 0x100 + #define RCWSR0_SYS_PLL_RAT_SHIFT 2 + #define RCWSR0_SYS_PLL_RAT_MASK 0x1f ++#define RCWSR0_MEM_PLL_CFG_SHIFT 8 ++#define RCWSR0_MEM_PLL_CFG_MASK 0x3 + #define RCWSR0_MEM_PLL_RAT_SHIFT 10 + #define RCWSR0_MEM_PLL_RAT_MASK 0x3f ++#define RCWSR0_MEM2_PLL_CFG_SHIFT 16 ++#define RCWSR0_MEM2_PLL_CFG_MASK 0x3 + #define RCWSR0_MEM2_PLL_RAT_SHIFT 18 + #define RCWSR0_MEM2_PLL_RAT_MASK 0x3f + +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0003-lx2160acex7-assert-SUS_S5-GPIO-to-poweroff-the-COM.patch new file +29
-0@@ -0,0 +1,29 @@ +From 72557b712198e3292776fbe8697322c68583acf4 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury <[email protected]> +Date: Sun, 28 Nov 2021 13:33:10 +0200 +Subject: [PATCH] lx2160acex7: assert SUS_S5# GPIO to poweroff the COM + +Signed-off-by: Rabeeh Khoury <[email protected]> +--- + plat/nxp/soc-lx2160a/aarch64/lx2160a.S | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +index cc679f2ba..01b3c7ecd 100644 +--- a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S ++++ b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +@@ -563,6 +563,11 @@ endfunc _soc_sys_reset + */ + func _soc_sys_off + ++ /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5) */ ++ mov x3, #NXP_GPIO3_ADDR ++ mov w1, #0x01000000 ++ str w1, [x3] ++ + /* disable sec, QBman, spi and qspi */ + ldr x2, =NXP_DCFG_ADDR + ldr x0, =DCFG_DEVDISR1_OFFSET +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0004-lx2160acex6-assert-IRQ0-GPIO-to-poweroff-the-EVB.patch new file +29
-0@@ -0,0 +1,29 @@ +From 6bc7cf0b6de6427b230d47ae7ee273175ffe95dd Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Mon, 14 Oct 2024 11:55:03 +0200 +Subject: [PATCH] lx2160acex6: assert IRQ0 GPIO to poweroff the EVB + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/aarch64/lx2160a.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +index 01b3c7ecd..8035b145e 100644 +--- a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S ++++ b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +@@ -563,9 +563,9 @@ endfunc _soc_sys_reset + */ + func _soc_sys_off + +- /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5) */ ++ /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5), GPIO3[0] (IRQ00 - CEX-6 EVB IRQ0) */ + mov x3, #NXP_GPIO3_ADDR +- mov w1, #0x01000000 ++ mov w1, #0x81000000 + str w1, [x3] + + /* disable sec, QBman, spi and qspi */ +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0005-lx2160a-assert-optional-S5-gpio-from-Makefile-consta.patch new file +63
-0@@ -0,0 +1,63 @@ +From 13496d248f11fe09d5a634fe15dd6b507a520a87 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 18 Oct 2024 21:09:04 +0200 +Subject: [PATCH 5/6] lx2160a: assert optional S5 gpio from Makefile constant + +GPIO address and number for S5 are specific per board and should not be +set globally across lx2160. + +Add support for setting gpio address and number form platform.mk, into +soc.mk: + +- LX2160A_S5_GPIO_ADDR: gpio value register address +- LX2160A_S5_GPIO: gpio number + +This feature can be enabled for individual boards by setting a non-zero +address in platform.mk file, before including soc.mk. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/aarch64/lx2160a.S | 9 ++++++--- + plat/nxp/soc-lx2160a/soc.mk | 8 ++++++++ + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +index 8035b145e..67ade7b66 100644 +--- a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S ++++ b/plat/nxp/soc-lx2160a/aarch64/lx2160a.S +@@ -563,10 +563,13 @@ endfunc _soc_sys_reset + */ + func _soc_sys_off + +- /* assert GPIO3[7] (IRQ07 - CEX-7 SUS_S5), GPIO3[0] (IRQ00 - CEX-6 EVB IRQ0) */ +- mov x3, #NXP_GPIO3_ADDR +- mov w1, #0x81000000 ++#if defined(CONFIG_LX2160A_S5_GPIO_ADDR) && defined(CONFIG_LX2160A_S5_GPIO) ++ /* assert s5 gpio */ ++ mov x3, # CONFIG_LX2160A_S5_GPIO_ADDR ++ ldr w1, [x3] ++ orr w1, w1, # 1 << (31 - CONFIG_LX2160A_S5_GPIO) + str w1, [x3] ++#endif + + /* disable sec, QBman, spi and qspi */ + ldr x2, =NXP_DCFG_ADDR +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index a72b4113d..20e64753c 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -177,3 +177,11 @@ include ${PLAT_PATH}/common/setup/common.mk + + # Adding source files to generate separate DDR FIP image + include ${PLAT_SOC_PATH}/ddr_fip.mk ++ ++# S5 GPIO (optional) ++LX2160A_S5_GPIO_ADDR ?= 0 ++LX2160A_S5_GPIO ?= 0 ++ifneq (${LX2160A_S5_GPIO_ADDR},0) ++$(eval $(call add_define_val,CONFIG_LX2160A_S5_GPIO_ADDR,$(LX2160A_S5_GPIO_ADDR))) ++$(eval $(call add_define_val,CONFIG_LX2160A_S5_GPIO,$(LX2160A_S5_GPIO))) ++endif +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0006-add-separate-platform-for-solidrun-cex7-module.patch new file +418
-0@@ -0,0 +1,418 @@ +From 1fc354074e5fe98e185633b8d7f62836d5b2b710 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 18 Oct 2024 15:11:53 +0200 +Subject: [PATCH 6/6] add separate platform for solidrun cex7 module + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex7/ddr_init.c | 116 ++++++++++++++++++ + plat/nxp/soc-lx2160a/lx2160acex7/plat_def.h | 105 ++++++++++++++++ + plat/nxp/soc-lx2160a/lx2160acex7/platform.c | 29 +++++ + plat/nxp/soc-lx2160a/lx2160acex7/platform.mk | 56 +++++++++ + .../soc-lx2160a/lx2160acex7/platform_def.h | 14 +++ + plat/nxp/soc-lx2160a/lx2160acex7/policy.h | 38 ++++++ + 6 files changed, 358 insertions(+) + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/ddr_init.c + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/plat_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/platform.c + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/platform.mk + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/platform_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex7/policy.h + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/ddr_init.c b/plat/nxp/soc-lx2160a/lx2160acex7/ddr_init.c +new file mode 100644 +index 000000000..2bd014a7e +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/ddr_init.c +@@ -0,0 +1,116 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <assert.h> ++#include <errno.h> ++#include <stdbool.h> ++#include <stdint.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++ ++#include <common/debug.h> ++#include <ddr.h> ++#include <lib/utils.h> ++#include <load_img.h> ++ ++#include "plat_common.h" ++#include <platform_def.h> ++ ++#if defined(CONFIG_STATIC_DDR) || defined(CONFIG_DDR_NODIMM) ++#error not implemented ++#endif /* defined(CONFIG_STATIC_DDR) || defined(CONFIG_DDR_NODIMM) */ ++ ++int ddr_board_options(struct ddr_info *priv) ++{ ++ struct memctl_opt *popts = &priv->opt; ++ const struct ddr_conf *conf = &priv->conf; ++ ++ popts->vref_dimm = U(0x24); /* range 1, 83.4% */ ++ popts->rtt_override = 0; ++ popts->rtt_park = U(240); ++ popts->otf_burst_chop_en = 0; ++ popts->burst_length = U(DDR_BL8); ++ popts->trwt_override = U(1); ++ popts->bstopre = U(0); /* auto precharge */ ++ popts->addr_hash = 1; ++ ++ /* Set ODT impedance on PHY side */ ++ switch (conf->cs_on_dimm[1]) { ++ case 0xc: /* Two slots dual rank */ ++ case 0x4: /* Two slots single rank, not valid for interleaving */ ++ popts->trwt = U(0xf); ++ popts->twrt = U(0x7); ++ popts->trrt = U(0x7); ++ popts->twwt = U(0x7); ++ popts->vref_phy = U(0x6B); /* 83.6% */ ++ popts->odt = U(60); ++ popts->phy_tx_impedance = U(28); ++ break; ++ case 0: /* One slot used */ ++ default: ++ popts->trwt = U(0x3); ++ popts->twrt = U(0x3); ++ popts->trrt = U(0x3); ++ popts->twwt = U(0x3); ++ popts->vref_phy = U(0x60); /* 75% */ ++ popts->odt = U(48); ++ popts->phy_tx_impedance = U(28); ++ break; ++ } ++ ++ return 0; ++} ++ ++long long init_ddr(void) ++{ ++ int spd_addr[] = { 0x51, 0x52, 0x53, 0x54 }; ++ struct ddr_info info; ++ struct sysinfo sys; ++ long long dram_size; ++ ++ zeromem(&sys, sizeof(sys)); ++ if (get_clocks(&sys) != 0) { ++ ERROR("System clocks are not set\n"); ++ panic(); ++ } ++ debug("platform clock %lu\n", sys.freq_platform); ++ debug("DDR PLL1 %lu\n", sys.freq_ddr_pll0); ++ debug("DDR PLL2 %lu\n", sys.freq_ddr_pll1); ++ ++ zeromem(&info, sizeof(info)); ++ ++ /* Set two DDRC. Unused DDRC will be removed automatically. */ ++ info.num_ctlrs = NUM_OF_DDRC; ++ info.spd_addr = spd_addr; ++ info.ddr[0] = (void *)NXP_DDR_ADDR; ++ info.ddr[1] = (void *)NXP_DDR2_ADDR; ++ info.phy[0] = (void *)NXP_DDR_PHY1_ADDR; ++ info.phy[1] = (void *)NXP_DDR_PHY2_ADDR; ++ info.clk = get_ddr_freq(&sys, 0); ++ info.img_loadr = load_img; ++ info.phy_gen2_fw_img_buf = PHY_GEN2_FW_IMAGE_BUFFER; ++ if (info.clk == 0) { ++ info.clk = get_ddr_freq(&sys, 1); ++ } ++ info.dimm_on_ctlr = DDRC_NUM_DIMM; ++ ++ info.warm_boot_flag = DDR_WRM_BOOT_NT_SUPPORTED; ++ ++ dram_size = dram_init(&info ++#if defined(NXP_HAS_CCN504) || defined(NXP_HAS_CCN508) ++ , NXP_CCN_HN_F_0_ADDR ++#endif ++ ); ++ ++ ++ if (dram_size < 0) { ++ ERROR("DDR init failed.\n"); ++ } ++ ++ return dram_size; ++} +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/plat_def.h b/plat/nxp/soc-lx2160a/lx2160acex7/plat_def.h +new file mode 100644 +index 000000000..02f51e74d +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/plat_def.h +@@ -0,0 +1,105 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLAT_DEF_H ++#define PLAT_DEF_H ++ ++#include <arch.h> ++#include <cortex_a72.h> ++/* Required without TBBR. ++ * To include the defines for DDR PHY ++ * Images. ++ */ ++#include <tbbr_img_def.h> ++ ++#include <policy.h> ++#include <soc.h> ++ ++#if defined(IMAGE_BL31) ++#define LS_SYS_TIMCTL_BASE 0x2890000 ++#define PLAT_LS_NSTIMER_FRAME_ID 0 ++#define LS_CONFIG_CNTACR 1 ++#endif ++ ++#define NXP_SYSCLK_FREQ 100000000 ++#define NXP_DDRCLK_FREQ 100000000 ++ ++/* UART related definition */ ++#define NXP_CONSOLE_ADDR NXP_UART_ADDR ++#define NXP_CONSOLE_BAUDRATE 115200 ++ ++/* Size of cacheable stacks */ ++#if defined(IMAGE_BL2) ++#if defined(TRUSTED_BOARD_BOOT) ++#define PLATFORM_STACK_SIZE 0x2000 ++#else ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++#elif defined(IMAGE_BL31) ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++ ++/* SD block buffer */ ++#define NXP_SD_BLOCK_BUF_SIZE (0x8000) ++#define NXP_SD_BLOCK_BUF_ADDR (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++ ++#ifdef SD_BOOT ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++#else ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE) ++#endif ++ ++/* IO defines as needed by IO driver framework */ ++#define MAX_IO_DEVICES 4 ++#define MAX_IO_BLOCK_DEVICES 1 ++#define MAX_IO_HANDLES 4 ++ ++#define PHY_GEN2_FW_IMAGE_BUFFER (NXP_OCRAM_ADDR + CSF_HDR_SZ) ++ ++/* ++ * FIP image defines - Offset at which FIP Image would be present ++ * Image would include Bl31 , Bl33 and Bl32 (optional) ++ */ ++#ifdef POLICY_FUSE_PROVISION ++#define MAX_FIP_DEVICES 3 ++#endif ++ ++#ifndef MAX_FIP_DEVICES ++#define MAX_FIP_DEVICES 2 ++#endif ++ ++/* ++ * ID of the secure physical generic timer interrupt used by the BL32. ++ */ ++#define BL32_IRQ_SEC_PHY_TIMER 29 ++ ++#define BL31_WDOG_SEC 89 ++ ++#define BL31_NS_WDOG_WS1 108 ++ ++/* ++ * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3 ++ * terminology. On a GICv2 system or mode, the lists will be merged and treated ++ * as Group 0 interrupts. ++ */ ++#define PLAT_LS_G1S_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE) ++ ++/* SGI 15 and Secure watchdog interrupts assigned to Group 0 */ ++#define NXP_IRQ_SEC_SGI_7 15 ++ ++#define PLAT_LS_G0_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(BL31_NS_WDOG_WS1, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(NXP_IRQ_SEC_SGI_7, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_LEVEL) ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/platform.c b/plat/nxp/soc-lx2160a/lx2160acex7/platform.c +new file mode 100644 +index 000000000..b00adb51d +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/platform.c +@@ -0,0 +1,29 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <plat_common.h> ++ ++#pragma weak board_enable_povdd ++#pragma weak board_disable_povdd ++ ++bool board_enable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} ++ ++bool board_disable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +new file mode 100644 +index 000000000..37598c2d7 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +@@ -0,0 +1,56 @@ ++# ++# Copyright 2021 NXP ++# ++# SPDX-License-Identifier: BSD-3-Clause ++# ++ ++# board-specific build parameters ++ ++BOOT_MODE ?= flexspi_nor ++BOARD ?= lx2160acex7 ++POVDD_ENABLE := no ++NXP_COINED_BB := no ++ ++ # DDR Compilation Configs ++NUM_OF_DDRC := 2 ++DDRC_NUM_DIMM := 2 ++DDRC_NUM_CS := 4 ++DDR_ECC_EN := yes ++ #enable address decoding feature ++DDR_ADDR_DEC := yes ++APPLY_MAX_CDD := yes ++ ++# S5 GPIO ++LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR ++LX2160A_S5_GPIO := 7 ++ ++# DDR Errata ++ERRATA_DDR_A011396 := 1 ++ERRATA_DDR_A050450 := 1 ++ ++ # On-Board Flash Details ++FLASH_TYPE := MT35XU512A ++XSPI_FLASH_SZ := 0x10000000 ++NXP_XSPI_NOR_UNIT_SIZE := 0x20000 ++BL2_BIN_XSPI_NOR_END_ADDRESS := 0x100000 ++# CONFIG_FSPI_ERASE_4K is required to erase 4K sector sizes. This ++# config is enabled for future use cases. ++FSPI_ERASE_4K := 0 ++ ++ # Platform specific features. ++WARM_BOOT := no ++ ++ # Adding Platform files build files ++BL2_SOURCES += ${BOARD_PATH}/ddr_init.c\ ++ ${BOARD_PATH}/platform.c ++ ++SUPPORTED_BOOT_MODE := flexspi_nor \ ++ sd \ ++ emmc \ ++ auto ++ ++# Adding platform board build info ++include plat/nxp/common/plat_make_helper/plat_common_def.mk ++ ++ # Adding SoC build info ++include plat/nxp/soc-lx2160a/soc.mk +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/platform_def.h b/plat/nxp/soc-lx2160a/lx2160acex7/platform_def.h +new file mode 100644 +index 000000000..666099800 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/platform_def.h +@@ -0,0 +1,14 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLATFORM_DEF_H ++#define PLATFORM_DEF_H ++ ++#include "plat_def.h" ++#include "plat_default_def.h" ++ ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/policy.h b/plat/nxp/soc-lx2160a/lx2160acex7/policy.h +new file mode 100644 +index 000000000..19ad6dbec +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/policy.h +@@ -0,0 +1,38 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef POLICY_H ++#define POLICY_H ++ ++/* Following defines affect the PLATFORM SECURITY POLICY */ ++ ++/* set this to 0x0 if the platform is not using/responding to ECC errors ++ * set this to 0x1 if ECC is being used (we have to do some init) ++ */ ++#define POLICY_USING_ECC 0x0 ++ ++/* Set this to 0x0 to leave the default SMMU page size in sACR ++ * Set this to 0x1 to change the SMMU page size to 64K ++ */ ++#define POLICY_SMMU_PAGESZ_64K 0x1 ++ ++/* ++ * POLICY_PERF_WRIOP = 0 : No Performance enhancement for WRIOP RN-I ++ * POLICY_PERF_WRIOP = 1 : No Performance enhancement for WRIOP RN-I = 7 ++ * POLICY_PERF_WRIOP = 2 : No Performance enhancement for WRIOP RN-I = 23 ++ */ ++#define POLICY_PERF_WRIOP 0 ++ ++/* ++ * set this to '1' if the debug clocks need to remain enabled during ++ * system entry to low-power (LPM20) - this should only be necessary ++ * for testing and NEVER set for normal production ++ */ ++#define POLICY_DEBUG_ENABLE 0 ++ ++ ++#endif /* POLICY_H */ +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0007-lx2160a-support-flexible-value-for-CONFIG_DDR_NODIMM.patch new file +33
-0@@ -0,0 +1,33 @@ +From 92d0a6fab056eb43fa5561fb1888c8c393ebee29 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 18 Oct 2024 21:17:12 +0200 +Subject: [PATCH 7/8] lx2160a: support flexible value for CONFIG_DDR_NODIMM + +Add support for values other than 0 and 1 for CONFIG_DDR_NODIMM. +This macro can be used for both enabling, and selecting a specific +memory configuration at compile-time. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/common/plat_make_helper/plat_common_def.mk | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/common/plat_make_helper/plat_common_def.mk b/plat/nxp/common/plat_make_helper/plat_common_def.mk +index a1038a073..ed6e0bdac 100644 +--- a/plat/nxp/common/plat_make_helper/plat_common_def.mk ++++ b/plat/nxp/common/plat_make_helper/plat_common_def.mk +@@ -39,8 +39,9 @@ ifneq (${NUM_OF_DDRC},) + $(eval $(call add_define_val,NUM_OF_DDRC,${NUM_OF_DDRC})) + endif + +-ifeq (${CONFIG_DDR_NODIMM},1) +-$(eval $(call add_define,CONFIG_DDR_NODIMM)) ++CONFIG_DDR_NODIMM ?= 0 ++ifneq (${CONFIG_DDR_NODIMM},0) ++$(eval $(call add_define_val,CONFIG_DDR_NODIMM,${CONFIG_DDR_NODIMM})) + DDRC_NUM_DIMM := 1 + endif + +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0008-add-separate-platform-for-solidrun-internal-cex6-eva.patch new file +544
-0@@ -0,0 +1,544 @@ +From 067c11cd6a6de8c7480b1f8c1002f29a9bc85787 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 18 Oct 2024 15:05:13 +0200 +Subject: [PATCH 8/8] add separate platform for solidrun internal cex6 + evaluation board + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c | 236 ++++++++++++++++++ + plat/nxp/soc-lx2160a/lx2160acex6/plat_def.h | 105 ++++++++ + plat/nxp/soc-lx2160a/lx2160acex6/platform.c | 29 +++ + plat/nxp/soc-lx2160a/lx2160acex6/platform.mk | 61 +++++ + .../soc-lx2160a/lx2160acex6/platform_def.h | 14 ++ + plat/nxp/soc-lx2160a/lx2160acex6/policy.h | 38 +++ + 6 files changed, 483 insertions(+) + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/plat_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/platform.c + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/platform.mk + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/platform_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2160acex6/policy.h + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +new file mode 100644 +index 000000000..0b978e298 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +@@ -0,0 +1,236 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <assert.h> ++#include <errno.h> ++#include <stdbool.h> ++#include <stdint.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++ ++#include <common/debug.h> ++#include <ddr.h> ++#include <lib/utils.h> ++#include <load_img.h> ++ ++#include "plat_common.h" ++#include <platform_def.h> ++ ++#ifdef CONFIG_STATIC_DDR ++#error not implemented ++#elif defined(CONFIG_DDR_NODIMM) ++#if CONFIG_DDR_NODIMM == 1 ++/* ++ * PCB Revision 1.0: 9 x K4A8G085WC-BCWE TODO ++ */ ++#error Not implemented. ++#endif /* CONFIG_DDR_NODIMM == 1 */ ++ ++#if CONFIG_DDR_NODIMM == 2 ++/* ++ * PCB Revision 1.1: 2 x 5 x K4A8G165WB-BCRC ++ * ++ * ECC disabled because of training failures. ++ */ ++#define CONFIG_DDR_NODIMM_CH2 ++static const struct dimm_params static_dimm = { ++ .mpart = "Fixed DDR Config 2", ++ .n_ranks = 1, ++ .die_density = 0x6, // encoded per spd byte 4, 0b110 = 16Gbit ++ .rank_density = 0x200000000, // 16GB ++ .capacity = 0x200000000, // 16GB ++ .primary_sdram_width = 64, ++ .ec_sdram_width = 0, // no ecc extension ++ .rdimm = 0, ++ .package_3ds = 0, ++ .device_width = 16, // 16 bit per sdram ++ .rc = 0, ++ ++ .n_row_addr = 17, ++ .n_col_addr = 10, ++ .edc_config = 0, // disable ecc ++ .bank_addr_bits = 0, // 4 banks ++ .bank_group_bits = 1, // 2 bank groups ++ .burst_lengths_bitmask = 0xc, // enable 4 & 8-bit burst (DDR4 spec) ++ ++ .mirrored_dimm = 0, ++ ++ // timings based on K4A8G085WC-BCTD (DDR4-2666), missing values for 3200 ++ .mtb_ps = 125, // MTB per SPD spec ++ .ftb_10th_ps = 10, // default value, unused by nxp ddr driver ++ .taa_ps = 13750, // min. 13.75ns ++ .tfaw_ps = 30000, // min: max(30ns or 28CK) (this 16Gbit sdram has 2KB pages) ++ ++ .tckmin_x_ps = 625, // 3200 (CK=1600) ++ .tckmax_ps = 1250, // 1600 (CK=800) ++ ++ .caslat_x = 0b00000001010101010101010000000000, // CL = [10,12,14,16,18,20,22,24] (1 << CL) ++ ++ .trcd_ps = 13750, // 13.75ns - CL22-22-22 ++ .trp_ps = 13750, // 13.75ns - CL22-22-22 ++ .tras_ps = 32000, // 32ns ++ ++ .trfc1_ps = 350000, // 350ns, ++ .trfc2_ps = 260000, // 260ns ++ .trfc4_ps = 160000, // 160ns ++ .trrds_ps = 5300, // min: max(4CK or 5.3ns) ++ .trrdl_ps = 6400, // min: max(4CK or 6.4ns) ++ .tccdl_ps = 5000, // min: max(4CK or 5ns) ++ .trfc_slr_ps = 0, ++ ++ .trc_ps = 45750, // tras + trp 45.75ns ++ .twr_ps = 15000, // 15ns ++ ++ .refresh_rate_ps = 7800000, // 1x mode 7.8us for standard temperature range (TODO: pick correct range based on temperature?!) ++ // .extended_op_srt = 0, ++ ++ // .rcw = {}, // only for registered dimm ++ .dq_mapping = { ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x00, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ 0x00, ++ 0x20, ++ }, ++ .dq_mapping_ors = 1, ++}; ++#endif /* CONFIG_DDR_NODIMM == 2 */ ++ ++int ddr_get_ddr_params(struct dimm_params *pdimm, ++ struct ddr_conf *conf) ++{ ++ // channel 1 ++ conf->dimm_in_use[0] = 1; ++ memcpy(&pdimm[0], &static_dimm, sizeof(struct dimm_params)); ++ ++#if defined(CONFIG_DDR_NODIMM_CH2) ++ // channel 2 ++ conf->dimm_in_use[1] = 1; // enable (module on) channel 2 ++ memcpy(&pdimm[1], &static_dimm, sizeof(struct dimm_params)); ++ ++ /* 2 modules */ ++ return 0x3; ++#else ++ /* 1 module */ ++ return 0x1; ++#endif /* defined(CONFIG_DDR_NODIMM_CH2) */ ++} ++#endif /* defined(CONFIG_DDR_NODIMM) */ ++ ++int ddr_board_options(struct ddr_info *priv) ++{ ++ struct memctl_opt *popts = &priv->opt; ++ const struct ddr_conf *conf = &priv->conf; ++ ++ popts->vref_dimm = U(0x24); /* range 1, 83.4% */ ++ popts->rtt_override = 0; ++ popts->rtt_park = U(240); ++ popts->otf_burst_chop_en = 0; ++ popts->burst_length = U(DDR_BL8); ++ popts->trwt_override = U(0); ++ popts->bstopre = U(0); /* auto precharge */ ++ popts->addr_hash = 1; ++ popts->caslat_override = 0; // TODO: why is this set by default?! ++ popts->caslat_override_value = 0; // TODO: why is this set by default?! ++ popts->auto_self_refresh_en = 1; ++ popts->output_driver_impedance = 0; // 34 Ohm ++ popts->twot_en = 0; ++ popts->threet_en = 0; ++ popts->addt_lat_override = 0; // TODO: why is this set by default?! ++ popts->addt_lat_override_value = 0; // TODO: why is this set by default?! ++ popts->phy_atx_impedance = 30; ++ popts->skip2d = 0; ++ ++ /* Set ODT impedance on PHY side */ ++ switch (conf->cs_on_dimm[1]) { ++ case 0xc: /* Two slots dual rank */ ++ case 0x4: /* Two slots single rank, not valid for interleaving */ ++ popts->trwt = U(0xf); ++ popts->twrt = U(0x7); ++ popts->trrt = U(0x7); ++ popts->twwt = U(0x7); ++ popts->vref_phy = U(0x6B); /* 83.6% */ ++ popts->odt = U(60); ++ popts->phy_tx_impedance = U(28); ++ break; ++ case 0: /* One slot used */ ++ default: ++ popts->trwt = U(0x3); ++ popts->twrt = U(0x3); ++ popts->trrt = U(0x3); ++ popts->twwt = U(0x3); ++ popts->vref_phy = U(0x60); /* 75% */ ++ popts->odt = U(48); ++ popts->phy_tx_impedance = U(28); ++ break; ++ } ++ ++ return 0; ++} ++ ++long long init_ddr(void) ++{ ++ int spd_addr[] = { 0x51, 0x52, 0x53, 0x54 }; ++ struct ddr_info info; ++ struct sysinfo sys; ++ long long dram_size; ++ ++ zeromem(&sys, sizeof(sys)); ++ if (get_clocks(&sys) != 0) { ++ ERROR("System clocks are not set\n"); ++ panic(); ++ } ++ debug("platform clock %lu\n", sys.freq_platform); ++ debug("DDR PLL1 %lu\n", sys.freq_ddr_pll0); ++ debug("DDR PLL2 %lu\n", sys.freq_ddr_pll1); ++ ++ zeromem(&info, sizeof(info)); ++ ++ /* Set two DDRC. Unused DDRC will be removed automatically. */ ++ info.num_ctlrs = NUM_OF_DDRC; ++ info.spd_addr = spd_addr; ++ info.ddr[0] = (void *)NXP_DDR_ADDR; ++ info.ddr[1] = (void *)NXP_DDR2_ADDR; ++ info.phy[0] = (void *)NXP_DDR_PHY1_ADDR; ++ info.phy[1] = (void *)NXP_DDR_PHY2_ADDR; ++ info.clk = get_ddr_freq(&sys, 0); ++ info.img_loadr = load_img; ++ info.phy_gen2_fw_img_buf = PHY_GEN2_FW_IMAGE_BUFFER; ++ if (info.clk == 0) { ++ info.clk = get_ddr_freq(&sys, 1); ++ } ++ info.dimm_on_ctlr = DDRC_NUM_DIMM; ++ ++ info.warm_boot_flag = DDR_WRM_BOOT_NT_SUPPORTED; ++ ++ dram_size = dram_init(&info ++#if defined(NXP_HAS_CCN504) || defined(NXP_HAS_CCN508) ++ , NXP_CCN_HN_F_0_ADDR ++#endif ++ ); ++ ++ ++ if (dram_size < 0) { ++ ERROR("DDR init failed.\n"); ++ } ++ ++ return dram_size; ++} +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/plat_def.h b/plat/nxp/soc-lx2160a/lx2160acex6/plat_def.h +new file mode 100644 +index 000000000..02f51e74d +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/plat_def.h +@@ -0,0 +1,105 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLAT_DEF_H ++#define PLAT_DEF_H ++ ++#include <arch.h> ++#include <cortex_a72.h> ++/* Required without TBBR. ++ * To include the defines for DDR PHY ++ * Images. ++ */ ++#include <tbbr_img_def.h> ++ ++#include <policy.h> ++#include <soc.h> ++ ++#if defined(IMAGE_BL31) ++#define LS_SYS_TIMCTL_BASE 0x2890000 ++#define PLAT_LS_NSTIMER_FRAME_ID 0 ++#define LS_CONFIG_CNTACR 1 ++#endif ++ ++#define NXP_SYSCLK_FREQ 100000000 ++#define NXP_DDRCLK_FREQ 100000000 ++ ++/* UART related definition */ ++#define NXP_CONSOLE_ADDR NXP_UART_ADDR ++#define NXP_CONSOLE_BAUDRATE 115200 ++ ++/* Size of cacheable stacks */ ++#if defined(IMAGE_BL2) ++#if defined(TRUSTED_BOARD_BOOT) ++#define PLATFORM_STACK_SIZE 0x2000 ++#else ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++#elif defined(IMAGE_BL31) ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++ ++/* SD block buffer */ ++#define NXP_SD_BLOCK_BUF_SIZE (0x8000) ++#define NXP_SD_BLOCK_BUF_ADDR (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++ ++#ifdef SD_BOOT ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++#else ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE) ++#endif ++ ++/* IO defines as needed by IO driver framework */ ++#define MAX_IO_DEVICES 4 ++#define MAX_IO_BLOCK_DEVICES 1 ++#define MAX_IO_HANDLES 4 ++ ++#define PHY_GEN2_FW_IMAGE_BUFFER (NXP_OCRAM_ADDR + CSF_HDR_SZ) ++ ++/* ++ * FIP image defines - Offset at which FIP Image would be present ++ * Image would include Bl31 , Bl33 and Bl32 (optional) ++ */ ++#ifdef POLICY_FUSE_PROVISION ++#define MAX_FIP_DEVICES 3 ++#endif ++ ++#ifndef MAX_FIP_DEVICES ++#define MAX_FIP_DEVICES 2 ++#endif ++ ++/* ++ * ID of the secure physical generic timer interrupt used by the BL32. ++ */ ++#define BL32_IRQ_SEC_PHY_TIMER 29 ++ ++#define BL31_WDOG_SEC 89 ++ ++#define BL31_NS_WDOG_WS1 108 ++ ++/* ++ * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3 ++ * terminology. On a GICv2 system or mode, the lists will be merged and treated ++ * as Group 0 interrupts. ++ */ ++#define PLAT_LS_G1S_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE) ++ ++/* SGI 15 and Secure watchdog interrupts assigned to Group 0 */ ++#define NXP_IRQ_SEC_SGI_7 15 ++ ++#define PLAT_LS_G0_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(BL31_NS_WDOG_WS1, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(NXP_IRQ_SEC_SGI_7, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_LEVEL) ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform.c b/plat/nxp/soc-lx2160a/lx2160acex6/platform.c +new file mode 100644 +index 000000000..b00adb51d +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform.c +@@ -0,0 +1,29 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <plat_common.h> ++ ++#pragma weak board_enable_povdd ++#pragma weak board_disable_povdd ++ ++bool board_enable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} ++ ++bool board_disable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +new file mode 100644 +index 000000000..1165cfa09 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +@@ -0,0 +1,61 @@ ++# ++# Copyright 2021 NXP ++# ++# SPDX-License-Identifier: BSD-3-Clause ++# ++ ++# board-specific build parameters ++ ++BOOT_MODE ?= flexspi_nor ++BOARD ?= lx2160acex6 ++POVDD_ENABLE := no ++NXP_COINED_BB := no ++ ++ # DDR Compilation Configs ++NUM_OF_DDRC := 2 ++DDRC_NUM_DIMM := 2 ++DDRC_NUM_CS := 4 ++DDR_ECC_EN := yes ++ #enable address decoding feature ++DDR_ADDR_DEC := yes ++APPLY_MAX_CDD := yes ++ ++# Mock SPD: ++# - 0: disable mock spd ++# - 2: 2 x 5 x K4A8G165WB-BCRC PCB v1.1 ++CONFIG_DDR_NODIMM := 0 ++ ++# S5 GPIO ++LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR ++LX2160A_S5_GPIO := 0 ++ ++# DDR Errata ++ERRATA_DDR_A011396 := 1 ++ERRATA_DDR_A050450 := 1 ++ ++ # On-Board Flash Details ++FLASH_TYPE := MT35XU512A ++XSPI_FLASH_SZ := 0x10000000 ++NXP_XSPI_NOR_UNIT_SIZE := 0x20000 ++BL2_BIN_XSPI_NOR_END_ADDRESS := 0x100000 ++# CONFIG_FSPI_ERASE_4K is required to erase 4K sector sizes. This ++# config is enabled for future use cases. ++FSPI_ERASE_4K := 0 ++ ++ # Platform specific features. ++WARM_BOOT := no ++ ++ # Adding Platform files build files ++BL2_SOURCES += ${BOARD_PATH}/ddr_init.c\ ++ ${BOARD_PATH}/platform.c ++ ++SUPPORTED_BOOT_MODE := flexspi_nor \ ++ sd \ ++ emmc \ ++ auto ++ ++# Adding platform board build info ++include plat/nxp/common/plat_make_helper/plat_common_def.mk ++ ++ # Adding SoC build info ++include plat/nxp/soc-lx2160a/soc.mk +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform_def.h b/plat/nxp/soc-lx2160a/lx2160acex6/platform_def.h +new file mode 100644 +index 000000000..666099800 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform_def.h +@@ -0,0 +1,14 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLATFORM_DEF_H ++#define PLATFORM_DEF_H ++ ++#include "plat_def.h" ++#include "plat_default_def.h" ++ ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/policy.h b/plat/nxp/soc-lx2160a/lx2160acex6/policy.h +new file mode 100644 +index 000000000..19ad6dbec +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/policy.h +@@ -0,0 +1,38 @@ ++/* ++ * Copyright 2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef POLICY_H ++#define POLICY_H ++ ++/* Following defines affect the PLATFORM SECURITY POLICY */ ++ ++/* set this to 0x0 if the platform is not using/responding to ECC errors ++ * set this to 0x1 if ECC is being used (we have to do some init) ++ */ ++#define POLICY_USING_ECC 0x0 ++ ++/* Set this to 0x0 to leave the default SMMU page size in sACR ++ * Set this to 0x1 to change the SMMU page size to 64K ++ */ ++#define POLICY_SMMU_PAGESZ_64K 0x1 ++ ++/* ++ * POLICY_PERF_WRIOP = 0 : No Performance enhancement for WRIOP RN-I ++ * POLICY_PERF_WRIOP = 1 : No Performance enhancement for WRIOP RN-I = 7 ++ * POLICY_PERF_WRIOP = 2 : No Performance enhancement for WRIOP RN-I = 23 ++ */ ++#define POLICY_PERF_WRIOP 0 ++ ++/* ++ * set this to '1' if the debug clocks need to remain enabled during ++ * system entry to low-power (LPM20) - this should only be necessary ++ * for testing and NEVER set for normal production ++ */ ++#define POLICY_DEBUG_ENABLE 0 ++ ++ ++#endif /* POLICY_H */ +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0009-lx2160a-support-flushing-i2c-bus-before-ddr-init.patch new file +365
-0@@ -0,0 +1,365 @@ +From efa6cca1a194050caa37a16ddccbf5d6e568b42f Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 25 Oct 2024 15:36:57 +0200 +Subject: [PATCH 09/11] lx2160a: support flushing i2c bus before ddr init + +The i2c bus can get locked by a slave device holding sda low, when the +cpu is reset during a transaction. +Implement workaround according to LX2160A Chip Errata 07/2020 A-010650. + +The workaround is inactive by default and must be explicitly enabled +through a board platform.mk file defining buses and muxes to flush: + +LX2160_FLUSH_IIC: 1D array, takes comma separate uint8 indicating +human-readable i2c bus number, +e.g: IIC1 & IIC2 = "1, 2". + +LX2160_FLUSH_IIC_MUX: 2D array, takes comma-separated 1D array +initializer expressions with i2c bus number, mux address on the bus and +a bitmask for channels to flush, +e.g. IIC1 mux @ 77, channels 1&2 = "{1, 0x77, 0x03}". + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/common/setup/common.mk | 1 + + plat/nxp/common/setup/include/plat_common.h | 2 + + plat/nxp/common/setup/ls_bl2_el3_setup.c | 1 + + plat/nxp/common/setup/ls_i2c_init.c | 274 ++++++++++++++++++++ + plat/nxp/soc-lx2160a/soc.mk | 6 + + 5 files changed, 284 insertions(+) + create mode 100644 plat/nxp/common/setup/ls_i2c_init.c + +diff --git a/plat/nxp/common/setup/common.mk b/plat/nxp/common/setup/common.mk +index 1fcf1d093..6333ec515 100644 +--- a/plat/nxp/common/setup/common.mk ++++ b/plat/nxp/common/setup/common.mk +@@ -80,6 +80,7 @@ BL2_SOURCES += drivers/io/io_fip.c \ + plat/nxp/common/setup/ls_image_load.c \ + plat/nxp/common/setup/ls_io_storage.c \ + plat/nxp/common/setup/ls_bl2_el3_setup.c \ ++ plat/nxp/common/setup/ls_i2c_init.c \ + plat/nxp/common/setup/${ARCH}/ls_bl2_mem_params_desc.c + + BL31_SOURCES += plat/nxp/common/setup/ls_bl31_setup.c \ +diff --git a/plat/nxp/common/setup/include/plat_common.h b/plat/nxp/common/setup/include/plat_common.h +index 45832fa68..1c850ebe2 100644 +--- a/plat/nxp/common/setup/include/plat_common.h ++++ b/plat/nxp/common/setup/include/plat_common.h +@@ -77,6 +77,8 @@ int open_backend(const uintptr_t spec); + void ls_bl2_plat_arch_setup(void); + void ls_bl2_el3_plat_arch_setup(void); + ++void bl2_i2c_init(void); ++ + enum boot_device { + BOOT_DEVICE_IFC_NOR, + BOOT_DEVICE_IFC_NAND, +diff --git a/plat/nxp/common/setup/ls_bl2_el3_setup.c b/plat/nxp/common/setup/ls_bl2_el3_setup.c +index a4cbaef45..63e3460d7 100644 +--- a/plat/nxp/common/setup/ls_bl2_el3_setup.c ++++ b/plat/nxp/common/setup/ls_bl2_el3_setup.c +@@ -276,6 +276,7 @@ void bl2_el3_plat_prepare_exit(void) + */ + void bl2_plat_preload_setup(void) + { ++ bl2_i2c_init(); + + soc_preload_setup(); + +diff --git a/plat/nxp/common/setup/ls_i2c_init.c b/plat/nxp/common/setup/ls_i2c_init.c +new file mode 100644 +index 000000000..5392b160d +--- /dev/null ++++ b/plat/nxp/common/setup/ls_i2c_init.c +@@ -0,0 +1,274 @@ ++#include <stdint.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++ ++#include <common/debug.h> ++#include <drivers/delay_timer.h> ++#include <i2c.h> ++#include <soc.h> ++ ++#define NXP_IIC1_ADDR 0x02000000 ++#define NXP_IIC2_ADDR 0x02010000 ++#define NXP_IIC3_ADDR 0x02020000 ++#define NXP_IIC4_ADDR 0x02030000 ++#define NXP_IIC5_ADDR 0x02040000 ++#define NXP_IIC6_ADDR 0x02050000 ++#define NXP_IIC7_ADDR 0x02060000 ++#define NXP_IIC8_ADDR 0x02070000 ++ ++#define RCWSR12 0x01e0012c ++#define RCWSR12_IIC2_PMUX_MASK 0x00000007 /* [0..2] */ ++#define RCWSR12_IIC2_PMUX_IIC2 0x00000000 ++#define RCWSR12_IIC2_PMUX_GPIO 0x00000001 ++#define RCWSR12_IIC3_PMUX_MASK 0x00000038 /* [3..5] */ ++#define RCWSR12_IIC3_PMUX_IIC3 0x00000000 ++#define RCWSR12_IIC3_PMUX_GPIO 0x00000008 ++#define RCWSR12_IIC4_PMUX_MASK 0x000001c0 /* [6..8] */ ++#define RCWSR12_IIC4_PMUX_IIC4 0x00000000 ++#define RCWSR12_IIC4_PMUX_GPIO 0x00000040 ++#define RCWSR12_IIC5_PMUX_MASK 0x00000e00 /* [9..11] */ ++#define RCWSR12_IIC5_PMUX_IIC5 0x00000000 ++#define RCWSR12_IIC5_PMUX_GPIO 0x00000200 ++#define RCWSR12_IIC6_PMUX_MASK 0x00007000 /* [12..14] */ ++#define RCWSR12_IIC6_PMUX_IIC6 0x00000000 ++#define RCWSR12_IIC6_PMUX_GPIO 0x00001000 ++#define RCWSR13 0x01e00130 ++#define RCWSR12_SDHC2_DAT74_PMUX_MASK 0x00000003 ++#define RCWSR12_SDHC2_DAT74_PMUX_SDHC2 0x00000000 ++#define RCWSR12_SDHC2_DAT74_PMUX_IIC78 0x00000001 ++#define RCWSR14 0x01e00134 ++#define RCWSR14_IIC1_PMUX_MASK 0x00000400 /* [10] */ ++#define RCWSR14_IIC1_PMUX_IIC1 0x00000000 ++#define RCWSR14_IIC1_PMUX_GPIO 0x00000400 ++ ++static void ls_i2c_flush_pca9547(uint8_t busno, const char *busname, uint8_t address, uint8_t channels); ++static void ls_i2c_flush(uint8_t busno, const char *busname); ++ ++/** ++ * Flush i2c buses to make slave devices release sda, ++ * in case the system was reset during a transaction. ++ */ ++void bl2_i2c_init() { ++ const uint8_t bus_flush_list[] = {CONFIG_LX2160_FLUSH_IIC}; ++ /* ++ * List of muxes and channels to flush. Takes 2D array: ++ * {<bus number>, <mux chip address>, <channel bitmask>}, ++ */ ++ const uint8_t mux_flush_list[][3] = {CONFIG_LX2160_FLUSH_IIC_MUX}; ++ const uintptr_t iic_base_addr[] = { ++ NXP_IIC1_ADDR, ++ NXP_IIC2_ADDR, ++ NXP_IIC3_ADDR, ++ NXP_IIC4_ADDR, ++ NXP_IIC5_ADDR, ++ NXP_IIC6_ADDR, ++ }; ++ const char *iic_name[] = { ++ "IIC1", ++ "IIC2", ++ "IIC3", ++ "IIC4", ++ "IIC5", ++ "IIC6", ++ }; ++ int i; ++ uint8_t busno; ++ uint8_t address; ++ uint8_t channels; ++ ++ /* flush i2c buses */ ++ for (i = 0; i < ARRAY_SIZE(bus_flush_list); i++) { ++ busno = bus_flush_list[i] - 1; ++ i2c_init(iic_base_addr[busno]); ++ ls_i2c_flush(busno, iic_name[busno]); ++ } ++ ++ /* flush muxes channels */ ++ for (i = 0; i < ARRAY_SIZE(mux_flush_list); i++) { ++ busno = mux_flush_list[i][0] - 1; ++ address = mux_flush_list[i][1]; ++ channels = mux_flush_list[i][2]; ++ i2c_init(iic_base_addr[busno]); ++ ls_i2c_flush_pca9547(busno, iic_name[busno], address, channels); ++ } ++} ++ ++static void ls_i2c_flush_pca9547(uint8_t busno, const char *busname, uint8_t chip, uint8_t channels) { ++ uint8_t channel, creg = 0; ++ char buffer[64]; ++ int ret; ++ ++ /* try read configuration register */ ++ ret = i2c_read(chip, 0x00, 1, &creg, 1); ++ if(ret != 0) { ++ /* no device responding at address, skip */ ++ return; ++ } ++ ++ /* after reset configuration register reads 0x08 */ ++ if(creg != 0x08) { ++ /* probably not a pca9547, skip */ ++ return; ++ } ++ ++ /* flush selected channels */ ++ for(uint8_t i = 8; i > 0; i--) { ++ if (!(channels & (1 << (i-1)))) ++ continue; ++ ++ /* select channel i */ ++ channel = 0x08 | (i-1); ++ i2c_write(chip, 0x00, 1, &channel, 1); ++ ++ /* flush channel */ ++ snprintf(buffer, sizeof(buffer), "%s mux@%02x channel %u", busname, chip, i-1); ++ ls_i2c_flush(busno, buffer); ++ } ++} ++ ++static struct i2c_bus_info { ++ uintptr_t pinmux_addr; ++ uint32_t pinmux_mask; ++ uint32_t pinmux_sel; ++ uintptr_t gpio_addr; ++ uint8_t gpio_scl; ++ uint8_t gpio_sda; ++} ls_i2c_bus_info[] = { ++ { ++ .pinmux_addr = RCWSR14, ++ .pinmux_mask = RCWSR14_IIC1_PMUX_MASK, ++ .pinmux_sel = RCWSR14_IIC1_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 3, /* GPIO1_DAT03 */ ++ .gpio_sda = 2, /* GPIO1_DAT02 */ ++ }, ++ { ++ .pinmux_addr = RCWSR12, ++ .pinmux_mask = RCWSR12_IIC2_PMUX_MASK, ++ .pinmux_sel = RCWSR12_IIC2_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 31, /* GPIO1_DAT31 */ ++ .gpio_sda = 30, /* GPIO1_DAT30 */ ++ }, ++ { ++ .pinmux_addr = RCWSR12, ++ .pinmux_mask = RCWSR12_IIC3_PMUX_MASK, ++ .pinmux_sel = RCWSR12_IIC3_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 29, /* GPIO1_DAT29 */ ++ .gpio_sda = 28, /* GPIO1_DAT28 */ ++ }, ++ { ++ .pinmux_addr = RCWSR12, ++ .pinmux_mask = RCWSR12_IIC4_PMUX_MASK, ++ .pinmux_sel = RCWSR12_IIC4_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 27, /* GPIO1_DAT27 */ ++ .gpio_sda = 26, /* GPIO1_DAT26 */ ++ }, ++ { ++ .pinmux_addr = RCWSR12, ++ .pinmux_mask = RCWSR12_IIC5_PMUX_MASK, ++ .pinmux_sel = RCWSR12_IIC5_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 25, /* GPIO1_DAT25 */ ++ .gpio_sda = 24, /* GPIO1_DAT24 */ ++ }, ++ { ++ .pinmux_addr = RCWSR12, ++ .pinmux_mask = RCWSR12_IIC6_PMUX_MASK, ++ .pinmux_sel = RCWSR12_IIC6_PMUX_GPIO, ++ .gpio_addr = NXP_GPIO1_ADDR, ++ .gpio_scl = 23, /* GPIO1_DAT23 */ ++ .gpio_sda = 22, /* GPIO1_DAT22 */ ++ }, ++ { ++ .pinmux_addr = RCWSR13, ++ .pinmux_mask = RCWSR12_SDHC2_DAT74_PMUX_MASK, ++ .pinmux_sel = RCWSR12_SDHC2_DAT74_PMUX_IIC78, ++ .gpio_addr = NXP_GPIO2_ADDR, ++ .gpio_scl = 16, /* GPIO2_DAT16 */ ++ .gpio_sda = 15, /* GPIO2_DAT15 */ ++ }, ++ { ++ .pinmux_addr = RCWSR13, ++ .pinmux_mask = RCWSR12_SDHC2_DAT74_PMUX_MASK, ++ .pinmux_sel = RCWSR12_SDHC2_DAT74_PMUX_IIC78, ++ .gpio_addr = NXP_GPIO2_ADDR, ++ .gpio_scl = 18, /* GPIO2_DAT18 */ ++ .gpio_sda = 17, /* GPIO2_DAT17 */ ++ }, ++}; ++ ++/* ++ * Flush the i2c bus through any muxes with 9 clock cycles ++ * to ensure all slave devices release their locks on SDA. ++ * This is a work-around for i2c slave devices locking SDA, ++ * when the system has been reset during a transaction. ++ * ++ * The implementation is inspired by LX2160A Chip Errata 07/2020 A-010650. ++ */ ++static void ls_i2c_flush(uint8_t busno, const char *busname) { ++ struct i2c_bus_info *info; ++ uintptr_t gpdir_addr, gpodr_addr, gpdat_addr; ++ uint32_t pinmux, gpdir, gpodr, gpdat; ++ struct { ++ uint32_t pinmux, gpdir, gpodr, gpdat; ++ } backup; ++ uint32_t scl_mask, sda_mask; ++ ++ if(busno >= 8) { ++ ERROR("failed to flush i2c bus %u %s: invalid bus number!\n", busno, busname); ++ return; ++ } ++ /* load i2c bus specific information */ ++ info = &ls_i2c_bus_info[busno]; ++ gpdir_addr = info->gpio_addr + 0x0; ++ gpodr_addr = info->gpio_addr + 0x4; ++ gpdat_addr = info->gpio_addr + 0x8; ++ scl_mask = 0x80000000 >> info->gpio_scl; ++ sda_mask = 0x80000000 >> info->gpio_sda; ++ ++ /* backup configuration registers */ ++ pinmux = backup.pinmux = mmio_read_32(info->pinmux_addr); ++ gpdir = backup.gpdir = mmio_read_32(gpdir_addr); ++ gpodr = backup.gpodr = mmio_read_32(gpodr_addr); ++ gpdat = backup.gpdat = mmio_read_32(gpdat_addr); ++ ++ /* configure SCL+SDA as GPIOs */ ++ pinmux = (pinmux & ~info->pinmux_mask) | info->pinmux_sel; ++ mmio_write_32(info->pinmux_addr, pinmux); ++ ++ /* configure SCL+SDA as output open drain */ ++ gpdir |= scl_mask | sda_mask; ++ gpodr |= scl_mask | sda_mask; ++ gpdat |= scl_mask | sda_mask; ++ mmio_write_32(gpdir_addr, gpdir); ++ mmio_write_32(gpodr_addr, gpodr); ++ mmio_write_32(gpdat_addr, gpdat); ++ ++ /* ++ * reliable detection of blocked bus is hard ++ * because sda depends on the last sent bit. ++ * Flush unconditionally instead. ++ */ ++ ++ VERBOSE("flushing i2c bus %u (%s)\n", busno, busname); ++ ++ /* toggle clock 9 times */ ++ for(uint8_t i = 0; i < 9; i++) { ++ mmio_write_32(gpdat_addr, gpdat & ~scl_mask); ++ udelay(10); ++ mmio_write_32(gpdat_addr, gpdat | scl_mask); ++ udelay(10); ++ } ++ ++ /* restore configuration registers */ ++ mmio_write_32(gpdat_addr, backup.gpdat); ++ mmio_write_32(gpodr_addr, backup.gpodr); ++ mmio_write_32(gpdir_addr, backup.gpdir); ++ mmio_write_32(info->pinmux_addr, backup.pinmux); ++ ++ return; ++} +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index 20e64753c..fa8c63251 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -185,3 +185,9 @@ ifneq (${LX2160A_S5_GPIO_ADDR},0) + $(eval $(call add_define_val,CONFIG_LX2160A_S5_GPIO_ADDR,$(LX2160A_S5_GPIO_ADDR))) + $(eval $(call add_define_val,CONFIG_LX2160A_S5_GPIO,$(LX2160A_S5_GPIO))) + endif ++ ++# I2C Bus Flushing (optional) ++LX2160_FLUSH_IIC ?= "" ++LX2160_FLUSH_IIC_MUX ?= "" ++$(eval $(call add_define_val,CONFIG_LX2160_FLUSH_IIC,"$(LX2160_FLUSH_IIC)")) ++$(eval $(call add_define_val,CONFIG_LX2160_FLUSH_IIC_MUX,"$(LX2160_FLUSH_IIC_MUX)")) +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0010-lx2160acex6-flush-i2c-bus-with-spd-eeprom-before-ddr.patch new file +30
-0@@ -0,0 +1,30 @@ +From 668924da1e8df2036dc05022616eb7d15a8c8727 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 25 Oct 2024 16:43:59 +0200 +Subject: [PATCH 10/11] lx2160acex6: flush i2c bus with spd eeprom before ddr + init + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/platform.mk | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +index 1165cfa09..950207878 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +@@ -29,6 +29,11 @@ CONFIG_DDR_NODIMM := 0 + LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR + LX2160A_S5_GPIO := 0 + ++# I2C Bus Flushing: IIC1 ++LX2160_FLUSH_IIC := 1, ++# I2C Mux Flushing: IIC1: PCA9547@77: Channel 0 (SPD EEPROM) ++LX2160_FLUSH_IIC_MUX := { 1, 0x77, 0x01 }, ++ + # DDR Errata + ERRATA_DDR_A011396 := 1 + ERRATA_DDR_A050450 := 1 +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0011-lx2160acex7-flush-i2c-bus-with-spd-eeprom-before-ddr.patch new file +30
-0@@ -0,0 +1,30 @@ +From 722e93b7d159dfb9435e642cb0b38c2255a10391 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 25 Oct 2024 18:11:56 +0200 +Subject: [PATCH 11/11] lx2160acex7: flush i2c bus with spd eeprom before ddr + init + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex7/platform.mk | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +index 37598c2d7..0b064bbbf 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160acex7/platform.mk +@@ -24,6 +24,11 @@ APPLY_MAX_CDD := yes + LX2160A_S5_GPIO_ADDR := NXP_GPIO3_ADDR + LX2160A_S5_GPIO := 7 + ++# I2C Bus Flushing: IIC1 ++LX2160_FLUSH_IIC := 1, ++# I2C Mux Flushing: IIC1: PCA9547@77: Channel 0 (SPD EEPROM) ++LX2160_FLUSH_IIC_MUX := { 1, 0x77, 0x01 }, ++ + # DDR Errata + ERRATA_DDR_A011396 := 1 + ERRATA_DDR_A050450 := 1 +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0012-plat-lx2160a-fix-building-without-NXP_NV_SW_MAINT_LA.patch new file +49
-0@@ -0,0 +1,49 @@ +From 94bdc4e055d10b89c7683c7966791612a7aed455 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Tue, 30 Jul 2024 17:45:33 +0300 +Subject: [PATCH 12/13] plat: lx2160a: fix building without + NXP_NV_SW_MAINT_LAST_EXEC_DATA + +Fix compiler errors encountered when disabling non-volatile storage of +execution state (NXP_NV_SW_MAINT_LAST_EXEC_DATA := no) while keeping +watchdog restart enabled (NXP_WDOG_RESTART := yes). + +Signed-off-by: Josua Mayer <[email protected]> +--- + drivers/nxp/ddr/phy-gen2/phy.h | 2 +- + plat/nxp/soc-lx2160a/soc.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/nxp/ddr/phy-gen2/phy.h b/drivers/nxp/ddr/phy-gen2/phy.h +index 5e80f3638..7ddc7c7c6 100644 +--- a/drivers/nxp/ddr/phy-gen2/phy.h ++++ b/drivers/nxp/ddr/phy-gen2/phy.h +@@ -6,7 +6,7 @@ + #if !defined(PHY_H) && defined(NXP_WARM_BOOT) + #define PHY_H + +-#include <flash_info.h> ++#include <drivers/nxp/flexspi/flash_info.h> + + /* To store sector size to be erase on flash*/ + #define PHY_ERASE_SIZE F_SECTOR_ERASE_SZ +diff --git a/plat/nxp/soc-lx2160a/soc.c b/plat/nxp/soc-lx2160a/soc.c +index 137c24ef8..4aebb1393 100644 +--- a/plat/nxp/soc-lx2160a/soc.c ++++ b/plat/nxp/soc-lx2160a/soc.c +@@ -521,10 +521,12 @@ void soc_init(void) + static uint64_t wdog_interrupt_handler(uint32_t id, uint32_t flags, + void *handle, void *cookie) + { ++#ifdef NXP_NV_SW_MAINT_LAST_EXEC_DATA + uint8_t data = WDOG_RESET_FLAG; + + wr_nv_app_data(WDT_RESET_FLAG_OFFSET, + (uint8_t *)&data, sizeof(data)); ++#endif + + mmio_write_32(NXP_RST_ADDR + RSTCNTL_OFFSET, SW_RST_REQ_INIT); + +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0013-plat-lx2160a-fix-boot-without-spi-flash-disable-non-.patch new file +33
-0@@ -0,0 +1,33 @@ +From cbe4212aaa1b934135c8400f16265849d12689c0 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Tue, 30 Jul 2024 17:45:38 +0300 +Subject: [PATCH 13/13] plat: lx2160a: fix boot without spi flash / disable + non-volatile storage + +Watchdog restart function does not require book-keeping on non-volatile +storage. +Remove explicit enabling of NXP_NV_SW_MAINT_LAST_EXEC_DATA. + +This fixed hang during boot where atf gets stuck trying to erase a +sector of spi flash. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/soc.mk | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk +index fa8c63251..4e864e164 100644 +--- a/plat/nxp/soc-lx2160a/soc.mk ++++ b/plat/nxp/soc-lx2160a/soc.mk +@@ -28,7 +28,6 @@ NXP_WDOG_RESTART := yes + + # for features enabled above. + ifeq (${NXP_WDOG_RESTART}, yes) +-NXP_NV_SW_MAINT_LAST_EXEC_DATA := yes + LS_EL3_INTERRUPT_HANDLER := yes + $(eval $(call add_define, NXP_WDOG_RESTART)) + endif +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0014-add-separate-platform-for-solidrun-lx2162a-som.patch new file +597
-0@@ -0,0 +1,597 @@ +From 956be9ce8f365e7f9ac7d7d1f896f1c2a27f6287 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Sun, 27 Oct 2024 18:00:11 +0100 +Subject: [PATCH] add separate platform for solidrun lx2162a som + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2162asom/ddr_init.c | 290 ++++++++++++++++++ + plat/nxp/soc-lx2160a/lx2162asom/plat_def.h | 105 +++++++ + plat/nxp/soc-lx2160a/lx2162asom/platform.c | 29 ++ + plat/nxp/soc-lx2160a/lx2162asom/platform.mk | 61 ++++ + .../nxp/soc-lx2160a/lx2162asom/platform_def.h | 14 + + plat/nxp/soc-lx2160a/lx2162asom/policy.h | 38 +++ + 6 files changed, 537 insertions(+) + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/ddr_init.c + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/plat_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/platform.c + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/platform.mk + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/platform_def.h + create mode 100644 plat/nxp/soc-lx2160a/lx2162asom/policy.h + +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/ddr_init.c b/plat/nxp/soc-lx2160a/lx2162asom/ddr_init.c +new file mode 100644 +index 000000000..2cadab7ba +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/ddr_init.c +@@ -0,0 +1,290 @@ ++/* ++ * Copyright 2018-2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <assert.h> ++#include <errno.h> ++#include <stdbool.h> ++#include <stdint.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++ ++#include <common/debug.h> ++#include <ddr.h> ++#include <lib/utils.h> ++#include <load_img.h> ++ ++#include "plat_common.h" ++#include <platform_def.h> ++ ++#ifdef CONFIG_STATIC_DDR ++#error not implemented ++#elif defined(CONFIG_DDR_NODIMM) ++#if CONFIG_DDR_NODIMM == 1 ++/* ++ * SoM Revision 1.1: 9 x K4A8G085WC-BCWE (SDP, 8GB w/ ECC) ++ * ++ * Use in production for units with empty SPD, ++ * and development. ++ */ ++static const struct dimm_params static_dimm = { ++ .mpart = "Fixed DDR Config 1", ++ .n_ranks = 1, ++ .die_density = 0x5, // encoded per spd byte 4, 0b101 = 8Gbit ++ .rank_density = 0x200000000, // 8GB ++ .capacity = 0x200000000, // 8GB ++ .primary_sdram_width = 64, ++ .ec_sdram_width = 8, // 8 bit ecc extension ++ .rdimm = 0, ++ .package_3ds = 0, ++ .device_width = 8, // 8 bit per sdram ++ .rc = 0, ++ ++ .n_row_addr = 16, ++ .n_col_addr = 10, ++ .edc_config = 2, // enable ecc ++ .bank_addr_bits = 0, // 4 banks ++ .bank_group_bits = 2, // 4 bank groups ++ .burst_lengths_bitmask = 0xc, // enable 4 & 8-bit burst (DDR4 spec) ++ ++ .mirrored_dimm = 0, ++ ++ // timings based on K4A8G085WC-BCTD (DDR4-2666), missing values for 3200 ++ .mtb_ps = 125, // MTB per SPD spec ++ .ftb_10th_ps = 10, // default value, unused by nxp ddr driver ++ .taa_ps = 13750, // min. 13.75ns ++ .tfaw_ps = 21000, // min: max(21ns or 20CK) (this 8Gbit sdram has 1KB pages) ++ ++ .tckmin_x_ps = 625, // 3200 (CK=1600) ++ .tckmax_ps = 1250, // 1600 (CK=800) ++ ++ .caslat_x = 0b00000001011111111111110000000000, // CL = [10-22,24] (1 << CL) ++ ++ .trcd_ps = 13750, // 13.75ns - CL22-22-22 ++ .trp_ps = 13750, // 13.75ns - CL22-22-22 ++ .tras_ps = 32000, // 32ns ++ ++ .trfc1_ps = 350000, // 350ns ++ .trfc2_ps = 260000, // 260ns ++ .trfc4_ps = 160000, // 160ns ++ .trrds_ps = 3300, // min: max(4CK or 3.3ns) ++ .trrdl_ps = 4900, // min: max(4CK or 6.4ns) ++ .tccdl_ps = 5000, // min: max(5CK or 5ns) ++ .trfc_slr_ps = 0, ++ ++ .trc_ps = 45750, // tras + trp 45.75ns ++ .twr_ps = 15000, // 15ns ++ ++ .refresh_rate_ps = 7800000, // 1x mode 7.8us for standard temperature range (TODO: pick correct range based on temperature?!) ++ // .extended_op_srt = 0, ++ ++ // .rcw = {}, // only for registered dimm ++ .dq_mapping = { ++ 0x16, // DQ[0:3]: lower nibble, bit order 3120 ++ 0x22, // DQ[4:7]: upper nibble, bit order 4576 ++ 0x0e, // DQ[8:11]: lower nibble, bit order 2031 ++ 0x30, // DQ[12:15]: upper nibble, bit order 6574 ++ 0x14, // DQ[16:19]: lower nibble, bit order 3021 ++ 0x36, // DQ[20:23]: upper nibble, bit order 7564 ++ 0x11, // DQ[24:27]: lower nibble, bit order 2301 ++ 0x2f, // DQ[28:31]: upper nibble, bit order 6547 ++ 0x03, // ECC[0:3]: lower nibble, bit order 0213 ++ 0x22, // ECC[4:7]: upper nibble, bit order 4576 ++ 0x10, // DQ[32:35]: lower nibble, bit order 2130 ++ 0x30, // DQ[36:39]: upper nibble, bit order 6574 ++ 0x0e, // DQ[40:43]: lower nibble, bit order 2031 ++ 0x34, // DQ[44:47]: upper nibble, bit order 7465 ++ 0x14, // DQ[48:51]: lower nibble, bit order 3021 ++ 0x36, // DQ[52:55]: upper nibble, bit order 7564 ++ 0x10, // DQ[56:59]: lower nibble, bit order 2130 ++ 0x2b, // DQ[60:63]: upper nibble, bit order 5746 ++ }, ++ .dq_mapping_ors = 1, ++}; ++#endif /* CONFIG_DDR_NODIMM == 1 */ ++ ++#if CONFIG_DDR_NODIMM == 2 ++/* ++ * SoM Revision 1.1: 9 x K4AAG085WA-BCWE (DDP, 16GB w/ ECC) ++ * ++ * Use in production for units with empty SPD, ++ * and development. ++ */ ++static const struct dimm_params static_dimm = { ++ .mpart = "Fixed DDR Config 2", ++ .n_ranks = 1, ++ .die_density = 0x6, // encoded per spd byte 4, 0b110 = 16Gbit ++ // TODO: for DDP memory should have 2 ranks per DIMM + correct density per die? ++ .rank_density = 0x400000000, // 16GB ++ .capacity = 0x400000000, // 16GB ++ .primary_sdram_width = 64, ++ .ec_sdram_width = 8, // 8 bit ecc extension ++ .rdimm = 0, ++ .package_3ds = 0, ++ .device_width = 8, // 8 bit per sdram ++ .rc = 0, ++ ++ .n_row_addr = 17, ++ .n_col_addr = 10, ++ .edc_config = 2, // enable ecc ++ .bank_addr_bits = 0, // 4 banks ++ .bank_group_bits = 2, // 4 bank groups ++ .burst_lengths_bitmask = 0xc, // enable 4 & 8-bit burst (DDR4 spec) ++ ++ .mirrored_dimm = 0, ++ ++ .mtb_ps = 125, // MTB per SPD spec ++ .ftb_10th_ps = 10, // default value, unused by nxp ddr driver ++ .taa_ps = 13750, // min. 13.75ns ++ .tfaw_ps = 30000, // min: max(30ns or 28CK) (this 16Gbit sdram has 2KB pages) ++ ++ .tckmin_x_ps = 625, // 3200 (CK=1600) ++ .tckmax_ps = 1250, // 1600 (CK=800) ++ ++ .caslat_x = 0b00000001011111111111110000000000, // CL = [10-22,24] (1 << CL) ++ ++ .trcd_ps = 13750, // 13.75ns ++ .trp_ps = 13750, // 13.75ns ++ .tras_ps = 32000, // 32ns ++ ++ .trfc1_ps = 350000, // 350ns, assumed same as 8Gbit SDP module ++ .trfc2_ps = 260000, // 260ns, assumed same as 8Gbit SDP module ++ .trfc4_ps = 160000, // 160ns, assumed same as 8Gbit SDP module ++ .trrds_ps = 5300, // min: max(4CK or 5.3ns) ++ .trrdl_ps = 6400, // min: max(4CK or 6.4ns) ++ .tccdl_ps = 5000, // min: max(5CK or 5ns) ++ .trfc_slr_ps = 0, ++ ++ .trc_ps = 45750, // tras + trp 45.75ns ++ .twr_ps = 15000, // 15ns ++ ++ .refresh_rate_ps = 7800000, // 1x mode 7.8us for standard temperature range (TODO: pick correct range based on temperature?!) ++ // .extended_op_srt = 0, ++ ++ // .rcw = {}, // only for registered dimm ++ .dq_mapping = { ++ 0x16, // DQ[0:3]: lower nibble, bit order 3120 ++ 0x22, // DQ[4:7]: upper nibble, bit order 4576 ++ 0x0e, // DQ[8:11]: lower nibble, bit order 2031 ++ 0x30, // DQ[12:15]: upper nibble, bit order 6574 ++ 0x14, // DQ[16:19]: lower nibble, bit order 3021 ++ 0x36, // DQ[20:23]: upper nibble, bit order 7564 ++ 0x11, // DQ[24:27]: lower nibble, bit order 2301 ++ 0x2f, // DQ[28:31]: upper nibble, bit order 6547 ++ 0x03, // ECC[0:3]: lower nibble, bit order 0213 ++ 0x22, // ECC[4:7]: upper nibble, bit order 4576 ++ 0x10, // DQ[32:35]: lower nibble, bit order 2130 ++ 0x30, // DQ[36:39]: upper nibble, bit order 6574 ++ 0x0e, // DQ[40:43]: lower nibble, bit order 2031 ++ 0x34, // DQ[44:47]: upper nibble, bit order 7465 ++ 0x14, // DQ[48:51]: lower nibble, bit order 3021 ++ 0x36, // DQ[52:55]: upper nibble, bit order 7564 ++ 0x10, // DQ[56:59]: lower nibble, bit order 2130 ++ 0x2b, // DQ[60:63]: upper nibble, bit order 5746 ++ }, ++ .dq_mapping_ors = 1, ++}; ++#endif /* CONFIG_DDR_NODIMM == 2 */ ++ ++int ddr_get_ddr_params(struct dimm_params *pdimm, ++ struct ddr_conf *conf) ++{ ++ // channel 1 ++ conf->dimm_in_use[0] = 1; ++ memcpy(&pdimm[0], &static_dimm, sizeof(struct dimm_params)); ++ ++ /* 1 module */ ++ return 0x1; ++} ++#endif /* defined(CONFIG_DDR_NODIMM) */ ++ ++int ddr_board_options(struct ddr_info *priv) ++{ ++ struct memctl_opt *popts = &priv->opt; ++ ++ popts->caslat_override = 0; ++ popts->caslat_override_value = 0; ++ popts->auto_self_refresh_en = 1; ++ popts->output_driver_impedance = 0; // 34 Ohm ++ popts->twot_en = 0; ++ popts->threet_en = 0; ++ popts->addt_lat_override = 0; ++ popts->addt_lat_override_value = 0; ++ popts->phy_atx_impedance = 30; ++ popts->skip2d = 0; ++ popts->vref_dimm = U(0x19); /* range 1, 83.4% */ ++ ++ popts->rtt_override = 0; ++ popts->rtt_park = 120U; ++ popts->otf_burst_chop_en = 0; ++ popts->burst_length = DDR_BL8; ++ popts->trwt_override = 1; ++ popts->bstopre = 0; /* auto precharge */ ++ popts->addr_hash = 1; ++ popts->trwt = 0x3; ++ popts->twrt = 0x3; ++ popts->trrt = 0x3; ++ popts->twwt = 0x3; ++ popts->vref_phy = U(0x5D); /* 72% */ ++ popts->odt = 60U; ++ popts->phy_tx_impedance = 28U; ++ ++ return 0; ++} ++ ++#ifdef NXP_WARM_BOOT ++long long init_ddr(uint32_t wrm_bt_flg) ++#else ++long long init_ddr(void) ++#endif ++{ ++ int spd_addr[] = { 0x51 }; ++ struct ddr_info info; ++ struct sysinfo sys; ++ long long dram_size; ++ ++ zeromem(&sys, sizeof(sys)); ++ if (get_clocks(&sys) != 0) { ++ ERROR("System clocks are not set\n"); ++ panic(); ++ } ++ debug("platform clock %lu\n", sys.freq_platform); ++ debug("DDR PLL1 %lu\n", sys.freq_ddr_pll0); ++ debug("DDR PLL2 %lu\n", sys.freq_ddr_pll1); ++ ++ zeromem(&info, sizeof(info)); ++ ++ /* Set two DDRC. Unused DDRC will be removed automatically. */ ++ info.num_ctlrs = NUM_OF_DDRC; ++ info.spd_addr = spd_addr; ++ info.ddr[0] = (void *)NXP_DDR_ADDR; ++ info.ddr[1] = (void *)NXP_DDR2_ADDR; ++ info.phy[0] = (void *)NXP_DDR_PHY1_ADDR; ++ info.phy[1] = (void *)NXP_DDR_PHY2_ADDR; ++ info.clk = get_ddr_freq(&sys, 0); ++ info.img_loadr = load_img; ++ info.phy_gen2_fw_img_buf = PHY_GEN2_FW_IMAGE_BUFFER; ++ if (info.clk == 0) { ++ info.clk = get_ddr_freq(&sys, 1); ++ } ++ info.dimm_on_ctlr = DDRC_NUM_DIMM; ++ ++ info.warm_boot_flag = DDR_WRM_BOOT_NT_SUPPORTED; ++ ++ dram_size = dram_init(&info ++#if defined(NXP_HAS_CCN504) || defined(NXP_HAS_CCN508) ++ , NXP_CCN_HN_F_0_ADDR ++#endif ++ ); ++ ++ ++ if (dram_size < 0) { ++ ERROR("DDR init failed.\n"); ++ } ++ ++ return dram_size; ++} +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/plat_def.h b/plat/nxp/soc-lx2160a/lx2162asom/plat_def.h +new file mode 100644 +index 000000000..de2d2444a +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/plat_def.h +@@ -0,0 +1,105 @@ ++/* ++ * Copyright 2018-2021 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLAT_DEF_H ++#define PLAT_DEF_H ++ ++#include <arch.h> ++#include <cortex_a72.h> ++/* Required without TBBR. ++ * To include the defines for DDR PHY ++ * Images. ++ */ ++#include <tbbr_img_def.h> ++ ++#include <policy.h> ++#include <soc.h> ++ ++#if defined(IMAGE_BL31) ++#define LS_SYS_TIMCTL_BASE 0x2890000 ++#define PLAT_LS_NSTIMER_FRAME_ID 0 ++#define LS_CONFIG_CNTACR 1 ++#endif ++ ++#define NXP_SYSCLK_FREQ 100000000 ++#define NXP_DDRCLK_FREQ 100000000 ++ ++/* UART related definition */ ++#define NXP_CONSOLE_ADDR NXP_UART_ADDR ++#define NXP_CONSOLE_BAUDRATE 115200 ++ ++/* Size of cacheable stacks */ ++#if defined(IMAGE_BL2) ++#if defined(TRUSTED_BOARD_BOOT) ++#define PLATFORM_STACK_SIZE 0x2000 ++#else ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++#elif defined(IMAGE_BL31) ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++ ++/* SD block buffer */ ++#define NXP_SD_BLOCK_BUF_SIZE (0x8000) ++#define NXP_SD_BLOCK_BUF_ADDR (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++ ++#ifdef SD_BOOT ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \ ++ - NXP_SD_BLOCK_BUF_SIZE) ++#else ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE) ++#endif ++ ++/* IO defines as needed by IO driver framework */ ++#define MAX_IO_DEVICES 4 ++#define MAX_IO_BLOCK_DEVICES 1 ++#define MAX_IO_HANDLES 4 ++ ++#define PHY_GEN2_FW_IMAGE_BUFFER (NXP_OCRAM_ADDR + CSF_HDR_SZ) ++ ++/* ++ * FIP image defines - Offset at which FIP Image would be present ++ * Image would include Bl31 , Bl33 and Bl32 (optional) ++ */ ++#ifdef POLICY_FUSE_PROVISION ++#define MAX_FIP_DEVICES 3 ++#endif ++ ++#ifndef MAX_FIP_DEVICES ++#define MAX_FIP_DEVICES 2 ++#endif ++ ++/* ++ * ID of the secure physical generic timer interrupt used by the BL32. ++ */ ++#define BL32_IRQ_SEC_PHY_TIMER 29 ++ ++#define BL31_WDOG_SEC 89 ++ ++#define BL31_NS_WDOG_WS1 108 ++ ++/* ++ * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3 ++ * terminology. On a GICv2 system or mode, the lists will be merged and treated ++ * as Group 0 interrupts. ++ */ ++#define PLAT_LS_G1S_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE) ++ ++/* SGI 15 and Secure watchdog interrupts assigned to Group 0 */ ++#define NXP_IRQ_SEC_SGI_7 15 ++ ++#define PLAT_LS_G0_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(BL31_NS_WDOG_WS1, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(NXP_IRQ_SEC_SGI_7, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_LEVEL) ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/platform.c b/plat/nxp/soc-lx2160a/lx2162asom/platform.c +new file mode 100644 +index 000000000..7622cf09a +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/platform.c +@@ -0,0 +1,29 @@ ++/* ++ * Copyright 2020 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#include <plat_common.h> ++ ++#pragma weak board_enable_povdd ++#pragma weak board_disable_povdd ++ ++bool board_enable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} ++ ++bool board_disable_povdd(void) ++{ ++#ifdef CONFIG_POVDD_ENABLE ++ return true; ++#else ++ return false; ++#endif ++} +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/platform.mk b/plat/nxp/soc-lx2160a/lx2162asom/platform.mk +new file mode 100644 +index 000000000..c1ba077e9 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/platform.mk +@@ -0,0 +1,61 @@ ++# ++# Copyright 2018-2020 NXP ++# ++# SPDX-License-Identifier: BSD-3-Clause ++# ++ ++# board-specific build parameters ++ ++BOOT_MODE ?= flexspi_nor ++BOARD ?= lx2162asom ++POVDD_ENABLE := no ++NXP_COINED_BB := no ++ ++ # DDR Compilation Configs ++NUM_OF_DDRC := 1 ++DDRC_NUM_DIMM := 1 ++DDRC_NUM_CS := 2 ++DDR_ECC_EN := yes ++ #enable address decoding feature ++DDR_ADDR_DEC := yes ++APPLY_MAX_CDD := yes ++ ++# Mock SPD: ++# - 0: disable mock spd ++# - 1: 9 x K4A8G085WC-BCWE SoM v1.1 8GB w/ ECC ++# - 2: 9 x K4AAG085WA-BCWE SoM v1.1 16GB w/ ECC ++CONFIG_DDR_NODIMM := 0 ++ ++# I2C Bus Flushing: IIC1 (SPD EEPROM) ++LX2160_FLUSH_IIC := 1, ++ ++# DDR Errata ++ERRATA_DDR_A011396 := 1 ++ERRATA_DDR_A050450 := 1 ++ ++# On-Board Flash Details ++FLASH_TYPE := MT35XU512A ++XSPI_FLASH_SZ := 0x10000000 ++NXP_XSPI_NOR_UNIT_SIZE := 0x20000 ++BL2_BIN_XSPI_NOR_END_ADDRESS := 0x100000 ++# CONFIG_FSPI_ERASE_4K is required to erase 4K sector sizes. This ++# config is enabled for future use cases. ++FSPI_ERASE_4K := 0 ++ ++# Platform specific features. ++WARM_BOOT := no ++ ++# Adding Platform files build files ++BL2_SOURCES += ${BOARD_PATH}/ddr_init.c\ ++ ${BOARD_PATH}/platform.c ++ ++SUPPORTED_BOOT_MODE := flexspi_nor \ ++ sd \ ++ emmc \ ++ auto ++ ++# Adding platform board build info ++include plat/nxp/common/plat_make_helper/plat_common_def.mk ++ ++# Adding SoC build info ++include plat/nxp/soc-lx2160a/soc.mk +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/platform_def.h b/plat/nxp/soc-lx2160a/lx2162asom/platform_def.h +new file mode 100644 +index 000000000..5fa774e90 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/platform_def.h +@@ -0,0 +1,14 @@ ++/* ++ * Copyright 2018-2020 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef PLATFORM_DEF_H ++#define PLATFORM_DEF_H ++ ++#include "plat_def.h" ++#include "plat_default_def.h" ++ ++#endif +diff --git a/plat/nxp/soc-lx2160a/lx2162asom/policy.h b/plat/nxp/soc-lx2160a/lx2162asom/policy.h +new file mode 100644 +index 000000000..1095f3840 +--- /dev/null ++++ b/plat/nxp/soc-lx2160a/lx2162asom/policy.h +@@ -0,0 +1,38 @@ ++/* ++ * Copyright 2018-2020 NXP ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ */ ++ ++#ifndef POLICY_H ++#define POLICY_H ++ ++/* Following defines affect the PLATFORM SECURITY POLICY */ ++ ++/* set this to 0x0 if the platform is not using/responding to ECC errors ++ * set this to 0x1 if ECC is being used (we have to do some init) ++ */ ++#define POLICY_USING_ECC 0x0 ++ ++/* Set this to 0x0 to leave the default SMMU page size in sACR ++ * Set this to 0x1 to change the SMMU page size to 64K ++ */ ++#define POLICY_SMMU_PAGESZ_64K 0x1 ++ ++/* ++ * POLICY_PERF_WRIOP = 0 : No Performance enhancement for WRIOP RN-I ++ * POLICY_PERF_WRIOP = 1 : No Performance enhancement for WRIOP RN-I = 7 ++ * POLICY_PERF_WRIOP = 2 : No Performance enhancement for WRIOP RN-I = 23 ++ */ ++#define POLICY_PERF_WRIOP 0 ++ ++/* ++ * set this to '1' if the debug clocks need to remain enabled during ++ * system entry to low-power (LPM20) - this should only be necessary ++ * for testing and NEVER set for normal production ++ */ ++#define POLICY_DEBUG_ENABLE 0 ++ ++ ++#endif /* POLICY_H */ +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0015-lx2160acex6-add-ddr-configuration-for-pcb-v1.2-with-.patch new file +127
-0@@ -0,0 +1,127 @@ +From 319f6d2f0cbbb54ac56926683c5e0dfefe984e64 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Sun, 24 Nov 2024 12:38:17 +0100 +Subject: [PATCH] lx2160acex6: add ddr configuration for pcb v1.2 with ecc + +Tune DDR Configuration for v1.1 PCB with MIcron memory, and v1.2 PCB +resolving ECC issues. + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c | 42 +++++++++++++------- + plat/nxp/soc-lx2160a/lx2160acex6/platform.mk | 3 +- + 2 files changed, 29 insertions(+), 16 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +index 0b978e298..61acfd7ac 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +@@ -31,21 +31,29 @@ + #error Not implemented. + #endif /* CONFIG_DDR_NODIMM == 1 */ + +-#if CONFIG_DDR_NODIMM == 2 ++#if CONFIG_DDR_NODIMM == 2 || CONFIG_DDR_NODIMM == 3 + /* +- * PCB Revision 1.1: 2 x 5 x K4A8G165WB-BCRC +- * +- * ECC disabled because of training failures. ++ * PCB Revision 1.1/1.2: 2 x 5 x MT40A1G16TB-062E IT:F + */ + #define CONFIG_DDR_NODIMM_CH2 ++ ++#if CONFIG_DDR_NODIMM == 3 ++/* PCB Revision 1.2 supports ECC */ ++#define CONFIG_DDR_NODIMM_ECC ++#endif /* CONFIG_DDR_NODIMM == 3 */ ++ + static const struct dimm_params static_dimm = { +- .mpart = "Fixed DDR Config 2", ++ .mpart = "Fixed DDR Config " __XSTRING(CONFIG_DDR_NODIMM), + .n_ranks = 1, + .die_density = 0x6, // encoded per spd byte 4, 0b110 = 16Gbit +- .rank_density = 0x200000000, // 16GB +- .capacity = 0x200000000, // 16GB ++ .rank_density = 0x200000000, // 16Gbit ++ .capacity = 0x200000000, // 16Gbit + .primary_sdram_width = 64, ++#ifdef CONFIG_DDR_NODIMM_ECC ++ .ec_sdram_width = 8, // 8 bit ecc extension ++#else + .ec_sdram_width = 0, // no ecc extension ++#endif + .rdimm = 0, + .package_3ds = 0, + .device_width = 16, // 16 bit per sdram +@@ -53,26 +61,30 @@ static const struct dimm_params static_dimm = { + + .n_row_addr = 17, + .n_col_addr = 10, ++#ifdef CONFIG_DDR_NODIMM_ECC ++ .edc_config = 2, // enable ecc ++#else + .edc_config = 0, // disable ecc ++#endif + .bank_addr_bits = 0, // 4 banks + .bank_group_bits = 1, // 2 bank groups + .burst_lengths_bitmask = 0xc, // enable 4 & 8-bit burst (DDR4 spec) + + .mirrored_dimm = 0, + +- // timings based on K4A8G085WC-BCTD (DDR4-2666), missing values for 3200 ++ // timings based on MT40A4G4 / MT40A2G8 / MT40A1G16 datasheet (DDR4-3200 22-22-22) + .mtb_ps = 125, // MTB per SPD spec + .ftb_10th_ps = 10, // default value, unused by nxp ddr driver + .taa_ps = 13750, // min. 13.75ns +- .tfaw_ps = 30000, // min: max(30ns or 28CK) (this 16Gbit sdram has 2KB pages) ++ .tfaw_ps = 30000, // min: max(30ns or 28CK) (this 8Gbit sdram has 2KB pages) + +- .tckmin_x_ps = 625, // 3200 (CK=1600) ++ .tckmin_x_ps = 625, // 2400 (CK=1600) + .tckmax_ps = 1250, // 1600 (CK=800) + +- .caslat_x = 0b00000001010101010101010000000000, // CL = [10,12,14,16,18,20,22,24] (1 << CL) ++ .caslat_x = 0b00000001011111111111110000000000, // CL = [10-22,24] (1 << CL) + +- .trcd_ps = 13750, // 13.75ns - CL22-22-22 +- .trp_ps = 13750, // 13.75ns - CL22-22-22 ++ .trcd_ps = 13750, // 13.75ns ++ .trp_ps = 13750, // 13.75ns + .tras_ps = 32000, // 32ns + + .trfc1_ps = 350000, // 350ns, +@@ -100,7 +112,7 @@ static const struct dimm_params static_dimm = { + 0x00, + 0x20, + 0x00, +- 0x00, ++ 0x02, + 0x00, + 0x20, + 0x00, +@@ -112,7 +124,7 @@ static const struct dimm_params static_dimm = { + }, + .dq_mapping_ors = 1, + }; +-#endif /* CONFIG_DDR_NODIMM == 2 */ ++#endif /* CONFIG_DDR_NODIMM == 2 || CONFIG_DDR_NODIMM == 3 */ + + int ddr_get_ddr_params(struct dimm_params *pdimm, + struct ddr_conf *conf) +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +index 950207878..d01a41ea6 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/platform.mk +@@ -22,7 +22,8 @@ APPLY_MAX_CDD := yes + + # Mock SPD: + # - 0: disable mock spd +-# - 2: 2 x 5 x K4A8G165WB-BCRC PCB v1.1 ++# - 2: 2 x 5 x MT40A1G16TB-062E IT:F PCB v1.1 ++# - 3: 2 x 5 x MT40A1G16TB-062E IT:F PCB v1.2 (with ECC) + CONFIG_DDR_NODIMM := 0 + + # S5 GPIO +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0016-nxp-ddr-add-debug-output-for-dimm-parameters-parsed-.patch new file +83
-0@@ -0,0 +1,83 @@ +From 0591394c1257b79d9d49016476325533c1c2a14a Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Thu, 26 Sep 2024 16:35:40 +0200 +Subject: [PATCH 16/17] nxp: ddr: add debug output for dimm parameters parsed + from spd or static + +Add debug prints for all members of struct dimm_params, after either +parsing of SPD - or from static (no-dimm) configuration. + +This enables comparison of parameters derived from SPD with static +configuration. + +Signed-off-by: Josua Mayer <[email protected]> +--- + drivers/nxp/ddr/nxp-ddr/ddr.c | 52 +++++++++++++++++++++++++++++++++++ + 1 file changed, 52 insertions(+) + +diff --git a/drivers/nxp/ddr/nxp-ddr/ddr.c b/drivers/nxp/ddr/nxp-ddr/ddr.c +index c051b3b25..91a6ef5dc 100644 +--- a/drivers/nxp/ddr/nxp-ddr/ddr.c ++++ b/drivers/nxp/ddr/nxp-ddr/ddr.c +@@ -616,6 +616,58 @@ static int parse_spd(struct ddr_info *priv) + /* now we have valid and identical DIMMs on controllers */ + #endif /* CONFIG_DDR_NODIMM */ + ++ debug("DIMM: n_ranks = %u\n", dimm->n_ranks); ++ debug("DIMM: die_density = %u\n", dimm->die_density); ++ debug("DIMM: rank_density = %llu\n", dimm->rank_density); ++ debug("DIMM: capacity = %llu\n", dimm->capacity); ++ debug("DIMM: primary_sdram_width = %u\n", dimm->primary_sdram_width); ++ debug("DIMM: ec_sdram_width = %u\n", dimm->ec_sdram_width); ++ debug("DIMM: rdimm = %u\n", dimm->rdimm); ++ debug("DIMM: package_3ds = %u\n", dimm->package_3ds); ++ debug("DIMM: device_width = %u\n", dimm->device_width); ++ debug("DIMM: rc = %u\n", dimm->rc); ++ ++ debug("DIMM: n_row_addr = %u\n", dimm->n_row_addr); ++ debug("DIMM: n_col_addr = %u\n", dimm->n_col_addr); ++ debug("DIMM: edc_config = %u\n", dimm->edc_config); ++ debug("DIMM: bank_addr_bits = %u\n", dimm->bank_addr_bits); ++ debug("DIMM: bank_group_bits = %u\n", dimm->bank_group_bits); ++ debug("DIMM: burst_lengths_bitmask = %u\n", dimm->burst_lengths_bitmask); ++ ++ debug("DIMM: mirrored_dimm = %u\n", dimm->mirrored_dimm); ++ ++ debug("DIMM: mtb_ps = %d\n", dimm->mtb_ps); ++ debug("DIMM: ftb_10th_ps = %d\n", dimm->ftb_10th_ps); ++ debug("DIMM: taa_ps = %d\n", dimm->taa_ps); ++ debug("DIMM: tfaw_ps = %d\n", dimm->tfaw_ps); ++ ++ debug("DIMM: tckmin_x_ps = %d\n", dimm->tckmin_x_ps); ++ debug("DIMM: tckmax_ps = %d\n", dimm->tckmax_ps); ++ ++ debug("DIMM: caslat_x = %u\n", dimm->caslat_x); ++ ++ debug("DIMM: trcd_ps = %d\n", dimm->trcd_ps); ++ debug("DIMM: trp_ps = %d\n", dimm->trp_ps); ++ debug("DIMM: tras_ps = %d\n", dimm->tras_ps); ++ ++ debug("DIMM: trfc1_ps = %d\n", dimm->trfc1_ps); ++ debug("DIMM: trfc2_ps = %d\n", dimm->trfc2_ps); ++ debug("DIMM: trfc4_ps = %d\n", dimm->trfc4_ps); ++ debug("DIMM: trrds_ps = %d\n", dimm->trrds_ps); ++ debug("DIMM: trrdl_ps = %d\n", dimm->trrdl_ps); ++ debug("DIMM: tccdl_ps = %d\n", dimm->tccdl_ps); ++ debug("DIMM: trfc_slr_ps = %d\n", dimm->trfc_slr_ps); ++ ++ debug("DIMM: trc_ps = %d\n", dimm->trc_ps); ++ debug("DIMM: twr_ps = %d\n", dimm->twr_ps); ++ ++ debug("DIMM: refresh_rate_ps = %u\n", dimm->refresh_rate_ps); ++ debug("DIMM: extended_op_srt = %u\n", dimm->extended_op_srt); ++ ++ debug("DIMM: rcw = [%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u]\n", (unsigned int)dimm->rcw[0], (unsigned int)dimm->rcw[1], (unsigned int)dimm->rcw[2], (unsigned int)dimm->rcw[3], (unsigned int)dimm->rcw[4], (unsigned int)dimm->rcw[5], (unsigned int)dimm->rcw[6], (unsigned int)dimm->rcw[7], (unsigned int)dimm->rcw[8], (unsigned int)dimm->rcw[9], (unsigned int)dimm->rcw[10], (unsigned int)dimm->rcw[11], (unsigned int)dimm->rcw[12], (unsigned int)dimm->rcw[13], (unsigned int)dimm->rcw[14], (unsigned int)dimm->rcw[15]); ++ debug("DIMM: dq_mapping = [%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u]\n", dimm->dq_mapping[0], dimm->dq_mapping[1], dimm->dq_mapping[2], dimm->dq_mapping[3], dimm->dq_mapping[4], dimm->dq_mapping[5], dimm->dq_mapping[6], dimm->dq_mapping[7], dimm->dq_mapping[8], dimm->dq_mapping[9], dimm->dq_mapping[10], dimm->dq_mapping[11], dimm->dq_mapping[12], dimm->dq_mapping[13], dimm->dq_mapping[14], dimm->dq_mapping[15], dimm->dq_mapping[16], dimm->dq_mapping[17]); ++ debug("DIMM: dq_mapping_ors = %u\n", dimm->dq_mapping_ors); ++ + debug("cal cs\n"); + conf->cs_in_use = 0; + for (j = 0; j < DDRC_NUM_DIMM; j++) { +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0017-lx2160acex6-fix-dq-mapping-and-remove-invalid-spd-ee.patch new file +36
-0@@ -0,0 +1,36 @@ +From 65eaf1b55184950c67cb07156477418e93fa9351 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Tue, 26 Nov 2024 14:37:27 +0100 +Subject: [PATCH 17/17] lx2160acex6: fix dq mapping and remove invalid spd + eeprom addresses + +Signed-off-by: Josua Mayer <[email protected]> +--- + plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +index 61acfd7ac..95c0a13cf 100644 +--- a/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c ++++ b/plat/nxp/soc-lx2160a/lx2160acex6/ddr_init.c +@@ -112,7 +112,7 @@ static const struct dimm_params static_dimm = { + 0x00, + 0x20, + 0x00, +- 0x02, ++ 0x20, + 0x00, + 0x20, + 0x00, +@@ -200,7 +200,7 @@ int ddr_board_options(struct ddr_info *priv) + + long long init_ddr(void) + { +- int spd_addr[] = { 0x51, 0x52, 0x53, 0x54 }; ++ int spd_addr[] = { 0x51, 0x00, 0x53, 0x00 }; + struct ddr_info info; + struct sysinfo sys; + long long dram_size; +-- +2.43.0 +board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch new file +0
-0
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch line 1
Quoted 2 lines
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch new file +1
-0@@ -0,0 +1 @@ +../../../../freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 8/11 board/lx2160acex7: Add qoriq-mc-utils patches
In reply to Vladimir OlteanThe DPL and DPC files are necessary for configuring the DPAA2 network objects. We include as-is all the Solidrun patches, but the defconfig only uses lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-{dpl,dpc}.dtb.
---v1->v2:
- split out from previous [PATCH 6/7] board/lx2160acex7: new platform
...x2160-cex7-based-clearfog-cx-dpl-dpc.patch | 937 +++++ ...160-cex6-based-evaluation-board-dpl-.patch | 1454 +++++++ ...n-for-lx2162a-som-and-clearfog-board.patch | 3622 +++++++++++++++++ ...som-clearfog-enable-dpni-connections.patch | 188 + ...rfog-cx-configure-qsfp-ports-type-ph.patch | 52 + 5 files changed, 6253 insertions(+) create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0001-add-solidrun-lx2160-cex7-based-clearfog-cx-dpl-dpc.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0002-add-solidrun-lx2160-cex6-based-evaluation-board-dpl-.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0003-add-configuration-for-lx2162a-som-and-clearfog-board.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0004-lx2162-som-clearfog-enable-dpni-connections.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0005-lx2160acex7-clearfog-cx-configure-qsfp-ports-type-ph.patch
board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0001-add-solidrun-lx2160-cex7-based-clearfog-cx-dpl-dpc.patch new file +937 -0
@@ -0,0 +1,937 @@ +From 24334396edb16fbebe5f0b07a8264d53493dbff4 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Fri, 28 Jun 2024 19:16:57 +0200 +Subject: [PATCH] add solidrun lx2160 cex7 based clearfog-cx dpl/dpc + +Signed-off-by: Josua Mayer <[email protected]> +--- + .../clearfog-cx-s1_8-s2_0-dpc.dts | 108 ++++ + .../clearfog-cx-s1_8-s2_0-dpl.dts | 556 ++++++++++++++++++ + .../LX2160A-CEX7/null-s1_0-s2_0-dpc.dts | 72 +++ + .../LX2160A-CEX7/null-s1_0-s2_0-dpl.dts | 157 +++++ + 4 files changed, 893 insertions(+) + create mode 100644 config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpc.dts + create mode 100644 config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpl.dts + create mode 100644 config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpc.dts + create mode 100644 config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpl.dts + +diff --git a/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpc.dts b/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpc.dts +new file mode 100644 +index 0000000..dcc376e +--- /dev/null ++++ b/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpc.dts +@@ -0,0 +1,108 @@ ++/* ++ * Copyright 2018 NXP ++ * Copyright 2022 Josua Mayer <[email protected]> ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This DPC configures SolidRun Clearfog-CX with 8x10Gbps SerDes & 1Gbps RGMII ports. ++ */ ++ ++/dts-v1/; ++ ++/ { ++ resources { ++ icid_pools { ++ ++ icid_pool@1 { ++ num = <0x64>; ++ base_icid = <0x0>; ++ }; ++ }; ++ }; ++ ++ mc_general { ++ log { ++ mode = "LOG_MODE_ON"; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ ++ console { ++ mode = "CONSOLE_MODE_OFF"; ++ uart_id = <0x4>; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ }; ++ ++ controllers { ++ qbman { ++ /* Transform this number of 8-WQ channels into four times ++ * as many 2-WQ channels. This allows the creation of a ++ * larger number of DPCONs. ++ */ ++ wq_ch_conversion = <32>; ++ }; ++ }; ++ ++ board_info { ++ ports { ++ mac@3 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ ++ mac@4 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ ++ mac@5 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ ++ mac@6 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ ++ mac@7 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ ++ mac@8 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ ++ mac@9 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ ++ mac@10 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ ++ mac@17 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ }; ++ }; ++}; +diff --git a/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpl.dts b/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpl.dts +new file mode 100644 +index 0000000..e91f837 +--- /dev/null ++++ b/config/lx2160a/LX2160A-CEX7/clearfog-cx-s1_8-s2_0-dpl.dts +@@ -0,0 +1,556 @@ ++/* ++ * Copyright 2018 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++/ { ++ dpl-version = <10>; ++ /***************************************************************** ++ * Containers ++ *****************************************************************/ ++ containers { ++ ++ dprc@1 { ++ compatible = "fsl,dprc"; ++ parent = "none"; ++ options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_OBJ_CREATE_ALLOWED", "DPRC_CFG_OPT_TOPOLOGY_CHANGES_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; ++ ++ objects { ++ ++ /* -------------- DPBPs --------------*/ ++ obj_set@dpbp { ++ type = "dpbp"; ++ ids = <0 >; ++ }; ++ ++ /* -------------- DPCONs --------------*/ ++ obj_set@dpcon { ++ type = "dpcon"; ++ ids = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >; ++ }; ++ ++ /* -------------- DPIOs --------------*/ ++ obj_set@dpio { ++ type = "dpio"; ++ ids = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >; ++ }; ++ ++ /* -------------- DPMACs --------------*/ ++ obj_set@dpmac { ++ type = "dpmac"; ++ ids = <3 4 5 6 7 8 9 10 17 >; ++ }; ++ ++ /* -------------- DPMCPs --------------*/ ++ obj_set@dpmcp { ++ type = "dpmcp"; ++ ids = <1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 >; ++ }; ++ ++ /* -------------- DPNIs --------------*/ ++ obj_set@dpni { ++ type = "dpni"; ++ ids = <0 >; ++ }; ++ ++ /* -------------- DPRTCs --------------*/ ++ obj_set@dprtc { ++ type = "dprtc"; ++ ids = <0 >; ++ }; ++ ++ /* -------------- DPSECIs --------------*/ ++ obj_set@dpseci { ++ type = "dpseci"; ++ ids = <0 >; ++ }; ++ }; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Objects ++ *****************************************************************/ ++ objects { ++ ++ dpbp@0 { ++ compatible = "fsl,dpbp"; ++ }; ++ ++ dpcon@0 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@1 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@2 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@3 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@4 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@5 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@6 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@7 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@8 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@9 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@10 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@11 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@12 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@13 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@14 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@15 { ++ compatible = "fsl,dpcon"; ++ num_priorities = <0x2>; ++ }; ++ ++ dpio@0 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@1 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@2 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@3 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@4 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@5 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@6 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@7 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@8 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@9 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@10 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@11 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@12 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@13 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@14 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@15 { ++ compatible = "fsl,dpio"; ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpmac@3 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@4 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@5 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@6 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@7 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@8 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@9 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@10 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmac@17 { ++ compatible = "fsl,dpmac"; ++ }; ++ ++ dpmcp@1 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@2 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@3 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@4 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@5 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@6 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@7 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@8 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@9 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@10 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@11 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@12 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@13 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@14 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@15 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@16 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@17 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@18 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@19 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@20 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@21 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@22 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@23 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@24 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@25 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@26 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@27 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@28 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@29 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@30 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@31 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@32 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@33 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@34 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@35 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@36 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@37 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@38 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@39 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@40 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@41 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@42 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@43 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@44 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@45 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@46 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@47 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@48 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@49 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@50 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@51 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpmcp@52 { ++ compatible = "fsl,dpmcp"; ++ }; ++ ++ dpni@0 { ++ compatible = "fsl,dpni"; ++ type = "DPNI_TYPE_NIC"; ++ num_queues = <16>; ++ num_tcs = <1>; ++ num_cgs = <1>; ++ mac_filter_entries = <16>; ++ vlan_filter_entries = <0>; ++ fs_entries = <64>; ++ qos_entries = <0>; ++ dist_key_size = <56>; ++ }; ++ ++ dprtc@0 { ++ compatible = "fsl,dprtc"; ++ }; ++ ++ dpseci@0 { ++ compatible = "fsl,dpseci"; ++ priorities = <1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1>; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Connections ++ *****************************************************************/ ++ connections { ++ ++ connection@1{ ++ endpoint1 = "dpni@0"; ++ endpoint2 = "dpmac@17"; ++ }; ++ }; ++}; +diff --git a/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpc.dts b/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpc.dts +new file mode 100644 +index 0000000..ac707bc +--- /dev/null ++++ b/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpc.dts +@@ -0,0 +1,72 @@ ++/* ++ * Copyright 2018 NXP ++ * Copyright 2022 Josua Mayer <[email protected]> ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++* This DPC is a bare example without networking. ++*/ ++ ++/dts-v1/; ++ ++/ { ++ resources { ++ icid_pools { ++ icid_pool@1 { ++ num = <0x64>; ++ base_icid = <0x0>; ++ }; ++ }; ++ }; ++ ++ mc_general { ++ log { ++ mode = "LOG_MODE_ON"; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ ++ console { ++ mode = "CONSOLE_MODE_OFF"; ++ uart_id = <0x4>; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ }; ++ ++ controllers { ++ qbman { ++ /* Transform this number of 8-WQ channels into four times ++ * as many 2-WQ channels. This allows the creation of a ++ * larger number of DPCONs. ++ */ ++ wq_ch_conversion = <32>; ++ }; ++ }; ++ ++ board_info { ++ ports { ++ }; ++ }; ++}; +diff --git a/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpl.dts b/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpl.dts +new file mode 100644 +index 0000000..9847cc3 +--- /dev/null ++++ b/config/lx2160a/LX2160A-CEX7/null-s1_0-s2_0-dpl.dts +@@ -0,0 +1,157 @@ ++/* ++ * Copyright 2020 NXP ++ * Copyright 2022 Josua Mayer <[email protected]> ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++/ { ++ dpl-version = <10>; ++ ++ containers { ++ dprc@1 { ++ compatible = "fsl,dprc"; ++ parent = "none"; ++ options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_OBJ_CREATE_ALLOWED", "DPRC_CFG_OPT_TOPOLOGY_CHANGES_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; ++ ++ objects { ++ obj_set@dpmcp { ++ type = "dpmcp"; ++ ids = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23>; ++ }; ++ }; ++ }; ++ }; ++ ++ objects { ++ dpmcp@1 { ++ }; ++ ++ dpmcp@2 { ++ }; ++ ++ dpmcp@3 { ++ }; ++ ++ dpmcp@4 { ++ }; ++ ++ dpmcp@5 { ++ }; ++ ++ dpmcp@6 { ++ }; ++ ++ dpmcp@7 { ++ }; ++ ++ dpmcp@8 { ++ }; ++ ++ dpmcp@9 { ++ }; ++ ++ dpmcp@10 { ++ }; ++ ++ dpmcp@11 { ++ }; ++ ++ dpmcp@12 { ++ }; ++ ++ dpmcp@13 { ++ }; ++ ++ dpmcp@14 { ++ }; ++ ++ dpmcp@15 { ++ }; ++ ++ dpmcp@16 { ++ }; ++ ++ dpmcp@17 { ++ }; ++ ++ dpmcp@18 { ++ }; ++ ++ dpmcp@19 { ++ }; ++ ++ dpmcp@20 { ++ }; ++ ++ dpmcp@21 { ++ }; ++ ++ dpmcp@22 { ++ }; ++ ++ dpmcp@23 { ++ }; ++ ++ dpmcp@24 { ++ }; ++ ++ dpmcp@25 { ++ }; ++ ++ dpmcp@26 { ++ }; ++ ++ dpmcp@27 { ++ }; ++ ++ dpmcp@28 { ++ }; ++ ++ dpmcp@29 { ++ }; ++ ++ dpmcp@30 { ++ }; ++ ++ dpmcp@31 { ++ }; ++ ++ dpmcp@32 { ++ }; ++ ++ dpmcp@33 { ++ }; ++ ++ dpmcp@34 { ++ }; ++ ++ dpmcp@35 { ++ }; ++ }; ++ ++ connections { ++ }; ++}; +-- +2.35.3 +
board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0002-add-solidrun-lx2160-cex6-based-evaluation-board-dpl-.patch new file +1454 -0
1,454 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0003-add-configuration-for-lx2162a-som-and-clearfog-board.patch new file +3622 -0
609 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0004-lx2162-som-clearfog-enable-dpni-connections.patch new file +188 -0
188 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-mc-utils/0005-lx2160acex7-clearfog-cx-configure-qsfp-ports-type-ph.patch new file +52 -0
52 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Part of the diff is not shown here. View the raw message.
PATCH v2 9/11 board/lx2160acex7: add qoriq-rcw patches
In reply to Vladimir OlteanThese come unmodified from SolidRun as of lx2160a_build commit 497e9ebf0e2a ("atf: update sdram configuration for internal cex6 evb revision 1.2"), and are needed to establish a bootable Reset Configuration Word for the platform.
The Buildroot defconfig only uses lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2_sdhc.rcw.
---v1->v2:
- split out from previous [PATCH 6/7] board/lx2160acex7: new platform
- update to latest lx2160a_build HEAD
...n-solidrun-lx2160a-cex-7-on-clearfog.patch | 950 ++++++++ ...-MEM_PLL_CFG-into-ddr-speed-specific.patch | 112 + ...separate-configurations-for-flexspi-.patch | 894 ++++++++ ...me-sdhc1-config-to-generic-sdhc-for-.patch | 149 ++ ...c-jumpc-and-jump-to-pbi-instructions.patch | 55 + ...add-configuration-for-both-sdhc-xspi.patch | 836 +++++++ ...ootlocptr-reduce-size-of-pbi-section.patch | 90 + ...ge-2.2GHz-configuration-platform-clo.patch | 475 ++++ ...configuration-for-fraction-ddr-speed.patch | 420 ++++ ...n-solidrun-internal-lx2160a-cex6-eva.patch | 220 ++ ...le-A-050426-workaround-for-silicon-o.patch | 35 + ...le-pci-errata-workarounds-for-all-ac.patch | 87 + ...-configuration-for-2.2GHz-binned-soc.patch | 42 + .../0014-lx2162aqds-re-enable-dpmac11.patch | 27 + ...n-for-lx2162a-som-and-clearfog-evalu.patch | 532 +++++ ...rfog-cx-add-configuration-for-serdes.patch | 2000 +++++++++++++++++ ...configuration-for-serdes-1-protocol-.patch | 49 + ...ipt-generating-configs-from-template.patch | 1476 ++++++++++++ ...rfog-cx-add-configuration-for-serdes.patch | 1611 +++++++++++++ ...add-configuration-for-each-ddr-speed.patch | 285 +++ 20 files changed, 10345 insertions(+) create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0001-add-configuration-solidrun-lx2160a-cex-7-on-clearfog.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0002-lx2160acex7-move-MEM_PLL_CFG-into-ddr-speed-specific.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0003-lx2160acex7-add-separate-configurations-for-flexspi-.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0004-lx2160acex7-rename-sdhc1-config-to-generic-sdhc-for-.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0005-add-loadc-jumpc-and-jump-to-pbi-instructions.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0006-lx2160acex7-add-configuration-for-both-sdhc-xspi.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0007-bootlocptr-reduce-size-of-pbi-section.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0008-lx2160acex7-change-2.2GHz-configuration-platform-clo.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0009-lx2160acex7-add-configuration-for-fraction-ddr-speed.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0010-add-configuration-solidrun-internal-lx2160a-cex6-eva.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0011-lx2160acex7-enable-A-050426-workaround-for-silicon-o.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0012-lx2160acex6-enable-pci-errata-workarounds-for-all-ac.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0013-lx2160acex6-add-configuration-for-2.2GHz-binned-soc.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0014-lx2162aqds-re-enable-dpmac11.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0015-add-configuration-for-lx2162a-som-and-clearfog-evalu.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0016-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0017-lx2160acex7-add-configuration-for-serdes-1-protocol-.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0018-solidrun-add-script-generating-configs-from-template.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0019-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch create mode 100644 board/solidrun/lx2160acex7/patches/qoriq-rcw/0020-lx2160acex6-add-configuration-for-each-ddr-speed.patch
board/solidrun/lx2160acex7/patches/qoriq-rcw/0001-add-configuration-solidrun-lx2160a-cex-7-on-clearfog.patch new file +950 -0
@@ -0,0 +1,950 @@ +From 5a5ec65c0eb53efbcb69894576d7d04f671a730e Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Wed, 12 Jun 2024 15:19:39 +0200 +Subject: [PATCH] add configuration solidrun lx2160a-cex-7 on clearfog-cx board + +Signed-off-by: Josua Mayer <[email protected]> +--- + lx2160acex7/Makefile | 1 + + lx2160acex7/README | 0 + .../clearfog-cx/rcw_2000_700_2400_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_2600_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_2900_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_3200_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2400_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2600_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2900_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_3200_8_5_2.rcw | 23 +++++ + lx2160acex7/clearfog-cx/sd1_8_eq.rcwi | 39 ++++++++ + lx2160acex7/include/SD1_8.rcwi | 24 +++++ + lx2160acex7/include/SD2_5.rcwi | 27 ++++++ + lx2160acex7/include/SD3_2.rcwi | 27 ++++++ + lx2160acex7/include/common.rcwi | 90 +++++++++++++++++++ + lx2160acex7/include/common_pbi.rcwi | 55 ++++++++++++ + lx2160acex7/include/pll_2000_700_xxxx.rcwi | 14 +++ + lx2160acex7/include/pll_2200_700_xxxx.rcwi | 14 +++ + lx2160acex7/include/pll_xxxx_xxx_2400.rcwi | 7 ++ + lx2160acex7/include/pll_xxxx_xxx_2600.rcwi | 7 ++ + lx2160acex7/include/pll_xxxx_xxx_2900.rcwi | 7 ++ + lx2160acex7/include/pll_xxxx_xxx_3200.rcwi | 7 ++ + lx2160acex7_rev2/Makefile | 1 + + lx2160acex7_rev2/README | 0 + .../clearfog-cx/rcw_2000_700_2400_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_2600_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_2900_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2000_700_3200_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2400_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2600_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_2900_8_5_2.rcw | 23 +++++ + .../clearfog-cx/rcw_2200_700_3200_8_5_2.rcw | 23 +++++ + 32 files changed, 688 insertions(+) + create mode 100644 lx2160acex7/Makefile + create mode 100644 lx2160acex7/README + create mode 100644 lx2160acex7/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw + create mode 100644 lx2160acex7/clearfog-cx/sd1_8_eq.rcwi + create mode 100644 lx2160acex7/include/SD1_8.rcwi + create mode 100644 lx2160acex7/include/SD2_5.rcwi + create mode 100644 lx2160acex7/include/SD3_2.rcwi + create mode 100644 lx2160acex7/include/common.rcwi + create mode 100644 lx2160acex7/include/common_pbi.rcwi + create mode 100644 lx2160acex7/include/pll_2000_700_xxxx.rcwi + create mode 100644 lx2160acex7/include/pll_2200_700_xxxx.rcwi + create mode 100644 lx2160acex7/include/pll_xxxx_xxx_2400.rcwi + create mode 100644 lx2160acex7/include/pll_xxxx_xxx_2600.rcwi + create mode 100644 lx2160acex7/include/pll_xxxx_xxx_2900.rcwi + create mode 100644 lx2160acex7/include/pll_xxxx_xxx_3200.rcwi + create mode 100644 lx2160acex7_rev2/Makefile + create mode 100644 lx2160acex7_rev2/README + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw + create mode 100644 lx2160acex7_rev2/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw + +diff --git a/lx2160acex7/Makefile b/lx2160acex7/Makefile +new file mode 100644 +index 0000000..f77e46b +--- /dev/null ++++ b/lx2160acex7/Makefile +@@ -0,0 +1 @@ ++include ../Makefile.inc +diff --git a/lx2160acex7/README b/lx2160acex7/README +new file mode 100644 +index 0000000..e69de29 +diff --git a/lx2160acex7/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw +new file mode 100644 +index 0000000..ba0f82c +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2400 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2400.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw +new file mode 100644 +index 0000000..b1723d3 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2600 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2600.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw +new file mode 100644 +index 0000000..fa59785 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2900 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2900.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw +new file mode 100644 +index 0000000..90ac8a4 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 3200 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_3200.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw +new file mode 100644 +index 0000000..464a285 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2400 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2400.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw +new file mode 100644 +index 0000000..1ef7db6 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2600 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2600.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw +new file mode 100644 +index 0000000..d021306 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2900 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2900.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw b/lx2160acex7/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw +new file mode 100644 +index 0000000..bfef1d4 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 3200 MT/s ++ * ++ * Silicon 1.0 ++ */ ++ ++#define LX_SR 1 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_3200.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7/clearfog-cx/sd1_8_eq.rcwi b/lx2160acex7/clearfog-cx/sd1_8_eq.rcwi +new file mode 100644 +index 0000000..44961c1 +--- /dev/null ++++ b/lx2160acex7/clearfog-cx/sd1_8_eq.rcwi +@@ -0,0 +1,39 @@ ++/* ++ * SERDES tuning based on the following hardware - ++ * - SolidRun COM express type 7 revision 1.7 and newer ++ * - SolidRun ClearFog CX revision 1.3 with TI retimers and EPT COM express headers ++ */ ++ ++.pbi ++/* Lane E (SD1 TX/RX 3) */ ++write 0x01EA0C28,0x00000000 ++write 0x01EA0C30,0x20818120 ++write 0x01EA0C34,0x23000000 ++write 0x01EA0C68,0x80000000 ++write 0x01EA0C74,0x00002020 ++write 0x01EA0C80,0x00008000 ++ ++/* Lane F (SD1 TX/RX 2)*/ ++write 0x01EA0D28,0x00000000 ++write 0x01EA0D30,0x20818120 ++write 0x01EA0D34,0x23000000 ++write 0x01EA0D68,0x80000000 ++write 0x01EA0D74,0x00002020 ++write 0x01EA0D80,0x00008000 ++ ++/* Lane G (SD1 TX/RX 1)*/ ++write 0x01EA0E28,0x00000000 ++write 0x01EA0E30,0x20818120 ++write 0x01EA0E34,0x23000000 ++write 0x01EA0E68,0x80000000 ++write 0x01EA0E74,0x00002020 ++write 0x01EA0E80,0x00008000 ++ ++/* Lane H (SD1 TX/RX 0)*/ ++write 0x01EA0F28,0x00000000 ++write 0x01EA0F30,0x20818120 ++write 0x01EA0F34,0x23000000 ++write 0x01EA0F68,0x80000000 ++write 0x01EA0F74,0x00002020 ++write 0x01EA0F80,0x00008000 ++.end +diff --git a/lx2160acex7/include/SD1_8.rcwi b/lx2160acex7/include/SD1_8.rcwi +new file mode 100644 +index 0000000..87ce260 +--- /dev/null ++++ b/lx2160acex7/include/SD1_8.rcwi +@@ -0,0 +1,24 @@ ++/* ++ * Serdes 1 Reference Clocks: ++ * - PLLF = 100MHz ++ * - PLLS = 161.1328125MHz ++ */ ++ ++/* Serdes 1 Protocol 8: 8x10Gbps */ ++SRDS_PRTCL_S1=8 ++ ++/* Disable PLLF */ ++SRDS_PLL_PD_PLL1=1 ++ ++/* Use PLLF for PLLS */ ++SRDS_INTRA_REF_CLK_S1=1 ++ ++/* Enable PLLS */ ++SRDS_PLL_PD_PLL2=0 ++ ++/* ++ * Select PLLF frequency 100MHz (don't care): Bit 0 = 0 ++ * Select PLLS frequency 161.1328125MHz: Bit 1 = 1 ++ * (See QorIQ LX2160A Reference Manual, Rev. 0, 07/2020, 4.9.8.9 Reset Control Word (RCW) Register Descriptions, Bits 932-933) ++ */ ++SRDS_PLL_REF_CLK_SEL_S1=2 +diff --git a/lx2160acex7/include/SD2_5.rcwi b/lx2160acex7/include/SD2_5.rcwi +new file mode 100644 +index 0000000..8fed5bd +--- /dev/null ++++ b/lx2160acex7/include/SD2_5.rcwi +@@ -0,0 +1,27 @@ ++/* ++ * Serdes 2 Reference Clocks: ++ * - PLLF = 100MHz ++ * - PLLS = 100MHz ++ */ ++ ++/* Serdes 2 Protocol 5: 1x PCI-e x4 Gen 3 + 4x SATA */ ++SRDS_PRTCL_S2=5 ++ ++/* Enable PLLF */ ++SRDS_PLL_PD_PLL3=0 ++ ++/* Don't use PLLF for PLLS */ ++SRDS_INTRA_REF_CLK_S2=0 ++ ++/* Enable PLLS */ ++SRDS_PLL_PD_PLL4=0 ++ ++/* ++ * Select PLLF frequency 100MHz: Bit 0 = 0 ++ * Select PLLS frequency 100MHz: Bit 1 = 0 ++ * (See QorIQ LX2160A Reference Manual, Rev. 0, 07/2020, 4.9.8.9 Reset Control Word (RCW) Register Descriptions, Bits 934-935) ++ */ ++SRDS_PLL_REF_CLK_SEL_S2=0 ++ ++/* Support up to PCI-e Gen 3 */ ++SRDS_DIV_PEX_S2=1 +diff --git a/lx2160acex7/include/SD3_2.rcwi b/lx2160acex7/include/SD3_2.rcwi +new file mode 100644 +index 0000000..b0be701 +--- /dev/null ++++ b/lx2160acex7/include/SD3_2.rcwi +@@ -0,0 +1,27 @@ ++/* ++ * Serdes 3 Reference Clocks: ++ * - PLLF = 100MHz ++ * - PLLS = 100MHz ++ */ ++ ++/* Serdes 3 Protocol 2: 1x PCI-e x8 Gen 3 */ ++SRDS_PRTCL_S3=2 ++ ++/* Disable PLLF */ ++SRDS_PLL_PD_PLL5=1 ++ ++/* Don't use Serdes 3 PLLF for PLLS */ ++SRDS_INTRA_REF_CLK_S3=0 ++ ++/* Enable PLLS */ ++SRDS_PLL_PD_PLL6=0 ++ ++/* ++ * Select PLLF frequency 100MHz: Bit 0 = 0 ++ * Select PLLS frequency 100MHz: Bit 1 = 0 ++ * (See QorIQ LX2160A Reference Manual, Rev. 0, 07/2020, 4.9.8.9 Reset Control Word (RCW) Register Descriptions, Bits 936-937) ++ */ ++SRDS_PLL_REF_CLK_SEL_S3=0 ++ ++/* Support up to PCI-e Gen 3 */ ++SRDS_DIV_PEX_S3=1 +diff --git a/lx2160acex7/include/common.rcwi b/lx2160acex7/include/common.rcwi +new file mode 100644 +index 0000000..e8a5660 +--- /dev/null ++++ b/lx2160acex7/include/common.rcwi +@@ -0,0 +1,90 @@ ++/* ++ * LX2160A COM-Express Type 7 Common Configuration ++ */ ++ ++/* DDR CGU PLL clk out div 4 */ ++MEM_PLL_CFG=3 ++MEM2_PLL_CFG=3 ++/* C[5:8]_PLL are CG[5:8] div 1 */ ++C5_PLL_SEL=0 ++C6_PLL_SEL=0 ++C7_PLL_SEL=0 ++C8_PLL_SEL=0 ++/* Cluster group A clock is PLL1 div 1 (unused on LX2160A) */ ++HWA_CGA_M1_CLK_SEL=1 ++/* Cluster group B clock is PLL2 div 2 (for DCE) */ ++HWA_CGB_M1_CLK_SEL=6 ++/* fall-back boot-mode is ocram, when DCFG bit location pointer registers are null */ ++BOOT_LOC=21 // TODO: test if SPI boot still functional ++/* SYSCLK is 100MHz */ ++SYSCLK_FREQ=600 ++/* USB-3.0 clock is 100MHz */ ++USB3_CLK_FSEL=39 ++ ++/* IIC1 is I2C */ ++IIC1_PMUX=0 ++/* IIC2 is SD Card-Detect */ ++IIC2_PMUX=6 ++/* IIC3 is I2C */ ++IIC3_PMUX=0 ++/* IIC4 is I2C (unused) */ ++IIC4_PMUX=0 ++/* IIC5 is I2C */ ++IIC5_PMUX=0 ++/* IIC6 is I2C (unused) */ ++IIC6_PMUX=0 ++/* ++ * SDHC1 CMD/CLK/VBUS/DAT[0:3] are SDHC ++ * SPI3_PCS0 is VSEL ++ */ ++SDHC1_BASE_PMUX=0 ++/* SDHC1_DS is GPIO (unused) */ ++SDHC1_DS_PMUX=1 ++/* SDHC1_CMD/DAT0/DAT1_DIR (SPI3_PCS[1:3]) are GPIO1[14:12] */ ++SDHC1_DIR_PMUX=1 ++/* USB[1:2]_DRVVBUS/PWRFAULT are GPIO4[28:25] (unused) */ ++USB_EXT_PMUX=1 ++/* XSPI1_A_DQS/SCK/CS0_B/CS1_B are SPI */ ++XSPI1_A_BASE_PMUX=0 ++/* XSPI1_A_DATA[3:0] are SPI */ ++XSPI1_A_DATA30_PMUX=0 ++/* XSPI1_A_DATA[7:4] are SPI */ ++XSPI1_A_DATA74_PMUX=0 ++/* ASLEEP is ASLEEP (unused) */ ++ASLEEP_PMUX=0 ++/* EVT[2:0] are GPIO3[14:12] */ ++EVT20_PMUX=1 ++/* EVT[4:3] are GPIO3[16:15] */ ++EVT43_PMUX=1 ++/* CLK_OUT is GPIO (unused) */ ++CLK_OUT_PMUX=1 ++/* IRQ[3:0] are GPIO3[3:0] */ ++IRQ03_00_PMUX=1 ++/* IRQ[7:4] are GPIO3[7:4] */ ++IRQ07_04_PMUX=1 ++/* IRQ[11:8] are GPIO3[11:8] */ ++IRQ11_08_PMUX=1 ++/* EC1_* are RGMII */ ++EC1_PMUX=0 ++/* EC2_* are PTP */ ++EC2_PMUX=2 ++/* EC_GTX_CLK125 is PTP */ ++GTX_CLK_PMUX=0 ++/* UART1_SOUT/SIN are UART1 */ ++UART1_SOUTSIN_PMUX=0 ++/* UART1_RTS/CTS_B are GPIO (unused) */ ++UART1_RTSCTS_PMUX=1 ++/* UART2_SOUT/SIN are UART2 */ ++UART2_SOUTSIN_PMUX=0 ++/* UART2_RTS/CTS_B are GPIO (unused) */ ++UART2_RTSCTS_PMUX=1 ++/* SDHC2_CMD/DAT[3:0]/DS/CLK are SDHC */ ++SDHC2_BASE_PMUX=0 ++/* SDHC2_DAT[7:4] are SDHC */ ++SDHC2_DAT74_PMUX=0 ++ ++/* ++ * Original SolidRun Settings in LSDK-21.08 ++ * ++ * HWA_CGB_M1_CLK_SEL=7 // Cluster Group B PLL 2 / 3 is clock ++ */ +diff --git a/lx2160acex7/include/common_pbi.rcwi b/lx2160acex7/include/common_pbi.rcwi +new file mode 100644 +index 0000000..0c28f92 +--- /dev/null ++++ b/lx2160acex7/include/common_pbi.rcwi +@@ -0,0 +1,55 @@ ++/* ++ * LX2160A COM-Express Type 7 Common Configuration ++ */ ++ ++/* Drive the fan full speed pin */ ++.pbi ++write 0x2320000,0x20000000 ++.end ++ ++/* Errata to write on scratch reg for validation */ ++#include <../lx2160asi/scratchrw1.rcw> ++ ++/* Boot Location Pointer */ ++#include <../lx2160asi/bootlocptr_sd.rcw> ++ ++/* Errata for SATA controller */ ++#include <../lx2160asi/a010554.rcw> ++ ++#if LX_SR == 1 ++/* Errata for PCIe controller */ ++#include <../lx2160asi/a011270.rcw> ++#include <../lx2160asi/a050234.rcw> ++#endif ++ ++/* common PBI commands */ ++#include <../lx2160asi/common.rcw> ++ ++#if LX_SR == 2 ++/*PCIe Errata A-009531*/ ++#include <../lx2160asi/a009531_PEX3.rcw> ++#include <../lx2160asi/a009531_PEX5.rcw> ++ ++/*PCIe Errata A-008851*/ ++#include <../lx2160asi/a008851_PEX3.rcw> ++#include <../lx2160asi/a008851_PEX5.rcw> ++ ++/*SerDes Errata A-050479*/ ++#include <../lx2160asi/a050479.rcw> ++ ++/* Errata A-050426 */ ++#include <../lx2160asi/a050426.rcw> ++#endif ++ ++/* ++ * FlexSPI controller supports modifcation of the FlexSPI Clock ++ * divisor value, default value of this is 80. ++ * For 700 MHz, FlexSPI clock runs with default value is ++ * (Platform Clock * 2) / (Divisor value) ++ * => 700 * 2 / 80 ==> 17MHz ++ * On Clearfog-CX bus speed is limited to 20MHz by a mux on carrier board. ++ * Explicitly set the default value again, in case it was modified elsewhere. ++ */ ++.pbi ++write 0x1e00900,0x00000014 ++.end +diff --git a/lx2160acex7/include/pll_2000_700_xxxx.rcwi b/lx2160acex7/include/pll_2000_700_xxxx.rcwi +new file mode 100644 +index 0000000..2a3725f +--- /dev/null ++++ b/lx2160acex7/include/pll_2000_700_xxxx.rcwi +@@ -0,0 +1,14 @@ ++/* ++ * Core and Platform Clocks: ++ * - Platform: 700MHz ++ * - Core: 2000MHz ++ */ ++ ++/* platform clock is system clock mul 14 div 2 = 700 */ ++SYS_PLL_RAT=14 ++ ++/* core clocks are 2000 */ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=7 +diff --git a/lx2160acex7/include/pll_2200_700_xxxx.rcwi b/lx2160acex7/include/pll_2200_700_xxxx.rcwi +new file mode 100644 +index 0000000..91d1a9b +--- /dev/null ++++ b/lx2160acex7/include/pll_2200_700_xxxx.rcwi +@@ -0,0 +1,14 @@ ++/* ++ * Core and Platform Clocks: ++ * - Platform: 700MHz ++ * - Core: 2200MHz ++ */ ++ ++/* platform clock is system clock mul 14 div 2 = 700 */ ++SYS_PLL_RAT=14 ++ ++/* core clocks are 2200 */ ++CGA_PLL1_RAT=22 ++CGA_PLL2_RAT=22 ++CGB_PLL1_RAT=22 ++CGB_PLL2_RAT=7 +diff --git a/lx2160acex7/include/pll_xxxx_xxx_2400.rcwi b/lx2160acex7/include/pll_xxxx_xxx_2400.rcwi +new file mode 100644 +index 0000000..9c79664 +--- /dev/null ++++ b/lx2160acex7/include/pll_xxxx_xxx_2400.rcwi +@@ -0,0 +1,7 @@ ++/* ++ * DDR Rate: 2400MHz ++ */ ++ ++/* data rate is reference clock mul 24 = 2400 */ ++MEM_PLL_RAT=24 ++MEM2_PLL_RAT=24 +diff --git a/lx2160acex7/include/pll_xxxx_xxx_2600.rcwi b/lx2160acex7/include/pll_xxxx_xxx_2600.rcwi +new file mode 100644 +index 0000000..404d52a +--- /dev/null ++++ b/lx2160acex7/include/pll_xxxx_xxx_2600.rcwi +@@ -0,0 +1,7 @@ ++/* ++ * DDR Rate: 2600MHz ++ */ ++ ++/* data rate is reference clock mul 26 = 2600 */ ++MEM_PLL_RAT=26 ++MEM2_PLL_RAT=26 +diff --git a/lx2160acex7/include/pll_xxxx_xxx_2900.rcwi b/lx2160acex7/include/pll_xxxx_xxx_2900.rcwi +new file mode 100644 +index 0000000..2ba2426 +--- /dev/null ++++ b/lx2160acex7/include/pll_xxxx_xxx_2900.rcwi +@@ -0,0 +1,7 @@ ++/* ++ * DDR Rate: 2900MHz ++ */ ++ ++/* data rate is reference clock mul 29 = 2900 */ ++MEM_PLL_RAT=29 ++MEM2_PLL_RAT=29 +diff --git a/lx2160acex7/include/pll_xxxx_xxx_3200.rcwi b/lx2160acex7/include/pll_xxxx_xxx_3200.rcwi +new file mode 100644 +index 0000000..cbc2cf4 +--- /dev/null ++++ b/lx2160acex7/include/pll_xxxx_xxx_3200.rcwi +@@ -0,0 +1,7 @@ ++/* ++ * DDR Rate: 3200MHz ++ */ ++ ++/* data rate is reference clock mul 32 = 3200 */ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 +diff --git a/lx2160acex7_rev2/Makefile b/lx2160acex7_rev2/Makefile +new file mode 100644 +index 0000000..f77e46b +--- /dev/null ++++ b/lx2160acex7_rev2/Makefile +@@ -0,0 +1 @@ ++include ../Makefile.inc +diff --git a/lx2160acex7_rev2/README b/lx2160acex7_rev2/README +new file mode 100644 +index 0000000..e69de29 +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw +new file mode 100644 +index 0000000..1c23c5c +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2400_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2400 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2400.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw +new file mode 100644 +index 0000000..87391ab +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2600_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2600 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2600.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw +new file mode 100644 +index 0000000..9114f36 +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_2900_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2900 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2900.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw +new file mode 100644 +index 0000000..7e97984 +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2000_700_3200_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2000 MHz ++ * Platform -- 700 MHz ++ * DDR -- 3200 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2000_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_3200.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw +new file mode 100644 +index 0000000..d59ceed +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2400_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2400 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2400.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw +new file mode 100644 +index 0000000..1bf815b +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2600_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2600 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2600.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw +new file mode 100644 +index 0000000..01138dc +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_2900_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 2900 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_2900.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +diff --git a/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw +new file mode 100644 +index 0000000..e99a12b +--- /dev/null ++++ b/lx2160acex7_rev2/clearfog-cx/rcw_2200_700_3200_8_5_2.rcw +@@ -0,0 +1,23 @@ ++/* ++ * SerDes Protocol 1 - 8 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 2200 MHz ++ * Platform -- 700 MHz ++ * DDR -- 3200 MT/s ++ * ++ * Silicon 2.0 ++ */ ++ ++#define LX_SR 2 ++#include <../lx2160asi/lx2160a.rcwi> ++#include <../lx2160acex7/include/pll_2200_700_xxxx.rcwi> ++#include <../lx2160acex7/include/pll_xxxx_xxx_3200.rcwi> ++#include <../lx2160acex7/include/common.rcwi> ++#include <../lx2160acex7/include/SD1_8.rcwi> ++#include <../lx2160acex7/include/SD2_5.rcwi> ++#include <../lx2160acex7/include/SD3_2.rcwi> ++#include <../lx2160acex7/include/common_pbi.rcwi> ++#include <../lx2160acex7/clearfog-cx/sd1_8_eq.rcwi> +-- +2.35.3 +
board/solidrun/lx2160acex7/patches/qoriq-rcw/0002-lx2160acex7-move-MEM_PLL_CFG-into-ddr-speed-specific.patch new file +112 -0
112 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0003-lx2160acex7-add-separate-configurations-for-flexspi-.patch new file +894 -0
894 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0004-lx2160acex7-rename-sdhc1-config-to-generic-sdhc-for-.patch new file +149 -0
149 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0005-add-loadc-jumpc-and-jump-to-pbi-instructions.patch new file +55 -0
55 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0006-lx2160acex7-add-configuration-for-both-sdhc-xspi.patch new file +836 -0
836 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0007-bootlocptr-reduce-size-of-pbi-section.patch new file +90 -0
4 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0008-lx2160acex7-change-2.2GHz-configuration-platform-clo.patch new file +475 -0
475 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0009-lx2160acex7-add-configuration-for-fraction-ddr-speed.patch new file +420 -0
420 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0010-add-configuration-solidrun-internal-lx2160a-cex6-eva.patch new file +220 -0
220 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0011-lx2160acex7-enable-A-050426-workaround-for-silicon-o.patch new file +35 -0
Lines of this file are not shown. View the raw message.
board/solidrun/lx2160acex7/patches/qoriq-rcw/0012-lx2160acex6-enable-pci-errata-workarounds-for-all-ac.patch new file +87 -0
87 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0013-lx2160acex6-add-configuration-for-2.2GHz-binned-soc.patch new file +42 -0
42 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0014-lx2162aqds-re-enable-dpmac11.patch new file +27 -0
Lines of this file are not shown. View the raw message.
board/solidrun/lx2160acex7/patches/qoriq-rcw/0015-add-configuration-for-lx2162a-som-and-clearfog-evalu.patch new file +532 -0
532 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0016-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch new file +2000 -0
2,000 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0017-lx2160acex7-add-configuration-for-serdes-1-protocol-.patch new file +49 -0
49 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0018-solidrun-add-script-generating-configs-from-template.patch new file +1476 -0
1,476 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0019-lx2160acex7-clearfog-cx-add-configuration-for-serdes.patch new file +1611 -0
1,611 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/qoriq-rcw/0020-lx2160acex6-add-configuration-for-each-ddr-speed.patch new file +285 -0
285 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Part of the diff is not shown here. View the raw message.
PATCH v2 10/11 board/lx2160acex7: add u-boot patches
In reply to Vladimir OlteanThe board is not supported in upstream U-Boot. Add the SolidRun patches over NXP lf-5.15.71-2.2.0 which allow it to have a functional bootloader.
---v1->v2:
- split out from previous [PATCH 6/7] board/lx2160acex7: new platform
- update to latest lx2160a_build HEAD
...d-solidrun-lx2160-cex7-board-support.patch | 1342 +++++++++++++++++ ...ait-100ms-for-Link-Up-in-ls_pcie_g4_.patch | 65 + ...t-100ms-for-Link-Up-in-ls_pcie_probe.patch | 64 + ...-calculation-of-ddr-clock-rate-to-in.patch | 63 + ...able-workaround-for-SPI-erratum-A-05.patch | 102 ++ ...x2160-cex7-enable-additional-drivers.patch | 96 ++ ...on-t-fail-boot-when-reading-eeprom-f.patch | 32 + ...x2160-cex7-fixup-u-boot-dts-dpmac-by.patch | 389 +++++ ...x2160acex7-enable-reading-tlv-eeprom.patch | 40 + ...x2160acex7-disable-second-usb-on-lx2.patch | 32 + ...x2160acex7-allocate-memory-before-pa.patch | 39 + ...upport-specifying-tlv-eeprom-in-DT-a.patch | 58 + ...x2160acex7-use-dt-alias-for-tlv-eepr.patch | 90 ++ ...om-fix-alias-access-to-second-eeprom.patch | 32 + 14 files changed, 2444 insertions(+) create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0001-add-solidrun-lx2160-cex7-board-support.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0002-pci-ls_pcie_g4-Wait-100ms-for-Link-Up-in-ls_pcie_g4_.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0003-pci-ls_pcie-Wait-100ms-for-Link-Up-in-ls_pcie_probe.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0004-fsl-lsch3-update-calculation-of-ddr-clock-rate-to-in.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0005-armv8-lx2160a-enable-workaround-for-SPI-erratum-A-05.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0006-configs-lx2160-cex7-enable-additional-drivers.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0007-cmd-tlv_eeprom-don-t-fail-boot-when-reading-eeprom-f.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0008-board-solidrun-lx2160-cex7-fixup-u-boot-dts-dpmac-by.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0009-board-solidrun-lx2160acex7-enable-reading-tlv-eeprom.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0010-board-solidrun-lx2160acex7-disable-second-usb-on-lx2.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0011-board-solidrun-lx2160acex7-allocate-memory-before-pa.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0012-cmd-tlv_eeprom-support-specifying-tlv-eeprom-in-DT-a.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0013-board-solidrun-lx2160acex7-use-dt-alias-for-tlv-eepr.patch create mode 100644 board/solidrun/lx2160acex7/patches/uboot/0014-cmd-tlv_eeprom-fix-alias-access-to-second-eeprom.patch
board/solidrun/lx2160acex7/patches/uboot/0001-add-solidrun-lx2160-cex7-board-support.patch new file +1342 -0
@@ -0,0 +1,1342 @@ +From 9e4a5468f62cf4f639a2d6224d33f545c67d1a88 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Thu, 13 Jun 2024 17:26:47 +0200 +Subject: [PATCH] add solidrun lx2160-cex7 board support + +Signed-off-by: Josua Mayer <[email protected]> +--- + arch/arm/Kconfig | 14 + + arch/arm/dts/Makefile | 1 + + arch/arm/dts/fsl-lx2160a-cex7-u-boot.dtsi | 22 ++ + arch/arm/dts/fsl-lx2160a-cex7.dts | 20 ++ + arch/arm/dts/fsl-lx2160a-cex7.dtsi | 187 ++++++++++ + board/solidrun/lx2160acex7/Kconfig | 15 + + board/solidrun/lx2160acex7/Makefile | 10 + + board/solidrun/lx2160acex7/ddr.c | 22 ++ + board/solidrun/lx2160acex7/eth_lx2160acex7.c | 88 +++++ + board/solidrun/lx2160acex7/lx2160a.c | 308 +++++++++++++++++ + configs/lx2160acex7_tfa_SECURE_BOOT_defconfig | 86 +++++ + configs/lx2160acex7_tfa_defconfig | 96 ++++++ + include/configs/lx2160acex7.h | 324 ++++++++++++++++++ + scripts/config_whitelist.txt | 6 + + 14 files changed, 1199 insertions(+) + create mode 100644 arch/arm/dts/fsl-lx2160a-cex7-u-boot.dtsi + create mode 100644 arch/arm/dts/fsl-lx2160a-cex7.dts + create mode 100644 arch/arm/dts/fsl-lx2160a-cex7.dtsi + create mode 100644 board/solidrun/lx2160acex7/Kconfig + create mode 100644 board/solidrun/lx2160acex7/Makefile + create mode 100644 board/solidrun/lx2160acex7/ddr.c + create mode 100644 board/solidrun/lx2160acex7/eth_lx2160acex7.c + create mode 100644 board/solidrun/lx2160acex7/lx2160a.c + create mode 100644 configs/lx2160acex7_tfa_SECURE_BOOT_defconfig + create mode 100644 configs/lx2160acex7_tfa_defconfig + create mode 100644 include/configs/lx2160acex7.h + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 39b6a2b1b5..7c51c37c93 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1375,6 +1375,19 @@ config TARGET_LS2081ARDB + development platform that supports the QorIQ LS2081A/LS2041A + Layerscape Architecture processor. + ++config TARGET_LX2160ACEX7 ++ bool "Support lx2160acex7" ++ select ARCH_LX2160A ++ select ARM64 ++ select ARMV8_MULTIENTRY ++ select ARCH_SUPPORT_TFABOOT ++ select BOARD_LATE_INIT ++ help ++ Support for SolidRun LX2160ACEX7 platform. ++ The lx2160acex7 (LX2160A COM-Express Type 7) ++ is a high-performance platform based on the ++ QorIQ LX2160A Layerscape Architecture processor. ++ + config TARGET_LX2160ARDB + bool "Support lx2160ardb" + select ARCH_LX2160A +@@ -2261,6 +2274,7 @@ source "board/kontron/sl28/Kconfig" + source "board/myir/mys_6ulx/Kconfig" + source "board/seeed/npi_imx6ull/Kconfig" + source "board/socionext/developerbox/Kconfig" ++source "board/solidrun/lx2160acex7/Kconfig" + source "board/st/stv0991/Kconfig" + source "board/tcl/sl50/Kconfig" + source "board/toradex/colibri_pxa270/Kconfig" +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 709fdaecd7..8f6f5bf7cc 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -454,6 +454,7 @@ dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \ + fsl-ls1028a-rdb.dtb \ + fsl-ls1028a-qds-duart.dtb \ + fsl-ls1028a-qds-lpuart.dtb \ ++ fsl-lx2160a-cex7.dtb \ + fsl-lx2160a-rdb.dtb \ + fsl-lx2160a-qds.dtb \ + fsl-lx2160a-qds-3-x-x.dtb \ +diff --git a/arch/arm/dts/fsl-lx2160a-cex7-u-boot.dtsi b/arch/arm/dts/fsl-lx2160a-cex7-u-boot.dtsi +new file mode 100644 +index 0000000000..9855fcb31c +--- /dev/null ++++ b/arch/arm/dts/fsl-lx2160a-cex7-u-boot.dtsi +@@ -0,0 +1,22 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++ ++/ { ++ fanctrl-override { ++ compatible = "solidrun,lx2160acex7-fanctrl-override"; ++ override-gpios = <&gpio2 2 0>; ++ }; ++}; ++ ++&i2c0 { ++ u-boot,dm-pre-reloc; ++ ++ i2c-mux@77 { ++ u-boot,dm-pre-reloc; ++ ++ i2c@0 { ++ eeprom@57 { ++ u-boot,dm-pre-reloc; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm/dts/fsl-lx2160a-cex7.dts b/arch/arm/dts/fsl-lx2160a-cex7.dts +new file mode 100644 +index 0000000000..60f99f143c +--- /dev/null ++++ b/arch/arm/dts/fsl-lx2160a-cex7.dts +@@ -0,0 +1,20 @@ ++// SPDX-License-Identifier: (GPL-2.0 OR MIT) ++/* ++ * Device Tree file for LX2160A-CEx7 Standalone (Generic Carrier Board) ++ * ++ * Copyright 2024 Josua Mayer <[email protected]> ++ */ ++ ++#include "fsl-lx2160a-cex7.dtsi" ++ ++&dpmac17 { ++ status = "okay"; ++}; ++ ++&esdhc0 { ++ sd-uhs-sdr104; ++ sd-uhs-sdr50; ++ sd-uhs-sdr25; ++ sd-uhs-sdr12; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/fsl-lx2160a-cex7.dtsi b/arch/arm/dts/fsl-lx2160a-cex7.dtsi +new file mode 100644 +index 0000000000..d32a52ab00 +--- /dev/null ++++ b/arch/arm/dts/fsl-lx2160a-cex7.dtsi +@@ -0,0 +1,187 @@ ++// SPDX-License-Identifier: (GPL-2.0 OR MIT) ++// ++// Device Tree file for LX2160A-CEx7 ++// ++// Copyright 2019 SolidRun Ltd. ++ ++/dts-v1/; ++ ++#include "fsl-lx2160a.dtsi" ++ ++/ { ++ model = "SolidRun LX2160A COM Express Type 7 module"; ++ compatible = "solidrun,lx2160a-cex7", "fsl,lx2160a"; ++ ++ aliases { ++ crypto = &crypto; ++ }; ++ ++ sb_3v3: regulator-sb3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "RT7290"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++&crypto { ++ status = "okay"; ++}; ++ ++&dpmac17 { ++ phy-handle = <&rgmii_phy1>; ++ phy-connection-type = "rgmii-id"; ++}; ++ ++&emdio1 { ++ status = "okay"; ++ ++ rgmii_phy1: ethernet-phy@1 { ++ reg = <1>; ++ qca,smarteee-tw-us-1g = <24>; ++ }; ++}; ++ ++&esdhc1 { ++ mmc-hs200-1_8v; ++ mmc-hs400-1_8v; ++ bus-width = <8>; ++ status = "okay"; ++}; ++ ++&i2c0 { ++ status = "okay"; ++ ++ i2c-mux@77 { ++ compatible = "nxp,pca9547"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x77>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ eeprom@50 { ++ compatible = "atmel,24c512"; ++ reg = <0x50>; ++ }; ++ ++ eeprom@51 { ++ compatible = "atmel,spd"; ++ reg = <0x51>; ++ }; ++ ++ eeprom@53 { ++ compatible = "atmel,spd"; ++ reg = <0x53>; ++ }; ++ ++ eeprom@57 { ++ compatible = "atmel,24c02"; ++ reg = <0x57>; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ fan-temperature-ctrlr@18 { ++ compatible = "ti,amc6821"; ++ reg = <0x18>; ++ cooling-min-state = <0>; ++ cooling-max-state = <9>; ++ #cooling-cells = <2>; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ regulator@5c { ++ compatible = "lltc,ltc3882"; ++ reg = <0x5c>; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ temperature-sensor@48 { ++ compatible = "nxp,sa56004"; ++ reg = <0x48>; ++ vcc-supply = <&sb_3v3>; ++ }; ++ }; ++ ++ sfp0_i2c: i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ }; ++ ++ sfp1_i2c: i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ }; ++ ++ sfp2_i2c: i2c@6 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <6>; ++ }; ++ ++ sfp3_i2c: i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ }; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++}; ++ ++&i2c4 { ++ status = "okay"; ++ ++ rtc@51 { ++ compatible = "nxp,pcf2129"; ++ reg = <0x51>; ++ }; ++}; ++ ++&fspi { ++ status = "okay"; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "micron,m25p80"; ++ m25p,fast-read; ++ spi-max-frequency = <50000000>; ++ reg = <0>; ++ /* The following setting enables 1-1-8 (CMD-ADDR-DATA) mode */ ++ spi-rx-bus-width = <8>; ++ spi-tx-bus-width = <1>; ++ }; ++}; ++ ++&usb0 { ++ status = "okay"; ++}; ++ ++&usb1 { ++ status = "okay"; ++}; +diff --git a/board/solidrun/lx2160acex7/Kconfig b/board/solidrun/lx2160acex7/Kconfig +new file mode 100644 +index 0000000000..85673846a4 +--- /dev/null ++++ b/board/solidrun/lx2160acex7/Kconfig +@@ -0,0 +1,15 @@ ++if TARGET_LX2160ACEX7 ++ ++config SYS_BOARD ++ default "lx2160acex7" ++ ++config SYS_VENDOR ++ default "solidrun" ++ ++config SYS_SOC ++ default "fsl-layerscape" ++ ++config SYS_CONFIG_NAME ++ default "lx2160acex7" ++ ++endif +diff --git a/board/solidrun/lx2160acex7/Makefile b/board/solidrun/lx2160acex7/Makefile +new file mode 100644 +index 0000000000..4a3b039a5c +--- /dev/null ++++ b/board/solidrun/lx2160acex7/Makefile +@@ -0,0 +1,10 @@ ++# ++# Copyright 2018 Freescale Semiconductor ++# Copyright 2024 Josua Mayer <[email protected]> ++# ++# SPDX-License-Identifier: GPL-2.0+ ++# ++ ++obj-y += lx2160a.o ++obj-y += ddr.o ++obj-$(CONFIG_TARGET_LX2160ACEX7) += eth_lx2160acex7.o +diff --git a/board/solidrun/lx2160acex7/ddr.c b/board/solidrun/lx2160acex7/ddr.c +new file mode 100644 +index 0000000000..d872e57530 +--- /dev/null ++++ b/board/solidrun/lx2160acex7/ddr.c +@@ -0,0 +1,22 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2018 NXP ++ * Copyright 2024 Josua Mayer <[email protected]> ++ */ ++ ++#include <common.h> ++#include <fsl_ddr_sdram.h> ++#include <fsl_ddr_dimm_params.h> ++#include <asm/global_data.h> ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int fsl_initdram(void) ++{ ++ gd->ram_size = tfa_get_dram_size(); ++ ++ if (!gd->ram_size) ++ gd->ram_size = fsl_ddr_sdram_size(); ++ ++ return 0; ++} +diff --git a/board/solidrun/lx2160acex7/eth_lx2160acex7.c b/board/solidrun/lx2160acex7/eth_lx2160acex7.c +new file mode 100644 +index 0000000000..d2c68d3424 +--- /dev/null ++++ b/board/solidrun/lx2160acex7/eth_lx2160acex7.c +@@ -0,0 +1,88 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2018-2021 NXP ++ * ++ */ ++ ++#include <common.h> ++#include <asm/io.h> ++#include <command.h> ++#include <fm_eth.h> ++#include <fsl_mdio.h> ++#include <fsl-mc/fsl_mc.h> ++#include <fsl-mc/ldpaa_wriop.h> ++#include <netdev.h> ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int board_eth_init(struct bd_info *bis) ++{ ++#if defined(CONFIG_FSL_MC_ENET) ++ struct memac_mdio_info mdio_info; ++ struct memac_mdio_controller *reg; ++ int i, interface; ++ struct mii_dev *dev; ++ struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++ u32 srds_s1; ++ ++ srds_s1 = in_le32(&gur->rcwsr[28]) & ++ FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_MASK; ++ srds_s1 >>= FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_SHIFT; ++ ++ reg = (struct memac_mdio_controller *)CONFIG_SYS_FSL_WRIOP1_MDIO1; ++ mdio_info.regs = reg; ++ mdio_info.name = DEFAULT_WRIOP_MDIO1_NAME; ++ ++ /* Register the EMI 1 */ ++ fm_memac_mdio_init(bis, &mdio_info); ++ ++ switch (srds_s1) { ++ case 8: ++ wriop_set_phy_address(WRIOP1_DPMAC17, 0, RGMII_PHY_ADDR1); ++ break; ++ ++ default: ++ printf("SerDes1 protocol 0x%x is not supported on LX2160ACEX7\n", ++ srds_s1); ++ goto next; ++ } ++ ++ for (i = WRIOP1_DPMAC17; i <= WRIOP1_DPMAC17; i++) { ++ interface = wriop_get_enet_if(i); ++ switch (interface) { ++ case PHY_INTERFACE_MODE_RGMII: ++ case PHY_INTERFACE_MODE_RGMII_ID: ++ dev = miiphy_get_dev_by_name(DEFAULT_WRIOP_MDIO1_NAME); ++ wriop_set_mdio(i, dev); ++ break; ++ default: ++ break; ++ } ++ } ++ ++next: ++ cpu_eth_init(bis); ++#endif /* CONFIG_FSL_MC_ENET */ ++ ++ return pci_eth_init(bis); ++} ++ ++#if defined(CONFIG_RESET_PHY_R) ++void reset_phy(void) ++{ ++#if defined(CONFIG_FSL_MC_ENET) ++ mc_env_boot(); ++#endif ++} ++#endif /* CONFIG_RESET_PHY_R */ ++ ++int mac_read_from_eeprom(void) ++{ ++ return 0; ++} ++ ++int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) ++{ ++ puts("Not implemented.\n"); ++ return CMD_RET_FAILURE; ++} +diff --git a/board/solidrun/lx2160acex7/lx2160a.c b/board/solidrun/lx2160acex7/lx2160a.c +new file mode 100644 +index 0000000000..08fa607067 +--- /dev/null ++++ b/board/solidrun/lx2160acex7/lx2160a.c +@@ -0,0 +1,308 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2018-2021 NXP ++ * Copyright 2024 Josua Mayer <[email protected]> ++ */ ++ ++#include <common.h> ++#include <asm/arch/clock.h> ++#include <asm/arch-fsl-layerscape/fsl_icid.h> ++#include <asm/arch/soc.h> ++#include <asm/gpio.h> ++#include <clock_legacy.h> ++#include <dm.h> ++#include <dm/platform_data/serial_pl01x.h> ++#include <fdt_support.h> ++#include <fsl-mc/fsl_mc.h> ++#include <fsl_ddr.h> ++#include <init.h> ++#include <malloc.h> ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++static struct pl01x_serial_plat serial0 = { ++#if CONFIG_CONS_INDEX == 0 ++ .base = CONFIG_SYS_SERIAL0, ++#elif CONFIG_CONS_INDEX == 1 ++ .base = CONFIG_SYS_SERIAL1, ++#else ++#error "Unsupported console index value." ++#endif ++ .type = TYPE_PL011, ++}; ++ ++U_BOOT_DRVINFO(nxp_serial0) = { ++ .name = "serial_pl01x", ++ .plat = &serial0, ++}; ++ ++static struct pl01x_serial_plat serial1 = { ++ .base = CONFIG_SYS_SERIAL1, ++ .type = TYPE_PL011, ++}; ++ ++U_BOOT_DRVINFO(nxp_serial1) = { ++ .name = "serial_pl01x", ++ .plat = &serial1, ++}; ++ ++static void uart_get_clock(void) ++{ ++ serial0.clock = get_serial_clock(); ++ serial1.clock = get_serial_clock(); ++} ++ ++int board_early_init_f(void) ++{ ++#ifdef CONFIG_SYS_I2C_EARLY_INIT ++ i2c_early_init_f(); ++#endif ++ /* get required clock for UART IP */ ++ uart_get_clock(); ++ ++ fsl_lsch3_early_init_f(); ++ return 0; ++} ++ ++#ifdef CONFIG_OF_BOARD_FIXUP ++int board_fix_fdt(void *fdt) ++{ ++ char *reg_names, *reg_name; ++ int names_len, old_name_len, new_name_len, remaining_names_len; ++ struct str_map { ++ char *old_str; ++ char *new_str; ++ } reg_names_map[] = { ++ { "ccsr", "dbi" }, ++ { "pf_ctrl", "ctrl" } ++ }; ++ int off = -1, i = 0; ++ ++ if (IS_SVR_REV(get_svr(), 1, 0)) ++ return 0; ++ ++ off = fdt_node_offset_by_compatible(fdt, -1, "fsl,lx2160a-pcie"); ++ while (off != -FDT_ERR_NOTFOUND) { ++ fdt_setprop(fdt, off, "compatible", "fsl,ls-pcie", ++ strlen("fsl,ls-pcie") + 1); ++ ++ reg_names = (char *)fdt_getprop(fdt, off, "reg-names", ++ &names_len); ++ if (!reg_names) ++ continue; ++ ++ reg_name = reg_names; ++ remaining_names_len = names_len - (reg_name - reg_names); ++ i = 0; ++ while ((i < ARRAY_SIZE(reg_names_map)) && remaining_names_len) { ++ old_name_len = strlen(reg_names_map[i].old_str); ++ new_name_len = strlen(reg_names_map[i].new_str); ++ if (memcmp(reg_name, reg_names_map[i].old_str, ++ old_name_len) == 0) { ++ /* first only leave required bytes for new_str ++ * and copy rest of the string after it ++ */ ++ memcpy(reg_name + new_name_len, ++ reg_name + old_name_len, ++ remaining_names_len - old_name_len); ++ /* Now copy new_str */ ++ memcpy(reg_name, reg_names_map[i].new_str, ++ new_name_len); ++ names_len -= old_name_len; ++ names_len += new_name_len; ++ i++; ++ } ++ ++ reg_name = memchr(reg_name, '\0', remaining_names_len); ++ if (!reg_name) ++ break; ++ ++ reg_name += 1; ++ ++ remaining_names_len = names_len - ++ (reg_name - reg_names); ++ } ++ ++ fdt_setprop(fdt, off, "reg-names", reg_names, names_len); ++ off = fdt_node_offset_by_compatible(fdt, off, ++ "fsl,lx2160a-pcie"); ++ } ++ ++ return 0; ++} ++#endif ++ ++int esdhc_status_fixup(void *blob, const char *compat) ++{ ++ /* Enable both esdhc DT nodes for LX2160ARDB */ ++ do_fixup_by_compat(blob, compat, "status", "okay", ++ sizeof("okay"), 1); ++ ++ return 0; ++} ++ ++int checkboard(void) ++{ ++ enum boot_src src = get_boot_src(); ++ char buf[64]; ++ ++ cpu_name(buf); ++ printf("Board: LX2160A-CEX7, %s, boot from ", buf); ++ ++ if (src == BOOT_SOURCE_SD_MMC) { ++ puts("SD\n"); ++ } else if (src == BOOT_SOURCE_SD_MMC2) { ++ puts("eMMC\n"); ++ } else if (src == BOOT_SOURCE_XSPI_NOR) { ++ puts("FlexSPI\n"); ++ } ++ ++ return 0; ++} ++ ++int config_board_mux(void) ++{ ++ return 0; ++} ++ ++unsigned long get_board_sys_clk(void) ++{ ++ return 100000000; ++} ++ ++unsigned long get_board_ddr_clk(void) ++{ ++ return 100000000; ++} ++ ++int board_init(void) ++{ ++#ifdef CONFIG_ENV_IS_NOWHERE ++ gd->env_addr = (ulong)&default_environment[0]; ++#endif ++ ++#if !defined(CONFIG_SYS_EARLY_PCI_INIT) && defined(CONFIG_DM_ETH) ++ pci_init(); ++#endif ++ return 0; ++} ++ ++void detail_board_ddr_info(void) ++{ ++ int i; ++ u64 ddr_size = 0; ++ ++ puts("\nDDR "); ++ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) ++ ddr_size += gd->bd->bi_dram[i].size; ++ print_size(ddr_size, ""); ++ print_ddr_info(0); ++} ++ ++#ifdef CONFIG_MISC_INIT_R ++int misc_init_r(void) ++{ ++ config_board_mux(); ++ ++ return 0; ++} ++#endif ++ ++#ifdef CONFIG_FSL_MC_ENET ++void fdt_fixup_board_enet(void *fdt) ++{ ++ int offset; ++ ++ offset = fdt_path_offset(fdt, "/soc/fsl-mc"); ++ ++ if (offset < 0) ++ offset = fdt_path_offset(fdt, "/fsl-mc"); ++ ++ if (offset < 0) { ++ printf("%s: fsl-mc node not found in device tree (error %d)\n", ++ __func__, offset); ++ return; ++ } ++ ++ if (get_mc_boot_status() == 0 && ++ (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) { ++ fdt_status_okay(fdt, offset); ++ } else { ++ fdt_status_fail(fdt, offset); ++ } ++} ++ ++void board_quiesce_devices(void) ++{ ++ fsl_mc_ldpaa_exit(gd->bd); ++} ++#endif ++ ++#ifdef CONFIG_OF_BOARD_SETUP ++int ft_board_setup(void *blob, struct bd_info *bd) ++{ ++ int i; ++ u16 mc_memory_bank = 0; ++ ++ u64 *base; ++ u64 *size; ++ u64 mc_memory_base = 0; ++ u64 mc_memory_size = 0; ++ u16 total_memory_banks; ++ ++ ft_cpu_setup(blob, bd); ++ ++ fdt_fixup_mc_ddr(&mc_memory_base, &mc_memory_size); ++ ++ if (mc_memory_base != 0) ++ mc_memory_bank++; ++ ++ total_memory_banks = CONFIG_NR_DRAM_BANKS + mc_memory_bank; ++ ++ base = calloc(total_memory_banks, sizeof(u64)); ++ size = calloc(total_memory_banks, sizeof(u64)); ++ ++ /* fixup DT for the three GPP DDR banks */ ++ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { ++ base[i] = gd->bd->bi_dram[i].start; ++ size[i] = gd->bd->bi_dram[i].size; ++ } ++ ++#ifdef CONFIG_RESV_RAM ++ /* reduce size if reserved memory is within this bank */ ++ if (gd->arch.resv_ram >= base[0] && ++ gd->arch.resv_ram < base[0] + size[0]) ++ size[0] = gd->arch.resv_ram - base[0]; ++ else if (gd->arch.resv_ram >= base[1] && ++ gd->arch.resv_ram < base[1] + size[1]) ++ size[1] = gd->arch.resv_ram - base[1]; ++ else if (gd->arch.resv_ram >= base[2] && ++ gd->arch.resv_ram < base[2] + size[2]) ++ size[2] = gd->arch.resv_ram - base[2]; ++#endif ++ ++ if (mc_memory_base != 0) { ++ for (i = 0; i <= total_memory_banks; i++) { ++ if (base[i] == 0 && size[i] == 0) { ++ base[i] = mc_memory_base; ++ size[i] = mc_memory_size; ++ break; ++ } ++ } ++ } ++ ++ fdt_fixup_memory_banks(blob, base, size, total_memory_banks); ++ ++#ifdef CONFIG_USB ++ fsl_fdt_fixup_dr_usb(blob, bd); ++#endif ++ ++#ifdef CONFIG_FSL_MC_ENET ++ fdt_fsl_mc_fixup_iommu_map_entry(blob); ++ fdt_fixup_board_enet(blob); ++#endif ++ fdt_fixup_icid(blob); ++ ++ return 0; ++} ++#endif +diff --git a/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig b/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig +new file mode 100644 +index 0000000000..12f236aad0 +--- /dev/null ++++ b/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig +@@ -0,0 +1,86 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_GIC_V3_ITS=y ++CONFIG_TARGET_LX2160ACEX7=y ++CONFIG_TFABOOT=y ++CONFIG_SYS_TEXT_BASE=0x82000000 ++CONFIG_SYS_MALLOC_LEN=0x202000 ++CONFIG_SYS_MALLOC_F_LEN=0x6000 ++CONFIG_NR_DRAM_BANKS=3 ++CONFIG_ENV_SIZE=0x2000 ++CONFIG_NXP_ESBC=y ++CONFIG_DM_GPIO=y ++CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7" ++CONFIG_FSPI_AHB_EN_4BYTE=y ++CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y ++CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y ++CONFIG_AHCI=y ++CONFIG_OF_BOARD_FIXUP=y ++CONFIG_REMAKE_ELF=y ++CONFIG_MP=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_OF_STDOUT_VIA_ALIAS=y ++CONFIG_DYNAMIC_SYS_CLK_FREQ=y ++CONFIG_USE_BOOTARGS=y ++CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf" ++CONFIG_DEFAULT_FDT_FILE="freescale/fsl-lx2160a-clearfog-cx.dtb" ++CONFIG_MISC_INIT_R=y ++CONFIG_CMD_GREPENV=y ++CONFIG_CMD_EEPROM=y ++CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=3 ++CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 ++CONFIG_CMD_DM=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_CACHE=y ++CONFIG_OF_CONTROL=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_DM=y ++CONFIG_SATA=y ++CONFIG_SATA_CEVA=y ++CONFIG_DYNAMIC_DDR_CLK_FREQ=y ++CONFIG_DDR_ECC=y ++CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y ++CONFIG_MPC8XXX_GPIO=y ++CONFIG_DM_I2C=y ++CONFIG_I2C_SET_DEFAULT_BUS_NUM=y ++CONFIG_SYS_I2C_EEPROM_ADDR=0x57 ++CONFIG_MMC_HS400_SUPPORT=y ++CONFIG_FSL_ESDHC=y ++CONFIG_MTD=y ++CONFIG_DM_SPI_FLASH=y ++CONFIG_SPI_FLASH_STMICRO=y ++CONFIG_SPI_FLASH_MT35XU=y ++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set ++CONFIG_PHYLIB=y ++CONFIG_PHY_ATHEROS=y ++CONFIG_DM_ETH=y ++CONFIG_DM_MDIO=y ++CONFIG_E1000=y ++CONFIG_MII=y ++CONFIG_FSL_LS_MDIO=y ++CONFIG_NVME_PCI=y ++CONFIG_PCI=y ++CONFIG_PCIE_LAYERSCAPE_RC=y ++CONFIG_PCIE_LAYERSCAPE_GEN4=y ++CONFIG_DM_RTC=y ++CONFIG_RTC_PCF2127=y ++CONFIG_DM_SCSI=y ++CONFIG_DM_SERIAL=y ++CONFIG_PL01X_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_NXP_FSPI=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_RSA=y ++CONFIG_SPL_RSA=y ++CONFIG_RSA_SOFTWARE_EXP=y ++CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +new file mode 100644 +index 0000000000..9f24e12a85 +--- /dev/null ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -0,0 +1,96 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_GIC_V3_ITS=y ++CONFIG_TARGET_LX2160ACEX7=y ++CONFIG_TFABOOT=y ++CONFIG_SYS_TEXT_BASE=0x82000000 ++CONFIG_SYS_MALLOC_LEN=0x202000 ++CONFIG_SYS_MALLOC_F_LEN=0x6000 ++CONFIG_NR_DRAM_BANKS=3 ++CONFIG_ENV_SIZE=0x2000 ++CONFIG_ENV_OFFSET=0x500000 ++CONFIG_ENV_SECT_SIZE=0x20000 ++CONFIG_DM_GPIO=y ++CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7" ++CONFIG_FSPI_AHB_EN_4BYTE=y ++CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y ++CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y ++CONFIG_AHCI=y ++CONFIG_OF_BOARD_FIXUP=y ++CONFIG_REMAKE_ELF=y ++CONFIG_MP=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_OF_STDOUT_VIA_ALIAS=y ++CONFIG_DYNAMIC_SYS_CLK_FREQ=y ++CONFIG_BOOTDELAY=10 ++CONFIG_USE_BOOTARGS=y ++CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf" ++CONFIG_DEFAULT_FDT_FILE="freescale/fsl-lx2160a-clearfog-cx.dtb" ++CONFIG_MISC_INIT_R=y ++CONFIG_CMD_GREPENV=y ++CONFIG_CMD_EEPROM=y ++CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=3 ++CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 ++CONFIG_CMD_DM=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_OPTEE_RPMB=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_WDT=y ++CONFIG_CMD_CACHE=y ++CONFIG_OF_CONTROL=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_ENV_IS_IN_SPI_FLASH=y ++CONFIG_ENV_ADDR=0x20500000 ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_DM=y ++CONFIG_SATA=y ++CONFIG_SATA_CEVA=y ++CONFIG_FSL_CAAM=y ++CONFIG_DYNAMIC_DDR_CLK_FREQ=y ++CONFIG_DDR_ECC=y ++CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y ++CONFIG_MPC8XXX_GPIO=y ++CONFIG_DM_I2C=y ++CONFIG_I2C_SET_DEFAULT_BUS_NUM=y ++CONFIG_SYS_I2C_EEPROM_ADDR=0x57 ++CONFIG_SUPPORT_EMMC_RPMB=y ++CONFIG_MMC_HS400_SUPPORT=y ++CONFIG_FSL_ESDHC=y ++CONFIG_MTD=y ++CONFIG_DM_SPI_FLASH=y ++CONFIG_SPI_FLASH_STMICRO=y ++CONFIG_SPI_FLASH_MT35XU=y ++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set ++CONFIG_PHYLIB=y ++CONFIG_PHY_ATHEROS=y ++CONFIG_DM_ETH=y ++CONFIG_DM_MDIO=y ++CONFIG_E1000=y ++CONFIG_MII=y ++CONFIG_FSL_LS_MDIO=y ++CONFIG_NVME_PCI=y ++CONFIG_PCI=y ++CONFIG_PCIE_LAYERSCAPE_RC=y ++CONFIG_PCIE_LAYERSCAPE_GEN4=y ++CONFIG_DM_RTC=y ++CONFIG_RTC_PCF2127=y ++CONFIG_DM_SCSI=y ++CONFIG_DM_SERIAL=y ++CONFIG_PL01X_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_NXP_FSPI=y ++CONFIG_TEE=y ++CONFIG_OPTEE=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_WDT=y ++CONFIG_WDT_SBSA=y ++CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +diff --git a/include/configs/lx2160acex7.h b/include/configs/lx2160acex7.h +new file mode 100644 +index 0000000000..83f64e65a8 +--- /dev/null ++++ b/include/configs/lx2160acex7.h +@@ -0,0 +1,324 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * Copyright 2018-2022 NXP ++ * Copyright 2024 Josua Mayer <[email protected]> ++ */ ++ ++#ifndef __CONFIG_LX2160ACEX7_H ++#define __CONFIG_LX2160ACEX7_H ++ ++#include <asm/arch/stream_id_lsch3.h> ++#include <asm/arch/config.h> ++#include <asm/arch/soc.h> ++ ++#define CONFIG_FSL_MEMAC ++ ++#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE ++#define CONFIG_SYS_FLASH_BASE 0x20000000 ++ ++/* DDR */ ++#define CONFIG_SYS_FSL_DDR_INTLV_256B /* force 256 byte interleaving */ ++#define CONFIG_VERY_BIG_RAM ++#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000UL ++#define CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY 0 ++#define CONFIG_SYS_DDR_BLOCK2_BASE 0x2080000000ULL ++#define CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS 2 ++#define CONFIG_SYS_SDRAM_SIZE 0x200000000UL ++#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE ++#define CONFIG_MEM_INIT_VALUE 0xdeadbeef ++#define SPD_EEPROM_ADDRESS1 0x51 ++#define SPD_EEPROM_ADDRESS2 0x52 ++#define SPD_EEPROM_ADDRESS3 0x53 ++#define SPD_EEPROM_ADDRESS4 0x54 ++#define SPD_EEPROM_ADDRESS5 0x55 ++#define SPD_EEPROM_ADDRESS6 0x56 ++#define SPD_EEPROM_ADDRESS SPD_EEPROM_ADDRESS1 ++#define CONFIG_SYS_SPD_BUS_NUM 0 /* SPD on I2C bus 0 */ ++#define CONFIG_DIMM_SLOTS_PER_CTLR 1 ++#define CONFIG_CHIP_SELECTS_PER_CTRL 4 ++#define CONFIG_SYS_MONITOR_LEN (936 * 1024) ++ ++/* SMP Definitinos */ ++#define CPU_RELEASE_ADDR secondary_boot_addr ++ ++/* Generic Timer Definitions */ ++/* ++ * This is not an accurate number. It is used in start.S. The frequency ++ * will be udpated later when get_bus_freq(0) is available. ++ */ ++ ++#define COUNTER_FREQUENCY 25000000 /* 25MHz */ ++ ++/* Serial Port */ ++#define CONFIG_PL011_CLOCK (get_bus_freq(0) / 4) ++#define CONFIG_SYS_SERIAL0 0x21c0000 ++#define CONFIG_SYS_SERIAL1 0x21d0000 ++#define CONFIG_SYS_SERIAL2 0x21e0000 ++#define CONFIG_SYS_SERIAL3 0x21f0000 ++/*below might needs to be removed*/ ++#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ ++ (void *)CONFIG_SYS_SERIAL1, \ ++ (void *)CONFIG_SYS_SERIAL2, \ ++ (void *)CONFIG_SYS_SERIAL3 } ++ ++/* MC firmware */ ++#define CONFIG_SYS_LS_MC_DPC_MAX_LENGTH 0x20000 ++#define CONFIG_SYS_LS_MC_DRAM_DPC_OFFSET 0x00F00000 ++#define CONFIG_SYS_LS_MC_DPL_MAX_LENGTH 0x20000 ++#define CONFIG_SYS_LS_MC_DRAM_DPL_OFFSET 0x00F20000 ++#define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000 ++ ++/* Define phy_reset function to boot the MC based on mcinitcmd. ++ * This happens late enough to properly fixup u-boot env MAC addresses. ++ */ ++#define CONFIG_RESET_PHY_R ++ ++/* ++ * Carve out a DDR region which will not be used by u-boot/Linux ++ * ++ * It will be used by MC and Debug Server. The MC region must be ++ * 512MB aligned, so the min size to hide is 512MB. ++ */ ++#ifdef CONFIG_FSL_MC_ENET ++#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (256UL * 1024 * 1024) ++#endif ++ ++/* GPIO */ ++#define CONFIG_GPIO_EXTRA_HEADER ++ ++/* SATA */ ++#ifdef CONFIG_SCSI ++#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1 ++#define CONFIG_SYS_SATA2 AHCI_BASE_ADDR2 ++#define CONFIG_SYS_SATA3 AHCI_BASE_ADDR3 ++#define CONFIG_SYS_SATA4 AHCI_BASE_ADDR4 ++#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4 ++#define CONFIG_SYS_SCSI_MAX_LUN 1 ++#endif ++ ++/* USB */ ++#ifdef CONFIG_USB ++#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 ++#endif ++ ++/* MAC/PHY configuration */ ++#if defined(CONFIG_FSL_MC_ENET) ++#define CONFIG_ETHPRIME "DPMAC17@rgmii-id" ++#define RGMII_PHY_ADDR1 0x01 ++#endif ++ ++#define COUNTER_FREQUENCY_REAL (get_board_sys_clk() / 4) ++ ++#define CONFIG_HWCONFIG ++#define HWCONFIG_BUFFER_SIZE 128 ++ ++/* Monitor Command Prompt */ ++#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ ++#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ ++ sizeof(CONFIG_SYS_PROMPT) + 16) ++#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */ ++#define CONFIG_SYS_MAXARGS 64 /* max command args */ ++ ++#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ ++ ++/* ++ * Memory Layout Ovverview: ++ * ++ */ ++ ++/* ++ * Boot-Media Latout: ++ * - SD/eMMC MC offsets (in sectors): ++ * - 0x3000: kernel header ++ * - 0x3200: mc firmware header ++ * - 0x3400: dpc header ++ * - 0x5000: firmware ++ * - 0x6800: dpl ++ * - 0x7000: dpc ++ * - 0x7800: dtb ++ * - 0x8000: kernel ++ * - SPI offsets (in byte): ++ * - 0x0600000: kernel header ++ * - 0x0640000: mc firmware header ++ * - 0x0680000: dpc header ++ * - 0x0a00000: mc firmware ++ * - 0x0e00000: dpc ++ * - 0x0d00000: dpl ++ * - 0x0f00000: dtb ++ * - 0x1000000: kernel ++ */ ++ ++/* ++ * Load Adresses (different from lx2160a_common.h): ++ * Use GPP DRAM Region #1 (2GB: [0x80000000-0xffffffff]). ++ * - 16MB for secure-boot / mc ([0x80000000-0x80ffffff]) ++ * - 1MB for boot-script ++ * - 1MB for pxe ++ * - 1MB for DTB ++ * - 64MB for compressed kernel ++ * - 512MB for uncompressed kernel ++ * - ~1.5GB for ramdisk ++ */ ++#define SCRIPT_ADDR_R __stringify(0x81000000) ++#define PXEFILE_ADDR_R __stringify(0x81100000) ++#define FDT_ADDR_R __stringify(0x81200000) ++#define KERNEL_COMP_ADDR_R __stringify(0x81300000) ++#define KERNEL_COMP_SIZE __stringify(0x04000000) ++#define KERNEL_ADDR_R __stringify(0x85300000) ++#define RAMDISK_ADDR_R __stringify(0xa5300000) ++#define FDT_RELOCATION_LIMIT __stringify(0xffffffff) ++ ++/* Initial environment variables */ ++#define XSPI_MC_INIT_CMD \ ++ "sf probe 0:0 && " \ ++ "sf read 0x80640000 0x640000 0x80000 && " \ ++ "sf read $fdt_addr_r 0xf00000 0x100000 && " \ ++ "env exists secureboot && " \ ++ "esbc_validate 0x80640000 && " \ ++ "esbc_validate 0x80680000; " \ ++ "sf read 0x80a00000 0xa00000 0x300000 && " \ ++ "sf read 0x80e00000 0xe00000 0x100000; " \ ++ "fsl_mc start mc 0x80a00000 0x80e00000\0" ++ ++#define SD_MC_INIT_CMD \ ++ "mmc read 0x80a00000 0x5000 0x1200;" \ ++ "mmc read 0x80e00000 0x7000 0x800;" \ ++ "mmc read $fdt_addr_r 0x7800 0x800;" \ ++ "env exists secureboot && " \ ++ "mmc read 0x80640000 0x3200 0x20 && " \ ++ "mmc read 0x80680000 0x3400 0x20 && " \ ++ "esbc_validate 0x80640000 && " \ ++ "esbc_validate 0x80680000 ;" \ ++ "fsl_mc start mc 0x80a00000 0x80e00000\0" ++ ++#define SD2_MC_INIT_CMD \ ++ "mmc dev 1; mmc read 0x80a00000 0x5000 0x1200;" \ ++ "mmc read 0x80e00000 0x7000 0x800;" \ ++ "mmc read $fdt_addr_r 0x7800 0x800;" \ ++ "env exists secureboot && " \ ++ "mmc read 0x80640000 0x3200 0x20 && " \ ++ "mmc read 0x80680000 0x3400 0x20 && " \ ++ "esbc_validate 0x80640000 && " \ ++ "esbc_validate 0x80680000 ;" \ ++ "fsl_mc start mc 0x80a00000 0x80e00000\0" ++ ++#define EXTRA_ENV_SETTINGS \ ++ "hwconfig=fsl_ddr:bank_intlv=auto\0" \ ++ "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \ ++ "fdt_high=" FDT_RELOCATION_LIMIT "\0" \ ++ "initrd_high=0xffffffffffffffff\0" \ ++ "kernel_start=0x1000000\0" \ ++ "kernelheader_start=0x600000\0" \ ++ "scriptaddr=" SCRIPT_ADDR_R "\0" \ ++ "scripthdraddr=0x80080000\0" \ ++ "fdtheader_addr_r=0x80100000\0" \ ++ "kernelheader_addr_r=0x80200000\0" \ ++ "kernel_addr_r=" KERNEL_ADDR_R "\0" \ ++ "kernelheader_size=0x40000\0" \ ++ "fdt_addr_r=" FDT_ADDR_R "\0" \ ++ "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ ++ "kernel_comp_addr_r=" KERNEL_COMP_ADDR_R "\0" \ ++ "kernel_comp_size=" KERNEL_COMP_SIZE "\0" \ ++ "load_addr=" KERNEL_ADDR_R "\0" \ ++ "kernel_size=0x2800000\0" \ ++ "kernel_addr_sd=0x8000\0" \ ++ "kernelhdr_addr_sd=0x3000\0" \ ++ "kernel_size_sd=0x14000\0" \ ++ "kernelhdr_size_sd=0x20\0" \ ++ "console=ttyAMA0,115200n8\0" \ ++ BOOTENV \ ++ "mcmemsize=0x70000000\0" \ ++ XSPI_MC_INIT_CMD \ ++ "scan_dev_for_boot_part=" \ ++ "part list ${devtype} ${devnum} devplist; " \ ++ "env exists devplist || setenv devplist 1; " \ ++ "for distro_bootpart in ${devplist}; do " \ ++ "if fstype ${devtype} " \ ++ "${devnum}:${distro_bootpart} " \ ++ "bootfstype; then " \ ++ "run scan_dev_for_boot; " \ ++ "fi; " \ ++ "done\0" \ ++ "boot_a_script=" \ ++ "load ${devtype} ${devnum}:${distro_bootpart} " \ ++ "${scriptaddr} ${prefix}${script}; " \ ++ "env exists secureboot && load ${devtype} " \ ++ "${devnum}:${distro_bootpart} " \ ++ "${scripthdraddr} ${prefix}${boot_script_hdr} " \ ++ "&& esbc_validate ${scripthdraddr};" \ ++ "source ${scriptaddr}\0" ++ ++#define XSPI_NOR_BOOTCOMMAND \ ++ "sf probe 0:0; " \ ++ "sf read 0x806c0000 0x6c0000 0x40000; " \ ++ "env exists mcinitcmd && env exists secureboot" \ ++ " && esbc_validate 0x806c0000; " \ ++ "sf read 0x80d00000 0xd00000 0x100000; " \ ++ "env exists mcinitcmd && " \ ++ "fsl_mc lazyapply dpl 0x80d00000; " \ ++ "run distro_bootcmd;run xspi_bootcmd; " \ ++ "env exists secureboot && esbc_halt;" ++ ++#define SD_BOOTCOMMAND \ ++ "env exists mcinitcmd && mmcinfo; " \ ++ "mmc read 0x80d00000 0x6800 0x800; " \ ++ "env exists mcinitcmd && env exists secureboot " \ ++ " && mmc read 0x806C0000 0x3600 0x20 " \ ++ "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ ++ "&& fsl_mc lazyapply dpl 0x80d00000;" \ ++ "run distro_bootcmd;run sd_bootcmd;" \ ++ "env exists secureboot && esbc_halt;" ++ ++#define SD2_BOOTCOMMAND \ ++ "mmc dev 1; env exists mcinitcmd && mmcinfo; " \ ++ "mmc read 0x80d00000 0x6800 0x800; " \ ++ "env exists mcinitcmd && env exists secureboot " \ ++ " && mmc read 0x806C0000 0x3600 0x20 " \ ++ "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ ++ "&& fsl_mc lazyapply dpl 0x80d00000;" \ ++ "run distro_bootcmd;run sd2_bootcmd;" \ ++ "env exists secureboot && esbc_halt;" ++ ++/* configure boot order for distro-boot feature */ ++#define BOOT_TARGET_DEVICES(func) \ ++ func(USB, usb, 0) \ ++ func(MMC, mmc, 0) \ ++ func(MMC, mmc, 1) \ ++ func(SCSI, scsi, 0) \ ++ func(SCSI, scsi, 1) \ ++ func(SCSI, scsi, 2) \ ++ func(SCSI, scsi, 3) \ ++ func(PXE, pxe, na) \ ++ func(DHCP, dhcp, na) ++#include <config_distro_bootcmd.h> ++ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ EXTRA_ENV_SETTINGS \ ++ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ ++ "boot_scripts=lx2160acex7_boot.scr\0" \ ++ "boot_script_hdr=hdr_lx2160acex7_bs.out\0" \ ++ "BOARD=lx2160acex7\0" \ ++ "xspi_bootcmd=echo Trying load from flexspi..;" \ ++ "sf probe 0:0 && sf read $load_addr " \ ++ "$kernel_start $kernel_size ; env exists secureboot &&" \ ++ "sf read $kernelheader_addr_r $kernelheader_start " \ ++ "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\ ++ " bootm $load_addr#$BOARD\0" \ ++ "sd_bootcmd=echo Trying load from sd card..;" \ ++ "mmc dev 0; mmcinfo; mmc read $load_addr " \ ++ "$kernel_addr_sd $kernel_size_sd ;" \ ++ "env exists secureboot && mmc read $kernelheader_addr_r "\ ++ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ ++ " && esbc_validate ${kernelheader_addr_r};" \ ++ "bootm $load_addr#$BOARD\0" \ ++ "sd2_bootcmd=echo Trying load from emmc card..;" \ ++ "mmc dev 1; mmcinfo; mmc read $load_addr " \ ++ "$kernel_addr_sd $kernel_size_sd ;" \ ++ "env exists secureboot && mmc read $kernelheader_addr_r "\ ++ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ ++ " && esbc_validate ${kernelheader_addr_r};" \ ++ "bootm $load_addr#$BOARD\0" ++ ++#include <asm/fsl_secure_boot.h> ++ ++#endif /* __CONFIG_LX2160ACEX7_H */ +diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt +index 8abfe47888..b8c0735d75 100644 +--- a/scripts/config_whitelist.txt ++++ b/scripts/config_whitelist.txt +@@ -1858,6 +1858,12 @@ CONFIG_SYS_SATA1_OFFSET + CONFIG_SYS_SATA2 + CONFIG_SYS_SATA2_FLAGS + CONFIG_SYS_SATA2_OFFSET ++CONFIG_SYS_SATA3 ++CONFIG_SYS_SATA3_FLAGS ++CONFIG_SYS_SATA3_OFFSET ++CONFIG_SYS_SATA4 ++CONFIG_SYS_SATA4_FLAGS ++CONFIG_SYS_SATA4_OFFSET + CONFIG_SYS_SATA_ENV_DEV + CONFIG_SYS_SATA_FAT_BOOT_PARTITION + CONFIG_SYS_SBFHDR_DATA_OFFSET +-- +2.35.3 +
board/solidrun/lx2160acex7/patches/uboot/0002-pci-ls_pcie_g4-Wait-100ms-for-Link-Up-in-ls_pcie_g4_.patch new file +65 -0
65 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0003-pci-ls_pcie-Wait-100ms-for-Link-Up-in-ls_pcie_probe.patch new file +64 -0
64 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0004-fsl-lsch3-update-calculation-of-ddr-clock-rate-to-in.patch new file +63 -0
63 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0005-armv8-lx2160a-enable-workaround-for-SPI-erratum-A-05.patch new file +102 -0
102 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0006-configs-lx2160-cex7-enable-additional-drivers.patch new file +96 -0
96 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0007-cmd-tlv_eeprom-don-t-fail-boot-when-reading-eeprom-f.patch new file +32 -0
@@ -0,0 +1,32 @@ +From fff14a56662e7f4ff86cdb5452e5c1b1e35f28bd Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Sat, 2 Nov 2024 16:31:01 +0100 +Subject: [PATCH 07/10] cmd: tlv_eeprom: don't fail boot when reading eeprom + fails + +When u-boot calls mac_read_from_eeprom during init an error return code +will fail the boot before reaching u-boot shell. + +Return success error code even on error, mac addresses are not critical. + +Signed-off-by: Josua Mayer <[email protected]> +--- + cmd/tlv_eeprom.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c +index bf8d453dc5b..cbc11ebf421 100644 +--- a/cmd/tlv_eeprom.c ++++ b/cmd/tlv_eeprom.c +@@ -1023,7 +1023,7 @@ int mac_read_from_eeprom(void) + + if (read_eeprom(eeprom)) { + printf("Read failed.\n"); +- return -1; ++ return 0; + } + + maccount = 1; +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/uboot/0008-board-solidrun-lx2160-cex7-fixup-u-boot-dts-dpmac-by.patch new file +389 -0
389 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0009-board-solidrun-lx2160acex7-enable-reading-tlv-eeprom.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 402f33f4a31ebfa8b4a03adee2b1940878cadc74 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Sat, 2 Nov 2024 18:30:53 +0100 +Subject: [PATCH 09/10] board: solidrun: lx2160acex7: enable reading tlv eeprom + mac addresses + +Enable tlv eeprom support in u-boot configuration to execute +mac_read_from_eeprom and populate network interface mac addresses from +tlv data if available. + +Signed-off-by: Josua Mayer <[email protected]> +--- + configs/lx2160acex7_tfa_defconfig | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +index 8fd603cb87e..803ddb376f4 100644 +--- a/configs/lx2160acex7_tfa_defconfig ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -28,6 +28,7 @@ CONFIG_USE_BOOTARGS=y + CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf" + CONFIG_DEFAULT_FDT_FILE="freescale/fsl-lx2160a-clearfog-cx.dtb" + CONFIG_MISC_INIT_R=y ++CONFIG_CMD_TLV_EEPROM=y + CONFIG_CMD_GREPENV=y + CONFIG_CMD_EEPROM=y + CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=3 +@@ -58,6 +59,9 @@ CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y + CONFIG_MPC8XXX_GPIO=y + CONFIG_DM_I2C=y + CONFIG_I2C_SET_DEFAULT_BUS_NUM=y ++CONFIG_I2C_MUX=y ++CONFIG_I2C_MUX_PCA954x=y ++CONFIG_I2C_EEPROM=y + CONFIG_SYS_I2C_EEPROM_ADDR=0x57 + CONFIG_SUPPORT_EMMC_RPMB=y + CONFIG_SUPPORT_EMMC_BOOT=y +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/uboot/0010-board-solidrun-lx2160acex7-disable-second-usb-on-lx2.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 86421a6f1f41ea90124e4de2f8b73e43049bc1d4 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Sat, 2 Nov 2024 19:52:31 +0100 +Subject: [PATCH 10/10] board: solidrun: lx2160acex7: disable second usb on + lx2162 + +LX2162 only has single USB controller, disable the second one from +board_fix_fdt. + +Signed-off-by: Josua Mayer <[email protected]> +--- + board/solidrun/lx2160acex7/lx2160a.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/board/solidrun/lx2160acex7/lx2160a.c b/board/solidrun/lx2160acex7/lx2160a.c +index af0a071488a..e0a9e6c51eb 100644 +--- a/board/solidrun/lx2160acex7/lx2160a.c ++++ b/board/solidrun/lx2160acex7/lx2160a.c +@@ -79,6 +79,10 @@ int board_fix_fdt(void *fdt) + { "pf_ctrl", "ctrl" } + }; + int off = -1, i = 0; ++ u32 is_lx2162 = get_svr() & 0x800; ++ ++ if (is_lx2162) ++ do_fixup_by_path_string(fdt, "/usb3@3110000", "status", "disabled"); + + board_fix_fdt_eth(fdt); + +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/uboot/0011-board-solidrun-lx2160acex7-allocate-memory-before-pa.patch new file +39 -0
@@ -0,0 +1,39 @@ +From bcabe078a2a27eecaa592e1f2ea640a5f1fc6cda Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Mon, 4 Nov 2024 15:16:27 +0100 +Subject: [PATCH 11/13] board: solidrun: lx2160acex7: allocate memory before + patching lx2162 fdt + +Update of second usb controller fdt node during board_fix_fdt fails due +to lack of space in the fdt. + +Explicitly allocate some extra bytes before to repair this fixup on +lx2162 som. + +Signed-off-by: Josua Mayer <[email protected]> +--- + board/solidrun/lx2160acex7/lx2160a.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/board/solidrun/lx2160acex7/lx2160a.c b/board/solidrun/lx2160acex7/lx2160a.c +index e0a9e6c51eb..17160d13154 100644 +--- a/board/solidrun/lx2160acex7/lx2160a.c ++++ b/board/solidrun/lx2160acex7/lx2160a.c +@@ -81,8 +81,13 @@ int board_fix_fdt(void *fdt) + int off = -1, i = 0; + u32 is_lx2162 = get_svr() & 0x800; + +- if (is_lx2162) ++ if (is_lx2162) { ++ /* allocate space for changes */ ++ fdt_increase_size(fdt, 32); ++ ++ /* LX2162 does not have second USB controller, disable */ + do_fixup_by_path_string(fdt, "/usb3@3110000", "status", "disabled"); ++ } + + board_fix_fdt_eth(fdt); + +-- +2.43.0 +
board/solidrun/lx2160acex7/patches/uboot/0012-cmd-tlv_eeprom-support-specifying-tlv-eeprom-in-DT-a.patch new file +58 -0
58 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0013-board-solidrun-lx2160acex7-use-dt-alias-for-tlv-eepr.patch new file +90 -0
90 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/uboot/0014-cmd-tlv_eeprom-fix-alias-access-to-second-eeprom.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 413ad975194c929a09199e6a67cf3d2b2f0fb337 Mon Sep 17 00:00:00 2001 +From: Josua Mayer <[email protected]> +Date: Wed, 20 Nov 2024 13:43:02 +0100 +Subject: [PATCH] cmd: tlv_eeprom: fix alias access to second eeprom + +find function wrongly used ARRAY_SIZE function on a 2d pointer, always +returning 1. Thus second eeprom can not be found. + +Replace with defined constant MAX_TLV_DEVICES. + +Fixes: "cmd: tlv_eeprom: support specifying tlv eeprom in DT alias tlv[0-255]" +Signed-off-by: Josua Mayer <[email protected]> +--- + cmd/tlv_eeprom.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c +index 546ede2dda2..881d7a8e3e6 100644 +--- a/cmd/tlv_eeprom.c ++++ b/cmd/tlv_eeprom.c +@@ -906,7 +906,7 @@ static int find_tlv_devices(struct udevice **tlv_devices_p) + struct udevice *dev; + + /* find by alias */ +- for (int i = 0; i < ARRAY_SIZE(tlv_devices_p); i++) { ++ for (int i = 0; i < MAX_TLV_DEVICES; i++) { + snprintf(alias_name, sizeof(alias_name), "tlv%d", i); + node = ofnode_get_aliases_node(alias_name); + if (!ofnode_valid(node)) +-- +2.43.0 +
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 11/11 board/freescale: get rid of common patch folder
In reply to Vladimir OlteanSince commit 7cbc240ac2c3 ("configs/ls1028ardb: update to Linux 6.6"), no config file references this through BR2_GLOBAL_PATCH_DIR.
Special case [PATCH] feat(build): add support for new binutils versions, which is symlinked by board/solidrun/lx2160acex7. Instead of removing this, just move it there and delete the symlink.
---v1->v2: none
...dd-support-for-new-binutils-versions.patch | 61 ------------------ ...Makefile-Suppress-array-bounds-error.patch | 51 --------------- ...dd-support-for-new-binutils-versions.patch | 62 ++++++++++++++++++- 3 files changed, 61 insertions(+), 113 deletions(-) delete mode 100644 board/freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch delete mode 100644 board/freescale/common/patches/arm-trusted-firmware/0002-LF-7968-01-fix-Makefile-Suppress-array-bounds-error.patch mode change 120000 => 100644 board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch
board/freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch deleted +0 -61
@@ -1,61 +0,0 @@ -From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001 -From: Marco Felsch <[email protected]> -Date: Wed, 9 Nov 2022 12:59:09 +0100 -Subject: [PATCH] feat(build): add support for new binutils versions - -Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces -of a new warning when linking the bl*.elf in the form: - - ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack - ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker - ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions - ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions - -These new warnings are enbaled by default to secure elf binaries: - - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 - - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774 - -Fix it in a similar way to what the Linux kernel does, see: -https://lore.kernel.org/all/[email protected]/ - -Following the reasoning there, we set "-z noexecstack" for all linkers -(although LLVM's LLD defaults to it) and optional add ---no-warn-rwx-segments since this a ld.bfd related. - -Signed-off-by: Marco Felsch <[email protected]> -Signed-off-by: Robert Schwebel <[email protected]> -Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617 -Signed-off-by: Heiko Thiery <[email protected]> -Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c ---- - Makefile | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 1ddb7b844..470956b19 100644 ---- a/Makefile -+++ b/Makefile -@@ -416,6 +416,8 @@ endif - - GCC_V_OUTPUT := $(shell $(CC) -v 2>&1) - -+TF_LDFLAGS += -z noexecstack -+ - # LD = armlink - ifneq ($(findstring armlink,$(notdir $(LD))),) - TF_LDFLAGS += --diag_error=warning --lto_level=O1 -@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH))) - - # LD = gcc-ld (ld) or llvm-ld (ld.lld) or other - else --TF_LDFLAGS += --fatal-warnings -O1 -+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we -+# are not loaded by a elf loader. -+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments) -+TF_LDFLAGS += -O1 - TF_LDFLAGS += --gc-sections - # ld.lld doesn't recognize the errata flags, - # therefore don't add those in that case --- -2.30.2 -
board/freescale/common/patches/arm-trusted-firmware/0002-LF-7968-01-fix-Makefile-Suppress-array-bounds-error.patch deleted +0 -51
51 lines not on this page · raw message
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch deleted +0 -1
@@ -1 +0,0 @@ -../../../../freescale/common/patches/arm-trusted-firmware/0001-feat-build-add-support-for-new-binutils-versions.patch
board/solidrun/lx2160acex7/patches/arm-trusted-firmware/0018-feat-build-add-support-for-new-binutils-versions.patch new file +61 -0
61 lines not on this page · raw message
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Vladimir, Romain,
Quoted 5 lines · Vladimir Oltean
This series aims to introduce basic initial support for the CX LX2 and HoneyComb LX2 boards by SolidRun (both of which are based on the LX2160A-CEX7 SoM):
https://shop.solid-run.com/product/SRLX216S00D00GE064C08CH/
https://shop.solid-run.com/product/SRLX216S00D00GE064H09CH/
I believe that you should break this serie with 2 series:
1- a generic serie for the LX2 packages, without any specific
additional board specific patches
2- a proper board support with its related set of patches. I believe
that this board support should be pushed upstream first into the ATF, uboot, etc... whenever possible and then your patches should point to the ongoing upstream contributions. The purpose of the patches is to buy some times until they'll be merged.
or
Create a new upstream project (on github/gitlab, etc...) for your specific SolidRun and related cex7 drivers and tools ; then those projetcs can be referenced as a set of new packages for Buildroot.
Combine it with a BR2_EXTERNAL for some very specific cases ; but your BR2_EXTERNAL should minimize the patches (so do some upstreams) if you still want to keep it easy to maintain along with the Buildroot upgrades.
Best regards,
Vincent
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot