aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-10Merge branch 'next_net/phy_connect_dev' of ↵WIP/11Jun2023WIP/10Jun2023-nextTom Rini14-92/+59
https://source.denx.de/u-boot/custodians/u-boot-sh into next
2023-06-10Merge branch 'next_mtd/rpc-spi' of ↵Tom Rini2-103/+105
https://source.denx.de/u-boot/custodians/u-boot-sh into next
2023-06-10ARM: renesas: Enable DM_ETH_PHY and SMSC PHY driverMarek Vasut1-0/+3
The board comes with SMSC LAN8710A PHY, enable matching driver. Enable DM_ETH_PHY in the process to start using DM drivers more. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> --- Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Michal Simek <michal.simek@amd.com> Cc: Nishanth Menon <nm@ti.com> Cc: Ramon Fried <rfried.dev@gmail.com>
2023-06-10ARM: dts: renesas: Add compatible properties to LAN8710A Ethernet PHYsGeert Uytterhoeven1-0/+2
Add compatible values to Ethernet PHY subnodes representing SMSC LAN8710A PHYs on RZ/A1 and R-Mobile A1 boards. This allows software to identify the PHY model at any time, regardless of the state of the PHY reset line. Ported from Linux kernel commit 1c65ef1c71e473c00f2a7a1b9c140f0b4862f282 . Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/247dc2074dae149af07b6d014985ad30eb362eda.1631174218.git.geert+renesas@glider.be --- Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Michal Simek <michal.simek@amd.com> Cc: Nishanth Menon <nm@ti.com> Cc: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: sh_eth: Fix RX error handlingValentine Barshak1-9/+7
In case RX error occurs, and the RD_RFE bit is set, the descriptor is never returned back to the queue. Make sh_eth_recv_start return zero length in this case so that the descriptor can be released and pushed back to the list. Also return the more appropriate -EAGAIN instead of -EINVAL if the descriptor is not ready yet. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: sh_eth: Workaround cache issuesValentine Barshak1-4/+6
U-Boot writes to RX packets when constructing replies. This can cause stale cached data to be written to RX buffer while we're receiving a packet. This causes RX packet corruption because we invalidate the cache right before processing the packet. Invalidate packet buffer cache when preparing RX descriptor as well. This seems to fix RX packet drops with high RX traffic. While at it flush the descriptors right before enabling RX/TX in sh_eth_tx_desc_init/sh_eth_rx_desc_init callbacks when they are ready instead of flushing after allocation. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: sh_eth: Drop reset GPIO handling in favor of common codeMarek Vasut2-17/+1
The common code is now capable of handling reset GPIO associated with PHY. Drop the local ad-hoc code in favor of common code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: ravb: Drop reset GPIO handling in favor of common codeMarek Vasut2-22/+1
The common code is now capable of handling reset GPIO associated with PHY. Drop the local ad-hoc code in favor of common code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: phy: Handle reset-delay-us/reset-post-delay-us propertiesMarek Vasut1-0/+8
These two properties are used by various DTs in place of current reset-assert-us/reset-deassert-us , handle both . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: phy: Bind ETH_PHY uclass driver to each new PHYMarek Vasut1-0/+17
In case a new PHY is created and DM_ETH_PHY is enabled, bind a generic PHY driver from ETH_PHY uclass to the PHY to have a matching DM representation of that PHY. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: phy: Unpublish phy_connect_dev()Marek Vasut2-11/+2
The phy_connect_dev() is legacy API, now that there are no users, make it internal to phy.c and unpublish it from headers. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: sunxi_emac: Switch to new U-Boot PHY APIMarek Vasut1-4/+3
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: sh_eth: Switch to new U-Boot PHY APIMarek Vasut1-4/+1
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: pch_gbe: Switch to new U-Boot PHY APIMarek Vasut1-4/+1
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: ethoc: Switch to new U-Boot PHY APIMarek Vasut1-5/+3
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: ave: Switch to new U-Boot PHY APIMarek Vasut1-4/+2
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: altera_tsa: Switch to new U-Boot PHY APIMarek Vasut1-7/+1
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10net: eth-phy: staticize eth_phy_reset()Marek Vasut1-1/+1
The eth_phy_reset() is not used outside of this file, staticize it. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-10mtd: spi: renesas: Add 4 bytes address mode supportCong Dang1-94/+78
This patch adds 4-byte address mode support. Because traditional access based on FIFO/shift register, it's complex to specify information like opcode, address length, dummy bytes etc to flash. Replace the traditional access by spi-mem layer which is essential to make 4-byte address mode support possible. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Cong Dang <cong.dang.xn@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-10mtd: spi: renesas: Add R-Car Gen4 supportHai Pham1-0/+5
Support RPC SPI on R-Car Gen4 R8A779F0 S4 and R8A779G0 V4H SoCs. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Squash S4 and V4H patches, fix brackets around STRTIM2]
2023-06-10mtd: spi: renesas: Enable SPI_FLASH_SFDP_SUPPORTHai Pham1-1/+1
Enable support for parsing and auto discovery of parameters for SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP) tables as per JESD216 standard. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Cong Dang <cong.dang.xn@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Make SFDP the default unconditionally
2023-06-10mtd: spi: renesas: Extract strobe delay setting code into separate functionHai Pham1-8/+21
Move strobe delay setting code into extra function and reflect the latest setting in datasheet (R-Car Gen3 v2.20, R-Car V3U v0.50). i.e. STRTIM[2:0] should be set to 110 (RCar M3-W) or 111 (Other products) This is also a preparation for new R-Car Gen4 SoC which has 4-bits STRTIM Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Fix for RZ/A1
2023-06-09Merge branch '2023-06-09-fwu-updates' into nextTom Rini23-676/+1516
Two sets of FWU updates from Jassi Brar. First: The patchset reduces ~400 lines of code, while keeping the functionality same and making meta-data operations much faster (by using cached structures). Issue: meta-data copies (primary and secondary) are being handled by the backend/storage layer instead of the common core in fwu.c (as also noted by Ilias) that is, gpt_blk.c manages meta-data and similarly raw_mtd.c will have to do the same when it arrives. The code could by make smaller, cleaner and optimised. Basic idea: Introduce .read_mdata() and .write_mdata() in fwu_mdata_ops that simply read/write meta-data copy. The core code takes care of integrity and redundancy of the meta-data, as a result we can get rid of every other callback .get_mdata() .update_mdata() .get_mdata_part_num() .read_mdata_partition() .write_mdata_partition() and the corresponding wrapper functions thereby making the code 100s of LOC smaller. Get rid of fwu_check_mdata_validity() and fwu_mdata_check() which expected underlying layer to manage and verify mdata copies. Implement fwu_get_verified_mdata(struct fwu_mdata *mdata) public function that reads, verifies and, if needed, fixes the meta-data copies. Verified copy of meta-data is now cached as 'g_mdata' in fwu.c, which avoids multiple low-level expensive read and parse calls. gpt meta-data partition numbers are now cached in gpt_blk.c, so that we don't have to do expensive part_get_info() and uid ops. And second: Introduce support for mtd backed storage for FWU feature and enable it on Synquacer platform based DeveloperBox.
2023-06-09fwu: provide default fwu_plat_get_bootidxJassi Brar1-0/+18
Just like fwu_plat_get_update_index, provide a default/weak implementation of fwu_plat_get_bootidx. So that most platforms wouldn't have to re-implement the likely case. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09fwu: DeveloperBox: add support for FWUJassi Brar6-6/+212
Add code to support FWU_MULTI_BANK_UPDATE. The platform does not have gpt-partition storage for Banks and MetaData, rather it used SPI-NOR backed mtd regions for the purpose. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09config: developerbox: move to new flash layout and boot flowJassi Brar1-2/+2
Towards enabling FWU and supporting new firmware layout in NOR flash, make u-boot PIC and adjust uboot env offset in flash. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09dt: fwu: developerbox: enable fwu banks and mdata regionsJassi Brar1-3/+46
Specify Bank-0/1 and fwu metadata mtd regions. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09tools: Add mkfwumdata tool for FWU metadata imageMasami Hiramatsu4-0/+436
Add 'mkfwumdata' tool to generate FWU metadata image for the meta-data partition to be used in A/B Update imeplementation. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2023-06-09FWU: Add FWU metadata access driver for MTD storage regionsMasami Hiramatsu6-0/+503
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, on a separate region. Add a driver for reading from and writing to the metadata when the updatable images and the metadata are stored on a raw MTD region. The code is divided into core under drivers/fwu-mdata/ and some helper functions clubbed together under lib/fwu_updates/ Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09test: dm: fwu: fix for the updated apiJassi Brar1-19/+3
fwu_get_mdata() no more requires 'dev' argument and fwu_check_mdata_validity() has been rendered useless and dropped. Fix the test cases to work with aforementioned changes. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: rename fwu_get_verified_mdata to fwu_get_mdataJassi Brar3-6/+6
fwu_get_mdata() sounds more appropriate than fwu_get_verified_mdata() Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: meta-data: switch to management by common codeJassi Brar5-702/+38
The common code can now read, verify and fix meta-data copies while exposing one consistent structure to users. Only the .read_mdata() and .write_mdata() callbacks of fwu_mdata_ops are needed. Get rid of .get_mdata() .update_mdata() .get_mdata_part_num() .read_mdata_partition() and .write_mdata_partition() and also the corresponding wrapper functions. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: gpt: implement read_mdata and write_mdata callbacksJassi Brar1-0/+36
Moving towards using common code for meta-data management, implement the read/write mdata hooks. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: move meta-data management in coreJassi Brar3-6/+202
Instead of each i/f having to implement their own meta-data verification and storage, move the logic in common code. This simplifies the i/f code much simpler and compact. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: gpt: use cached meta-data partition numbersJassi Brar1-19/+24
Use cached values and avoid parsing and scanning through partitions everytime for meta-data partitions because they can't change after bootup. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09dt/bindings: fwu-mdata-mtd: drop changes outside FWUJassi Brar1-14/+91
Any requirement of FWU should not require changes to bindings of other subsystems. For example, for mtd-backed storage we can do without requiring 'fixed-partitions' children to also carry 'uuid', a property which is non-standard and not in the bindings. There exists no code yet, so we can change the fwu-mtd bindings to contain all properties within the fwu-mdata node. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09Merge branch 'next_soc/v3x' of ↵WIP/09Jun2023-nextTom Rini32-244/+1618
https://source.denx.de/u-boot/custodians/u-boot-sh into next
2023-06-08ARM: renesas: Add R8A77980 V3HSK board and CPLD codeValentine Barshak8-0/+370
Add board code for the R8A77980 V3HSK board. Add CPLD sysreset driver to the R-Car V3H SK board. Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Sync configs and board code with V3H Condor, squash CPLD driver in]
2023-06-08ARM: dts: renesas: Add R8A77980 V3HSK DTsValentine Barshak1-0/+292
Import R8A77980 V3HSK DTs from Linux 6.1.31, commit d2869ace6eeb ("Linux 6.1.31"). Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Sync with 6.1.31
2023-06-08ARM: renesas: Add R8A77970 V3MSK board and CPLD codeValentine Barshak9-0/+564
Add board code for the R8A77970 V3MSK board. Add CPLD sysreset driver to the R-Car V3M SK board. Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Sync configs and board code with V3M Eagle, squash CPLD driver in]
2023-06-08ARM: dts: renesas: Add R8A77970 V3MSK DTsValentine Barshak1-0/+303
Import R8A77970 V3MSK DTs from Linux 6.1.31, commit d2869ace6eeb ("Linux 6.1.31"). Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Sync with 6.1.31
2023-06-08ARM: rmobile: Introduce weak default board_init()Marek Vasut6-35/+7
Introduce weak default board_init() in rcar-common/common.c , which allows complete removal of ebisu.c and condor.c at the same time . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Drop eagle.h config of R8A77970 V3M Eagle boardMarek Vasut2-20/+1
The eagle.h is now empty and only includes rcar-gen3-common.h . Use rcar-gen3-common.h directly instead and drop eagle.h . No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Factor out common R-Car V3M/V3H board codeMarek Vasut2-26/+2
Pull common board initialization code from V3M Eagle board into rcar-common/v3-common.c so it can be re-used by other V3M/V3H boards. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Reduce R-Car V3H Condor header usageMarek Vasut1-11/+0
There is no need to pull in all those headers as the board file is basically empty. Drop them all. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Reduce R-Car E3 Ebisu header usageMarek Vasut1-22/+0
There is no need to pull in all those headers as the board file is basically empty. Drop them all. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Deduplicate R-Car Gen3/Gen4 reset_cpu()Marek Vasut9-90/+39
The reset_cpu() implementation is basically the same across Gen3 SoCs and identical across Gen4 SoCs. Introduce weak default for reset_cpu(), so that it does not have to be duplicated in every board file again. There is a slight difference for CA53 only systems, like E3 and D3, which now check MIDR for CPU ID first just like the other systems, but this is OK since the MIDR always returns CA53 core type and the correct reset register is written. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08Merge tag 'efi-next-20230608' of ↵WIP/08Jun2023-nextTom Rini27-677/+1102
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request efi-next-20230608 UEFI: * Support for firmware versions in capsule updates
2023-06-08test/py: efi_capsule: test for FMP versioningMasahisa Kojima6-2/+404
This test covers the FMP versioning for both raw and FIT image, and both signed and non-signed capsule update. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-06-08test: efi_capsule: refactor efi_capsule testMasahisa Kojima5-642/+287
Current efi capsule python tests have much code duplication. This commit creates the common function in test/py/tests/test_efi_capsule/capsule_common.py, aim to reduce the code size and improve maintainability. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>