aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-12-18Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵WIP/18Dec2023-nextTom Rini1-7/+9
into next - VisionFive2: Enable CONFIG_SYSRESET - StarFive: Modify starfive timer driver - AMD/Xilinx: Add MicroBlaze V support - Unmatched: Migrate to text environment
2023-12-18Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spi ↵Tom Rini10-7/+209
into next - spi_nor_read_sfdp_dma_unsafe (Vaishnav) - w25q01/02 (Jim)
2023-12-18Merge tag 'v2024.01-rc5' into nextTom Rini14-11/+377
Prepare v2024.01-rc5
2023-12-18timer: starfive: Add Starfive timer supportKuan Lim Lee1-7/+9
Add timer driver in Starfive SoC. It is an timer that outside of CPU core and inside Starfive SoC. Signed-off-by: Kuan Lim Lee <kuanlim.lee@starfivetech.com> Signed-off-by: Wei Liang Lim <weiliang.lim@starfivetech.com> Changes for v2: - correct driver name, comment, variable Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-12-15Merge tag 'clk-2024.01-next' of ↵WIP/15Dec2023-nextTom Rini13-193/+264
https://source.denx.de/u-boot/custodians/u-boot-clk into next clock patches for u-boot/next The main thing in here is Igor's conversion of soc_clk_dump to a clk_ops member. There's also a write-protect feature for nuvoton clocks. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-12-15test: dm: clk_ccf: test ccf_clk_opsYang Xiwen2-0/+2
Assign ccf_clk_ops to .ops of clk_ccf driver so that it can act as an clk provider. Also add "#clock-cells=<1>" to its device tree node. Add "i2c_root" to clk_test in the device tree and driver for testing. Get "i2c_root" clock in CCF unit tests and add tests for it. Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231111-enable_count-v3-2-08a821892fa9@outlook.com
2023-12-15clk: nuvoton: add read only feature for clk driverJim Liu3-9/+19
Add a flag to set ahb/apb/fiu/spi clock divider as read-only The spi clock setting is related to booting flash, it is setup by early bootloader. It just protects the clock source and can't modify it in uboot. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231114090004.3746024-1-JJLIU0@nuvoton.com
2023-12-15clk: treewide: switch to clock dump from clk_opsIgor Prusov10-105/+108
Switch to using new dump operation in clock provider drivers instead of overriding soc_clk_dump. Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-8-ivprusov@sberdevices.ru
2023-12-15clk: amlogic: Move driver and ops structsIgor Prusov1-17/+17
Move driver and ops structs to avoid forward declaration after switching to dump in clk_ops. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-5-ivprusov@sberdevices.ru
2023-12-15clk: k210: Move soc_clk_dump functionIgor Prusov1-46/+46
Move clock dump function to avoid forward declaration after switching to dump in clk_ops. Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-4-ivprusov@sberdevices.ru
2023-12-15clk: ast2600: Move soc_clk_dump functionIgor Prusov1-35/+35
Move clock dump function to avoid forward declaration after switching to dump in clk_ops. Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-3-ivprusov@sberdevices.ru
2023-12-15clk: zynq: Move soc_clk_dump to Zynq clock driverIgor Prusov1-0/+58
Move clock dump function in preparation for switching to dump function in clk_ops. Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-2-ivprusov@sberdevices.ru
2023-12-15clk: Check that composite clock's div has set_rate()Igor Prusov1-1/+1
It's possible for composite clocks to have a divider that does not implement set_rate() operation. For example, sandbox_clk_composite() registers composite clock with a divider that only has get_rate(). Currently clk_composite_set_rate() only checks thate rate_ops are present, so for sandbox it will cause NULL dereference during clk_set_rate(). This patch adds rate_ops->set_rate check tp clk_composite_set_rate(). Signed-off-by: Igor Prusov <ivprusov@salutedevices.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231205232334.2931-2-ivprusov@salutedevices.com
2023-12-15clk: get correct ops for clk_enable() and clk_disable()Yang Xiwen1-0/+2
assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations are called on clocks. This fixes the incorrect enable_count issue as described in [1]. [1]: https://lore.kernel.org/all/SEZPR06MB695927A6DEEEF8489A06897396A7A@SEZPR06MB6959.apcprd06.prod.outlook.com/ Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231111-enable_count-v2-2-20e3728600b5@outlook.com
2023-12-15clk: check parent_name in clk_register to avoid confusing log_error() outputYang Xiwen1-8/+10
For some gate clocks and fixed clocks without a parent, calling clk_register will print an useless error message indicating that parent is missing. Fix that by gaurding log_xxx() with an if-statement. Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Suggested-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230807-clk-fix-v2-1-0b688e21fb4e@outlook.com
2023-12-15board: stm32f469-disco: add support to displayDario Binacchi1-0/+31
Add support to Orise Tech OTM8009A display on stm32f469-disco board. It was necessary to retrieve the framebuffer address from the device tree because the address returned by the video-uclass driver pointed to a memory area that was not usable. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-12-15clk: stm32f: fix setting of LCD clockDario Binacchi1-12/+14
Set pllsaidivr only if the PLLSAIR output frequency is an exact multiple of the pixel clock rate. Otherwise, we search through all combinations of pllsaidivr * pllsair and use the one which gives the rate closest to requested one. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC clock") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-12-15clk: stm32f: fix setting of division factor for LCD_CLKDario Binacchi1-1/+2
The value to be written to the register must be appropriately shifted, as is correctly done in other parts of the code. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC clock") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-12-14ddr: imx: Add 3600 MTps rate supportMarek Vasut1-0/+4
Add PLL settings for DDR 3600 MTps . This is very similar to 3200 MTps PLL setting, except the divider is not 9 but 8 . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-12-14ddr: imx: Handle 3734 in addition to 3733 and 3732 MTps ratesMarek Vasut1-0/+1
The new MX8M DDR tool 3.31 now generates a programming file which uses data rate 3734 instead of 3733 or 3732 . Handle another rounding option . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-12-14Merge tag 'xilinx-for-v2024.04-rc1' of ↵WIP/14Dec2023-nextTom Rini6-51/+245
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2024.04-rc1 zynqmp: - Introduce Kria specific defconfig - Calculate SPI image location based on boot offset - DT updates zynqmp-clk: - Fix topsw_lsbus_clock for DP axi-enet: - Support older DT binding mailbox: - Add support for multiple mailboxes pcie-xilinx: - Covert driver to newer interface - Enable MMIO region zynq: - dfu updates - Enable capsule update for Antminer S9 - DT updates xilinx_spi: - Add new xfer callback and support runtime fifo depth discovery
2023-12-14spi: cadence-quadspi: Fix error message on stuck busy stateJan Kiszka1-2/+1
We are not iterating CQSPI_REG_RETRY, we are waiting 'timeout' ms, since day 1. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-12-14mtd: spi-nor-ids: add support for xtx XT55Q02GBruce Suen1-0/+2
Add support for XTX XT55Q02G(1.8V,2Gbit). Signed-off-by: Bruce Suen <bruce_suen@163.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-12-14mtd: spinand: add support for ESMT F50x1G41LBIgor Prusov3-1/+140
Adaptation of Linux commit d74c36480a67 This patch adds support for ESMT F50L1G41LB and F50D1G41LB. It seems that ESMT likes to use random JEDEC ID from other vendors. Their 1G chips uses 0xc8 from GigaDevice and 2G/4G chips uses 0x2c from Micron. For this reason, the ESMT entry is named esmt_c8 with explicit JEDEC ID in variable name. Datasheets: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50L1G41LB(2M).pdf https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50D1G41LB(2M).pdf Signed-off-by: Igor Prusov <ivprusov@salutedevices.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Signed-off-by: Martin Kurbanov <mmkurbanov@sberdevices.ru> Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> Tested-by: Martin Kurbanov <mmkurbanov@sberdevices.ru> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-12-14mtd: spi-nor-core: Implement spi_nor_read_sfdp_dma_unsafe() for sfdp parseVaishnav Achath1-2/+32
During SFDP header parse and BFPT parse, structures in stack are used to perform spi_nor_read_sfdp() which expects a dma-safe buffer. This commit introduces spi_nor_read_sfdp_dma_unsafe() to wrap spi_nor_read_sfdp() using a kmalloc'ed bounce buffer which is the same implementation in Linux (drivers/mtd/spi-nor/sfdp.c). Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-12-14Merge tag 'u-boot-imx-next-20231214' of ↵Tom Rini6-6/+58
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next - Add TPM support for venice boards - Add networking support for imx93-evk - Enable TCP, IPv6, wget for DHCOM and Data Modul boards - Enable fastboot support for Toradex boards - Allow pico-imx7d to boot from SD - Enable fastboot for beacon imx8m beacon boards, disabled SYS_CONSOLE_IS_IN_ENV - Fix mxsboot to prevent NAND blocks being reported as bad - Add imx8mm PWM clock support - Several devicetree syncs with the kernel - Add support for i.MX8MP Polyhex Debix Model A SBC - Reworked ddr_load_train_firmware() to get a 50ms boot time improvement
2023-12-13fdt: Check for a valid fdt in oftree_ensure()Simon Glass1-0/+5
Check the header before starting to use it, since this could provide very confusing later, when ofnode calls start to fail. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13acpi: move acpi_get_rsdp_addr() to acpi/acpi_table.hHeinrich Schuchardt1-0/+1
Function acpi_get_rsdp_addr() is needed on all architectures which write ACPI tables. Move the definition from the x86 include to an architecture independent one. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13Merge patch series "bootm: Refactoring to reduce reliance on CMDLINE (part A)"Tom Rini1-3/+3
To quote the author: It would be useful to be able to boot an OS when CONFIG_CMDLINE is disabled. This could allow reduced code size. Standard boot provides a way to handle programmatic boot, without scripts, so such a feature is possible. The main impediment is the inability to use the booting features of U-Boot without a command line. So the solution is to avoid passing command arguments and the like to code in boot/ A similar process has taken place with filesystems, for example, where we have (somewhat) separate Kconfig options for the filesystem commands and the filesystems themselves. This series starts the process of refactoring the bootm logic so that it can be called from standard boot without using the command line. Mostly it removes the use of argc, argv and cmdtbl from the internal logic. Some limited tidy-up is included, but this is kept to smaller patches, rather than trying to remove all #ifdefs etc. Some function comments are added, however. A simple programmatic boot is provided as a starting point. This work will likely take many series, so this is just the start. Size growth with this series for firefly-rk3288 (Thumb2) is: arm: (for 1/1 boards) all +23.0 rodata -49.0 text +72.0 This should be removed by: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/11 but it is not included in this series as it is already large enough. No functional change is intended in this series. Changes in v3: - Add a panic if programmatic boot fails - Drop RFC tag Changes in v2: - Add new patch to adjust position of unmap_sysmem() in boot_get_kernel() - Add new patch to obtain command arguments - Fix 'boot_find_os' typo - Pass in the command name - Use the command table to provide the command name, instead of "bootm"
2023-12-13command: Introduce functions to obtain command argumentsSimon Glass1-3/+3
Add some functions which provide an argument to a command, or NULL if the argument does not exist. Use the same numbering as argv[] since it seems less confusing than the previous idea. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com>
2023-12-13Merge patch series "some LED patches"Tom Rini6-28/+609
To quote the author: I wanted to add support for ti,lp5562, and found an old submission from Doug. While trying to modify that to work in current U-Boot, I found a problem with the "move label handling to core" patches. Patch 1 is a prerequisite for the ti,lp5562 driver, which turned out to be needed by Christian as well. Patch 2 is an attempt at (quick-)fixing the mentioned "move label handling to core" problem. The real fix consists of changing remaining drivers to not bind the same driver to the top node as to the child nodes, but I can't test those other drivers. Patch 3 introduces a helper which should allow removing some boilerplate in most individual drivers, and 4,5 apply that in the gpio and pwm drivers. Converting remaining drivers is trivial, but left out for now. Finally patch 6 is the reworked lp5562 driver. While I've changed it to match existing DT bindings (with the goal of making it work with our .dts that is known to work with the linux driver), most of the logic is unchanged from Doug's original patch, so he is still listed as author. Changes in v2: Interchange order of patches 1 and 2, add a few R-bs, and try to trim down the commit message in patch 2.
2023-12-13led: add TI LP5562 LED driverDoug Zobel3-0/+586
Driver for the TI LP5562 4 channel LED controller. Supports independent on/off control of all 4 channels. Supports LED_BLINK on 3 independent channels: blue/green/red. The white channel can blink, but shares the blue channel blink rate. Heavily based on patch originally from Doug Zobel [1]. I have modified it so it matches the DT bindings in the linux tree, and also follows the linux driver implementation more closely. This should address Tom's concerns, and also matches my goal of making the U-Boot driver work with our existing .dts which is known to work in linux. As our boards only have the R,G,B outputs connected, I have not actually tested how the white channel behaves, but the R,G,B work exactly as expected. [1] https://lore.kernel.org/u-boot/1547150757-1561-1-git-send-email-douglas.zobel@climate.com/ Cc: Doug Zobel <douglas.zobel@climate.com> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-12-13led: led_pwm: use led_bind_generic() helperRasmus Villemoes1-13/+1
Use the helper led_bind_generic() to reduce code duplication. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-12-13led: led_gpio: use led_bind_generic() helperRasmus Villemoes1-14/+1
Use the helper led_bind_generic() to reduce code duplication. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-12-13led: introduce led_bind_generic()Rasmus Villemoes1-0/+18
All existing drivers in drivers/led/ contain a .bind method that does exactly the same thing, with just the actual driver name differing. Create a helper so all those individual methods can be changed to one-liners. Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-12-13led-uclass: do not create fallback label for top-level nodeRasmus Villemoes1-1/+1
Many existing drivers, and led-uclass itself, rely on uc_plat->label being NULL for the device representing the top node, as opposed to the child nodes representing individual LEDs. This means that the drivers whose .probe methods rely on this were broken by commit 83c63f0d1185 ("led: Move OF "label" property parsing to core"), and also that the top node wrongly shows up with 'led list'. Binding the same driver to the top node as to the individual child nodes is arguably wrong, and the approach of using a UCLASS_NOP driver for the top node is probably better - this has for example been done in commit 01074697801b ("led: gpio: Use NOP uclass driver for top-level node") and commit 910b01c27c04 ("drivers: led: bcm6753: do not use null label to find the top") Until remaining affected drivers are fixed, we can use a heuristic that only sets the label to the fallback value derived from the node name if the node does not have a "compatible" property - i.e., if it has been bound to the LED driver explicitly via device_bind_driver_to_node(). This is similar to what commit e3aa76644c2a ("led: gpio: Check device compatible string to determine the top level node") did for gpio_led, but that fix was then supplanted by commit 01074697801b ("led: gpio: Use NOP uclass driver for top-level node") Fixes: 83c63f0d1185 ("led: Move OF "label" property parsing to core") Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-12-13led-uclass: honour ->label field populated by driver's own .bindRasmus Villemoes1-1/+3
If the driver's own .bind method has populated uc_plat->label, don't override that. This is necessary for an upcoming driver for ti,lp5562, where the DT binding unfortunately says to use "chan-name" and not "label". Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-12-13clk: zynqmp: enable topsw_lsbus clockVenkatesh Yadav Abbarapu1-0/+1
Display port is using topsw_lsbus clock, it is failing while enabling the clock, so enable the topsw_lsbus clock. Signed-off-by: Sreekanth Sunnam <sreekanth.sunnam@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20231204084515.9488-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13drivers: misc: Kconfig: Fix SPL_FS_LOADER promptAlexander Gendin1-1/+1
Both FS_LOADER and SPL_FS_LOADER have the same menu prompt. To avoid confusion, make prompt for SPL_FS_LOADER different. Signed-off-by: Alexander Gendin <agendin@matrox.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13clk: imx8mn: add pwm clocksNicolas Heemeryck1-0/+30
Based on Linux kernel 6.7-rc4, add necessary clocks for the PWM controllers. Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@devialet.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-12-13phy: phy-imx8mq-usb: Remove .exit operationFabio Estevam1-6/+0
Currently, when running "ums 0 mmc 2" and breaking it via CTRL + C, the following message is seen: u-boot=> ums 0 mmc 1 UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x1dacc00 CTRL+C - Operation aborted clk usb_phy_root_clk already disabled The USB PHY clock is disabled twice: first it gets disabled inside imx8mq_usb_phy_power_off(), then it is disabled again inside imx8mq_usb_phy_exit(). Let the USB PHY clock be disabled only once inside imx8mq_usb_phy_power_off() by removing the .exit operation. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-12-13net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CGSébastien Szymanski1-0/+14
Add support for the RTL8211F(D)(I)-VD-CG PHY present on the i.MX93 EVK board. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2023-12-13net: dwc_eth_qos: add i.MX93 supportSébastien Szymanski2-0/+7
Add support for DWC EQoS MAC on i.MX93. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-12-13ddr: imx: Save the FW loading if it hasn't changedShawn Guo1-0/+7
Function ddr_load_train_firmware() is called 4 times in a loop by ddr_cfg_phy(). The first 3 calls are all '1D' type and just loading the same FWs. Let's add a type check and save 2 of them. This helps to reduce DDRPHY training time from 269 ms down to 212 ms, and thus speed up boot time ~ 50 ms. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-12-13mailbox: zynqmp: support mulitple mboxes via device-treeTanmay Shah2-13/+74
As of now only one mailbox agent is supported by mailbox driver. On zynqmp platform there are about 7 mailbox agents which can communicate over same IPI channel to U-Boot. This patch series introduces new "zynqmp_ipi_dest" driver which adds one to multi-channel mailbox support. Following format in device-tree is expected as per latest bindings: zynqmp-ipi { compatible = "xlnx,zynqmp-ipi-mailbox"; mbox_1: mailbox@1 { /* New compatible for child node */ compatible = "xlnx,zynqmp-ipi-dest-mailbox"; ... }; ... mbox_n: mailbox@n { compatible = "xlnx,zynqmp-ipi-dest-mailbox"; ... } }; Then mailbox client uses child mailbox node as following: ipi-dest-1 { ... mboxes = <mbox_1 0>, <mbox_1 1>; mbox-names = "tx", "rx"; ... }; New "zynqmp_ipi_dest" driver is for devices with "xlnx,zynqmp-ipi-dest-mailbox" compatible string. This driver will take care of mailbox send recv ops and it replaces previous "zynqmp_ipi" driver. Now "zynqmp_ipi" driver simply binds each child device with "zynqmp_ipi_dest" driver. However, its important to maintain backward comaptibility with previous bindings where child node does not have compatible string. In such case, new driver isn't probed by U-Boot during boot and system fails to boot. To resolve this issue firmware-zynqmp.c driver probes all the IPI parent node driver which binds each child node device with "zynqmp_ipi_dest" driver. This makes sure corresponding child driver will be probed when requested using mbox_get_by_name or mbox_get_by_idx framework calls. This way multiple mailbox agents are supported in device-tree without breaking previous binding support. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Link: https://lore.kernel.org/r/20231204215620.63334-4-tanmay.shah@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13mailbox: add el3 support only for zynqmp platformTanmay Shah1-0/+10
If U-Boot is running in Exception Level 3 then use hardcode register values for mailbox message passing with PMU. This is only supported for zynqmp platform. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Link: https://lore.kernel.org/r/20231204215620.63334-3-tanmay.shah@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13mailbox: zynqmp: support smc calls to TF-ATanmay Shah1-2/+86
Use SMC calls to TF-A to operate IPI for execution level below 3. For EL3 use hardcode IPI registers as TF-A isn't available in EL3. Hence, in EL3 remote and local IPI ids retrieved using xlnx,ipi-id property are unused. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Link: https://lore.kernel.org/r/20231204215620.63334-2-tanmay.shah@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13drivers: xilinx_spi: Probe fifo_depth at runtimeMayuresh Chitale1-0/+23
If the fifo-size DT parameter is not provided then probe the controller's fifo depth at runtime. This is ported from a patch in the Linux Xilinx SPI driver. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/1422029330-10971-5-git-send-email-ricardo.ribalda@gmail.com Tested-by: Love Kumar <love.kumar@amd.com> Link: https://lore.kernel.org/r/20231116164336.140171-4-mchitale@ventanamicro.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13drivers: xilinx_spi: Add xfer callbackMayuresh Chitale1-0/+13
Add the xfer callback which is used by the MMC_SPI driver and generally by the dm_spi_xfer callback. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Tested-by: Love Kumar <love.kumar@amd.com> Link: https://lore.kernel.org/r/20231116164336.140171-3-mchitale@ventanamicro.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13drivers: xilinx_spi: Use udevice in start_tranferMayuresh Chitale1-16/+16
Modify start_transfer and related functions to take a udevice parameter as input instead of spi_slave. This is needed so that start_transfer can be used directly via the xfer callback. Also fix a compiler warning. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Tested-by: Love Kumar <love.kumar@amd.com> Link: https://lore.kernel.org/r/20231116164336.140171-2-mchitale@ventanamicro.com Signed-off-by: Michal Simek <michal.simek@amd.com>