summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-08-28mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()'Arseniy Krasnov
Move call 'meson_nfc_cmd_seed()' and check for 'NAND_NEED_SCRAMBLING' to 'meson_nfc_cmd_access()', thus removing code duplication. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/r/20240826131710.29746-3-avkrasnov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-08-28mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flagArseniy Krasnov
Based on Linux kernel: commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/r/20240826131710.29746-2-avkrasnov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-08-27gpio: Add G7 Aspeed gpio controller driverBilly Tsai
In the 7th generation of the SoC from Aspeed, the control logic of the GPIO controller has been updated to support per-pin control. Each pin now has its own 32-bit register, allowing for individual control of the pin’s value, direction, interrupt type, and other settings. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-08-27dm: core: Make SPL_DM_SEQ_ALIAS select SPL_STRTOGaskell, Oliver
Enabling CONFIG_DM_SEQ_ALIAS enables code which relies on `trailing_strtol()` - which is only linked in SPL when CONFIG_SPL_STRTO is enabled. CONFIG_SPL_STRTO is not enabled by default - to ensure this function is available in SPL, CONFIG_SPL_DM_SEQ_ALIAS should select CONFIG_SPL_STRTO. Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27Merge patch series "dm: core: Avoid multiple calls to fdt_parent_offset()"Tom Rini
Jonas Karlman <jonas@kwiboo.se> says: Use of fdt_parent_offset() is very expensive as detailed by the function documentation: NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset, *twice*. This series remove multiple calls to fdt_parent_offset() or ofnode_get_parent() when instead a single call can be made and the returned value can be reused. This series help reduce boot time by around: - ~137ms on a Radxa ROCK Pi 4 (RK3399) - ~33ms on a Radxa ZERO 3W (RK3566)
2024-08-27timer: npcm: Change counter sourceJim Liu
The counter value read from TDR register may not be correct. Read SECCNT and CNTR25M instead to get the correct timestamp. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2024-08-27dm: core: regmap: Avoid multiple calls to ofnode_get_parent()Jonas Karlman
Until a live tree is used in U-Boot proper after relocation, use of ofnode_get_parent() will trigger a call to the very expensive fdt_parent_offset(), as detailed by the function documentation: NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset, *twice*. Re-use the returned value from a single call instead of having to make multiple calls for same node. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27dm: core: ofnode: Avoid multiple calls to ofnode_get_parent()Jonas Karlman
Until a live tree is used in U-Boot proper after relocation, use of ofnode_get_parent() will trigger a call to the very expensive fdt_parent_offset() as detailed by the function documentation: NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset, *twice*. Re-use the returned value from a single call instead of having to make multiple calls for same node. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27dm: core: fdtaddr: Avoid multiple calls to fdt_parent_offset()Jonas Karlman
Use of fdt_parent_offset() is very expensive as detailed by the function documentation: NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset, *twice*. Re-use the returned value from a single call instead of having to make multiple calls for same nodeoffset. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27gpio: npcm: Add SGPIO support for Nuvoton NPCM SoCsJim Liu
Add Nuvoton BMC NPCM7xx/NPCM8xx sgpio driver. BMC can use this driver to increase 64 GPI pins and 64 GPO pins to use. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2024-08-27dm: core: Show device sequence instead in dm_dump_tree()Zixun LI
Currently uclass index is shown in DM tree dump which ignores alias sequence numbering. The result could be confusing since these 2 numbers could be different. Show device sequence number instead as it's more meaningful. Also update documentation to use sequence number. Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27mtd: nand: raw: omap_gpmc: Check return value of gpmc_nand_initVignesh Raghavendra
If the function is called with no NAND device attached, then this function can return error value, proceeding further ignoring the same can cause system crash. This is seen when "mtd list" is run with no NAND addon cards connected. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Acked-by: Roger Quadros <rogerq@kernel.org>
2024-08-27sandbox: Fix pinmux warnings with non-test devicetreesSean Anderson
The sandbox pinmux driver is used in the non-test devicetree as well as the test one. I didn't realize this when I modified the driver for tests, and so broke the regular use case (which only resulted in warnings). First, making the pinmux and the UART group available pre-relocation to avoid ENODEV errors. Then, convert the pin groups and functions to the new style, adding onewire group as well. Fixes: 7f0f1806e3a ("test: pinmux: Add test for pin muxing") Closes: https://source.denx.de/u-boot/u-boot/-/issues/2 Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27ata: sata_rescan must scan for block devicesHeinrich Schuchardt
A system may have multiple SATA controller. Removing the controller with the lowest sequence number before probing all SATA controllers makes no sense. In sata_rescan we remove all block devices which are children of SATA controllers. We also have to remove the bootdev devices as they will be created when scanning for block devices. After probing all SATA controllers we must scan for block devices otherwise we end up without any SATA block device. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-27pci: mediatek: add support for upstream split PCIe nodeChristian Marangi
Add support for upstream linux split PCIe node. Upstream linux have an alternative way to declare PCIe nodes that splits them in dedicated nodes for each line instead of putting them all in one node. Detect this by checking if the mediatek,generic-pciecfg node is passed as it's used to reference the common address for all the PCIe lines. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-27remoteproc: uclass: Modify uc_pdata->name to use combination of device name ↵MD Danish Anwar
and device's parent name uc_pdata->name is populated from device tree property "remoteproc-name". For those devcices that don't set "remoteproc-name", uc_pdata->name falls back to dev->name. If two devices have same name, this will result into uc_pdata->name not being unique and rproc_init() will fail. Fix this by using combination of dev->name and dev->parent->name instead of using just the dev->name to populate uc_pdata->name. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Andrew Davis <afd@ti.com>
2024-08-27ata: dwc_ahsata: create boot deviceHeinrich Schuchardt
For each block device we must create a sibling boot device. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-08-26video: Avoid setting global_data fb_base in video setupSimon Glass
This field is not used, so don't set it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26video: Avoid setting global_data fb_base from SPL handoffSimon Glass
This field is not used, so don't set it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26zynqmp: Avoid setting the framebuffer addressSimon Glass
This is handled by driver model so this driver should not be setting the framebuffer address. Drop the assignment. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26global_data: Drop spl_handoffSimon Glass
Provide a function to locate this information, rather than doing it automatically on startup, to save space in global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26video: mxs: Avoid setting global_data fb_baseSimon Glass
This is not used, so don't set it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26video: mxc: Avoid setting global_data fb_baseSimon Glass
This is not used, so don't set it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26video: Add a function to obtain the framebuffer addressSimon Glass
Add a new function which returns the framebuffer address of the first video device. This will allow the global_data field top be dropped. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26global_data: Move pci_clk to m68k and powerpcSimon Glass
Only m68k and powerpc use this field, so move it to the arch-specific info, to reduce the size for other archs. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-23spl: Create a function to init spl_load_infoSimon Glass
Rather than having every caller set this up individually, create a common init function. This allows new fields to be added without the risk of them being left uninited. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-23mmc: Use logging instead of pr_err()Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code. The CONFIG_LOGF_FUNC option can be used to enable the function name. Update 'enhanced size' to use hex since this is the U-Boot default and more natural for the large numbers involved. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-08-23mmc: Use logging instead of printf()Simon Glass
The code makes quite a few uses of __func__ which puts the function name into the resulting SPL image. Use the log subsystem instead, to reduce size. The CONFIG_LOGF_FUNC option can be used to enable the function name. Use lower-case hex for the status output in sdhci_transfer_data(), to match sdhci_send_command() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-08-22Merge branch 'master' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-samsung into next
2024-08-22usb: gadget: ux500: Do not redefine ops if CONFIG_USB_MUSB_HOST setMarek Vasut
In case CONFIG_USB_MUSB_HOST is set, the ux500_gadget_ops get overridden to musb_usb_ops . Simply set the ops one way or the other depending on whether CONFIG_USB_MUSB_HOST is set or not. Fixes: ac4bf5d48a9e ("usb: gadget: ux500: Convert interrupt handling to usb_gadget_generic_ops") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240818200425.89045-1-marek.vasut+renesas@mailbox.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-20Merge tag 'u-boot-dfu-next-20240820' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-next-20240820 - Migrate Atmel usb gadget to DM_USB_GADGET - More small cleanups/improvements on the atmel UDC driver - Change udc uclass name from "usb" -> "usb_gadget"
2024-08-20usb: gadget: udc: Fix duplicate uclass nameZixun LI
Currently both USB host uclass and USB gadget uclass are using the same name "usb" which break uclass functions like uclass_get_by_name(). Rename the uclass to "usb_gadget" to fix, also makes bind/unbind by class index (or sequence) working. This breaks the capacity of using "usb" as DT alias sequence numbering which needs a fix afterwards. Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/all/20240802092820.917450-1-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-19Merge tag 'v2024.10-rc3' into nextTom Rini
Prepare v2024.10-rc3
2024-08-19Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"Tom Rini
Christian Marangi <ansuelsmth@gmail.com> says: These are all the required patches to migrate clk and correctly support OF_UPSTREAM. This will align the clk index to upstream to support the same clk implementation with downstream and upstream DTS.
2024-08-19clk: mediatek: mt7622: add missing clock PERIBUS_SEL clockChristian Marangi
Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also convert pericfg to mux + gate implementation as now we have also mux on top of gates. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock PERI_UART4_PDChristian Marangi
Add missing clock PERI_UART4_PD for peri clock gates. This is needed to match upstream linux clk ID in preparation for OF_UPSTREAM. Also convert infracfg to mux + gate implementation as now we have mux on top of gates. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock MUX1_SELChristian Marangi
Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to match the upstream clk ID order in preparation for OF_UPSTREAM. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock define for MAIN_CORE_ENChristian Marangi
Add missing clock for MAIN_CORE_EN. This is a special clock as it's a gate for the APMIXED clocks required as a parent for CPU clocks. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: move INFRA_TRNG to the bottomChristian Marangi
Move INFRA_TRNG clock to the bottom of the clk ID to match upstream linux order. This is in preparation of OF_UPSTREAM. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parentsChristian Marangi
Fix broken peri_cgs clock with XTAL parents as they have wrong definition of the parent type. Correctly fix them and use CLK_PARENT_XTAL for them. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19Merge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"Tom Rini
Christian Marangi <ansuelsmth@gmail.com> says: These are all the required patches to migrate clk and correctly support OF_UPSTREAM. This will align the clk index to upstream to support the same clk implementation with downstream and upstream DTS.
2024-08-19clk: mediatek: mt7986: rename CK to CLKChristian Marangi
Rename each entry from CK to CLK to match the include in upstream kernel linux. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2024-08-19clk: mediatek: mt7986: convert to unified infracfg gates + muxesChristian Marangi
Convert to infracfg gates + muxes implementation now that it's supported. Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: replace infracfg ID with upstream linuxChristian Marangi
Replace infracfg clk ID with upstream linux version. The same format is used here with the factor first, then mux and then gates. To correctly reference the gates in clk_gate function, define the gates_offs value in clk_tree now that they are at an offset from mux and factor. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the listChristian Marangi
Move INFRA_TRNG_CK to the bottom of the list to have a 1:1 match with upstream linux clock ID. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not usedChristian Marangi
Comment out CK_TOP_A_TUNER as not used and not defined in upstream kernel linux. This is to permit support of OF_UPSTREAM and have a 1:1 match with upstream linux clock ID. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: drop 1/1 spurious factor for topckgenChristian Marangi
Now that we can have advanced parent handling for mux, we can drop spurious topckgen 1/1 factor. This is in preparation to make the clk ID match the ID in upstream include for mt7986. Drop the factor entry from mt7986-clk.h and reference to them in mt7981.dtsi. Muxes and gates are updated to reference the apmixed clk following how it's done in upstream kernel linux. Add relevant clk type flag in clk_tree for apmixed. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: reorder TOPCKGEN factor IDChristian Marangi
Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is to match how it's done in upstream kernel linux and in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream namingChristian Marangi
Rename TOPCKGEN factor clock to upstream neaming. Upstream kernel linux reference the factor clock for apmixedpll with the "pll" suffix. Align the naming to the upstream naming format in preparation for OF_UPSTREAM support. Also rename rtc clock to drop the CB_ as upstream doesn't have that. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: fix typo for infra_i2c0_ckChristian Marangi
Fix a typo for infra_i2c0_ck where 0 was misspelled as O. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>