oweals/u-boot.git
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Mon, 11 Nov 2019 19:19:04 +0000 (14:19 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Rename CONFIG_SECURE_BOOT to CONFIG_NXP_ESBC.
- Few bug fixes and updates related to SPI, hwconfig, ethernet,
  fsl-layerscape, pci, icid, PSCI

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Fri, 8 Nov 2019 19:05:07 +0000 (14:05 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- Assorted fixes

4 years agotools/img2brec.sh: Delete unused tool
Tom Rini [Fri, 8 Nov 2019 14:26:18 +0000 (09:26 -0500)]
tools/img2brec.sh: Delete unused tool

This script was only used on the MX1ADS board (and possibly other MX1
platforms) to program the flash.  As we no longer have any boards for
that SoC, remove this tool.

Fixes: e570aca9474b ("mx1ads: remove board support")
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2019-11-07-master-imports'
Tom Rini [Fri, 8 Nov 2019 12:27:45 +0000 (07:27 -0500)]
Merge branch '2019-11-07-master-imports'

- Add Phytium Durian Board
- Assorted bugfixes
- Allow for  make ERR_PTR/PTR_ERR architecture specific

4 years agoMerge branch '2019-11-07-ti-imports'
Tom Rini [Fri, 8 Nov 2019 12:26:51 +0000 (07:26 -0500)]
Merge branch '2019-11-07-ti-imports'

- LogicPD platform fixes
- Adaptive Voltage Scaling (AVS) support
- Minor bugfixes

4 years agocmd: move down CONFIG_CMD_BOOTEFI after CONFIG_BOOTM_VXWORKS
AKASHI Takahiro [Fri, 8 Nov 2019 01:32:15 +0000 (10:32 +0900)]
cmd: move down CONFIG_CMD_BOOTEFI after CONFIG_BOOTM_VXWORKS

Due to the commit 4b0bcfa7c4ec ("Kconfig: Migrate CONFIG_BOOTM_* options")
BOOTEFI and BOOTEFI_HELLO_COMPILE (and other BOOTEFI configs) are
displayed in a long distance. This will make it difficult for us to
understand that those configurations are closely related.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agofreescale/powerpc: Rename the config CONFIG_SECURE_BOOT name
Udit Agarwal [Thu, 7 Nov 2019 16:11:39 +0000 (16:11 +0000)]
freescale/powerpc: Rename the config CONFIG_SECURE_BOOT name

Rename the CONFIG_SECURE_BOOT name to CONFIG_NXP_ESBC to avoid
conflicts with UEFI secure boot.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofreescale/layerscape: Rename the config CONFIG_SECURE_BOOT name
Udit Agarwal [Thu, 7 Nov 2019 16:11:32 +0000 (16:11 +0000)]
freescale/layerscape: Rename the config CONFIG_SECURE_BOOT name

Rename CONFIG_SECURE_BOOT to CONFIG_NXP_ESBC to avoid conflict
with UEFI secure boot.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: spi: Add the SPI_FLASH_BAR for ESPI
Xiaowei Bao [Thu, 31 Oct 2019 06:34:40 +0000 (14:34 +0800)]
configs: spi: Add the SPI_FLASH_BAR for ESPI

Add the SPI_FLASH_BAR for the ESPI controller of FSL, this entry
is missed by
commit 6d8251783641 ("configs: Don't use SPI_FLASH_BAR as default")

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: fix warning if no hwconfig is defined
Pankaj Bansal [Thu, 31 Oct 2019 05:41:09 +0000 (05:41 +0000)]
fsl-layerscape: fix warning if no hwconfig is defined

While getting the 'subarg' of 'hwconfig' env variable in
config_core_prefetch(), if no hwconfig variable is defined,
below warning is received:
WARNING: Calling __hwconfig without a buffer and
before environment is ready

Fix this by checking 'hwconfig' env variable.
If not found return without further processing.

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
4 years agousb: xhci: support 1.1 or later version
Chunfeng Yun [Fri, 8 Nov 2019 02:55:52 +0000 (10:55 +0800)]
usb: xhci: support 1.1 or later version

The xHCI 1.1 version also need set Transfer Type field

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agodrivers: net: fsl_enetc: fix RGMII configuration
Michael Walle [Sat, 26 Oct 2019 00:39:12 +0000 (02:39 +0200)]
drivers: net: fsl_enetc: fix RGMII configuration

Add the missing RGMII PHY modes in which case the MAC has configure its
RGMII settings. The only difference between these modes is the RX and
TX delay configuration. A user might choose any RGMII mode in the device
tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: fsl_enetc: set phydev->node
Michael Walle [Sat, 26 Oct 2019 00:39:11 +0000 (02:39 +0200)]
drivers: net: fsl_enetc: set phydev->node

The saved ofnode is used by some PHY drivers to access the device tree
node of the PHY.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: fsl-layerscape: introduce fsl_board_late_init()
Michael Walle [Mon, 21 Oct 2019 20:37:45 +0000 (22:37 +0200)]
armv8: fsl-layerscape: introduce fsl_board_late_init()

The fsl-layerscape already occupies board_late_init(), therefore it is
not possible for a board to have its own board_late_init(). Introduce
fsl_board_late_init() which can be implemented in the board specific
code.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: fsl-lsch3: convert CONFIG_TARGET_x to CONFIG_ARCH_x
Michael Walle [Mon, 21 Oct 2019 23:10:57 +0000 (01:10 +0200)]
armv8: fsl-lsch3: convert CONFIG_TARGET_x to CONFIG_ARCH_x

The clocks are not dependent on the target but only on the SoC.
Therefore, convert the CONFIG_TARGET_x macros to the corresponding
CONFIG_ARCH_x. This will allow other targets to automatically use the
common code. Otherwise every new target would have to add itself to the
"#if defined(CONFIG_TARGET_x) || .." macros.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028a: add erratum A-050382 workaround
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:56 +0000 (09:01 +0000)]
armv8: ls1028a: add erratum A-050382 workaround

Erratum A-050382 states that the eDMA ICID programmed in the eDMA_AMQR
register in DCFG is not correctly forwarded to the SMMU.
The workaround consists in programming the eDMA ICID in the eDMA_AMQR
register in DCFG to 40.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: lx2160a: add icid setup for platform devices
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:55 +0000 (09:01 +0000)]
armv8: lx2160a: add icid setup for platform devices

Add ICID setup for the platform devices contained on this chip: usb,
sata, sdhc, sec.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: add missing SATA3 and SATA4 base addresses
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:54 +0000 (09:01 +0000)]
fsl-layerscape: add missing SATA3 and SATA4 base addresses

LX2160A chips have 4 sata controllers. Add missing base addresses for
SATA3 and SATA4.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls2088a: add icid setup for platform devices
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:54 +0000 (09:01 +0000)]
armv8: ls2088a: add icid setup for platform devices

Add ICID setup for the platform devices contained on this chip: usb,
sata, sdhc, sec.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: fix compile error with sec fw disabled
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:53 +0000 (09:01 +0000)]
fsl-layerscape: fix compile error with sec fw disabled

If SEC FW support is not enabled (ARMV8_SEC_FIRMWARE_SUPPORT=n), below
compilation error appears
arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h:169:4: error:
'CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT' undeclared here (not in a function)

Fix it by wrapping with CONFIG_IS_ENABLED().

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: fsl-layerscape: guard caam specific defines
Laurentiu Tudor [Fri, 18 Oct 2019 09:01:52 +0000 (09:01 +0000)]
armv8: fsl-layerscape: guard caam specific defines

These macros should only be used when CONFIG_FSL_CAAM is present.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: do not use layerscape EFI reset if PSCI used
Mathew McBride [Fri, 18 Oct 2019 03:27:54 +0000 (14:27 +1100)]
fsl-layerscape: do not use layerscape EFI reset if PSCI used

If the secure world reset handlers are used (via CONFIG_PSCI_RESET),
then do not use the layerscape-specific implementation.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: dts: ls1088a: add PSCI binding for LS1088A
Mathew McBride [Fri, 18 Oct 2019 03:27:53 +0000 (14:27 +1100)]
armv8: dts: ls1088a: add PSCI binding for LS1088A

This allows the use of PSCI calls to trusted firmware to
initiate reset and poweroff events with CONFIG_PSCI_RESET and
CONFIG_ARM_PSCI_FW. This is desirable, for example, if the target
board has implemented a custom reset or poweroff procedure in EL3.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: layerscape: Only set EP CFG READY bit
Pankaj Bansal [Mon, 14 Oct 2019 11:43:19 +0000 (11:43 +0000)]
pci: layerscape: Only set EP CFG READY bit

In ls_pcie_ep_enable_cfg(), as part of EP setup,config ready bit
of pci controller is set, so that RC can read the config space of EP.

While setting the config ready bit, LTSSM_EN bit in same register was
also inadvertently getting cleared. This restarts the link training
between RC and EP.

Update code to just set the desired CFG_READY bit (bit 0),
while leaving the other bits unchanged.

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Reviewed-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: j721e_evm_r5_defconfig: Remove SPL multi-DTB FIT support
Andrew F. Davis [Thu, 7 Nov 2019 13:06:09 +0000 (08:06 -0500)]
configs: j721e_evm_r5_defconfig: Remove SPL multi-DTB FIT support

The SPL FIT will only have one DTB, so remove support for multi-DTB. This
also removes an early access to EEPROM used to select the DTB that is not
valid in SPL at the point at which it is accessed, that always returns
false for GP devices and causes a firewall expection on HS.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoKconfig: ti: Make board detect EEPROM addresses depend BOARD_DETECT
Adam Ford [Mon, 4 Nov 2019 23:05:24 +0000 (17:05 -0600)]
Kconfig: ti: Make board detect EEPROM addresses depend BOARD_DETECT

There is an option to enable the board detection for TI platforms.
If this is option is not set, there is no reason to set the EEPROM
bus address or chip address.

This patch makes both EEPROM_BUS_ADDRESS and EEPROM_CHIP_ADDRESS
depend on TI_I2C_BOARD_DETECT.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoconfigs: omap3_logic_somlv: Remove GPIO from SPL
Adam Ford [Sun, 3 Nov 2019 23:15:53 +0000 (17:15 -0600)]
configs: omap3_logic_somlv: Remove GPIO from SPL

The SPL is too tight, and it cannot start any longer.  To
help reduce the size of SPL, we need to remove some non-critical
features.

This patch removes SPL_GPIO_SUPPORT to free up some operating space.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: dts: logicpd-som-lv-37xx-devkit-u-boot: Remove unused GPIO
Adam Ford [Sun, 3 Nov 2019 23:15:52 +0000 (17:15 -0600)]
ARM: dts: logicpd-som-lv-37xx-devkit-u-boot: Remove unused GPIO

The only GPIO bank needed in SPL is GPIO4 and the SPL space is tight.

This patch removes the all but GPIO4 from the spl device tree to
reduce the SPL footprint.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoRevert "ARM: omap3_logic/omap35_logic: Enable GPIO in SPL"
Adam Ford [Sun, 3 Nov 2019 23:03:02 +0000 (17:03 -0600)]
Revert "ARM: omap3_logic/omap35_logic: Enable GPIO in SPL"

The SPL is too tight, and it cannot start any longer.  To
help reduce the size of SPL, we need to remove some non-critical
features.

This reverts commit 66063a7c1388fb724e8671b03c529fb5cda992dd.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: dts: logicpd-torpedo-37xx-devkit-u-boot: Remove unused GPIO
Adam Ford [Sun, 3 Nov 2019 23:03:01 +0000 (17:03 -0600)]
ARM: dts: logicpd-torpedo-37xx-devkit-u-boot: Remove unused GPIO

The only GPIO bank needed in SPL is GPIO4 and the SPL space is tight.

This patch removes the all but GPIO4 from the spl device tree to
reduce the SPL footprint.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: omap3_logic: Power on MMC when setting up PMIC
Adam Ford [Sun, 3 Nov 2019 22:18:27 +0000 (16:18 -0600)]
ARM: omap3_logic: Power on MMC when setting up PMIC

The PMIC enables power to the MMC card by default, but depending
on the state it was left when restarted, it's possible the MMC
may be powered down.

This patch patch explicitly tells the twl4030 to power the MMC.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoconfigs: j721e_evm_r5_defconfig: Enable AVS Class 0 & dependent configs
Keerthy [Thu, 24 Oct 2019 09:31:03 +0000 (15:01 +0530)]
configs: j721e_evm_r5_defconfig: Enable AVS Class 0 & dependent configs

Enable AVS Class 0 & dependent config options.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoconfigs: am65x_evm_r5_defconfig: Enable AVS class 0 support
Tero Kristo [Thu, 24 Oct 2019 09:31:02 +0000 (15:01 +0530)]
configs: am65x_evm_r5_defconfig: Enable AVS class 0 support

Enable AVS class 0 support for the R5 SPL bootloader.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoconfigs: am65x_evm_r5_defconfig: Enable TPS62363 regulator support
Tero Kristo [Thu, 24 Oct 2019 09:31:01 +0000 (15:01 +0530)]
configs: am65x_evm_r5_defconfig: Enable TPS62363 regulator support

TPS62363 is used to control the MPU_VDD voltage, so enable the driver
for this.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-j721e-r5-common-proc-board: Hook buck12_reg to vtm supply
Keerthy [Thu, 24 Oct 2019 09:31:00 +0000 (15:01 +0530)]
arm: dts: k3-j721e-r5-common-proc-board: Hook buck12_reg to vtm supply

Hook buck12_reg to vtm avs supply

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-j721e-r5-common: Add tps65941 node and dependent wkup_i2c0 node
Keerthy [Thu, 24 Oct 2019 09:30:59 +0000 (15:00 +0530)]
arm: dts: k3-j721e-r5-common: Add tps65941 node and dependent wkup_i2c0 node

Add tps65941 node and dependent wkup_i2c0 node needed for AVS class 0 support

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-j721e-r5-common-proc-board: Add VTM node
Keerthy [Thu, 24 Oct 2019 09:30:58 +0000 (15:00 +0530)]
arm: dts: k3-j721e-r5-common-proc-board: Add VTM node

Add VTM node for voltage and thermal management. For u-boot, this is needed
for supporting AVS class 0, as the efuse values for the OPPs are stored
under the VTM.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-am654-r5-base-board: enable wkup_vtm0 node and link in supplies
Tero Kristo [Thu, 24 Oct 2019 09:30:57 +0000 (15:00 +0530)]
arm: dts: k3-am654-r5-base-board: enable wkup_vtm0 node and link in supplies

Link the vdd-supplies for the voltage domains under the VTM node. Also,
enable the node under SPL. This will enable the AVS class 0 support on
am65x-evm board.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-am654-r5-base-board: add supply rail for MPU
Tero Kristo [Thu, 24 Oct 2019 09:30:56 +0000 (15:00 +0530)]
arm: dts: k3-am654-r5-base-board: add supply rail for MPU

MPU voltage on AM65x-evm is controlled via the TPS62363 chip attached
to i2c0 bus. Add device node for this so that it can be controlled via
a regulator driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-am654-r5-base-board: enable wkup_i2c0 driver for spl
Tero Kristo [Thu, 24 Oct 2019 09:30:55 +0000 (15:00 +0530)]
arm: dts: k3-am654-r5-base-board: enable wkup_i2c0 driver for spl

Enable wkup_i2c0 as this is needed for voltage control.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-am654-r5-base-board: Add VTM node
Keerthy [Thu, 24 Oct 2019 09:30:54 +0000 (15:00 +0530)]
arm: dts: k3-am654-r5-base-board: Add VTM node

Add VTM node for voltage and thermal management. For u-boot, this is needed
for supporting AVS class 0, as the efuse values for the OPPs are stored
under the VTM.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: mach-k3: j721e_init: Initialize avs class 0
Keerthy [Thu, 24 Oct 2019 09:30:53 +0000 (15:00 +0530)]
arm: mach-k3: j721e_init: Initialize avs class 0

Initialize avs class 0

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: mach-k3: am6_init: Initialize AVS class 0
Keerthy [Thu, 24 Oct 2019 09:30:52 +0000 (15:00 +0530)]
arm: mach-k3: am6_init: Initialize AVS class 0

Initialize AVS class 0 so that mpu voltage rail is
programmed to the AVS class 0 compensated value.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agopower: regulator: tps65941: add regulator support
Keerthy [Thu, 24 Oct 2019 09:30:51 +0000 (15:00 +0530)]
power: regulator: tps65941: add regulator support

The driver provides regulator set/get voltage
enable/disable functions for tps65941 family of PMICs.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agopower: pmic: tps65941: Add support for tps65941 family of PMICs
Keerthy [Thu, 24 Oct 2019 09:30:50 +0000 (15:00 +0530)]
power: pmic: tps65941: Add support for tps65941 family of PMICs

Add support to bind the regulators/child nodes with the pmic.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agomisc: k3_avs: Add j721e support
Keerthy [Thu, 24 Oct 2019 09:30:49 +0000 (15:00 +0530)]
misc: k3_avs: Add j721e support

j721e SoCs have different OPP tables. Add support for the same.

Note: DM Still has lot of voltages TBD hence the correct
values need to be programmed once they are published.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agopower: regulator: tps6236x: add support for tps6236x regulators
Tero Kristo [Thu, 24 Oct 2019 09:30:48 +0000 (15:00 +0530)]
power: regulator: tps6236x: add support for tps6236x regulators

TPS6236x is a family of step down DC-DC converters optimized for battery
powered portable applications for a small solution size. Add a regulator
driver for supporting these devices.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoclk: clk-ti-sci: Notify AVS driver upon setting clock rate
Keerthy [Thu, 24 Oct 2019 09:30:47 +0000 (15:00 +0530)]
clk: clk-ti-sci: Notify AVS driver upon setting clock rate

Notify AVS driver upon setting clock rate so that voltage
is changed accordingly.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agomisc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0
Tero Kristo [Thu, 24 Oct 2019 09:30:46 +0000 (15:00 +0530)]
misc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0

Adaptive Voltage Scaling is a technology used in TI SoCs to optimize
the operating voltage based on characterization data written to efuse
during production. Add a driver to support this feature for K3 line of
SoCs, initially for AM65x.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: add initial support for the Phytium Durian Board
liu hao [Thu, 31 Oct 2019 07:51:08 +0000 (07:51 +0000)]
arm: add initial support for the Phytium Durian Board

This adds platform code and the device tree for the Phytium Durian Board.
The initial support comprises the UART and the PCIE.

Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Steven Hao <liuhao@phytium.com.cn>
4 years agocmd: mtdparts: Fix build with option ..._SHOW_NET_SIZES
Alexander Dahl [Wed, 30 Oct 2019 15:53:55 +0000 (16:53 +0100)]
cmd: mtdparts: Fix build with option ..._SHOW_NET_SIZES

That option is currently not used by any defconfig and could not be set
anymore since it became mandatory to used Kconfig when introducing new
options with U-Boot v2016.11 or commit eed921d92348 ("Kconfig: Add a
whitelist of ad-hoc CONFIG options") and commit 371244cb19f9 ("Makefile:
Give a build error if ad-hoc CONFIG options are added").

It was also not considered when fixing build warnings in
commit 39ac34473f3c ("cmd_mtdparts: use 64 bits for flash size,
partition size & offset") and could probably not be compiled anyway
after commit dfe64e2c8973 ("mtd: resync with Linux-3.7.1"), which
renamed some members of struct mtd_info â€¦ so it was probably broken
since then, which was U-Boot v2013.07-rc1.

However it still seems to work, see example output below:

U-Boot 2019.10-00035-g06a9b259ca-dirty (Oct 30 2019 - 14:03:44 +0100)

CPU: SAMA5D27 1G bits DDR2 SDRAM
Crystal frequency:       24 MHz
CPU clock        :      492 MHz
Master clock     :      164 MHz
Model: ***
DRAM:  128 MiB
NAND:  256 MiB
Loading Environment from NAND... OK
In:    serial@f8020000
Out:   serial@f8020000
Err:   serial@f8020000
Net:   eth0: ethernet@f8008000
Hit keys 'tt' to stop autoboot (3 seconds).
U-Boot> mtdparts

device nand0 <atmel_nand>, # parts = 8
 #: name                size            net size        offset          mask_flags
 0: bootstrap           0x00040000      0x00040000      0x00000000      1
 1: uboot               0x000c0000      0x000c0000      0x00040000      1
 2: env1                0x00040000      0x00040000      0x00100000      0
 3: env2                0x00040000      0x00040000      0x00140000      0
 4: fpga_led            0x00040000      0x00040000      0x00180000      1
 5: reserved            0x00040000      0x00040000      0x001c0000      1
 6: rootfs_rec          0x03200000      0x03200000      0x00200000      1
 7: filesystem          0x0cc00000      0x0cb80000 (!)  0x03400000      0

active partition: nand0,0 - (bootstrap) 0x00040000 @ 0x00000000

defaults:
mtdids  : nand0=atmel_nand
mtdparts: mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256k(env1),256k(env2),256k(fpga_led)ro,256k(reserved)ro,50M(rootfs_rec)ro,-(filesystem)

Signed-off-by: Alexander Dahl <ada@thorsis.com>
4 years agocmd: nand: Remove not used declaration
Alexander Dahl [Wed, 30 Oct 2019 15:53:54 +0000 (16:53 +0100)]
cmd: nand: Remove not used declaration

This declaration is not used anywhere in the whole tree. There is a
function 'mtd_id_parse()' which was renamed from 'id_parse()' in
commit 68d7d65100e8 ("Separate mtdparts command from jffs2"), but that
function is not used (anymore?) in cmd nand and build is fine without
that declaration, so it's probably just safe to remove.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
4 years agoarm: caches: Disable mmu only if mmu is available
Lokesh Vutla [Wed, 30 Oct 2019 10:25:41 +0000 (15:55 +0530)]
arm: caches: Disable mmu only if mmu is available

As part of disabling caches MMU as well gets disabled. But MMU is not
available on all armv7 cores like R5F. So disable MMU only if it is
available.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agohush: re-sequence includes
Heinrich Schuchardt [Sat, 26 Oct 2019 21:45:08 +0000 (23:45 +0200)]
hush: re-sequence includes

'make tests' on a 32bit ARM system leads to

In file included from ../common/cli_hush.c:79:
../include/malloc.h:364:7: error: conflicting types for â€˜memset’
 void* memset(void*, int, size_t);
       ^~~~~~
In file included from ../include/compiler.h:126,
                 from ../include/env.h:12,
                 from ../common/cli_hush.c:78:
../include/linux/string.h:103:15:
note: previous declaration of â€˜memset’ was here
 extern void * memset(void *,int,__kernel_size_t);
               ^~~~~~
In file included from ../common/cli_hush.c:79:
../include/malloc.h:365:7: error: conflicting types for â€˜memcpy’
 void* memcpy(void*, const void*, size_t);
       ^~~~~~
In file included from ../include/compiler.h:126,
                 from ../include/env.h:12,
                 from ../common/cli_hush.c:78:
../include/linux/string.h:106:15:
note: previous declaration of â€˜memcpy’ was here
 extern void * memcpy(void *,const void *,__kernel_size_t);
        ^~~~~~

According to the U-Boot coding style guide common.h should be the first
include.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agodlmalloc: calloc: fix zeroing early allocations
Simon Goldschmidt [Fri, 25 Oct 2019 19:23:35 +0000 (21:23 +0200)]
dlmalloc: calloc: fix zeroing early allocations

When full malloc is enabled and SYS_MALLOC_F is also enabled, the simple
pre-reloc heap is used before relocation. In this case, calloc() uses
the MALLOC_ZERO macro to zero out the allocated memory. However, since
this macro is specially crafted for the dlmalloc implementation, it
does not always work for simple malloc.

For example, when allocating 16 bytes via simple malloc, only the first
12 bytes get zeroed out. The last 4 bytes will remain untouched.

This is a problem for DM drivers that are allocated before relocation:
memory allocated via 'platdata_auto_alloc_size' might not be set to
zero, resulting in bogus behaviour.

To fix this, use 'memset' instead of 'MALLOC_ZERO' to zero out memory
that compes from simple malloc.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agospl: fix SPI config dependencies
Simon Goldschmidt [Fri, 25 Oct 2019 14:22:09 +0000 (16:22 +0200)]
spl: fix SPI config dependencies

As SPL_SPI_FLASH_SUPPORT cannot work without SPL_SPI_SUPPORT, fix
dependencies to prevent enabling SPI flash support without basic SPI
support.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
4 years agoarm: socfpga: gen5: fix ERR_PTR_OFFSET
Simon Goldschmidt [Tue, 22 Oct 2019 19:29:48 +0000 (21:29 +0200)]
arm: socfpga: gen5: fix ERR_PTR_OFFSET

The default implementation of ERR_PTR/PTR_ERR maps errno values at the
and of the address range (e.g. -EINVAL/-22 gets 0xFFFFFFEA).

For socfpga gen5 SPL, this doesn't really work, as the heap is nearly
at the end of the 32 bit address range.

This patch adjusts the ERR_PTR_OFFSET to map errno values into the range
of the Boot ROM, which should not be used for valid pointers.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agolinux err: make ERR_PTR/PTR_ERR architecture specific
Simon Goldschmidt [Tue, 22 Oct 2019 19:29:47 +0000 (21:29 +0200)]
linux err: make ERR_PTR/PTR_ERR architecture specific

This patch changes ERR_PTR/PTR_ERR to use CONFIG_ERR_PTR_OFFSET to map
errno values into a pointer region that cannot contain valid pointers.

IS_ERR and IS_ERR_OR_NULL have to be converted to use PTR_ERR, too,
for this to work.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoKconfig add config ERR_PTR_OFFSET
Simon Goldschmidt [Tue, 22 Oct 2019 19:29:46 +0000 (21:29 +0200)]
Kconfig add config ERR_PTR_OFFSET

Some U-Boot pointers have redundant information, so we can use a scheme
where we can return either an error code or a pointer with the same
return value. The default implementation just casts the pointer to a
number, however, this may fail on platforms where the end of the address
range is used for valid pointers (e.g. 0xffffff00 is a valid heap pointer
in socfpga SPL). For such platforms, this value provides an upper range
of those error pointer values - up to 'MAX_ERRNO' bytes below this value
must be unused/invalid addresses.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoarm64: Add memcpy_{from, to}io() and memset_io() helpers
Vignesh Raghavendra [Sat, 12 Oct 2019 10:59:34 +0000 (16:29 +0530)]
arm64: Add memcpy_{from, to}io() and memset_io() helpers

Provide optimized memcpy_{from,to}io() and memset_io(). This is required
when moving large amount of data to and from IO regions such as IP
registers or accessing memory mapped flashes.

Code is borrowed from Linux Kernel v5.4.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoapi: storage: Add the missing write operation support
Cristian Ciocaltea [Sat, 12 Jan 2019 00:03:15 +0000 (02:03 +0200)]
api: storage: Add the missing write operation support

API_dev_write(va_list ap) is currently lacking the write support
to storage devices because, historically, those devices did not
implement block_write()

The solution has been tested by loading and booting a (patched)
GRUB instance in a QEMU vexpress-a9 environment. The disk write
operations were triggered with GRUB's save_env command.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
4 years agoconfigs: Resync with savedefconfig
Tom Rini [Thu, 7 Nov 2019 19:25:00 +0000 (14:25 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
Tom Rini [Thu, 7 Nov 2019 12:25:14 +0000 (07:25 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx

- mpc85xx, socrates: Add dts, enable DM support, fix warnings, disable
  video

4 years agoMerge branch '2019-11-06-reenable-llvm-in-ci'
Tom Rini [Thu, 7 Nov 2019 03:54:47 +0000 (22:54 -0500)]
Merge branch '2019-11-06-reenable-llvm-in-ci'

- Re-enable LLVM tests in Travis and add them to GitLab and Azure

4 years agogitlab/azure: Enable LLVM tests
Tom Rini [Thu, 7 Nov 2019 00:30:47 +0000 (19:30 -0500)]
gitlab/azure: Enable LLVM tests

Now that we have again fixed the problems that building with clang
exposes, enable these tests on Azure and GitLab-CI as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agotravis: Fix the clang-7 test
Tom Rini [Sat, 26 Oct 2019 17:48:41 +0000 (13:48 -0400)]
travis: Fix the clang-7 test

When using the OVERRIDE variable we need to pass -O to buildman as well
to use the "override" option to buildman.

Fixed: e9500f49ea35 ("travis: Use buildman for building with clang")
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agocommon/console.c: Fix unused warning with console_doenv()
Tom Rini [Wed, 30 Oct 2019 13:18:43 +0000 (09:18 -0400)]
common/console.c: Fix unused warning with console_doenv()

Newer versions of LLVM-7 will provide an unused function warning over
console_doenv() in the case of SYS_CONSOLE_IS_IN_ENV not being enabled
as can be the case in SPL.  Add guards around this function.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agousb: composite: add BOS descriptor support to composite framework
T Karthik Reddy [Mon, 14 Oct 2019 12:52:50 +0000 (14:52 +0200)]
usb: composite: add BOS descriptor support to composite framework

To add usb-3.0 support to peripheral device add BOS & SS capability
descriptors to gadget composite framework.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
4 years agousb: gadget: Add gadget_is_cdns3() macro
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:36 +0000 (17:26 +0530)]
usb: gadget: Add gadget_is_cdns3() macro

Add a new bcdDevice entry for Cadence USB gadget controller similar to
other controller and add gadget_is_cdns3() macro as well.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agousb: cdns3: Add TI wrapper driver for CDNS USB3 controller
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:35 +0000 (17:26 +0530)]
usb: cdns3: Add TI wrapper driver for CDNS USB3 controller

Add driver to handle TI specific wrapper for Cadence USB3 controller
present on J721e SoC. Based on Linux driver for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agousb: cdns3: gadget: Implement udc_set_speed() callback
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:34 +0000 (17:26 +0530)]
usb: cdns3: gadget: Implement udc_set_speed() callback

Implement udc_set_speed() callback to limit Controller's speed to
high-speed/full-speed when working with gadgets that are high-speed or
full-speed only

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agousb: Add Cadence USB3 host and gadget driver
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:33 +0000 (17:26 +0530)]
usb: Add Cadence USB3 host and gadget driver

Add support for USB3 host and gadget driver. This is a direct sync of
Linux kernel Cadence USB stack that from v5.4-rc1 release.
Driver has been modified so that it compiles without errors against
U-Boot code base.
Features not required for U-Boot such as scatter-gather DMA and OTG
interrupt handling has been dropped.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
[jjhiblot@ti.com: Add PHY support]
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agousb: udc: Introduce ->udc_set_speed() method
Sherry Sun [Tue, 1 Oct 2019 11:56:32 +0000 (17:26 +0530)]
usb: udc: Introduce ->udc_set_speed() method

This patch was copied from kernel commit: 67fdfda4a99ed.

Sometimes, the gadget driver we want to run has max_speed lower than
what the UDC supports. In such situations, UDC might want to make sure
we don't try to connect on speeds not supported by the gadget
driver because that will just fail.

So here introduce a new optional ->udc_set_speed() method which can be
implemented by interested UDC drivers to achieve this purpose.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agousb: gadget: Add match_ep() op to usb_gadget_ops
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:31 +0000 (17:26 +0530)]
usb: gadget: Add match_ep() op to usb_gadget_ops

Add match_ep() op to usb_gadget_ops similar to Linux kernel which is
useful in finding a suitable ep match for the function driver. This will
avoid adding more gadget_is_xxx() handling code to usb_ep_autoconfig().

Also sync usb_ep_caps struct thats is usually used in the match_ep()
callback by the gadget controller driver

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agobitmaps: import for_each_set_bit() macro
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:30 +0000 (17:26 +0530)]
bitmaps: import for_each_set_bit() macro

Import for_each_set_bit() and associated macros and functions from
Linux. This is useful in parsing interrupt registers and take action on
each bit that is set.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agolist: import list_first_entry_or_null()
Vignesh Raghavendra [Tue, 1 Oct 2019 11:56:29 +0000 (17:26 +0530)]
list: import list_first_entry_or_null()

Import list_first_entry_or_null() macro from Linux that would be used
by Cadence USB driver

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoMakefile: fix dependency for imx targets
Heiko Schocher [Fri, 25 Oct 2019 12:46:54 +0000 (14:46 +0200)]
Makefile: fix dependency for imx targets

imx targets are defined in arch/arm/mach-imx/Makefile.
Some of them are dependent on targets defined in main
Makefile. For the Makefile in arch/arm/mach-imx this
targets must be finished before the imx targets are
build, if not you get for example the error:

make -f /home/hs/abb/mainlining/u-boot/scripts/Makefile.build obj=arch/arm/mach-imx u-boot-dtb.imx
make[2]: *** No rule to make target 'u-boot-fit-dtb.bin', needed by 'u-boot-dtb.imx'.  Stop.
make[1]: *** [/home/hs/abb/mainlining/u-boot/Makefile:1123: u-boot-dtb.imx] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/work/hs/compile/u-boot/aristainetos2_defconfig'
make: *** [Makefile:148: sub-make] Error 2
compile failed

In above case of CONFIG_MULTI_DTB_FIT is defined, the
u-boot-dtb.imx is dependent on the u-boot-fit-dtb.bin
which may is not build yet ...

I could reproduce this error on a travis build also if
I build an out-of-tree build on a local machine with a
build directory on a "slow" slow storage device. If
building the same source target with a build dir on a
fast storage device, the build works.

I found no solution to tell the arch/arm/mach-imx/Makefile
to find the targets in main Makefile, if there is a way
this would be the better fix.

I solved it by adding a IMX_DEPS var, which holds a list
of main u-boot targets, which must be finished, before
calling imx targets and fixed the build for imx
targets which enabled CONFIG_MULTI_DTB_FIT.

I think it is just luck, that imx targets with
CONFIG_OF_SEPARATE enabled build, because the
u-boot-dtb.imx target depends on u-boot-dtb.bin
which gets build early enough before starting with
u-boot-dtb.imx. May this targets should be fixed too.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 6 Nov 2019 12:11:02 +0000 (07:11 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- DFU updates
- USB Storage updates

4 years agoMerge tag 'mmc-2019-11-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Wed, 6 Nov 2019 12:10:16 +0000 (07:10 -0500)]
Merge tag 'mmc-2019-11-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- fsl_esdhc driver cleanup
- fsl_esdhc_imx driver improvement and compatible string update

4 years agompc85xx, socrates: add DM PCI support
Heiko Schocher [Wed, 16 Oct 2019 03:55:54 +0000 (05:55 +0200)]
mpc85xx, socrates: add DM PCI support

add DM PCI support on the socrates board.
use PCIE_FSL now.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: enable DM serial
Heiko Schocher [Wed, 16 Oct 2019 03:55:53 +0000 (05:55 +0200)]
mpc85xx, socrates: enable DM serial

switch to DM_SERIAL support.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: enable DM I2C
Heiko Schocher [Wed, 16 Oct 2019 03:55:52 +0000 (05:55 +0200)]
mpc85xx, socrates: enable DM I2C

enable DM I2C support for the socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: disable VIDEO
Heiko Schocher [Wed, 16 Oct 2019 03:55:51 +0000 (05:55 +0200)]
mpc85xx, socrates: disable VIDEO

disable video, as not really needed longer.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: get rid of DM_USB warning
Heiko Schocher [Wed, 16 Oct 2019 03:55:50 +0000 (05:55 +0200)]
mpc85xx, socrates: get rid of DM_USB warning

add some defines and get rid of USB warning.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: add DM support
Heiko Schocher [Wed, 16 Oct 2019 03:55:49 +0000 (05:55 +0200)]
mpc85xx, socrates: add DM support

enable CONFIG_DM for the socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, dts, socrates: add u-boot specific dtsi
Heiko Schocher [Wed, 16 Oct 2019 03:55:48 +0000 (05:55 +0200)]
mpc85xx, dts, socrates: add u-boot specific dtsi

add u-boot specific dtsi file for socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx: add socrates dts from linux
Heiko Schocher [Wed, 16 Oct 2019 03:55:47 +0000 (05:55 +0200)]
mpc85xx: add socrates dts from linux

add socrates device tree from linux:

commit 71ae5fc87c34 ("Merge tag 'linux-kselftest-5.2-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest")

and added SPDX license identifier.
Did not fix checkpatch warnings:
arch/powerpc/dts/socrates.dts:235: check: Please don't use multiple blank lines
arch/powerpc/dts/socrates.dts:238: error: code indent should use tabs where possible

Also, add me as board maintainer.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc85xx, socrates: suppress unknown flash warning
Heiko Schocher [Wed, 16 Oct 2019 03:55:46 +0000 (05:55 +0200)]
mpc85xx, socrates: suppress unknown flash warning

suppress warning:
Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: add DM based mpc85xx driver
Heiko Schocher [Mon, 14 Oct 2019 09:29:39 +0000 (11:29 +0200)]
pci: add DM based mpc85xx driver

add DM based PCI Configuration space access support for
MPC85xx PCI Bridge. This driver is based on
arch/powerpc/cpu/mpc85xx/pci.c

In the old driver there is a fix for a hw issue on the
TARGET_MPC8555CDS and TARGET_MPC8541CDS boards. As I
have no such hardware I did not port this part.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agotravis: Rework how we write the ~/.buildman file
Tom Rini [Tue, 5 Nov 2019 15:44:16 +0000 (10:44 -0500)]
travis: Rework how we write the ~/.buildman file

With python3 we're now tripping over a long-standing problem with how we
add to the buildman file with some toolchains.  We cannot have multiple
toolchain-alias sections as that leads to a parse error.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge tag 'fdt-pull-5nov19' of git://git.denx.de/u-boot-fdt
Tom Rini [Tue, 5 Nov 2019 12:59:28 +0000 (07:59 -0500)]
Merge tag 'fdt-pull-5nov19' of git://git.denx.de/u-boot-fdt

Update to latest libfdt and pylibfdt, with added size control
Update binman, dtoc, patman, buildman to Python 3
Update move_config, rkmux, microcode_tool to Python 3

4 years agommc: fsl_esdhc_imx: Update compatible string for imx8m
Peng Fan [Mon, 4 Nov 2019 09:31:17 +0000 (17:31 +0800)]
mmc: fsl_esdhc_imx: Update compatible string for imx8m

To enable HS400(ES) and UHS for imx8m platforms, update the driver data
to share with imx8qm esdhc_soc_data.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: fsl_esdhc_imx: drop redundant clock settings
Peng Fan [Mon, 4 Nov 2019 09:14:15 +0000 (17:14 +0800)]
mmc: fsl_esdhc_imx: drop redundant clock settings

During mmc initialization, there are several calls to mmc_set_clock
and mmc_set_ios. When mmc_power_off, the mmc->clock will be set,
but the imx driver will use 400KHz. So the following calls
to mmc_set_ios will set the clock several times which is redundant
in fsl_esdhc_imx driver. So let's simplify to remove redundant
clock settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: fsl_esdhc: clean up DM and non-DM code
Yangbo Lu [Thu, 31 Oct 2019 10:54:26 +0000 (18:54 +0800)]
mmc: fsl_esdhc: clean up DM and non-DM code

Make DM and non-DM code clear using below structure.
#if !CONFIG_IS_ENABLED(DM_MMC)
<non-DM_MMC code>
#else
<DM_MMC code>
#endif

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: always check write protect state
Yangbo Lu [Thu, 31 Oct 2019 10:54:25 +0000 (18:54 +0800)]
mmc: fsl_esdhc: always check write protect state

The QorIQ eSDHC on all platforms supports checking write protect
state through register bit. So check it always.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: drop redundant code for non-removable feature
Yangbo Lu [Thu, 31 Oct 2019 10:54:24 +0000 (18:54 +0800)]
mmc: fsl_esdhc: drop redundant code for non-removable feature

Drop redundant code for non-removable feature. "non-removable" property
has been read in mmc_of_parse().

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: convert to use fsl_esdhc_get_cfg_common()
Yangbo Lu [Thu, 31 Oct 2019 10:54:23 +0000 (18:54 +0800)]
mmc: fsl_esdhc: convert to use fsl_esdhc_get_cfg_common()

The fsl_esdhc_init() was actually to get configuration of mmc_config.
So rename it to fsl_esdhc_get_cfg_common() and make it common for both
DM_MMC and non-DM_MMC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: clean up bus width configuration code
Yangbo Lu [Thu, 31 Oct 2019 10:54:22 +0000 (18:54 +0800)]
mmc: fsl_esdhc: clean up bus width configuration code

This patch is to clean up bus width setting code.

- For DM_MMC, remove getting "bus-width" from device tree.
  This has been done in mmc_of_parse().

- For non-DM_MMC, move bus width configuration from fsl_esdhc_init()
  to fsl_esdhc_initialize() which is non-DM_MMC specific.
  And fix up bus width configuration to support only 1-bit, 4-bit,
  or 8-bit. Keep using 8-bit if it's not set because many platforms
  use driver without providing max bus width.

- Remove bus_width member from fsl_esdhc_priv structure.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: fix voltage validation
Yangbo Lu [Thu, 31 Oct 2019 10:54:21 +0000 (18:54 +0800)]
mmc: fsl_esdhc: fix voltage validation

Voltage validation should be done by CMD8. Current comparison between
mmc_cfg voltages and host voltage capabilities is meaningless.
So drop current comparison and let voltage validation is through CMD8.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: drop controller initialization in fsl_esdhc_init()
Yangbo Lu [Thu, 31 Oct 2019 10:54:20 +0000 (18:54 +0800)]
mmc: fsl_esdhc: drop controller initialization in fsl_esdhc_init()

Controller initialization is not needed in fsl_esdhc_init().
It will be done in esdhc_init() for non-DM_MMC, and in
esdhc_init_common() in probe for DM_MMC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>