aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-09dm: core: add ofnode_for_each_compatible_node()Michael Walle1-0/+24
Add a helper to iterate over all nodes with a given compatible string. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: sl28: sync dtbsMichael Walle6-92/+265
Copy the board device tree files from linux v5.14. On top of the v5.14 dtbs the changes of these two patches are included here which are needed for u-boot: https://lore.kernel.org/linux-devicetree/20210831134013.1625527-7-michael@walle.cc/ https://lore.kernel.org/linux-devicetree/20210831134013.1625527-8-michael@walle.cc/ At the time of this writing the patches were accepted and will be included in 5.15. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linuxMichael Walle2-90/+785
Now that everything is prepared, copy the fsl-ls1028a.dtsi from the linux kernel v5.14.12. Notable changes: - second watchdog added - the number of chip selects of the SPI controller is now correct and reflects what the hardware offers - the LPUARTs have the correct clock parent - USB controllers are enabled by default, which was already the case before this sync because all board enabled all the USB controller nodes. A linux patch to fix this is pending. - the eSDHC controller changes from big-endian to little-endian, but that property seems to be not used at all. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: disable the PCIe controller by defaultMichael Walle4-0/+31
Disable the PCIe controllers by default, just like in the linux device tree. But there is one catch, for linux they are enabled in-place by the bootloader. Obviously, this doesn't work for the bootloader. Thus we explicitly enable the controllers in the -u-boot.dtsi files. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the PCI I/O window to matchMichael Walle1-2/+2
To make the synchronization of the u-boot device tree with the one from linux easier, move the I/O window to the one which is specified in the linux device tree. The actual value shouldn't matter as long as it mapped to the corresponding memory window of the PCIe controller which is a 32GiB window at 80_0000_0000h (first controller) or 88_0000_0000h (second controller). Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: remove num-lanes in the PCIe controller nodesMichael Walle1-2/+0
This property is unused in the layerscape PCIe controller driver and not present in the linux device tree. Remove it to be similarly. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09pci: layerscape: add official ls1028a binding supportMichael Walle2-28/+53
The official bindind of the PCIe controller of the ls1028a has the following compatible string: compatible = "fsl,ls1028a-pcie"; Additionally, the resource names and count are different. Update the driver to support this binding and change the entry in the ls1028a device tree. Cc: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09usb: xhci: fsl: add new compatible fsl,ls1028a-dwc3Michael Walle2-2/+3
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-dwc3", "snps,dwc3"; Change the ls1028a device tree and add this new compatible to the fsl specific xhci driver, otherwise the generic dwc3 driver will be used with the compatibles above. Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09scsi: ceva: rename the resource name to match the linux kernel oneMichael Walle7-7/+7
The driver will look for a named resource "ecc-addr", but this isn't the official binding. In fact, the official device tree binding documentation doesn't mention any resource names at all. But it is safe to assume that it's the linux ones we have to use if we want to be compatible with the linux device tree. Thus rename "ecc-addr" to "sata-ecc" and convert all the users in u-boot. While at it, also rename "sata-base" to "ahci" although its not used at all. This change doesn't affect the SATA controller on the ZynqMP. Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09serial: lpuart: add new compatible fsl, ls1028a-lpuartMichael Walle2-12/+8
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-lpuart"; Add the missing compatible to the driver and update the device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09spi: fsl_dspi: rename num-cs to spi-num-chipselectsMichael Walle10-19/+20
The official devicetree bindings specifies spi-num-chipselects as the name. Use it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09spi: fsl_dspi: add new compatible fsl, ls1021a-v1.0-dspiMichael Walle2-3/+4
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi"; Add the missing compatible to the driver and update the device tree. We can use the fallback "fsl,ls1021a-v1.0-dspi", because the endianness is determined by the little-endian property and not by the compatible string itself. Further, we won't need and specific details on the DMA configuration (which is different on the LS1021A). If it's ever needed, we can later add the more specific "fsl,ls1028a-dspi" compatible to the driver. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09watchdog: sp805_wdt: use correct compatible stringMichael Walle3-4/+4
According to the linux device tree specification the compatible string is: compatible = "arm,sp805", "arm,primecell"; Fix all users in u-boot. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: update the labelsMichael Walle23-81/+81
Update the labels of the nodes to match the kernel ones. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the iRC node and its devices into /socMichael Walle1-99/+103
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. While at it fix the indentation. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the watchdog node into /socMichael Walle1-5/+5
While inserting it into the new location, keep it sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the PCIe controller nodes into /socMichael Walle1-32/+32
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. While at it fix the indentation. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move SATA and USB controller nodes into /socMichael Walle1-25/+25
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the GPIO controller nodes into /socMichael Walle1-33/+33
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the low-power UART nodes into /socMichael Walle1-60/+60
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the UART controller nodes into /socMichael Walle1-16/+16
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the SPI and eSDHC controller nodes into /socMichael Walle1-58/+58
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the FlexSPI controller nodeMichael Walle1-13/+13
While inserting it into the new location, keep it sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move I2C controller nodes into /socMichael Walle12-115/+115
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: move the clockgen node into /socMichael Walle1-7/+7
Populate the /soc node with the first device node. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: add an empty /socMichael Walle2-0/+11
To keep the device tree similar to the linux kernel one, we need to move all CCSR related devices into the /soc node. To keep the patches easy to review, we initially add an empty /soc node and populate it piece by piece. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a-{rdb, qds}: remove dm-pre-reloc propertyMichael Walle2-2/+0
Nowadays, both boards boot using the TF-A BL1/BL2 and SPL isn't used at all. The property is not needed, remove it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: remove /memory nodeMichael Walle1-6/+0
This node is some hodgepodge between the ddr controller node at SoC offset 0x1080000 and some static memory size of 2GiB. Remove this bogus node because it doesn't seem to be used at all. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09armv8: ls1028a: use the official compatible string for the GPUMichael Walle2-2/+2
There is no "fsl,ls1028a-gpu" compatible string. It is solely for the proprietary driver which will never be open source. Lately, linux gained support for the open source etnaviv driver for the GPU (although there is still support for the DisplayPort PHY missing to get actual graphics output). Thus, instead of supporting some proprietary driver, switch over to the open source one, which also have an official device tree binding. Cc: Andy Tang <andy.tang@nxp.com> Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: ddr: lc_common_dimm_params.c : Fix Divison by zero issueManinder Singh1-2/+8
Adds check for memory clock variable before calculating caslat_actual. Set mclk_ps to slowest DIMM supported if mclk_ps is found zero. Signed-off-by: Maninder Singh <maninder.singh_1@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: net: fsl-mc: add a command which dumps the MC logCosmin-Florin Aluchenesei2-1/+97
Extended fsl_mc command adding an extra option dump_log Signed-off-by: Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09ppc: mpc8xx: Drop -mstring from PLATFORM_CPPFLAGSTom Rini1-1/+1
This has not been supported by toolchains for some time and has been putting out a warning. Drop this. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1088a: Update qspi node propertiesKuldeep Singh1-1/+1
Remove "num-cs" property from device-tree as it is no longer used by qspi driver anymore. Also, specify status as "disabled" and enable qspi support in respective board dts files. This will also help in aligning node properties with other board properties. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: sl28: add update image documentationMichael Walle1-0/+15
Document the update image and how to use the EFI UpdateCapsule. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09doc: board: kontron: sl28: Reduce section levels and change titleFrieder Schrempf1-15/+15
In order to add other Kontron boards to the docs alongside the existing sl28 board, we need to reduce the levels of the sections and change the title. Cc: Fabio Estevam <festevam@gmail.com> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Acked-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: sl28: enable EFI UpdateCapsule supportMichael Walle2-0/+8
Enable support for update over EFI UpdateCapsule mechanism. This board doesn't support setting EFI variables after ExitBootservices(). Therefore, we are also enabling EFI_IGNORE_OSINDICATIONS. Signed-off-by: Michael Walle <michael@walle.cc> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: sl28: generate FIT update imageMichael Walle1-2/+33
Generate a FIT update image during build. The image will be called "u-boot.update" and can be used to build an EFI UpdateCapsule or during DFU mode. Although, the latter isn't supported because there is no USB OTG driver yet. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: sl28: enable EFI_SET_TIME supportMichael Walle1-0/+1
Allow EFI to actually set the time before ExitBootServices(). Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: freescale: lx216x : increase fdt blob sizeWasim Khan1-0/+8
Increase fdt blob size for lx2160 and lx2162 series to fix below errors/warnings during device tree fixup. Unable to update property /soc/spi@2100000:status, err=FDT_ERR_NOSPACE Unable to update property /soc/spi@2110000:status, err=FDT_ERR_NOSPACE Unable to update property /soc/spi@2120000:status, err=FDT_ERR_NOSPACE WARNING: could not set reg FDT_ERR_NOSPACE. WARNING unable to set iommus: FDT_ERR_NOSPACE Signed-off-by: Wasim Khan <wasim.khan@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: fsl_validate: Fix Double free IssueKshitiz Varshney2-29/+13
Remove Double free issue from calc_img_key_hash() and calc_esbchdr_esbc_hash() function. Verified the secure boot changes using lx2162aqds board. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09configs: lx2162a: Enable CONFIG_SPI_FLASH_MT35XU for lx2162a-qdsKuldeep Singh3-0/+3
LX2162A-QDS has micron mt35xu512aba flash which requires flag CONFIG_SPI_FLASH_MT35XU on to probe flash successfully. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Wasim Khan <wasim.khan@nxp.com> Tested-by: Wasim Khan <wasim.khan@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09armv8: fsl-layerscape: Erratum A010315 needs PCIE supportAlban Bedel1-2/+2
Disabling PCIE support currently lead to a crash because the code for erratum A010315 is still run. Add a conditional to only select CONFIG_SYS_FSL_ERRATUM_A010315 when CONFIG_PCIE_LAYERSCAPE is enabled. Signed-off-by: Alban Bedel <alban.bedel@aerq.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09lx2162a : Rename emmc boot command variableMeenakshi Aggarwal1-2/+2
Rename emmc_bootcmd environment variable to sd2_bootcmd to fix emmc boot on lx2162aqds board. Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: freescale: t104xrdb: Set popts->cpo_sample to 0x54 for DDR3Priyanka Singh1-0/+2
Set popts->cpo_sample to 0x54 in t104xrdb/ddr.c to optimize cpo Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: ddr: main.c: Fix Bad Shift operator issuePriyanka Singh1-3/+8
Fix Bad Shift operator issue in step_to_string function by adding an if check Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: ddr: fsl_ddr_gen4.c: Fix divide by zero issuePriyanka Singh1-3/+11
Fix possible divide by zero issue in fsl_ddr_set_memctl_regs by adding an if check Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: ddr: util.c: Fix divide by zero issuePriyanka Singh1-4/+8
Fix possible divide by zero issue in get_memory_clk_period_ps by adding a check Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09exynos: mmu: use CONFIG_IS_ENABLEDMinkyu Kang1-5/+6
to fix following checkpatch warnings. Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Cc: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-11-09exynos78x0: pinctrl: set const to structsMinkyu Kang1-7/+7
to fix following checkpatch warings. WARNING: struct should normally be const Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Cc: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-11-09exynos: pwm: Deal with a PWM at 100%Simon Glass1-0/+4
At present the counter never hits the comparitor in this case. Add a special case. This ensures that the snow backlight works when at full brightness. Fixes: 76c2ff3e5fd video: backlight: fix pwm's duty cycle calculation Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>