summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
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-12Merge tag 'u-boot-rockchip-20240812' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip Please pull the updates for rockchip platform: - Add board support: RK3566: Radxa ROCK 3 Model C Radxa ZERO 3W/3E Xunlong Orange Pi 3B RK3568J: Radxa ROCK 3B RK3308B: Radxa ROCK S0 RK3588: Radxa ROCK 5 ITX FriendlyElec CM3588 NAS board - dw-mmc: allow 4-bit mode; - dts and config updates; CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/21997
2024-08-11usb: dwc3: support USB 3.1 controllersCaleb Connolly
The revision is different for these, add the additional check as in xhci-dwc3 core_init code. Equivalent upstream Linux patch: 690fb3718a70 ("usb: dwc3: Support Synopsys USB 3.1 IP") Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550 Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Marek Vasut <marex@denx.de>
2024-08-09Merge tag 'tpm-master-09082024' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tpm.git Back when the TPM subsystem was refactored tpm_tis_wait_init() ended up being called after tpm_tis_init() which initializes values the former needs. Since we added more TPM chipsets since then sitting on an i2c bus, this patch folds in tpm_tis_wait_init into tpm_tis_init and makes sure it's called in the right order regardless of the bus the TPM sits on.
2024-08-09i2c: imx_lpi2c: Support read transfers longer than 256 bytesFedor Ross
The TXFIFO register of LPI2C only has one byte length, and if the length of the data that needs to be read exceeds 256 bytes, it needs to be written to TXFIFO multiple times. Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
2024-08-09i2c: imx_lpi2c: Replace hard-coded bus speed value with bus->speed_hzFedor Ross
Instead of using the hard-coded bus speed value I2C_SPEED_STANDARD_RATE, use the actual configured bus speed. This way the bus speed doesn't change suddenly after calling the imx_lpi2c_probe_chip() function for example. Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
2024-08-09i2c: imx_lpi2c: Fix a typo in bus_i2c_receiveFedor Ross
Fix a typo in a debug message. It should be 'for' not 'fot' . Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
2024-08-09i2c: samsung: Support platforms other than EXYNOS4 and EXYNOS5David Virag
Newer Samsung SoCs (including newer Exynos, ExynosAuto, Google Tensor) still use these IPs, or slightly newer versions of it. Make these drivers available on these platforms by guarding EXYNOS4/EXYNOS5 specific code behind their configs, and using CCF for clocks on other platforms. Tested S3C I2C driver on Exynos7885. This along with extended clock driver should enable S3C I2C on Exynos850. Signed-off-by: David Virag <virag.david003@gmail.com> Tested-by: Henrik Grimler <henrik@grimler.se> Reviewed-by: Heiko Schocher <hs@denx.de>
2024-08-09i2c: samsung: Drop s3c24x0 specific code.David Virag
This has been dead code for many years now. Remove it. Signed-off-by: David Virag <virag.david003@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2024-08-09i2c: mux: Fix error path in i2c-arb-gpioMichal Simek
There is no reason to use goto and just call return. Better is to call return directly which is done for some if/else parts. Also make no sense to setup ret to -ETIMEDOUT and then to 0. Return timeout directly. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2024-08-09i2c: pca954x: Remove pointer to GDMichal Simek
There is no reason to have any pointer to GD that's why remove it. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2024-08-09dm: adc: Add SPL_ADC Kconfig symbol for use of ADC in SPLJonas Karlman
What model of Radxa ZERO 3W/3E board can be identified using ADC at runtime, add a Kconfig symbol to allow use of ADC in SPL. This will be used to identify board model in SPL to allow loading correct FIT configuration and FDT for U-Boot proper at SPL phase. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-08-09rockchip: io-domain: Add support for RK3308Jonas Karlman
Port the RK3308 part of the Rockchip IO Domain driver from linux. This differs from linux version in that vccio3 iodomain bit is enabled in the write ops instead of in an init ops as in linux, this way we can avoid keeping a full state of all supply that have been configured. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-08-09mmc: rockchip_dw_mmc: Allow 4-bit mode when 8-bit mode is supportedJonas Karlman
Hosts capable of 8-bit can also do 4 bits, fix use of 4-bit mode when 8-bit mode is supported. This fixes use of 1-bit mode with SD NAND on ROCK Pi S using the DT in v6.11-rc1 that chage to use 8-bit bus to also support eMMC. With this 4-bit mode is used with SD NAND and 8-bit mode with eMMC, same as in Linux kernel. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-08-09phy: rockchip: naneng-combphy: Introduce PHY-IDs to fix RK3588 muxingSebastian Kropatsch
Fix multiplex configuration for PCIe1L0 and PCIe1L1 in PCIESEL_CON for RK3588 to correctly select between Combo PHYs and PCIe3 PHY. Currently, the code incorrectly muxes both ports to Combo PHYs, interfering with PCIe3 PHY settings. Introduce PHY identifiers to identify the correct Combo PHY and set the necessary bits accordingly. This fix is adapted from the upstream Linux commit by Sebastian Reichel: d16d4002fea6 ("phy: rockchip: naneng-combphy: Fix mux on rk3588") Fixes: b37260bca1aa ("phy: rockchip: naneng-combphy: Use signal from comb PHY on RK3588") Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
2024-08-08Merge tag 'u-boot-nand-20240808' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash This series adds support for the UBI block device, which allows to read/write data block by block. The series was tested by Alexey Romanov on SPI NAND. The patches pass the pipeline CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/21933
2024-08-08spinand: bind UBI blockAlexey Romanov
UBI block is virtual block device, which is an abstraction over MTD layer. Therefore it is logical to use it in combination with MTD drivers. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08disk: support UBI partitionsAlexey Romanov
UBI partition is abstraction over UBI volumes. Can be used by UBI block device. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08drivers: introduce UBI block abstractionAlexey Romanov
UBI block is an virtual device, that runs on top of the MTD layer. The blocks are UBI volumes. Intended to be used in combination with other MTD drivers. Despite the fact that it, like mtdblock abstraction, it used with UCLASS_MTD, they can be used together on the system without conflicting. For example, using bcb command: # Trying to load bcb via mtdblock: $ bcb load mtd 0 mtd_partition_name # Trying to load bcb via UBI block: $ bcb load ubi 1 ubi_volume_name User always must attach UBI layer (for example, using ubi_part()) before using UBI block device. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08spinand: bind mtdblockAlexey Romanov
Bind SPI-NAND driver to MTD block driver. Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08drivers: introduce mtdblock abstractionAlexey Romanov
MTD block - abstraction over MTD subsystem, allowing to read and write in blocks using BLK UCLASS. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08disk: support MTD partitionsAlexey Romanov
Add new MTD partition driver, which can be useful with mtdblock driver combination. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-06Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
This updates the "old style" DTs to that of Linux v6.10, matching what OF_UPSTREAM is at now. Hopefully we won't need to do this (manually) anymore. Since this brings in the DT for a new board (Tanix TX1), also add the defconfig for that, which has just been waiting for that sync. There are three more fixes: two for the SPI clock setup, which avoids too high frequencies in some cases, and one fix to avoid a build warning with GCC 14 for the sunxi TOC0 part of the mkimage tool. The gitlab CI passed, and I tested the SPI flash on the OrangePi Zero 3 and also booted that into Linux.
2024-08-06Merge tag 'xilinx-for-v2024.10-rc2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx changes for v2024.10-rc2 amd/xilinx: - Enable CONFIG_MMC_SPEED_MODE_SET env: - support overriding spi dev from board code clk: - Add set_rate support for display clocks spi: - Describe is25lp01gg flash zynq: - Add support for 7z010_lr and 7z020_lr zynqmp: - Add support for zu1eg_lr - Enable NFS for Kria - DT changes - Cleanup firmware handling in board_init() versal-net: - Setup spi seq number based on boot device - dt-schema update for mini configurations versal2: - Disable uartlite driver - Add support for mini configurations - Enable NFS
2024-08-06tpm: call tpm_tis_wait_init() after tpm_tis_init()Lukas Funke
tpm_tis_wait_init() is using the 'chip->timeout_b' field which is initialized in tpm_tis_init(). However, the init-function is called *after* tpm_tis_wait_init() introducing an uninitalized field access. This commit switches both routines. Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> [Ilias removed unusged 'chip' definition in tpm_tis_spi_probe()] Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Fixes: a5c30c26b28 ("tpm: Use the new API on tpm2 spi driver") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-08-06spi: sunxi: fix clock divider calculation for max frequency settingMichael Walle
If the maximum frequency is requested, we still fall into the CDR2 handling. But there the minimal divider is 2. For the sun6i and sun8i we can do better with the CDR1 setting where the minimal divider is 1: SPI_CLK = MOD_CLK / 2 ^ cdr with cdr = 0 Thus, handle the div = 1 case specially. While at it, correct the comment above the calculation. Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2024-08-06spi: sunxi: fix CDR2 calculationMichael Walle
The CDR2 divider calculation always yield a frequency greater than the requested one. Use DIV_ROUND_UP() to keep the frequency equal or below the requested one. This way, we can also drop the "if div > 0" check because we know for a fact that div cannot be zero. FWIW, this aligns the CDR2 calculation with the linux driver. Suggested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2024-08-05Merge patch series "Bug-fixes for a few boards"Tom Rini
Simon Glass <sjg@chromium.org> says: This series includes fixes to get some rockchip and nvidia boards working again. It also drops the broken Beaglebone Black config and provides a devicetree fix for coral (x86).
2024-08-05rockchip: Avoid #ifdefs in RK3399 SPLSimon Glass
The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow. This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-05rockchip: Ensure memory size is available in RK3399 SPLSimon Glass
At present gd->ram_size is 0 in SPL, meaning that it is not possible to enable the cache. Correct this by always populating the RAM size correctly. This increases code size by about 500 bytes in SPL, since it must call the rather large rockchip_sdram_size() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-08-05soc: zynqmp: Add support for zu1eg_lr deviceMichal Simek
There is new chip coming which is using new _lr suffix that's why record it in the list to enable bitstream in bit format loading. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/12a939e2c88e82a9828852a8f7f33dfa14a6a4b8.1722351201.git.michal.simek@amd.com
2024-08-05mtd: spi-nor: ids: Add IS25LP01GG flash supportPrasad Kummari
Add support for ISSI 128MB flash IS25LP01GG. This part supports 4byte opcodes. It also supports dual and quad read. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20240617041841.1336632-1-prasad.kummari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-08-05clk: zynqmp: Add set_rate support for display clocksVenkatesh Yadav Abbarapu
If "assigned-clock-rates" property is included in the device tree, display driver probe is getting failed, as dp_video_ref till dp_stc_ref clocks are missing from set rate function, adding them to fix the probe failure. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20240711082939.29260-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-08-02cpu: imx: implement release_core callbackHou Zhiqiang
Release the secondary cores through the PSCI request. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-08-02cpu: imx: Add i.MX 8M series SoCsHou Zhiqiang
Add i.MX 8M Mini, Nano and Plus SoCs support. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-08-02cpu: imx: removed the tail '\n' of the CPU descriptionHou Zhiqiang
Return CPU description string without newline character in the end. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-08-02cpu: imx: fix the CPU type field widthHou Zhiqiang
Increase one more bit to cover all CPU types. Otherwise it shows wrong CPU info on some platforms, such as i.MX8M Plus: U-Boot 2024.04+g674440bc73e+p0 (Jun 06 2024 - 10:05:34 +0000) CPU: NXP i.MX8MM Rev1.1 A53 at 4154504685 MHz at 30C Model: NXP i.MX8MPlus LPDDR4 EVK board Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-08-02cpu: imx: fix the CPU frequency in cpu_imx_get_info()Hou Zhiqiang
The cpu_freq stores the current CPU frequency in Hz. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-02cpu: sandbox: implement release_core callbackHou Zhiqiang
Add empty release CPU core function for testing. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-02cpu: add release_core callbackHou Zhiqiang
Add a new callback release_core to the cpu_ops, which is used to release a CPU core to run baremetal or RTOS application on a SoC with multiple CPU cores. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-08-02clk: imx8m: register ARM A53 core clockHou Zhiqiang
Register ARM A53 core clock for i.MX 8M Mini, Nano and Plus, preparing for enabling the 'cpu' command, which depends on this to print CPU core frequency. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-08-01clk: clk-uclass: Print clk name in clk_enable/clk_disableMichael Trimarchi
Print clk name in clk_enable and clk_disable. Make sense to know what clock get disabled/enabled before a system crash or system hang. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-01clk: Fix error message in clk_get_bulkJan Kiszka
Fix a logical inversion of the printed text. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2024-08-01Merge patch series "clk: mediatek: add OPs to support OF_UPSTREAM"Tom Rini
Christian Marangi <ansuelsmth@gmail.com> says: This series doesn't currently change anything and it does add all the additional OPs to make support of OF_UPSTREAM. While converting the mt7681/7686/7688/7623/7622 it was notice lots of discrepancy between the downstream dtsi and the upstream one and the clock ID between downstream clock ID and upstream clock ID. Upstream reference clock by names and clock are handled by the CCF (Common Clock Framework). The same can't be used here as we would quickly reach the max space allocated before relocation. The current mediatek clock driver reference all the parents and clocks with offset from the clk ID related to the different tables. Discrepancy between clock ID and the order in the clocks table cause one clock referenced for another or even crash for trying to access a clock at an offset that doesn't exist. To handle this and permit use of OF_UPSTREAM, various measure and changes are done to the mediatek clock driver to support it. This series have all the generic clock changes. Once this is merged, series for each SoC will came that will just change files in their dedicated clock driver. This is to prevent massive patch and to permit to split series, one for each SoC. As said at the start, these changes doesn't cause regression and are just expansion to the current API. Current behaviour is saved in every possible way (aside from the first 2 patch that fixes latent bugs)
2024-08-01clk: mediatek: add support for APMIXED parent in infra MUXChristian Marangi
Add support for APMIXED parent in infra MUX. This is the case for mt7622 that reference APMIXED parents for the MUX1_SEL clock. We assume the second level parent is always APMIXED. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-01clk: mediatek: add support for GATEs for APMIXED OPsChristian Marangi
Add support for GATEs for APMIXED OPs. It's possible that some APMIXED have also gates on top of PLL. This is the case for mt7622. Add support for this. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-01clk: mediatek: implement MUX_FLAGS and MUX_MIXED_FLAGS macroChristian Marangi
Some simple MUX might require flags to specify the parent source. Implement MUX_FLAGS as a variant of the MUX macro that takes custom flags as last arg. Also implement MUX_MIXED_FLAGS for PARENT_MIXED implementation and MUX_MIXED with no additional flags. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-01clk: mediatek: add support for remapping clock IDChristian Marangi
Upstream kernel linux might have a different clock ID order in their <soc>-clk.h header. This is the case of some clock ID for mt7623 that upstream use the shared header clk-mt7601.h This header doesn't have a well distincted order and have factor or mux in the middle of the CLK ID list. This is problematic with the mtk clock driver that expect everything well organized in block and apply offset to reference the clk in the different array. To solve this problem, implement in the mtk_clk_tree an additional option .id_offs_map, an array where each CLK ID can be remapped to what the driver expect permitting to reorganize the clock following the expected logic of fixed, factor, mux and gates. Each clock function is updated to tranparently handle this by first converting the clk ID to the remapped one. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-01clk: mediatek: provide common clk init function for infrasysChristian Marangi
Provide common clk init function for infrasys that defaults to topckgen driver if clock-parent is not defined. This is the case for upstream DTSI that doesn't provide this entry. This is needed for infracfg driver that will make use of the unified gates + muxes implementation. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-01clk: mediatek: add support for gate clock to reference topckgen clockChristian Marangi
Add support for gate clock get_rate to reference topckgen clock for infracfg-ao implementation. In infracfg-ao implementation topckgen is on second level of parent with infracfg in the middle. To correctly detect this, check the driver of the dev parent and use the second level parent if it's not mtk_clk_topckgen. Due to all the dependency, parent tree must be filled before a gate is used, hence is safe to assume it will be there. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>