summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-10-21usb: dwc3: allocate setup_buf with dma_alloc_coherent()Neil Armstrong
Since setup_buf is also consumed by hardware DMA, aligns it's allocation like other hardware buffers by introduce setup_buf_addr populated by dma_alloc_coherent(), and use it to pass the physical address of the buffer to the hardware. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-09-25power: regulator: Consistently return -ENOSYS when ops is unimplementedJonas Karlman
dev_get_driver_ops() may return NULL when the udevice is invalid. Move the ops check to top of functions to consistently return -ENOSYS when ops is unimplemented and prevent trying to access uclass plat data, also add missing NULL checks to suspend ops. Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-09-25power: regulator: Do not call set_suspend_value with -ENODATAJonas Karlman
On some boards a PMIC regulator is flagged with regulator-on-in-suspend and does not define any suspend or max microvolt, e.g. on Radxa ROCK 3A: vcc_ddr: DCDC_REG3 { regulator-name = "vcc_ddr"; regulator-always-on; regulator-boot-on; regulator-initial-mode = <0x2>; regulator-state-mem { regulator-on-in-suspend; }; }; This result in suspend_uV having the value -ENODATA after probe. This negative voltage, -ENODATA, gets missinterpreted and result in an unexpected voltage being set by autoset. E.g. on Radxa ROCK 3A the vcc_ddr regulator by default have a normal and suspend voltage value of 0.5v. However, due to this missinterpretation the suspend voltage end up beind set to 0.5625v instead. Fix this by skip calling regulator_set_suspend_value() in autoset and also protect calling set value ops when input value is -ENODATA. Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-09-25Merge tag 'u-boot-imx-next-20240925' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22406 - i.MX93 FEC fixes. - Always name the generated fitImage u-boot.itb to keep compatibility with pr-buildman behavior. -----------------------
2024-09-24net: fec_mxc: Skip recv packet process when fec is haltedYe Li
After FEC is halted by calling fec_halt callback, we should not continue receiving packet. Otherwise it will process previous pending interrupts on EIR register and uses wrong rbd index as this has been reset to 0. The GRA interrupt which is triggered by issuing graceful stop command to FEC transmitter in fec_halt is processed in this case. It causes wrong receive buffer descriptors be used by FEC in next time. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-24net: fec_mxc: Fix clk_ref rate on iMX93Peng Fan
i.MX93 FEC ENET port supports two mode: RGMII and RMII. For RGMII, there is an internal /2 divider, so the freq needs to set with (*2), otherwise the speed will not reach 1G and cause communication error in some network environments. For RMII, the clk path is ccm -> enet tx_clk pin -> pad loop back to enet, no /2 divider. So fix for RGMII mode with freq multiplied by 2. Fixes: 09de565f76b ("net: fec_mxc: support i.MX93") Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-24Merge patch series "Miscellaneous fixes"Tom Rini
Jerome Forissier <jerome.forissier@linaro.org> says: Miscellaneous fixes made when developing the lwIP series [1]. They are posted separately since they make sense on their own. Subsequent versions of the lwIP series will contain a squashed version of this one. [1] http://patchwork.ozlabs.org/project/uboot/list/?series=420712&state=%2A&archive=both
2024-09-24net: fec_mxc_init(): do not ignore return status of fec_open()Jerome Forissier
The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24net: ftgmac100: depend on NETJerome Forissier
FTGMAC100 enables drivers/net/ftgmac100.c which uses PHY_INTERFACE_MODE_NCSI, which is defined only when PHY_NCSI is enabled. Therefore FTGMAC100 depends on PHY_NCSI. However adding such a dependency causes a "recursive dependency detected!" message, so add a dependency on NET instead (PHY_NCSI depends on NET). All in all, either the stack is NET and FTGMAC100 can be enabled, or it is NET_LWIP (or NO_NET) and it cannot. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-24net: phy: ncsi: depend on NETJerome Forissier
PHY_NCSI enables drivers/net/phy/ncsi.c which calls net_loop() and net_set_timeout_handler(). That's the legacy NET stack (as opposed to NET_LWIP). Therefore add the dependency to Kconfig. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24net: fm: call dtsec_init_phy() only when it is definedJerome Forissier
dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-24flash: prefix error codes with FL_Jerome Forissier
Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-09-24spl: ram: hide SPL_RAM_SUPPORTJerome Forissier
Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning: common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function] 19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-09-23Merge tag 'xilinx-for-v2025.01-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next AMD/Xilinx changes for v2025.01-rc1 kbuild: - Add rules for automatically applying DT overlays Microblaze: - Enable bootscript location via DT AMD/Xilinx - Enable SIMPLE_PM_BUS by default ZynqMP: - DT updates and alignments with dt-schema - Call fdtoverlay via make directly - Enable non-invasive CCI-400 PMU debug - Disable secure access for boot devices - Add new zynqmp reboot command Versal NET: - Cleanup spi_get_env_dev() Kria: - Add bootmenu support sdhci: - Do not call device_is_compatible everywhere net: - Remove is-internal-pcspma DT flag
2024-09-21mmc: Poll CD in case cyclic framework is enabledMarek Vasut
In case the cyclic framework is enabled, poll the card detect of already initialized cards and deinitialize them in case they are removed. Since the card initialization is a longer process and card initialization is done on first access to an uninitialized card anyway, avoid initializing newly detected uninitialized cards in the cyclic callback. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-20net: gem: Remove undocumented is-internal-pcspma dt flagMichal Simek
Generic understanding/consideration is that phy-mode as sgmi means that the internal PCS(Physical Coding Sublayer) should be enabled by default. Xilinx GEM implementation allows configuration GEM (gmii mode) + PL PCS PMA (sgmii mode, Physical Medum Attachment) but in this case phy-mode should be setup as gmii. The reason for this assumption is that phy-mode should be described based on GEM configuration not based on mode coming out of PHY. Also Linux kernel automatically setting up PCSSEL bit when phy mode is sgmii without a need to specified additional DT propety. All our DTSes with sgmii phy mode have this flag enabled that's why there is no need/reason to just duplicate information. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/2ecdbcc4ce692e2f8b3e7054a2abab35f6c03a69.1726213052.git.michal.simek@amd.com
2024-09-20mmc: zynq_sdhci: Remove device_is_compatible() functionPadmarao Begari
There are lot of device_is_compatible() present in the driver. Remove them and replace with a variables "SDHCI_COMPATIBLE_SDHCI_89A" and "SDHCI_COMPATIBLE_VERSAL_NET_EMMC" with match data. This change saves the space and reduce the execution time. Signed-off-by: Padmarao Begari <padmarao.begari@amd.com> Link: https://lore.kernel.org/r/20240913093157.2343476-1-padmarao.begari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-09-19mtd: spi-nor: scale up timeout for full-chip eraseVenkatesh Yadav Abbarapu
This patch fixes timeout issues seen on large NOR flash. For full-chip erase, where we use the SPINOR_OP_CHIP_ERASE (0xc7) opcode. Use a different timeout for full-chip erase than for other commands. [Ported from Linux kernel commit 09b6a377687b ("mtd: spi-nor: scale up timeout for full-chip erase") ] Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2024-09-19imx93: Add Low performance parts 9302/9301 supportYe Li
Add support for iMX93 low performance parts 9302 and 9301 which restrict to low drive voltage only. The parts run A55 max speed at 900Mhz and M33 at 133Mhz, have NPU and A55 core1 (9301) disabled. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-19imx9: Add 233Mhz DDR PLL frequencyYe Li
To support 1.866GTS LPDDR4x timing script, need to add 233Mhz freq to DDR PLL for second mission point at 933MTS. Otherwise DDR training will fail. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-18Merge patch series "Fix various bugs"Tom Rini
Simon Glass <sjg@chromium.org> says: This series includes the patches needed to make make the EFI 'boot' test work. That test has now been split off into a separate series along with the EFI patches. This series fixes these problems: - sandbox memory-mapping conflict with PCI - the fix for that causes the mbr test to crash as it sets up pointers instead of addresses for its 'mmc' commands - the mmc and read commands which cast addresses to pointers - a tricky bug to do with USB keyboard and stdio - a few other minor things
2024-09-18usb: Drop old non-DM codeSimon Glass
The driver model deadline for USB was in 2019, so drop the old USB keyboard code, to avoid needing to deal with the extra code path. Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18nvmxip: Avoid probing on bootSimon Glass
Devices should be probed when they are used, not before. Drop this boot-time probing. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18nvmxip: Drop the message on probeSimon Glass
We should not need to announce this device. Drop the message. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-16Merge patch series "Arm: npcm: modify npcm8xx boot setting"Tom Rini
Jim Liu <jim.t90615@gmail.com> says: Modify npcm8xx new boot design. Correct memory setting and set gpio default value.
2024-09-16pinctrl: npcm8xx: clear all gpio eventsStanley Chu
Clear all gpio events to avoid unexpected interrupts during kernel booting. Signed-off-by: Stanley Chu <yschu@nuvoton.com>
2024-09-16drivers/crypto: aspeed: Add Caliptra SHA ACC supportChia-Wei Wang
Aspeed AST27xx SoCs integrate the CPTRA 1.0 secure IP, which export a SHA accelerator interface for SoC to use. Note that CPTRA 1.0 supports only SHA384 and SHA512 and this patch is verified by the 'hash test sha384/sha512' commands. Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2024-09-16Merge tag 'v2024.10-rc5' into nextTom Rini
Prepare v2024.10-rc5
2024-09-13Merge tag 'efi-next-20241024' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request efi-next-20241024 UEFI: * Use generated UUIDs in UEFI capsules: - efi: define struct efi_guid - lib: uuid: add UUID v5 support - efi: add a helper to generate dynamic UUIDs - doc: uefi: document dynamic UUID generation - sandbox: switch to dynamic UUIDs - lib: uuid: supporting building as part of host tools - include: export uuid.h - tools: mkeficapsule: use u-boot UUID library - tools: mkeficapsule: support generating dynamic GUIDs - test: lib/uuid: add unit tests for dynamic UUIDs - test: lib/uuid: add tests for UUID version/variant bits * Minor code clean-up - shorten efi_bootmgr_release_uridp_resource() - rename efi_bootmgr_image_return_notify - return the correct error in efi_bootmgr_release_uridp() - Kconfig: clean up the efi configuration status - Use puts() in cout so that console recording works - Put back copyright message in helloworld.c
2024-09-12bootcount: Update to point to current documentationTom Rini
The current documentation for the bootcount API is on our website and not the old wiki, update the link in two places. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-09-12include: export uuid.hCaleb Connolly
Move this header to include/u-boot/ so that it can be used by external tools. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-12Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini
into next CI result shows no issue: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/22315 ---------------------------------------------------------------- - Aspeed: Add AST2700 board (Ibex RISC-V core) support - Add timer, dram controller, network support - Sophgo: Add clock controller support for Milk-V Duo
2024-09-11pwm: imx: Don't drop the enable bit once setMiquel Raynal
Changing the duty-cycle should not blindly override (and clear) the enable (EN) bit if it has already been set. For instance, a PWM backlight can be enabled and set to a specific intensity using two operations. The order of these operations should not matter. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-09-11ram: ast2700: Add DRAM controller initializationChia-Wei Wang
Add driver for AST2700 to initialize DRAM in SPL. This patch also refactors the Kconfig dependency of Aspeed DRAM drivers as some of them are shared among the file structures of RV and ARM ISAs. Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11timer: Add AST2700 IBEX timer supportChia-Wei Wang
Add the driver for the AST2700 Ibex timer, which uses CPU cycles as the timer count running at 200MHz. Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11driver: net: Add Aspeed AST2700 MDIO supportJacky Chou
The AST2700 is the 7th generation SoC from Aspeed. And use the driver to support clause 22 access. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11net: ftgmac100: Add Aspeed AST2700 supportJacky Chou
Add support of Aspeed AST2700 SoC. AST2700 is based on ARM64 so modify the DMA address related code to fit both ARM and ARM64. Besides, the RMII/RGMII mode control register is moved from SCU500 to MAC50 so initialize the register in ftgmac100_start correspondingly. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11net: ftgmac100: Modify desc. size to cache lineJacky Chou
The TX/RX descriptor size is 16 byte. When the cache line size is larger than 16 bytes, descriptors flushed to RAM will flush more than one descriptor. It is possible that it may mistakenly flush to other descriptor that has been updated by MAC in RAM. To avoid this issue, align the descriptors to cache line size. Only one desc will be flushed or invalidated at a time. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11net: ftgmac100: Fixed NC-SI PHY device cannot getJacky Chou
The NC-SI interface does not need the MDIO bus and the NC-SI PHY device cannot get from dm_eth_phy_connect. Therefore, use phy_connect directly here. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11net: ftgmac100: Fixed the cache coherency issues of rx memoryJacky Chou
When executing TFTP, the ARP will be replied to after receiving the ARP. U-boot's ARP routine modifies the data in the receive packet in response to the ARP packet and then copies it into the transmit packet. At this point, the received packet cache is inconsistent. It is possible that the cache will perform a writeback action to affect the MAC receiving packets. Avoid the same problem that occurs in other networking protocols. In the free_pkt function, ensure cache and memory consistency. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11clk: sophgo: cv1800b: Add clock controller driver for cv1800b SoCKongyang Liu
Add clock controller driver for sophgo cv1800b SoC Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-10arm: Remove ethernut5 boardTom Rini
As per the maintainers at egnite GmbH, they are no longer interested in supporting this board. Go and remove the platform here. Furthermore, this is the only AT91SAM9XE platform in-tree so remove supporting code for that as well. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-09-10clk: sifive: avoid declaring static variables in includesHeinrich Schuchardt
The existing code is unnecessarily convoluted: Arrays __prci_init_clocks_fu[5|7]40 are initialized with data. In separate includes fu[5|7]40-prci.h the size of the arrays is provided as constants. By moving the structures prci_clk_fu[5|7]40 to the respective code modules we can directly use ARRAY_SIZE() to access the size of the data used for initialization. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-10clk: sifive: append missing \n to messagesHeinrich Schuchardt
If multiple messages are written, line-feeds improve the readability. Fixes: c40b6df87fc0 ("clk: Add SiFive FU540 PRCI clock driver") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2024-09-09Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb ↵Tom Rini
into next
2024-09-09Merge branch 'qcom-next' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon into next Various improvements to Snapdragon support: * Bumped up the pagetable size to handle newer SoCs with much more RAM * Made memory map parsing more robust, fixing chainloading on SM8550/SM8650 * Populate fdt_addr_r with U-Boot's FDT by default, and set $loadaddr to prevent crashes with some commands which expect it * Added initial support for SC7280/QCM6490 and the new RB3 Gen 2 board * Add debug config fragments to enable debug UART on some SoCs. * Enable RPMh regulators on SM8550/SM8650 * Map the cmd-db memory explicitly since it may not be in the memory map CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/22255
2024-09-09phy: test: Implement sandbox PHY .set_mode and DM testMarek Vasut
Implement trivial extension to the sandbox PHY, which makes it pretend to support selecting USB Host mode and nothing else. Any other mode is rejected with -EINVAL. Any submode except for default submode 0 is rejected with -EOPNOTSUPP . The implementation behaves in this trivial way to permit easy unit testing using test which is also added in this commit. To run the test, use e.g. sandbox64_defconfig and run U-Boot as follows: $ ./u-boot -Tc 'ut dm phy_setup' Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-09phy: rcar: Split init and set_mode operationsMarek Vasut
The current init operation also sets the PHY into USB host mode. Split the mode configuration into set_mode callback instead and implement support for device and OTG modes as well. The OTG mode performs auto-detection and selects either host or device mode. In case the OTG mode is configured, submode field can be used to select full PHY (re)initialization or only mode auto-detection. The full (re)initialization is only necessary once, on start up. Since the OTG mode may enable IRQ generation in the PHY, disable that IRQ generation in the exit callback again. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-09phy: Extend generic_setup_phy() with PHY mode and submodeMarek Vasut
Extend generic_setup_phy() parameter list with PHY mode and submode and call generic_phy_set_mode() in generic_setup_phy(), so the generic PHY setup function can configure the PHY into correct mode before powering the PHY up. Update all call sites of generic_setup_phy() as well, all of which are USB host related, except for DM test which now behaves as a USB host test. Note that if the PHY driver does not implement the .set_mode callback, generic_phy_set_mode() call returns 0 and does not error out, so this should not break any existing systems. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-09mtd: spi: renesas: Add R-Car Gen4 DT compatibleMarek Vasut
Add device tree compatible string "renesas,rcar-gen4-rpc-if" to the driver to match on upstream RPC DT node in R-Car Gen4 DTs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>