summaryrefslogtreecommitdiff
path: root/drivers/soc
AgeCommit message (Collapse)Author
2025-02-23soc: imx8m: Unregister cpufreq and soc dev in cleanup pathPeng Fan
Unregister the cpufreq device and soc device when resource unwinding, otherwise there will be warning when do removing test: sysfs: cannot create duplicate filename '/devices/platform/imx-cpufreq-dt' CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.13.0-rc1-next-20241204 Hardware name: NXP i.MX8MPlus EVK board (DT) Fixes: 9cc832d37799 ("soc: imx8m: Probe the SoC driver as platform driver") Cc: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2025-02-20soc: loongson: loongson2_guts: Add check for devm_kstrdup()Haoxiang Li
Add check for the return value of devm_kstrdup() in loongson2_guts_probe() to catch potential exception. Fixes: b82621ac8450 ("soc: loongson: add GUTS driver for loongson-2 platforms") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Link: https://lore.kernel.org/r/20250220081714.2676828-1-haoxiang_li2024@163.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-02-20soc: renesas: r9a09g057-sys: Add a callback to print SoC-specific extra featuresJohn Madieu
Some RZ/V2H SoC variants feature a Mali-G31 (GPU) and/or a Mali-C55 (ISP) IP(s). Detect and inform about their presence during SoC identification. Also detect PLL frequency and warn in case of mismatch. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Link: https://lore.kernel.org/20250128031342.52675-6-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-02-20soc: renesas: rz-sysc: Move RZ/V2H SoC detection to the SYS driverJohn Madieu
As per the other SoC variant of the same family, the system controller provides SoC ID in its own registers. Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250128031342.52675-5-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-02-20soc: renesas: rz-sysc: Add support for RZ/G3E familyJohn Madieu
Add SoC detection support for the RZ/G3E SoC. Also add support for detecting the number of cores and the ETHOS-U55 NPU, and also detect PLL mismatch for SW settings other than 1.7GHz. Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250128031342.52675-4-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-02-20soc: renesas: rz-sysc: Move RZ/G3S SoC detection to the SYSC driverClaudiu Beznea
Now that we have SoC detection in the RZ SYSC driver, move the RZ/G3S SoC detection to it. The SYSC provides SoC ID in its own registers. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Link: https://lore.kernel.org/20250128031342.52675-3-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-02-20soc: renesas: Add SYSC driver for Renesas RZ familyClaudiu Beznea
The RZ/G3S system controller (SYSC) has various registers that control different functionalities. One of the exposed register offers information about the SoC identification. Add a driver that identifies the SoC. Later the driver will be extended with other functionalities. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250128031342.52675-2-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-02-19soc: samsung: exynos-chipid: add exynos2200 SoC supportIvaylo Ivanov
Add EXYNOS2200 information to soc_ids tables. This SoC product id is "0xE9925000". Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20250215112716.159110-5-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-02-18soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()Harshit Mogalapalli
This code calls kfree(bfr); and then passes "bfr" to rtk->ops->crashed() which is a use after free. The ->crashed function pointer is implemented by apple_nvme_rtkit_crashed() and it doesn't use the "bfr" pointer so this doesn't cause a problem. But it still looks sketchy as can be. Fix this by moving kfree() after the last usage of bfr. Fixes: bf8b4e49777d ("soc: apple: rtkit: Pass the crashlog to the crashed() callback") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Eric Curtin <ecurtin@redhat.com> Link: https://lore.kernel.org/r/20250212085853.1357906-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Sven Peter <sven@svenpeter.dev>
2025-02-18soc: apple: rtkit: Pass the crashlog to the crashed() callbackAsahi Lina
Client drivers might want a copy of the crashlog to stash into a devcoredump blob. Since device memory management can be very variable, the actual devcoredump implementation is left to client drivers. Pass the raw crashlog buffer to the client callback so it can use it if desired. Signed-off-by: Asahi Lina <lina@asahilina.net> Reviewed-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20250202-rtkit-crashdump-v1-1-9d38615b4e12@asahilina.net Signed-off-by: Sven Peter <sven@svenpeter.dev>
2025-02-18soc: apple: rtkit: Check & log more failuresAsahi Lina
Check and log the following failures: * regular messages * management messages * failed buffer requests This helps debugging. Signed-off-by: Asahi Lina <lina@asahilina.net> Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Neal Gompa <neal@gompa.dev> Link: https://lore.kernel.org/r/20250211-rtkit-more-logging-v1-1-93334e9c1c77@rosenzweig.io Signed-off-by: Sven Peter <sven@svenpeter.dev>
2025-02-18soc: mediatek: mtk-socinfo: Add entry for MT8390AV/AZA Genio 700Louis-Alexis Eyraud
Add an entry for the MT8390 SoC with commercial name Genio 700. Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250113-mtk-socinfo_genio-510-700-v1-2-cf5112b325b7@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-02-18soc: mediatek: mtk-socinfo: Add entry for MT8370AV/AZA Genio 510Louis-Alexis Eyraud
Add an entry for the MT8370 SoC with commercial name Genio 510. Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250113-mtk-socinfo_genio-510-700-v1-1-cf5112b325b7@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-02-18soc: mediatek: mtk-socinfo: Restructure SoC attribute informationFei Shao
So far, the MediaTek socinfo driver populates the SoC information as follows: - family: "MediaTek" - machine: "<marketing_name> (<soc_name>)" e.g., "Kompanio 1380 (MT8195)" - soc_id: <null> This approach has some drawbacks: 1. "soc_id" can be used for showing the SoC name (e.g. "MT8195"), while it's currently unused. 2. The newer socinfo API automatically populates the "machine" attribute with the model name from board DTS if unspecified, which we may want to preserve if possible. 3. "machine" combines the marketing name and SoC name, making it trickier to parse. Ideally, the marketing name and SoC name should be in separate attributes so userspace to utilize them as needed. 4. There's no guarantee that the marketing name will be announced along with the SoC name. If either is undetermined, the current design will result in a malformed "machine" output. This is observed on some newer MediaTek platforms, where the marketing name is still undetermined but the SoC information needs to be settled for device registration and validation before launch. To address these points, this commit proposes a new theme to display the SoC information: - family: "MediaTek <marketing_name>" e.g., "MediaTek Kompanio 1380" - machine: "<dt_model_name>" (auto-populated) e.g., "Acer Tomato (rev1) board" - soc_id: "<soc_name>" e.g., "MT8195" Moreover, if the marketing name is not provided, the driver displays "MediaTek" in the "family" attribute instead, consistent with the previous behavior. Restructure the way driver populates the SoC information as described above. Note that Mediatek-based Chromebooks are the primary consumers of this socinfo driver, and Google has prepared corresponding userspace changes to comply with this update, so the impact to userspace is controlled. Signed-off-by: Fei Shao <fshao@chromium.org> Link: https://lore.kernel.org/r/20241219113411.3999355-1-fshao@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-02-15soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()Chenyuan Yang
soc_dev_attr->revision could be NULL, thus, a pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02 ("ice: Fix some null pointer dereference issues in ice_ptp.c"). This issue is found by our static analysis tool. Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com> Link: https://lore.kernel.org/r/20250212213518.69432-1-chenyuan0y@gmail.com Fixes: 3253b7b7cd44 ("soc: samsung: Add exynos chipid driver support") Cc: <stable@vger.kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-02-14soc: qcom: Do not expose internal servreg_location_entry_ei arrayKrzysztof Kozlowski
'struct qmi_elem_info servreg_location_entry_ei' is used only internally in qcom_pdr_msg.c, so drop the extern declaration to make headers smaller and code more obvious about intention. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250121102817.68577-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-14soc: qcom: ice: make of_qcom_ice_get() staticTudor Ambarus
There's no consumer calling it left, make the method static. Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20250117-qcom-ice-fix-dev-leak-v2-4-1ffa5b6884cb@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-14soc: qcom: ice: introduce devm_of_qcom_ice_getTudor Ambarus
Callers of of_qcom_ice_get() leak the device reference taken by of_find_device_by_node(). Introduce devm variant for of_qcom_ice_get(). Existing consumers need the ICE instance for the entire life of their device, thus exporting qcom_ice_put() is not required. Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20250117-qcom-ice-fix-dev-leak-v2-1-1ffa5b6884cb@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-14soc: qcom: pdr: Fix the potential deadlockSaranya R
When some client process A call pdr_add_lookup() to add the look up for the service and does schedule locator work, later a process B got a new server packet indicating locator is up and call pdr_locator_new_server() which eventually sets pdr->locator_init_complete to true which process A sees and takes list lock and queries domain list but it will timeout due to deadlock as the response will queued to the same qmi->wq and it is ordered workqueue and process B is not able to complete new server request work due to deadlock on list lock. Fix it by removing the unnecessary list iteration as the list iteration is already being done inside locator work, so avoid it here and just call schedule_work() here. Process A Process B process_scheduled_works() pdr_add_lookup() qmi_data_ready_work() process_scheduled_works() pdr_locator_new_server() pdr->locator_init_complete=true; pdr_locator_work() mutex_lock(&pdr->list_lock); pdr_locate_service() mutex_lock(&pdr->list_lock); pdr_get_domain_list() pr_err("PDR: %s get domain list txn wait failed: %d\n", req->service_name, ret); Timeout error log due to deadlock: " PDR: tms/servreg get domain list txn wait failed: -110 PDR: service lookup for msm/adsp/sensor_pd:tms/servreg failed: -110 " Thanks to Bjorn and Johan for letting me know that this commit also fixes an audio regression when using the in-kernel pd-mapper as that makes it easier to hit this race. [1] Link: https://lore.kernel.org/lkml/Zqet8iInnDhnxkT9@hovoldconsulting.com/ # [1] Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") CC: stable@vger.kernel.org Reviewed-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Tested-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Tested-by: Johan Hovold <johan+linaro@kernel.org> Signed-off-by: Saranya R <quic_sarar@quicinc.com> Co-developed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250212163720.1577876-1-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-07genirq: Remove leading space from irq_chip::irq_print_chip() callbacksGeert Uytterhoeven
The space separator was factored out from the multiple chip name prints, but several irq_chip::irq_print_chip() callbacks still print a leading space. Remove the superfluous double spaces. Fixes: 9d9f204bdf7243bf ("genirq/proc: Add missing space separator back") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/893f7e9646d8933cd6786d5a1ef3eb076d263768.1738764803.git.geert+renesas@glider.be
2025-02-05soc: samsung: usi: implement support for USIv1 and exynos8895Ivaylo Ivanov
USIv1 IP-core is found on some ARM64 Exynos SoCs (like Exynos8895) and provides selectable serial protocols (one of: HSI2C0, HSI2C1, HSI2C0_1, SPI, UART, UART_HSI2C1). USIv1, unlike USIv2, doesn't have any known register map. Underlying protocols that it implements have no offset, like with Exynos850. Desired protocol can be chosen via SW_CONF register from System Register block of the same domain as USI. In order to select a particular protocol, the protocol has to be selected via the System Register. Unlike USIv2, there's no need for any setup before the given protocol becomes accessible apart from enabling the APB clock and the protocol operating clock. Modify the existing driver in order to allow USIv1 instances in Exynos8895 to probe and set their protocol. While we're at it, make use of the new mode constants in place of the old ones. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20250204172803.3425496-4-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-02-05soc: samsung: usi: add a routine for unconfiguring the ipIvaylo Ivanov
Add a devm_add_action_or_reset() routine for unconfiguring the USI IP block whenever the device gets removed. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20250204172803.3425496-3-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-02-04soc: qcom: Use str_enable_disable-like helpersKrzysztof Kozlowski
Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250114203646.1013708-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-04soc: qcom: pmic_glink: Drop redundant pg assignment before taking lockKrzysztof Kozlowski
Commit e9f826b0459f ("soc: qcom: pmic_glink: simplify locking with guard()") was on top of a fix [1] which was moving the 'pg = __pmic_glink' assignment into the critical section. Unfortunately the actual fix was not applied and instead rebased version of the next patch got in. The resulting code is in general correct, but now there is a duplicated assignment 'pg = __pmic_glink'. [1] https://lore.kernel.org/all/20240822164815.230167-1-krzysztof.kozlowski@linaro.org/ Fixes: e9f826b0459f ("soc: qcom: pmic_glink: simplify locking with guard()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250111172326.101779-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-03soc: samsung: Use syscon_regmap_lookup_by_phandle_argsKrzysztof Kozlowski
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() combined with getting the syscon argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. Link: https://lore.kernel.org/r/20250111185402.183793-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-01-25Merge tag 'media/v6.14-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Sensor driver fixes - remove dead TI wl128x FM radio driver - Add support for the imx462 sensor at the IMX290 binding - V4L2 pixel data transmitter and receiver documentation improvements - Add support for MIPI Discovery and Configuration for C-PHY line orders - imx8-isi fixes and improvements - stm32: dcmipp: add core support for the stm32mp25 - qcom: camss: Add sc7280 support - Various fixes and enhancements * tag 'media/v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (152 commits) media: nuvoton: Fix an error check in npcm_video_ece_init() media: dvb-usb-v2: af9035: fix ISO C90 compilation error on af9035_i2c_master_xfer media: platform: rzg2l-cru: rzg2l-video: Fix the comment in rzg2l_cru_start_streaming_vq() media: fix secfeed undefined when filter alloc fail media: dt-bindings: trivial white-space and example cleanup MAINTAINERS: repair file entry in MEDIA DRIVERS FOR STM32 - CSI media: solo6x10: Use const 'struct bin_attribute' callback media: saa7164: Remove unused values staging: media: imx: fix OF node leak in imx_media_add_of_subdevs() media: platform: exynos4-is: Remove unused __is_get_frame_size media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread media: mmp: Bring back registration of the device media: cec: include linux/debugfs.h and linux/seq_file.h where needed Revert "media: qcom: camss: Restructure camss_link_entities" media: venus: Remove unused hfi_core_ping() media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable media: venus: Populate video encoder/decoder nodename entries media: venus: Add support for static video encoder/decoder declarations media: venus: match instance creation and destruction order media: venus: destroy hfi session after m2m_ctx release ...
2025-01-24Merge tag 'soc-drivers-6.14' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "These are changes to SoC specific drivers and DT bindings that don't have a separate subsystem tree, or that get grouped here for simplicity. Nothing out of the ordinary for the 6.14 release here: - Most of the updates are for Qualcomm specific drivers, adding support for additional SoCs in the exssting drivers, and support for wrapped encryption key access in the SCM firmware. - The Arm SCMI firmware code gains support for having multiple instances of firmware running, and better module auto loading. - A few minor updates for litex, samsung, ti, tegra, mediatek, imx and renesas platforms. - Reset controller updates for amlogic, to add support for the A1 soc and clean up the existing code. - Memory controller updates for ti davinci aemif, refactoring the code and adding a few interfaces to other drivers" * tag 'soc-drivers-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (58 commits) drivers/soc/litex: Use devm_register_restart_handler() reset: amlogic: aux: drop aux registration helper reset: amlogic: aux: get regmap through parent device reset: amlogic: add support for A1 SoC in auxiliary reset driver dt-bindings: reset: add bindings for A1 SoC audio reset controller soc/tegra: fuse: Update Tegra234 nvmem keepout list soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() soc/tegra: cbb: Drop unnecessary debugfs error handling firmware: qcom: scm: add calls for wrapped key support soc: qcom: pd_mapper: Add SM7225 compatible dt-bindings: firmware: qcom,scm: Document ipq5424 SCM soc: qcom: llcc: Update configuration data for IPQ5424 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove soc: mediatek: mtk-devapc: Fix leaking IO map on error paths firmware: qcom: scm: smc: Narrow 'mempool' variable scope firmware: qcom: scm: smc: Handle missing SCM device firmware: qcom: scm: Cleanup global '__scm' on probe failures firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() ...
2025-01-24Merge tag 'soc-arm-6.14' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC arm platform code updates from Arnd Bergmann: "The updates here add code for the Microchip SAMA7D65 SoC, as well as minor bugfixes for OMAP" * tag 'soc-arm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: omap1: Fix up the Retu IRQ on Nokia 770 ARM: omap2plus_defconfig: enable charger of TWL603X ARM: at91: add new SoC sama7d65 ARM: at91: pm: change BU Power Switch to automatic mode soc: atmel: fix device_node release in atmel_soc_device_init() ARM: OMAP2+: Fix a typo
2025-01-22Merge tag 'clk-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "A pretty quiet cycle this time around. We have a bunch of new Qualcomm clk drivers, per usual, and then a handful of drivers for other SoCs. Then the usual pile of cleanups is fairly small data fixes or converting DT bindings to YAML so they can be validated. No changes to the core framework besides an OF node refcount bump that never got decremented. New Drivers: - 5L35023 variant of Versa 3 clock generator - Various Qualcomm clk controllers: IPQ CMN PLL, SM6115 LPASS, SM750 global, tcsr, rpmh, and display. X Plus GPU and global. QCS615 rpmh and MSM8937 and MSM8940 RPM. - Qualcomm Pongo and Taycan Alpha PLLs - Qualcomm IPQ5424 NoC-related interconnect clks - Renesas RZ/G3E (R9A09G047) SoC clk driver - SAMA7D65 SoC clk driver - Samsung Exynos990 SoC clk driver" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (159 commits) clk: analogbits: Fix incorrect calculation of vco rate delta clk: bcm: rpi: Add disp clock clk: bcm: rpi: Create helper to retrieve private data clk: bcm: rpi: Enable minimize for all firmware clocks clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks clk: bcm: rpi: Add ISP to exported clocks clk: stm32f4: support spread spectrum clock generation clk: stm32f4: use FIELD helpers to access the PLLCFGR fields dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking dt-bindings: clock: convert stm32 rcc bindings to json-schema clk: Use str_enable_disable-like helpers clk: clk-loongson2: Fix the number count of clk provider clk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data() clk: starfive: Make _clk_get become a common helper function clk: en7523: Add clock for eMMC for EN7581 dt-bindings: clock: add ID for eMMC for EN7581 dt-bindings: clock: drop NUM_CLOCKS define for EN7581 clk: en7523: Rework clock handling for different clock numbers clk: thead: Fix cpu2vp_clk for TH1520 AP_SUBSYS clocks clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot ...
2025-01-22Merge tag 'litex-6.13-rc1' of https://github.com/litex-hub/linux into ↵Arnd Bergmann
soc/drivers LiteX updates for next Remaining LiteX updates from 2024, reviewed and successfully tested against v6.13-rc1. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> * tag 'litex-6.13-rc1' of https://github.com/litex-hub/linux: drivers/soc/litex: Use devm_register_restart_handler() Link: https://lore.kernel.org/r/Z41PgCffqPUTyxkE@errol.ini.cmu.edu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-19drivers/soc/litex: Use devm_register_restart_handler()Andrew Davis
Use device life-cycle managed register function to simplify probe error path and eliminate need for explicit remove function. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Gabriel Somlo <gsomlo@gmail.com> Link: https://lore.kernel.org/all/20240123164443.394642-3-afd@ti.com Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2025-01-15Merge tag 'samsung-drivers-6.14' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC drivers for v6.14 1. Add new bindings for sysreg in Exynos8895. 2. Minor improvements in Exynos USI bindings. 3. Fix for Smatch warning in Exynos PMU syscon driver. * tag 'samsung-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic() dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos8895 dt-bindings: samsung: exynos-usi: Restrict possible samsung,mode values Link: https://lore.kernel.org/r/20250112180846.64154-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-15Merge tag 'qcom-drivers-for-6.14' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.14 The Qualcomm SCM drivers gains a number of fixes and improvements related to race conditions during initialization. QSEECOM and the EFI variable service therein is enabled for a few 8cx Gen 3 and X Elite boards. LLCC driver gains configuration for IPQ5424 and WRCACHE is enabled on X Elite. The BCM_TCS_CMD() macro is corrected and is cleaned up. Support for SM7225 and X 1 Plus are added to the pd-mapper. pmic_glink and the associated altmode driver are simplied using guards. socinfo is added for QCS9075 and serial number readout on MSM8916 devices is corrected. * tag 'qcom-drivers-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (29 commits) firmware: qcom: scm: add calls for wrapped key support soc: qcom: pd_mapper: Add SM7225 compatible dt-bindings: firmware: qcom,scm: Document ipq5424 SCM soc: qcom: llcc: Update configuration data for IPQ5424 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible firmware: qcom: scm: smc: Narrow 'mempool' variable scope firmware: qcom: scm: smc: Handle missing SCM device firmware: qcom: scm: Cleanup global '__scm' on probe failures firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() soc: qcom: socinfo: add QCS9075 SoC ID dt-bindings: arm: qcom,ids: add SoC ID for QCS9075 soc: qcom: socinfo: Avoid out of bounds read of serial number firmware: qcom: scm: Allow QSEECOM on Huawei Matebook E Go (sc8280xp) firmware: qcom: scm: Allow QSEECOM for Windows Dev Kit 2023 firmware: qcom: scm: Allow QSEECOM for HP Omnibook X14 soc: qcom: rmtfs: constify rmtfs_class soc: qcom: rmtfs: allow building the module with COMPILE_TEST=y soc: qcom: pmic_glink_altmode: simplify locking with guard() soc: qcom: Rework BCM_TCS_CMD macro ... Link: https://lore.kernel.org/r/20250111172901.391774-1-andersson@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-15Merge tag 'tegra-for-6.14-soc' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Cleanups for v6.14-rc1 This contains debugfs error handling cleanup, a typofix and an update to the FUSE block's keepout list to properly allow reading these registers. * tag 'tegra-for-6.14-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Update Tegra234 nvmem keepout list soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() soc/tegra: cbb: Drop unnecessary debugfs error handling Link: https://lore.kernel.org/r/20250110185355.4143505-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-15Merge tag 'mtk-soc-for-v6.14' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers MediaTek soc driver updates for v6.14 This adds fixes avoiding iomap leaks on error paths in the MediaTek devapc driver. * tag 'mtk-soc-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove soc: mediatek: mtk-devapc: Fix leaking IO map on error paths Link: https://lore.kernel.org/r/20250108100826.32458-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-15Merge tag 'imx-drivers-6.14' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.14: - Add a SoC driver for i.MX9 (Alice Guo) * tag 'imx-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: Add SoC device register for i.MX9 Link: https://lore.kernel.org/r/20250105095139.714590-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-10soc/tegra: fuse: Update Tegra234 nvmem keepout listKartik Rajput
Various Nvidia userspace applications and tests access following fuse via Fuse nvmem interface: * odmid * odminfo * boot_security_info * public_key_hash * reserved_odm0 * reserved_odm1 * reserved_odm2 * reserved_odm3 * reserved_odm4 * reserved_odm5 * reserved_odm6 * reserved_odm7 * odm_lock * pk_h1 * pk_h2 * revoke_pk_h0 * revoke_pk_h1 * security_mode * system_fw_field_ratchet0 * system_fw_field_ratchet1 * system_fw_field_ratchet2 * system_fw_field_ratchet3 * optin_enable Update tegra234_fuse_keepouts list to allow reading these fuse from nvmem sysfs interface. Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Link: https://lore.kernel.org/r/20241127061053.16775-1-kkartik@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com>
2025-01-10soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout()liujing
Fix spelling error in tegra234_lookup_slave_timeout(). Signed-off-by: liujing <liujing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241209055148.3749-1-liujing@cmss.chinamobile.com Signed-off-by: Thierry Reding <treding@nvidia.com>
2025-01-09soc/tegra: cbb: Drop unnecessary debugfs error handlingKrzysztof Kozlowski
Kernel coding style expects all drivers to ignore debugfs errors. Partially because it is purely for debugging, not for important user interfaces. Simplify the code by dropping unnecessary probe failuring and error message on debugfs failures, which also fixes incorrect usage IS_ERR_OR_NULL() and Smatch warning: drivers/soc/tegra/cbb/tegra-cbb.c:80 tegra_cbb_err_debugfs_init() warn: passing zero to 'PTR_ERR' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104141958.115911-1-krzysztof.kozlowski@linaro.org Signed-off-by: Thierry Reding <treding@nvidia.com>
2025-01-08soc: qcom: pd_mapper: Add SM7225 compatibleLuca Weiss
The Qualcomm SM7225 is practically identical to SM6350, so add an entry using that data. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Link: https://lore.kernel.org/r/20241220-pd-mapper-sm7225-v1-1-68f85a87288d@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-01-07soc: qcom: llcc: Update configuration data for IPQ5424Varadarajan Narayanan
The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241121051935.1055222-3-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-01-07soc: mediatek: mtk-devapc: Fix leaking IO map on driver removeKrzysztof Kozlowski
Driver removal should fully clean up - unmap the memory. Fixes: 0890beb22618 ("soc: mediatek: add mt6779 devapc driver") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104142012.115974-2-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-01-07soc: mediatek: mtk-devapc: Fix leaking IO map on error pathsKrzysztof Kozlowski
Error paths of mtk_devapc_probe() should unmap the memory. Reported by Smatch: drivers/soc/mediatek/mtk-devapc.c:292 mtk_devapc_probe() warn: 'ctx->infra_base' from of_iomap() not released on lines: 277,281,286. Fixes: 0890beb22618 ("soc: mediatek: add mt6779 devapc driver") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104142012.115974-1-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-01-06soc: qcom: socinfo: add QCS9075 SoC IDWasim Nazir
Update soc_id table for the Qualcomm QCS9075 SoC to represent qcs9075 machine. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com> Link: https://lore.kernel.org/r/20241229152332.3068172-3-quic_wasimn@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-01-06soc: qcom: socinfo: Avoid out of bounds read of serial numberStephan Gerhold
On MSM8916 devices, the serial number exposed in sysfs is constant and does not change across individual devices. It's always: db410c:/sys/devices/soc0$ cat serial_number 2644893864 The firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not have support for the serial_num field in the socinfo struct. There is an existing check to avoid exposing the serial number in that case, but it's not correct: When checking the item_size returned by SMEM, we need to make sure the *end* of the serial_num is within bounds, instead of comparing with the *start* offset. The serial_number currently exposed on MSM8916 devices is just an out of bounds read of whatever comes after the socinfo struct in SMEM. Fix this by changing offsetof() to offsetofend(), so that the size of the field is also taken into account. Cc: stable@vger.kernel.org Fixes: efb448d0a3fc ("soc: qcom: Add socinfo driver") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241230-qcom-socinfo-serialno-oob-v1-1-9b7a890da3da@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-01-06soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic()Krzysztof Kozlowski
If tensor_set_bits_atomic() is called with a mask of 0 the function will just iterate over its bit, not perform any updates and return stack value of 'ret'. Also reported by smatch: drivers/soc/samsung/exynos-pmu.c:129 tensor_set_bits_atomic() error: uninitialized symbol 'ret'. Fixes: 0b7c6075022c ("soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250104135605.109209-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-01-02soc/qman: test: Use kthread_run_on_cpu()Frederic Weisbecker
Use the proper API instead of open coding it. However it looks like kthreads here could be replaced by the use of a per-cpu workqueue instead. Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2024-12-26soc: qcom: rmtfs: constify rmtfs_classBartosz Golaszewski
The rmtfs class object is never modified and can be made constant. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241202094903.18388-2-brgl@bgdev.pl Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-12-26soc: qcom: rmtfs: allow building the module with COMPILE_TEST=yBartosz Golaszewski
Make it possible to build the module when COMPILE_TEST is enabled for better build coverage. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241202094903.18388-1-brgl@bgdev.pl Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-12-26soc: qcom: pmic_glink_altmode: simplify locking with guard()Krzysztof Kozlowski
Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240822164853.231087-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>