aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-16Merge https://source.denx.de/u-boot/custodians/u-boot-mmcWIP/16Mar2022Tom Rini7-14/+183
- Rockchip, i.MX and xenon_sdhci updates
2022-03-16Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini1-0/+23
- mvebu: dts: turris_mox: fix non-working network / MDIO (Marek)
2022-03-16Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini16-121/+174
- k210 updates
2022-03-16Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini3-3/+3
- Config tweaks to enable the right I2C driver
2022-03-16rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568Alper Nebi Yasak1-6/+58
On RK3568, a register bit must be set to enable Enhanced Strobe. However, it appears that the address of this register may differ from vendor to vendor and should be read from the underlying MMC IP. Let the Rockchip SDHCI driver read this address and set the relevant bit when Enhanced Strobe configuration is requested. The IP uses a custom mode select value (0x7) for HS400, use that instead of the common but non-standard SDHCI_CTRL_HS400 value (0x5). Also add some necessary DLL_STRBIN and DLL_TXCLK configuration for HS400. Additionally, a bit signifying that the connected hardware is an eMMC chip must be set to enable Data Strobe for HS400 and HS400ES modes. Also make the driver set this bit as appropriate. This is partly ported from Linux's Synopsys DWC MSHC driver which happens to be the underlying IP. (drivers/mmc/host/sdhci-of-dwcmshc.c in Linux tree). Co-developed-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-03-16rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399Alper Nebi Yasak1-0/+53
On RK3399, a register bit must be set to enable Enhanced Strobe. Let the Rockchip SDHCI driver set it when Enhanced Strobe configuration is requested. However, having it set makes the lower-speed modes stop working and makes reinitialization fail, so let it be unset as needed in set_control_reg(). This is mostly ported from Linux's Arasan SDHCI driver which happens to be the underlying IP. (drivers/mmc/host/sdhci-of-arasan.c in Linux tree). Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-03-16mmc: sdhci: Add HS400 Enhanced Strobe supportAlper Nebi Yasak2-0/+30
Delegate setting the Enhanced Strobe configuration to individual drivers if they set a function for it. Return -ENOTSUPP if they do not, like what the MMC uclass does. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-03-16mmc: xenon_sdhci: remove wait_dat0 SDHCI OPRobert Marko1-1/+6
Generic SDHCI driver received support for checking the busy status by polling the DAT[0] level instead of waiting for the worst MMC switch time. Unfortunately, it appears that this does not work for Xenon controllers despite being a part of the standard SDHCI registers and the Armada 3720 datasheet itself telling that BIT(20) is useful for detecting the DAT[0] busy signal. I have tried increasing the timeout value, but I have newer managed to catch DAT_LEVEL bits change from 0 at all. This issue appears to hit most if not all SoC-s supported by Xenon driver, at least A3720, A8040 and CN9130 have non working eMMC currently. So, until a better solution is found drop the wait_dat0 OP for Xenon. I was able to only test it on A3720, but it should work for others as well. Fixes: 40e6f52454fc ("drivers: mmc: Add wait_dat0 support for sdhci driver") Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-16cmd/mmc: fix output of mmc info for e-MMCMax Merchel1-4/+12
e-MMC and SD standards differ for some CID fields: - 6 Byte Name - assigned by Manufacturer (SD 5 Byte) - 1 Byte OEM - assigned by Jedec (SD 2 Byte) See e-MMC standard (JEDEC Standard No. 84-B51), 7.2.3 (OID) and 7.2.4 (PNM) Signed-off-by: Max Merchel <Max.Merchel@tq-group.com> Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-03-16mmc: fsl_esdhc_imx: use VENDORSPEC_FRC_SDCLK_ON when necessaryHaibo Chen2-3/+24
After commit f132aab40327 ("Revert "mmc: fsl_esdhc_imx: use VENDORSPEC_FRC_SDCLK_ON to control card clock output""), it involve issue in mmc_switch_voltage(), because of the special design of usdhc. For FSL_USDHC, it do not implement VENDORSPEC_CKEN/PEREN/HCKEN/IPGEN, these are reserved bits(Though RM contain the definition of these bits, but actually internal IC logic do not implement, already confirm with IC team). Instead, use VENDORSPEC_FRC_SDCLK_ON to gate on/off the card clock output. Here is the definition of this bit in RM: [8] FRC_SDCLK_ON Force CLK output active Do not set this bit to 1 unless it is necessary. Also, make sure that this bit is cleared when uSDHC’s clock is about to be changed (frequency change, clock source change, or delay chain tuning). 0b - CLK active or inactive is fully controlled by the hardware. 1b - Force CLK active In default, the FRC_SDCLK_ON is 0. This means, when there is no command or data transfer on bus, hardware will gate off the card clock. But in some case, we need the card clock keep on. Take IO voltage 1.8v switch as example, after IO voltage change to 1.8v, spec require gate off the card clock for 5ms, and gate on the clock back, once detect the card clock on, then the card will draw the dat0 to high immediately. If there is not clock gate off/on behavior, some card will keep the dat0 to low level. This is the reason we fail in mmc_switch_voltage(). To fix this issue, and concern that this is only the fsl usdhc hardware design limitation, set the bit FRC_SDCLK_ON in the beginning of the wait_dat0() and clear it in the end. To make sure the 1.8v IO voltage switch process align with SD specification. For standard tuning process, usdhc specification also require the card clock keep on, so also add these behavior in fsl_esdhc_execute_tuning(). Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-03-16arm: mvebu: dts: turris_mox: fix non-working network / MDIOMarek Behún1-0/+23
Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM as it's own device, but is registered as part of mvneta's driver, which means that pinctrl definitions are not parsed for the MDIO bus node. Also mvneta driver does not consider "phy-handle" property, only "phy". For now, fix this by adding armada-3720-turris-mox-u-boot.dtsi file returning the MDIO to how it was defined previously. A better solution (using proper mvmdio DM driver) is being work on, but will need testing on various boards, and we need the bug fixed now for the upcoming release. Fixes: 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-15Merge tag 'u-boot-stm32-20220315' of ↵Tom Rini15-49/+777
https://source.denx.de/u-boot/custodians/u-boot-stm mtd: add NAND write protect support to stm32_fmc2_nand stm32mp1 bsec: Add permanent lock write support stm32mp1 bsec: Add dev in function description cmd_stboard: Update test on misc_read() result video: fix the check of return value of clk_set_rate in stm32_ltdc DT: Alignment with kernel v5.17 for stm32mp15 DT: Add USB OTG pinctrl and regulator in SPL for DHCOR DT: Move vdd_io extras into Avenger96 extras DT: Add DFU support for DHCOM recovery ram: stm32mp1: Unconditionally enable ASR psci: Implement PSCI system suspend and DRAM SSR for stm32mp
2022-03-15pinctrl: k210: Fix bias-pull-upNiklas Cassel1-1/+1
Using bias-pull-up would actually cause the pin to have its pull-down enabled. Fix this. Original Linux patch by Sean Anderson: https://lore.kernel.org/linux-gpio/20220209182822.640905-1-seanga2@gmail.com/ Fixes: 7224d5ccf8e1 ("pinctrl: Add support for Kendryte K210 FPIOA") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15pinctrl: k210: Fix loop in k210_pc_get_drive()Niklas Cassel1-1/+1
The loop exited too early so the k210_pc_drive_strength[0] array element was never used. Original Linux patch by Dan Carpenter: https://lore.kernel.org/linux-gpio/20220209180804.GA18385@kili/ Fixes: 7224d5ccf8e1 ("pinctrl: Add support for Kendryte K210 FPIOA") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15spi: dw: Actually mask interruptsSean Anderson1-1/+1
The designware spi driver unconditionally uses polling. The comment to spi_hw_init() also states that the function should disable interrupts. According to the DesignWare DW_apb_ssi Databook, value 0xff in IMR enables all interrupts. Since we want to mask all interrupts write 0x0 instead. On the canaan k210 board, pressing the reset button twice to reset the board will run u-boot. If u-boot boots Linux without having SPI interrupts masked, Linux will hang as soon as interrupts are enabled, because of an interrupt storm. Properly masking the SPI interrupts in u-boot allows us to successfully boot Linux, even after resetting the board. Fixes: 5bef6fd79f94 ("spi: Add designware master SPI DM driver used on SoCFPGA") Signed-off-by: Sean Anderson <seanga2@gmail.com> [Niklas: rewrite commit message] Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15spi: dw: Force set K210 fifo length to 31Damien Le Moal1-1/+15
The Canaan Kendryte K210 SoC DW apb_ssi v4 spi controller is documented to have a 32 word deep TX and RX FIFO, which spi_hw_init() detects. However, when the RX FIFO is filled up to 32 entries (RXFLR = 32), an RX FIFO overrun error occurs. Avoid this problem by force setting fifo_len to 31. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15k210: dts: align plic node with LinuxNiklas Cassel1-2/+2
The Linux PLIC interrupt-controller driver actually initializes the hart context registers in the PLIC driver exactly in the same order as specified in the interrupts-extended device tree property. See the device tree binding [1]. The ordering of the interrupts is therefore essential in order to configure the PLIC correctly. Fix the order so that we will have sane IRQ behavior when booting Linux with the u-boot device tree. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-03-15k210: dts: align fpioa node with LinuxDamien Le Moal2-7/+15
Linux kernel fpioa pinctrl driver expects the sysctl phandle and the power bit offset of the fpioa device to be specified as a single property "canaan,k210-sysctl-power". Replace the "canaan,k210-sysctl" and "canaan,k210-power-offset" properties with "canaan,k210-sysctl-power" to satisfy the Linux kernel requirements. This new property is parsed using the existing function dev_read_phandle_with_args(). Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15k210: dts: add missing power bus clocksDamien Le Moal1-23/+53
Linux drivers for many of the K210 peripherals depend on the power bus clock to be specified. Add the missing clocks and their names to avoid problems when booting Linux using u-boot DT. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-03-15k210: use the board vendor name rather than the marketing nameDamien Le Moal16-90/+91
"kendryte" is the marketing name for the K210 RISC-V SoC produced by Canaan Inc. Rather than "kendryte,k210", use the usual "canaan,k210" vendor,SoC compatibility string format in the device tree files and use the SoC name for file names. With these changes, the device tree files are more in sync with the Linux kernel DTS and drivers, making uboot device tree usable by the kernel. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-03-15ARM: dts: stm32: Add DFU support for DHCOM recoveryMarek Vasut2-3/+54
This patch configures U-Boot SPL for DHCOM SoM to permit DFU upload of SPL and subsequent u-boot.itb for recovery or commissioning purposes. The DFU usage procedure is identical to STM32MP1 DHCOR SoM, see commit 3919aa1722a ("ARM: dts: stm32: Add DFU support for DHCOR recovery") , except for switching the SoM into DFU mode. By default, the DHCOM SoM has no dedicated mechanism for setting BOOTn straps into UART/USB mode, therefore to enter DFU mode, the SoC must fail to boot from boot media which can be selected by the BOOTn strap override mechanism first and then fall back to DFU mode. In case of a SoM with pre-populated BOOTn strap override button, power the system off, remove microSD card (if applicable), hold down the BOOTn strap override button located between eMMC and SoM edge connector, power on the SoM. The SoC will fail to boot from SD card and fall back into DFU mode. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15stm32mp: psci: Implement PSCI system suspend and DRAM SSRMarek Vasut2-11/+519
Implement PSCI system suspend and placement of DRAM into SSR while the CPUs are in suspend. This saves non-trivial amount of power in suspend, on 2x W632GU6NB-15 ~710mW. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15ram: stm32mp1: Unconditionally enable ASRMarek Vasut2-0/+31
Enable DRAM ASR, auto self-refresh, unconditionally. This saves non-trivial amount of power both at runtime and in suspend (on 2x W632GU6NB-15 ~150mW). Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15ARM: dts: stm32: Move vdd_io extras into Avenger96 extrasMarek Vasut2-4/+4
The vdd_io regulator is present only on DHCOR SoM configured for 1V8 IO, as populated on Avenger96, but not present on 3V3 DHCOR SoM. Move these extras to Avenger96 u-boot DT extras. Fixes: 3919aa1722a ("ARM: dts: stm32: Add DFU support for DHCOR recovery") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-03-15ARM: dts: stm32: Add USB OTG pinctrl and regulator nodes into SPL DT on DHCORMarek Vasut1-0/+8
Fix the following warning in SPL and make sure that even DTs which enforce Vbus detection using u-boot,force-vbus-detection;, the DFU in SPL will work. dwc2-udc-otg usb-otg@49000000: prop pinctrl-0 index 0 invalid phandle Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15arm: dts: stm32mp15: alignment with v5.17Patrick Delaunay3-16/+54
Device tree alignment with Linux kernel v5.17-rc1 - ARM: dts: stm32: add pull-up to USART3 and UART7 RX pins on STM32MP15 DKx boards - ARM: dts: stm32: clean uart4_idle_pins_a node for stm32mp15 - ARM: dts: stm32: tune the HS USB PHYs on stm32mp15xx-dkx - ARM: dts: stm32: tune the HS USB PHYs on stm32mp157c-ev1 - ARM: dts: stm32: fix stusb1600 pinctrl used on stm32mp157c-dk Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15video: stm32: stm32_ltdc: fix the check of return value of clk_set_rate()Gabriel Fernandez1-5/+6
The clk_set_rate() function returns rate as an 'ulong' not an 'int' and rate > 0 by default. This patch avoids to display the associated warning when the set rate function returns the new frequency. Fixes: aeaf330649e8 ("video: stm32: stm32_ltdc: add bridge to display controller") Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15board: st: common: update test on misc_read result in command stboardPatrick Delaunay1-4/+4
Update management of misc_read/misc_write, which now returns length of data after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered"): raise a error when the result is not the expected length. Fixes: 658fde8a36ff ("board: stm32mp1: stboard: lock the OTP after programming") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15stm32mp1: bsec: add missing dev in function commentPatrick Delaunay1-0/+4
Add the missing @dev reference in some function description. Fixes: b66bfdf238b9 ("arm: stm32mp: bsec: migrate trace to log macro") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15stm32mp: bsec: add permanent lock write supportPatrick Delaunay1-6/+84
Add support of the permanent lock support in U-Boot proper when BSEC is not managed by secure monitor (TF-A SP_MIN or OP-TEE). This patch avoid issue with stm32key command and fuse command on basic boot for this missing feature of U-Boot BSEC driver. Reported-by: Johann Neuhauser <jneuhauser@dh-electronics.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Tested-by: Johann Neuhauser <jneuhauser@dh-electronics.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15mtd: rawnand: stm32_fmc2: add NAND Write Protect supportChristophe Kerello1-0/+9
This patch adds the support of the WP# signal. WP will be disabled before the first access to the NAND flash. Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-14Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/14Mar2022Tom Rini1-2/+3
- Bugfix for dwc2 USB driver.
2022-03-14Merge tag 'video-20220314' of ↵Tom Rini5-42/+93
https://source.denx.de/u-boot/custodians/u-boot-video - fix display of the u-boot logo on Apple devices - convert Nokia RX-51 to CONFIG_DM_VIDEO
2022-03-14Prepare v2022.04-rc4v2022.04-rc4Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-14Merge branch '2022-03-14-regression-fixes'Tom Rini5-65/+101
- Regression fixes for RK3399 eMMC, j721e Sierra SerDes driver, vexpress64 autoboot and tbs2910 image size
2022-03-14board: tbs2910: Enable Link Time Optimizations in defconfigWIP/2022-03-14-regression-fixesSoeren Moch1-0/+1
This saves about 12 kBytes image size and helps to stay within the size limit. Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Soeren Moch <smoch@web.de>
2022-03-14vexpress64: fvp: Fix automatic bootAndre Przywara1-1/+1
Commit 90f262a6951f ("vexpress64: Clean up BASE_FVP boot configuration") cleaned up the usage of default address variables, but missed to update the address for the kernel in the FVP's bootcmd definition. Change ${kernel_addr} to read ${kernel_addr_r} to bring back the automated boot for the fastmodel. Also use "setenv" instead of the potentially ambiguous "set" on the way. Fixes: 90f262a6951f ("vexpress64: Clean up BASE_FVP boot configuration") Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-14board: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0Aswath Govindraju1-15/+13
Initialization and power on operations of links have been moved under the link device in the Sierra SerDes driver. Also, the UCLASS of sierra_phy_provider has been changed to UCLASS_MISC. Therefore, fix the probing of SerDes0 instance accordingly. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2022-03-14phy: cadence: Sierra: Move the link operations from serdes phy to link deviceAswath Govindraju1-39/+20
In commit 6f46c7441a9f ("phy: cadence: Sierra: Add a UCLASS_PHY device for links"), a separate udevice of type UCLASS_PHY was created for each link. Therefore, move the corresponding link operations under the link device. Also, change the uclass of sierra phy to UCLASS_MISC as it is no longer the phy device. Fixes: 6f46c7441a9f ("phy: cadence: Sierra: Add a UCLASS_PHY device for links") Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2022-03-14rockchip: sdhci: Fix RK3399 eMMC PHY power cyclingAlper Nebi Yasak1-10/+66
The Rockchip RK3399 eMMC PHY has to be power-cycled while changing its clock speed to some higher speeds. This is dependent on the desired SDHCI clock speed, and it looks like the PHY should be powered off while setting the SDHCI clock in these cases. Commit ac804143cfd1 ("mmc: rockchip_sdhci: add phy and clock config for rk3399") attempts to do this in the set_ios_post() hook by setting the SDHCI clock once more while the PHY is turned off/on as necessary, as the SDHCI framework does not provide a way to override how it sets its clock. However, the commit breaks reinitializing the eMMC on a few boards including chromebook_kevin and reportedly ROCKPro64. This patch reworks the power cycling to utilize the SDHCI framework slightly better (using the set_control_reg() hook to power off the PHY and set_ios_post() hook to power it back on) which happens to fix the issue, at least on a chromebook_kevin. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-14Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini3-6/+39
- kwboot: Misc minor improvement and fixes, e.g. mix of arguments (Pali) - PCI: a37xx: Remap IO space to bus address 0x0 (Pali)
2022-03-14Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini2-3/+9
- Trivial fixes for x86
2022-03-14arm: a37xx: Remap IO space to bus address 0x0Pali Rohár2-2/+7
Remap PCI I/O space to the bus address 0x0 in the Armada 37xx device-tree in order to support legacy I/O port based cards which have hardcoded I/O ports in low address space. Some legacy PCI I/O based cards do not support 32-bit I/O addressing. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-14tools: kwboot: Allow to mix positional arguments with option -bPali Rohár1-4/+14
Commit 9e6d71d2b55f ("tools: kwboot: Allow to use -b without image path as the last getopt() option") broke usage of kwboot with following arguments: kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-spl.kwb Fix parsing of option -b with optional argument again. Fixes: 9e6d71d2b55f ("tools: kwboot: Allow to use -b without image path as the last getopt() option") Signed-off-by: Pali Rohár <pali@kernel.org> Reported-by: Tony Dinh <mibodhi@gmail.com> Tested-by: Tony Dinh <mibodhi at gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-14tools: kwboot: Check if baudrate value is supported before sending imagePali Rohár1-1/+13
Call kwboot_open_tty() which baudrate value which was specified at the command line by option -B. This function returns error if baudrate is not supported by selected tty device. Initial baudrate for image transfer is always 115200, so call kwboot_tty_change_baudrate() with value 115200 immediately after kwboot_open_tty() if baudrate specified by option -B is different than 115200. This makes kwboot fail immediately, informing that baudrate is unsupported, instead of failing only after the first part of image is already sent. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-14tools: kwboot: Allow to specify custom baudrate only in supported operationsPali Rohár1-0/+6
Custom baudrate different than 115200 may be specified only when kwboot is not going to send boot/debug message pattern or when it is going to send boot message pattern with image file (in which case baudrate change happens after sending kwbimage header). BootROM detects boot/debug message pattern only at baudrate 115200. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-14usb: dwc2: handle return code of dev_read_size() in of to, plat functionWolfgang Grandegger1-2/+3
dev_read_size() returns -EINVAL (-22) if the property "g-tx-fifo-size" does not exist. If that's the case, we now keep the default value of 0. Signed-off-by: Wolfgang Grandegger <wg@aries-embedded.de>
2022-03-14configs: condor: Enabled I2C support for R-Car V3HNam Nguyen1-1/+1
Enable I2C support for R-Car V3H (R8A77980) on Condor board. Signed-off-by: Nam Nguyen <nam.nguyen.yh@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2022-03-14configs: eagle: Enabled I2C support for R-Car V3MNam Nguyen1-1/+1
Enable I2C support for R-Car V3M (R8A77970) on Eagle board. Signed-off-by: Nam Nguyen <nam.nguyen.yh@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2022-03-14configs: falcon: Enabled I2C support for R-Car V3UNam Nguyen1-1/+1
Enable I2C support for R-Car V3U (R8A779A0) on Falcon board. Signed-off-by: Nam Nguyen <nam.nguyen.yh@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>