summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-04-11pinctrl: qcom: handle reserved rangesCaleb Connolly
Some Qualcomm boards feature reserved ranges of pins which are protected by firmware. Attempting to read or write any registers associated with these pins results the board resetting. Add support for parsing these ranges from devicetree and ensure that the pinctrl and GPIO drivers don't try to interact with these pins. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250410-topic-sm8x50-pinctrl-reserved-ranges-v2-1-654488392b9a@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11button: make button_get_by_label() case insensitiveCaleb Connolly
This function is already doing a fuzzy match, since there are no guarantees that a given label is unique. Ignoring case makes it much easier to catch "Volume down" or "Volume Down" in board-agnostic code. Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-6-f52e57d3b8c6@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11button: qcom-pmic: prettify and standardise button labelsCaleb Connolly
Boards using gpio-keys for volume buttons label them "Volume Down", let's match that here, and make the power button nicer too. This simplifies configuring button_cmds in a board-agnostic way. Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-5-f52e57d3b8c6@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11drivers: pinctrl: Add Qualcomm SDM630/660 TLMM driverAlexey Minnekhanov
Add support for TLMM pin controller block (Top Level Mode Multiplexer) on SDM630/660 SoCs, with support for special pins. Correct pin configuration is required for working debug UART and eMMC/SD cards. SDM630 and SDM660 TLMM blocks are the same. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250331155531.3638165-1-alexeymin@postmarketos.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11gpio: msm: return correct value return for special output pinsNeil Armstrong
When a special pin is output only, the current code would return 0, but if the pin is output only we can get the output value. Try to return the output value and in all the other cases return an error instead of 0. Fixes: f9bb539460d ("gpio: msm: add support for special pins") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-2-a1148a02bb16@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11gpio: msm: fix get_function return for special pinsNeil Armstrong
The get_function callback wrongly returns 0 for special pins, return the appropriate pin function by probing into the special pins data fields to find if the pin is gpio capable. Fixes: f9bb539460d ("gpio: msm: add support for special pins") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-1-a1148a02bb16@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10phy: phy-qcom-qusb2: Fix USB PHY power on sequenceSumit Garg
Recent addition of support for SDM660 inadvertently broke USB PHY power on sequence on RB1/RB2 and others with following error: starting USB... Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0 qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16. Can't power on PHY0 probe failed, error -16 No USB controllers found The root cause was the addition of flag se_clk_scheme_default which was configured correctly for SDM660 but incorrect for all other supported SoC. Fix that by properly assignment as per upstream Linux driver. Fixes: 475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy") Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Reviewed-by: Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250410080027.208674-3-sumit.garg@kernel.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk: stub: add qcom,glink-smd-rpmJorge Ramirez-Ortiz
Add support for the resource power manager clocks over SMD/GLINK to be stubbed. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250407175617.3494506-4-jorge.ramirez@oss.qualcomm.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/qcom: apq8096: fix the sdhci clockJorge Ramirez-Ortiz
Select the right clock for sdhci. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250407175617.3494506-3-jorge.ramirez@oss.qualcomm.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/qcom: apq8096: fix set rate for the uart clockJorge Ramirez-Ortiz
The function should return a valid rate. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Link: https://lore.kernel.org/r/20250407175617.3494506-2-jorge.ramirez@oss.qualcomm.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10spmi: msm: correctly handle multiple mapping entriesNeil Armstrong
On v5 & v7 controllers, multiple mapping for different Execution Environment exists, if the mapping owner is for a different Execution Environment we can only read and not write any data. To allow us to find a Write mapping for our Execution Environment, we can overwritte a mapping if we encounter a new one which we own. Implement this logic, the result is the same mapping table as in Linux. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: caleb.connolly@linaro.org # sdm845 Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-4-a7548d3aef0d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10spmi: msm: introduce SPMI_CHANNEL_VALID flagNeil Armstrong
Introduce the SPMI_CHANNEL_VALID flag so we can check if a mapping exists for a SPMI command. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: caleb.connolly@linaro.org # sdm845 Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-3-a7548d3aef0d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10spmi: msm: factor out channel mapping for v5 & v7Neil Armstrong
The handling of the table mapping for V5 & V7 needs more work to handle the duplicate read-only & read-write mappings, so to make code cleaner add a switch/case and move the v5 & v7 mapping handler in a separate function. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: caleb.connolly@linaro.org # sdm845 Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-2-a7548d3aef0d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10spmi: msm: use real number of channels for v5 & v7Neil Armstrong
The SPMI_MAX_CHANNELS_Vx are only the maximum channels supported by the controller, but the real number of channels mapped on this system can be read from a register, so take this info. This allows no to overlap on the second controller present on the V7 SPMI arbiter, otherwise we would also parse the mapping of the second SPMI bus and we would bet the wrong IDs. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: caleb.connolly@linaro.org # sdm845 Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-1-a7548d3aef0d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/qcom: sc7280: add missing UFS and MMC clocksCaleb Connolly
These are all usually enabled, hence we don't (yet) bother configuring their RCG src clocks. Add them to remove the errors about missing clocks when the UFS and MMC drivers probe. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250317-sc7280-mmc-ufs-clocks-v1-2-38e05c16511b@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10pinctrl: qcom: add driver for SA8775P SoCVaradarajan Narayanan
Add pinctrl and GPIO driver for SA8775P. Driver code is based on the similar U-Boot and Linux drivers. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250324080504.2385747-1-quic_varada@quicinc.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10regulator: qcom-rpmh-regulator: add support for pmm8654 regulatorsVaradarajan Narayanan
Add the PMC8380 regulator data found on the Qualcomm SA8775P platform. The tables are imported from the Linux driver. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250324113030.2597986-1-quic_varada@quicinc.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10power: regulator: add qcom-usb-vbusRui Miguel Silva
Add regulator driver that allow some Qualcomm PMIC to feed VBUS output to peripherals that are connected. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Acked-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250227094911.497219-3-rui.silva@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLKCaleb Connolly
Missing for UFS. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-2-d177a10f336d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/stub: add sdm845 rpmh clockCaleb Connolly
Necessary for UFS to successfully probe all clocks. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-1-d177a10f336d@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10clk/qcom: sdm845: add missing USB3 clocksSam Day
These are necessary for USB gadget to come up properly, now that qcom_gate_clk_en fails on unknown clocks. Signed-off-by: Sam Day <me@samcday.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250319-sdm845-usb-clocks-v1-1-ddea854f62ec@samcday.com Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-10phy: Add SDM660 support to Qualcomm QUSB2 phyAlexey Minnekhanov
Imported from Linux driver. Note that already existing but previously unused member of struct qusb2_phy::has_se_clk_scheme is now utilized for it's purpose. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20250325083713.2425430-1-alexeymin@postmarketos.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-08Merge patch series "Annotate switch/case fallthrough cases"Tom Rini
Andre Przywara <andre.przywara@arm.com> says: C's implicit fallthrough behaviour in switch/case statements can lead to subtle bugs. Quite some while ago many compilers introduced warnings in those cases, requiring intentional fallthrough's to be annotated. So far we were not enabling that compiler option, so many ambiguities and some bugs in the code went unnoticed. This series adds the required annotations in code paths that the first stage of the U-Boot CI covers. There is a large number of cases left in the libbz2 code. The usage of switch/case is borderline insane there, labels are hidden in macros, and there are no breaks, but just goto's. Upstream still uses very similar code, without any annotations. I still am not 100% sure those are meant to fall through or not, and plan to do further investigations, but didn't want to hold the rest of the patches back. You can see for yourself by applying patch 18/18 and building for sandbox64, for instance. Because of this we cannot quite enable the warning in the Makefile yet, but those fixes are worth regardless, and be it to increase readability. Please note that those patches do not fix anything, really, they just add those fallthrough annotations, so the series is not really critical. Link: https://lore.kernel.org/r/20250327153313.2105227-1-andre.przywara@arm.com
2025-04-08mtd: rawnand: nand_base: annotate switch/case fallthroughAndre Przywara
The raw NAND flash code uses an implicit switch/case fallthrough to share code when dealing with different ECC modes, and also when handling some read command. Add our "fallthrough;" statement-like macro before the respective labels in the NAND code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. This copies the fallthrough annotations that the original kernel code gained, before this function got refactored there. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Michael Trimrachi <michael@amarulasolutions.com>
2025-04-08mtd: spi-nor-tiny: annotate switch/case fallthroughAndre Przywara
The SPI NOR code uses an implicit switch/case fallthrough when checking different vendors to determine how to deal with extended addressig modes. Add our "fallthrough;" statement-like macro before some label in the 4-byte addressing mode code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08mtd: ubi: annotate fallthroughAndre Przywara
The UBI code uses an implicit switch/case fallthrough when handling two related cases of bad header errors. Also there is a switch/case for unit prefix handling (G/M/K), which accumulates multiplications. Add our "fallthrough;" statement-like macro before the respective labels in both cases, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-08net: e1000: annotate switch/case fallthroughAndre Przywara
The E1000 driver uses an implicit switch/case fallthrough for sharing some code supporting different PHYs. Add our "fallthrough;" statement-like macro before the two labels in e1000_set_phy_type(), to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08video: annotate switch/case fall-throughAndre Przywara
The generic DM video code uses an implicit switch/case fallthrough to provide fallback code paths when certain colour depths are not enabled. Add our "fallthrough;" statement-like macro to the video_fill() function to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08usb: xhci: annotate switch/case fallthrough properlyAndre Przywara
The USB XHCI code uses an implicit switch/case fallthrough to share code for handling full speed and low speed transfers. Add our "fallthrough;" statement-like macro before the second label in the XHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08usb: ohci-hcd: annotate switch/case fallthroughAndre Przywara
The USB OCHI code uses an implicit switch/case fallthrough after checking for valid descriptor IDs. Add our "fallthrough;" statement-like macro before the default branch in the OHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08net: sun8i-emac: annotate fallthroughAndre Przywara
The Allwinner sun8i EMAC driver uses an implicit switch/case fallthrough when setting up the MAC/PHY communication protocol, to handle the case when RMII is requested, but would not be supported by the hardware. Add our "fallthrough;" statement-like macro before the default branch in sun8i_emac_set_syscon(), to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08fastboot: annotate switch/case fallthrough caseAndre Przywara
The fastboot command handling uses an implicit switch/case fallthrough when receiving the OEM_CONSOLE command, but when this command is not enabled in Kconfig, to report this command as unknown. Add our "fallthrough;" statement-like macro before the default branch in the fastboot code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-08gadget: f_thor: annotate switch/case fallthroughAndre Przywara
Even though we seem to catch POWEROFF and EFSCLEAR commands in the THOR protocol request handling, we ultimately do not seem to handle them (apart from sending a response), so those commands still print an error message. Annotate the switch/case fallthrough in this case, to make this clear to the compiler. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-08ata: ahci: remove bad freeVincent Stehlé
In the case of a memory allocation error, the ahci_port_start() function tries to free the `pp' pointer. This pointer was not dynamically allocated but does in fact point to an element of the port[] array member of the struct ahci_uc_priv. Remove the erroneous call to free() to fix this. Fixes: 4782ac80b02f ("Add AHCI support to u-boot") Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Tom Rini <trini@konsulko.com> Cc: Jason Jin <jason.jin@freescale.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08Merge tag 'ubifixes-for-2025.07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-ubi ubi fixes for v2025.07-rc1 - ubi: fix bug creating partitions for non-existent volumes from Oskar Nilsson
2025-04-08Merge branch 'next'Tom Rini
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
2025-04-08ubi: fix bug creating partitions for non-existent volumesOskar Nilsson
The part_get_info_ubi() function was incorrectly returning 0 (success) when a UBI volume was not found for a given partition index. This caused the part_create_block_devices() function in blk-uclass.c to continue creating devices for non-existent partitions up to MAX_SEARCH_PARTITIONS Fix the issue by returning -1 when a volume is not found, signaling to the part_create_block_devices() function that no more valid volumes exist. Before patch, 128 blk_partition are created: Class   Index  Probed  Driver        Name ------------------------------------------------- root        0  [ + ]  root_driver    root_driver thermal     0  [   ]  imx_thermal    |-- imx_thermal simple_bus  0  [ + ]  simple_bus     |-- soc mtd         0  [ + ]  mxs-nand-dt    |   |-- nand-controller@1806000 blk         0  [   ]  ubi_blk        |   |   `-- nand-controller@1806000.blk partition   0  [   ]  blk_partition  |   |       |-- nand-controller@1806000.blk:1 ... partition 127  [   ]  blk_partition  |   |       `-- nand-controller@1806000.blk:128 After patch, the expected blk_partition are created: Class   Index  Probed  Driver        Name ------------------------------------------------- root        0  [ + ]  root_driver    root_driver thermal     0  [   ]  imx_thermal    |-- imx_thermal simple_bus  0  [ + ]  simple_bus     |-- soc mtd         0  [ + ]  mxs-nand-dt    |   |-- nand-controller@1806000 blk         0  [   ]  ubi_blk        |   |   `-- nand-controller@1806000.blk partition   0  [   ]  blk_partition  |   |       |-- nand-controller@1806000.blk:1 partition   1  [   ]  blk_partition  |   |       |-- nand-controller@1806000.blk:2 partition   2  [   ]  blk_partition  |   |       |-- nand-controller@1806000.blk:3 partition   3  [   ]  blk_partition  |   |       `-- nand-controller@1806000.blk:4 simple_bus  1  [ + ]  simple_bus     |   |-- bus@2000000 Signed-off-by: Oskar Nilsson <onilsson@rums.se> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Heiko Schocher <hs@denx.de> Cc: Alexey Romanov <avromanov@salutedevices.com> Changed in v2: - Change return from -1 to -ENOENT Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-05Merge patch series "Enable MUX_MMIO at SPL stage"Tom Rini
Anurag Dutta <a-dutta@ti.com> says: This series enables MUX_MMIO at SPL stage for j7200 and j721e as it is required for successful hyperflash boot. Test logs : https://gist.github.com/anuragdutta731/b4c79ef8da56d8c50b38d953c9da4d45 Link: https://lore.kernel.org/r/20250320063004.1069653-1-a-dutta@ti.com
2025-04-05arm: mach-k3: j721e: Split out J7200 SoC support from J721eAndrew Davis
Currently in j721e_init.c we check which firewalls to remove using the board configuration (e.g CONFIG_TARGET_J721E_R5_EVM). We do this as J721e and J7200 have different IP and firewalls but use the same SoC definition (SOC_K3_J721E) even though they are different SoCs. The idea was they would be similar enough that they both could use the same SoC config to help with common code sharing. Board checks would then be used differentiate. This has grown far too messy to maintain any more, especially now that there is more than one board using J721e (EVM, SK, Beagle AI64). As differentiation is done based on board, every one of these boards would have to have checks added for them. Instead let's split J7200 support out from J721e like how normal new SoC support is done. This patch touches several subsystems and could not be split much better as when we add SOC_K3_J7200 we want to make use of it in all spots that once used the combined SOC_K3_J721E so we can turn off SOC_K3_J721E when building for J7200 boards. Signed-off-by: Andrew Davis <afd@ti.com>
2025-04-05mux: Kconfig: Add Kconfig options for MUX_MMIOAnurag Dutta
Add Kconfig options for MUX_MMIO so that it can be enabled in SPL stage. Signed-off-by: Anurag Dutta <a-dutta@ti.com>
2025-04-04Merge patch series "cmd: fuse: Introduce fuse writebuff sub-system and clean up"Tom Rini
Harsha Vardhan V M <h-vm@ti.com> says: This patch series introduces the fuse writebuff sub-system command and makes improvements to the existing fuse implementation by removing the custom string functions. The patches are required to be applied in sequence. The series consists of the following changes: Patch 1 removes custom string functions and replaces them with standard string functions. Patch 2 introduces fuse.rst documentation for fuse commands. Patch 3 introduces the fuse writebuff sub-system command, allowing to write a structured buffer in memory to fuses, and implementing the necessary function calls. Patch 4 enables the fuse sub-system in the K3 platform. Patch 5 updates the fuse.rst documentation to include details about the new fuse writebuff command. These changes aim to improve the fuse sub-system by the removal of custom string functions and the addition of the fuse writebuff command improves fuse programming workflows by allowing to write a structured buffer in memory to efuses. Link: https://lore.kernel.org/r/20250319084714.335777-1-h-vm@ti.com
2025-04-04drivers: k3_fuse: Add fuse sub-system func callsHarsha Vardhan V M
Add K3_FUSE config option to add and enable fuse sub-system implementation function calls. Signed-off-by: Harsha Vardhan V M <h-vm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-03Merge patch series "membuff: Add tests and update to support a flag for ↵Tom Rini
empty/full" Simon Glass <sjg@chromium.org> says: The membuff implementation curently has no tests. It also assumes that head and tail can never correspond unless the buffer is empty. This series provides a compile-time flag to support a 'full' flag. It also adds some tests of the main routines. The data structure is also renamed to membuf which fits better with U-Boot. There may be some cases in the code which could be optimised a little, but the implementation is functional. Link: https://lore.kernel.org/r/20250318152059.1464369-1-sjg@chromium.org
2025-04-03membuf: Rename structSimon Glass
Rename the struct to match the function prefix and filenames. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03membuff: Rename functions to have membuf_ prefixSimon Glass
The double 'f' is not necessary and is a bit annoying as elsewhere in U-Boot we use 'buf'. Rename all the functions before it is used more widely. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03Merge patch series "x86: Improve operation under QEMU"Tom Rini
Simon Glass <sjg@chromium.org> says: U-Boot can start and boot an OS in both qemu-x86 and qemu-x86_64 but it is not perfect. With both builds, executing the VESA ROM causes an intermittent hang, at least on some AMD CPUs. With qemu-x86_64 kvm cannot be used since the move to long mode (64-bit) is done in a way that works on real hardware but not with QEMU. This means that performance is 4-5x slower than it could be, at least on my CPU. We can work around the first problem by using Bochs, which is anyway a better choice than VESA for QEMU. The second can be addressed by using the same descriptor across the jump to long mode. With an MTRR fix this allows booting into Ubuntu on qemu-x86_64 In v3 some e820 patches are included to make booting reliable and avoid ACPI tables being dropped. Also, several MTTR problems are addressed, to support memory sizes above 4GB reliably. Link: https://lore.kernel.org/all/20250315142643.2600605-1-sjg@chromium.org/
2025-04-03x86: emulation: Support BLOBLIST_TABLES properlySimon Glass
The existing QEMU implementation mostly ignored BLOBLIST_TABLES and allocates the bulk of the tables with malloc(). Update it to place all tables in the bloblist. Since QEMU declares a size of 128KB regardless of the size of its tables, this requires a larger bloblist. Fix up the e820 table to handle this, keeping the old code as an option for now, to assist with any future bug-fixing. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03Merge patch series "Introduce J742S2 SoC and EVM"Tom Rini
Manorit Chawdhry <m-chawdhry@ti.com> says: The series adds support for J742S2 family of SoCs. Also adds J742S2 EVM Support and re-uses most of the stuff from the superset device J784s4. This device is a subset of J784S4 and shares the same memory map and thus the code is being reused from J784S4 to avoid duplication. It initially cleans up the J784s4 and AM69 files so that they can be re-usable for j742s2 and then it introduces J742S2. The DT for the following SoC will be coming to U-boot during 6.13 Sync so the series is kept as RFC till then. Here are some of the salient features of the J742S2 automotive grade application processor: The J742S2 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications. Some changes that this devices has from J784S4 are: * 4x Cortex-A72 vs 8x Cortex-A72 * 3x C7x DSP vs 4x C7x DSP * 4 port ethernet switch vs 8 port ethernet switch * 2 DDR controller vs 4 DDR controller Test logs: https://gist.github.com/manorit2001/f7df0e8cca1e9973b4361f0559c6f53d Link: https://lore.kernel.org/r/20250317-b4-upstream-j742s2-v4-0-4ba88bfd357a@ti.com
2025-04-03arm: mach-k3: j742s2: Introduce clock and device files for J742S2 SoCManorit Chawdhry
Re-use j784s4 clocks and power domains for j742s2 family of device. Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2025-04-03soc: Add information to identify the J742S2 SoC familyManorit Chawdhry
J742S2 has the same part number as J784S4 but JTAG_DEVICE_ID has a PKG bit that tells about J742S2. Add support for reading JTAG_DEVICE_ID and set family as J742S2 based on that. Link: https://www.ti.com/lit/pdf/spruje3 (TRM) Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>