Arnd Bergmann [Mon, 15 Jul 2024 06:02:30 +0000 (08:02 +0200)]
platform: cznic: turris-omnia-mcu: fix Kconfig dependencies
The newly added driver causes a Kconfig warning:
WARNING: unmet direct dependencies detected for RTC_CLASS
Depends on [n]: !S390 [=y]
Selected by [m]:
- TURRIS_OMNIA_MCU [=m] && CZNIC_PLATFORMS [=y] && (MACH_ARMADA_38X || COMPILE_TEST [=y]) && I2C [=m] && OF [=y] && WATCHDOG [=y]
The problem here is that it selects entire subsystems, which normal
device drivers should not do. Changes all of these to 'depends on'
instead.
Fixes:
dfa556e45ae9e ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs")
Fixes:
90e700fd12b61 ("platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup")
Fixes:
ab89fb5fb92c7 ("platform: cznic: turris-omnia-mcu: Add support for MCU watchdog")
Fixes:
41bb142a40289 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Wed, 10 Jul 2024 20:22:32 +0000 (22:22 +0200)]
Merge tag 'sunxi-drivers-for-6.11-2' of https://git./linux/kernel/git/sunxi/linux into soc/drivers
Allwinner SoC driver changes for 6.11 part 2
One additional minor cleanup
- Const-ify |struct regmap_config| in SRAM driver
- Const-ify |struct regmap_bus| in Allwinner RSB bus driver
* tag 'sunxi-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
bus: sunxi-rsb: Constify struct regmap_bus
soc: sunxi: sram: Constify struct regmap_config
Link: https://lore.kernel.org/r/Zo7T4YsfamN0PbYK@wens.tw
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Javier Carrasco [Fri, 5 Jul 2024 06:05:18 +0000 (08:05 +0200)]
bus: sunxi-rsb: Constify struct regmap_bus
`regmap_sunxi_rsb` is not modified and can be declared as const to
move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240705-sunxi-rsb-bus-const-regmap_bus-v1-1-129094960ce9@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Javier Carrasco [Fri, 5 Jul 2024 10:52:27 +0000 (12:52 +0200)]
soc: sunxi: sram: Constify struct regmap_config
`sunxi_sram_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20240705-sunxi-sram-const-regmap_config-v1-1-1b997cd65d0f@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Arnd Bergmann [Tue, 9 Jul 2024 20:50:24 +0000 (22:50 +0200)]
Merge tag 'qcom-drivers-for-6.11-2' of https://git./linux/kernel/git/qcom/linux into soc/drivers
A few more Qualcomm driver updates for v6.11
This adds a quirk to skip using the newly introduced SHM Bridge
implementation while regressions are being investigated.
One occurance of return no_free_ptr() is replaced with return_ptr() to
make code easier to read. llcc, mdt_loader, ocmem, pdr, socinfo and
wcnss drivers gets simplified using cleanup.h.
* tag 'qcom-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
soc: qcom: wcnss: simplify with cleanup.h
soc: qcom: pdr: simplify with cleanup.h
soc: qcom: ocmem: simplify with cleanup.h
soc: qcom: mdt_loader: simplify with cleanup.h
soc: qcom: llcc: simplify with cleanup.h
firmware: qcom: tzmem: simplify returning pointer without cleanup
soc: qcom: socinfo: Add PM6350 PMIC
Link: https://lore.kernel.org/r/20240709191246.3053-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 13:36:08 +0000 (15:36 +0200)]
Merge tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx into soc/drivers
arm64: Xilinx SoC changes for 6.11
Timer
- Fix u32 overflow issue in 32-bit width PWM mode.
Event manager:
- rename cpu_number1 to dummy_cpu_number
Power:
- Add cb event for subsystem restart
- check return status of get_api_version()
Firmware:
- Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
* tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx:
drivers: soc: xilinx: check return status of get_api_version()
firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
soc: xilinx: Add cb event for subsystem restart
soc: xilinx: rename cpu_number1 to dummy_cpu_number
pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode.
Link: https://lore.kernel.org/r/CAHTX3dKMtqgNpkEvrw0p2w+SPN83Ai1_kzhefUGOO5rMkPaH_w@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 8 Jul 2024 11:40:02 +0000 (13:40 +0200)]
platform: cznic: turris-omnia-mcu: Depend on WATCHDOG
Add depend on WATCHDOG, otherwise modpost fails with
ERROR: modpost: "watchdog_init_timeout" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined!
ERROR: modpost: "devm_watchdog_register_device" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined!
Fixes:
ab89fb5fb92c ("platform: cznic: turris-omnia-mcu: Add support for MCU watchdog")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202407040711.g19y3cWq-lkp@intel.com/
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240708114002.4285-3-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 8 Jul 2024 11:40:01 +0000 (13:40 +0200)]
platform: cznic: turris-omnia-mcu: Depend on OF
Add depend on OF, otherwise the compilation fails with
error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
error: no member named 'of_xlate' in 'struct gpio_chip'
Fixes:
dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202407031646.trNSwajF-lkp@intel.com/
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240708114002.4285-2-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Peter Griffin [Tue, 2 Jul 2024 06:35:09 +0000 (08:35 +0200)]
soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers
Not all registers in PMU_ALIVE block support atomic set/clear operations.
GS101_SYSIP_DAT0 and GS101_SYSTEM_CONFIGURATION registers are two regs
where attempting atomic access fails.
As documentation on exactly which registers support atomic operations is
not forthcoming. We default to atomic access, unless the register is
explicitly added to the tensor_is_atomic() function. Update the comment
to reflect this as well.
Reviewed-by: Will McVicker <willmcvicker@google.com>
Tested-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240628223506.1237523-4-peter.griffin@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240702063514.6215-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:15:35 +0000 (11:15 +0200)]
Merge tag 'memory-controller-drv-6.11' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers
Memory controller drivers for v6.11
Make the Freescale IFC driver selectable because it is used now by two
drivers: Freescale NAND and generic NOR flash. The patches adjusting
defconfig are waiting on the mailing lists to be picked up.
* tag 'memory-controller-drv-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
dt-bindings: memory: fsl: replace maintainer
memory: fsl_ifc: Make FSL_IFC config visible and selectable
Link: https://lore.kernel.org/r/20240702070212.8291-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:13:50 +0000 (11:13 +0200)]
Merge tag 'sunxi-drivers-for-6.11' of https://git./linux/kernel/git/sunxi/linux into soc/drivers
Allwinner SoC driver changes for 6.11
- DT binding addition of regulator node under SRAM node
- Cleanup of unused list in SRAM driver
* tag 'sunxi-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
dt-bindings: sram: sunxi-sram: Add regulators child
soc: sunxi: sram: Remove unused list 'claimed_sram'
Link: https://lore.kernel.org/r/ZoQZguQ6taJziJ11@wens.tw
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:12:54 +0000 (11:12 +0200)]
Merge tag 'reset-for-v6.11-2' of git://git.pengutronix.de/pza/linux into soc/drivers
Reset controller updates for v6.11, part 2
This tag adds USB VBUS regulator control for Renesas RZ/G2L SoCs,
which also touches PHY driver and device tree, and pulls in a new
regulator_hardware_enable() helper.
The Tegra BPMP reset driver can be compiled under COMPILE_TEST now.
* tag 'reset-for-v6.11-2' of git://git.pengutronix.de/pza/linux:
arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs
reset: renesas: Add USB VBUS regulator device as child
dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator
reset: tegra-bpmp: allow building under COMPILE_TEST
regulator: core: Add helper for allow HW access to enable/disable regulator
Link: https://lore.kernel.org/r/20240703100809.2773890-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:09:07 +0000 (11:09 +0200)]
Merge tag 'qcom-drivers-for-6.11' of https://git./linux/kernel/git/qcom/linux into soc/drivers
Qualcomm driver updates for v6.11
Support for Shared Memory (shm) Bridge is added, which provides a
stricter interface for handling of buffers passed to TrustZone.
The X1Elite platform is added to uefisecapp allow list, to instantiate
the efivars implementation.
A new in-kernel implementation of the pd-mapper (or servreg) service is
introduced, to replace the userspace dependency for USB Type-C and
battery management.
Support for sharing interrupts across multiple bwmon instances is added,
and a refcount imbalance issue is corrected.
The LLCC support for recent platforms is corrected, and SA8775P support
is added.
A new interface is added to SMEM, to expose "feature codes". One example
of the usecase for this is to indicate to the GPU driver which
frequencies are available on the given device.
The interrupt consumer and provider side of SMP2P is updated to provide
more useful names in interrupt stats.
Support for using the mailbox binding and driver for outgoing IPC
interrupt in the SMSM driver is introduced.
socinfo driver learns about SDM670 and IPQ5321, as well as get some
updates to the X1E PMICs.
pmic_glink is bumped to now support managing 3 USB Type-C ports.
* tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (48 commits)
soc: qcom: smp2p: Use devname for interrupt descriptions
soc: qcom: smsm: Add missing mailbox dependency to Kconfig
soc: qcom: add missing pd-mapper dependencies
soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances
dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances
dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list
firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new()
soc: qcom: add pd-mapper implementation
soc: qcom: pdr: extract PDR message marshalling data
soc: qcom: pdr: fix parsing of domains lists
soc: qcom: pdr: protect locator_addr with the main mutex
firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image()
firmware: qcom: scm: add support for SHM bridge memory carveout
firmware: qcom: tzmem: enable SHM Bridge support
firmware: qcom: scm: add support for SHM bridge operations
firmware: qcom: qseecom: convert to using the TZ allocator
firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator
firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator
firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator
firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator
...
Link: https://lore.kernel.org/r/20240705034410.13968-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Pascal Paillet [Fri, 5 Jul 2024 13:45:54 +0000 (15:45 +0200)]
arm64: stm32: enable scmi regulator for stm32
Add SCMI ARM REGULATOR configuration for stm32.
Signed-off-by: Pascal Paillet <p.paillet@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240705134554.2833835-1-alexandre.torgue@foss.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:07:32 +0000 (11:07 +0200)]
Merge tag 'ti-driver-soc-for-v6.11' of https://git./linux/kernel/git/ti/linux into soc/drivers
TI SoC driver updates for v6.11
- Update TISCI protocol URL link which was dead
- socinfo: Add j721E SR 2.0 detection support
- MAINTAINER list additions: ti,pruss.yaml and ti,j721e-system-controller.yaml
- pm33xx: log statement improvement
- knav_qmss: minor data structure optimization
* tag 'ti-driver-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
dt-bindings: soc: ti: Move ti,j721e-system-controller.yaml to soc/ti
MAINTAINERS: Add entry for ti,pruss.yaml to TI KEYSTONE MULTICORE NAVIGATOR DRIVERS
soc: ti: k3-socinfo: Add J721E SR2.0
soc: ti: knav_qmss: Constify struct knav_range_ops
firmware: ti_sci: fix TISCI protocol URL link
dt-bindings: ti: fix TISCI protocol URL link
soc: ti: pm33xx: Fix missing newlines in log statements
Link: https://lore.kernel.org/r/20240705151449.s4rngkehjn73favn@stream
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 09:05:26 +0000 (11:05 +0200)]
Merge tag 'riscv-firmware-for-v6.11' of https://git./linux/kernel/git/conor/linux into soc/drivers
RISC-V firmware drivers for v6.11
Microchip:
Support for writing "bitstream info" to the flash using the auto-update
driver. At this point the "bitstream info" is a glorified dtbo wrapper,
but there's plans to add more info there in the future. Additionally,
rework some allocations in the driver and use scope-based cleanup on
them.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-firmware-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
firmware: microchip: use scope-based cleanup where possible
firmware: microchip: move buffer allocation into mpfs_auto_update_set_image_address()
firmware: microchip: support writing bitstream info to flash
Link: https://lore.kernel.org/r/20240707-lukewarm-film-8a9da40a1c27@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 9 Jul 2024 08:53:48 +0000 (10:53 +0200)]
Merge tag 'riscv-cache-for-v6.11' of https://git./linux/kernel/git/conor/linux into soc/drivers
RISC-V cache drivers for v6.11
StarFive:
A new driver for the cache controller on the jh8100, which didn't
implement Zicbom and thus needs an implementation of non-standard cache
management operations.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-cache-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
MAINTAINERS: add microchip soc binding directory to microchip soc driver entry
MAINTAINERS: add cache binding directory to cache driver entry
cache: Add StarFive StarLink cache management
dt-bindings: cache: Add docs for StarFive Starlink cache controller
Link: https://lore.kernel.org/r/20240707-whoever-undesired-c5f6e96ae403@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Mon, 8 Jul 2024 19:35:03 +0000 (21:35 +0200)]
Merge tag 'tegra-for-6.11-soc' of https://git./linux/kernel/git/tegra/linux into soc/drivers
soc/tegra: Changes for v6.11-rc1
This is a simple change that condenses two function calls into one in
two places to save some boilerplate.
* tag 'tegra-for-6.11-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
soc/tegra: pmc: Simplify resource lookup
Link: https://lore.kernel.org/r/20240628210818.3627404-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Dmitry Baryshkov [Thu, 4 Jul 2024 11:12:46 +0000 (14:12 +0300)]
firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
corresponding platforms using SoC-level compat string. If later it's
found that the bad behaviour is limited just to the particular boards
rather than SoC, the compat strings can be adjusted.
Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Fixes:
f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Qualcomm RB3
Link: https://lore.kernel.org/r/20240704-shmbridge-blacklist-v1-1-14b027b3b2dc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 09:42:40 +0000 (11:42 +0200)]
soc: qcom: wcnss: simplify with cleanup.h
Allocate the memory with scoped/cleanup.h to reduce error handling (less
error paths) and make the code a bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240703-thermal-const-v1-5-6e59e139c65d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 09:42:39 +0000 (11:42 +0200)]
soc: qcom: pdr: simplify with cleanup.h
Allocate the memory with scoped/cleanup.h to reduce error handling (less
error paths) and make the code a bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240703-thermal-const-v1-4-6e59e139c65d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 09:42:38 +0000 (11:42 +0200)]
soc: qcom: ocmem: simplify with cleanup.h
Allocate the memory with scoped/cleanup.h to reduce error handling (less
error paths) and make the code a bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240703-thermal-const-v1-3-6e59e139c65d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 09:42:37 +0000 (11:42 +0200)]
soc: qcom: mdt_loader: simplify with cleanup.h
Allocate the memory with scoped/cleanup.h to reduce error handling and
make the code a bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240703-thermal-const-v1-2-6e59e139c65d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 09:42:36 +0000 (11:42 +0200)]
soc: qcom: llcc: simplify with cleanup.h
Allocate the memory with scoped/cleanup.h to reduce error handling and
make the code a bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240703-thermal-const-v1-1-6e59e139c65d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Krzysztof Kozlowski [Wed, 3 Jul 2024 08:30:46 +0000 (10:30 +0200)]
firmware: qcom: tzmem: simplify returning pointer without cleanup
Use 'return_ptr' helper for returning a pointer without cleanup for
shorter code.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240703083046.95811-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Luca Weiss [Wed, 3 Jul 2024 07:01:03 +0000 (09:01 +0200)]
soc: qcom: socinfo: Add PM6350 PMIC
Add the ID for the PM6350 PMIC found on e.g. SM7225 Fairphone 4.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240703-socinfo-pm6350-v1-1-e12369af3ed6@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Biju Das [Tue, 2 Jul 2024 18:00:18 +0000 (19:00 +0100)]
arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
Replace the fixed regulator for USB VBUS and use the proper one that
controls regulator based on VBUS detection.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240702180032.207275-5-biju.das.jz@bp.renesas.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Biju Das [Tue, 2 Jul 2024 18:00:17 +0000 (19:00 +0100)]
phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs
Use regulator_hardware_enable() for controlling VBUS enable for
RZ/G2L alike SoCs in interrupt context.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20240702180032.207275-4-biju.das.jz@bp.renesas.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Biju Das [Tue, 2 Jul 2024 18:00:16 +0000 (19:00 +0100)]
reset: renesas: Add USB VBUS regulator device as child
As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit
of the VBUS Control Register(VBENCTL) register in the USBPHY Control.
Expose this register as regmap and instantiate the USB VBUS regulator
device, so that consumer can control the vbus using regulator API's
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20240702180032.207275-3-biju.das.jz@bp.renesas.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Biju Das [Tue, 2 Jul 2024 18:00:15 +0000 (19:00 +0100)]
dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator
The VBUS enable can be controlled by the VBOUT bit of the VBUS control
register. This register is part of usbphy-ctrl IP.
Document the USB VBUS regulator object.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240702180032.207275-2-biju.das.jz@bp.renesas.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Philipp Zabel [Wed, 3 Jul 2024 08:50:10 +0000 (10:50 +0200)]
Merge tag 'regulator-hw-enable-helper' of https://git./linux/kernel/git/broonie/regulator into reset/next
regulator: Add helper to allow enable/disable in interrupt context
Add a helper function that enables exclusive consumers to bypass locking
and do an enable/disable from within interrupt context.
Link: https://lore.kernel.org/r/988df019-00d4-4209-8716-39e82c565bf1@sirena.org.uk
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Chris Lew [Thu, 27 Jun 2024 10:48:30 +0000 (16:18 +0530)]
soc: qcom: smp2p: Use devname for interrupt descriptions
When using /proc/interrupts to collect statistics on smp2p interrupt
counts, it is hard to distinguish the different instances of smp2p from
each other. For example to debug a processor boot issue, the ready and
handover interrupts are checked for sanity to ensure the firmware
reached a specific initialization stage.
Remove "smp2p" string from the irq request so that the irq will default
to the device name. Add an .irq_print_chip() callback to print the irq
chip name as the device name. These two changes allow for a unique name
to be used in /proc/interrupts as shown below.
/ # cat /proc/interrupts | grep smp2p
18: ... ipcc 196610 Edge smp2p-adsp
20: ... ipcc 131074 Edge smp2p-modem
170: ... smp2p-modem 1 Edge q6v5 ready
178: ... smp2p-adsp 1 Edge q6v5 ready
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240627104831.4176799-2-quic_sudeepgo@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Luca Weiss [Fri, 28 Jun 2024 17:30:23 +0000 (19:30 +0200)]
soc: qcom: smsm: Add missing mailbox dependency to Kconfig
Since the smsm driver got the ability to interact with the mailbox using
the mailbox subsystem and not just syscon, we need to add the dependency
to kconfig as well to avoid compile errors.
Fixes:
75287992f58a ("soc: qcom: smsm: Support using mailbox interface")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202406180006.Z397C67h-lkp@intel.com/
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240628-smsm-kconfig-v1-1-117d5af4ba1f@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Dmitry Baryshkov [Wed, 26 Jun 2024 19:12:37 +0000 (22:12 +0300)]
soc: qcom: add missing pd-mapper dependencies
The pd-mapper driver uses auxiliary bus and Qualcomm PDR message format
data. Add missing dependencies to the driver's Kconfig entry.
Reported-by: Mark Brown <broonie@kernel.org>
Fixes:
1ebcde047c54 ("soc: qcom: add pd-mapper implementation")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20240626-qcom-pd-mapper-fix-deps-v1-1-644678dc4663@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Arnd Bergmann [Mon, 1 Jul 2024 13:48:46 +0000 (15:48 +0200)]
Merge tag 'amlogic-drivers-for-v6.11' of https://git./linux/kernel/git/amlogic/linux into soc/drivers
Amlogic drivers changes for v6.11:
- Add S905L & A113X SoC IDs
- add missing MODULE_DESCRIPTION() macro for meson_sm driver
* tag 'amlogic-drivers-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
firmware: meson_sm: add missing MODULE_DESCRIPTION() macro
soc: amlogic: meson-gx-socinfo: add new A113X SoC id
soc: amlogic: meson-gx-socinfo: Add S905L ID
Link: https://lore.kernel.org/r/35093904-c4a8-432d-b010-a994fc1ee536@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:08 +0000 (13:30 +0200)]
platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG
Add support for true random number generator provided by the MCU.
New Omnia boards come without the Atmel SHA204-A chip. Instead the
crypto functionality is provided by new microcontroller, which has
a TRNG peripheral.
Signed-off-by: Marek Behún <kabel@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-7-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:07 +0000 (13:30 +0200)]
platform: cznic: turris-omnia-mcu: Add support for MCU watchdog
Add support for the watchdog mechanism provided by the MCU.
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-6-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:06 +0000 (13:30 +0200)]
platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup
Add support for true board poweroff (MCU can disable all unnecessary
voltage regulators) and wakeup at a specified time, implemented via a
RTC driver so that the rtcwake utility can be used to configure it.
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-5-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:05 +0000 (13:30 +0200)]
platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs
Add support for GPIOs connected to the MCU on the Turris Omnia board.
This includes:
- front button pin
- enable pins for USB regulators
- MiniPCIe / mSATA card presence pins in MiniPCIe port 0
- LED output pins from WAN ethernet PHY, LAN switch and MiniPCIe ports
- on board revisions 32+ also various peripheral resets and another
voltage regulator enable pin
Signed-off-by: Marek Behún <kabel@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-4-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:04 +0000 (13:30 +0200)]
platform: cznic: Add preliminary support for Turris Omnia MCU
Add the basic skeleton for a new platform driver for the microcontroller
found on the Turris Omnia board.
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-3-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Marek Behún [Mon, 1 Jul 2024 11:30:03 +0000 (13:30 +0200)]
dt-bindings: firmware: add cznic,turris-omnia-mcu binding
Add binding for cznic,turris-omnia-mcu, the device-tree node
representing the system-controller features provided by the MCU on the
Turris Omnia router.
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240701113010.16447-2-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Roger Quadros [Mon, 20 May 2024 12:05:41 +0000 (15:05 +0300)]
dt-bindings: soc: ti: Move ti,j721e-system-controller.yaml to soc/ti
soc/ti is the more appropriate location for the system controller
device tree binding documentation so move there.
Update Kishon's email address to a working one.
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240520-for-v6-11-j721e-syscon-v1-1-f57a93e12cad@kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
Philipp Zabel [Tue, 25 Jun 2024 12:51:41 +0000 (14:51 +0200)]
reset: tegra-bpmp: allow building under COMPILE_TEST
The Tegra BPMP reset driver can be compiled without TEGRA_BPMP being
enabled. Allow it to be built under COMPILE_TEST.
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20240625-reset-compile-bpmp-v1-1-647e846303d8@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Samuel Holland [Sat, 22 Jun 2024 15:07:29 +0000 (23:07 +0800)]
dt-bindings: sram: sunxi-sram: Add regulators child
Some sunxi SoCs have in-package regulators controlled by a register in
the system control MMIO block. Allow a child node for this regulator
device in addition to SRAM child nodes.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240622150731.1105901-2-wens@kernel.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Arnd Bergmann [Fri, 28 Jun 2024 16:40:53 +0000 (18:40 +0200)]
Merge tag 'mtk-soc-for-v6.11' of https://git./linux/kernel/git/mediatek/linux into soc/drivers
MediaTek driver updates for v6.11
This adds the previously missed Tone Curve Conversion (TCC)
MuteX bit to enable the same in MDP3 on the the MT8188 SoC,
disables 9-bit Alpha for display HDR support in MT8195 and
adds math operation support in the Global Command Engine for
all MediaTek SoCs, which will be used in the near future in
the ISP driver.
* tag 'mtk-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation
soc: mediatek: Disable 9-bit alpha in ETHDR
soc: mediatek: mtk-mutex: Add MDP_TCC0 mod to MT8188 mutex table
Link: https://lore.kernel.org/r/20240628093801.126013-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
MD Danish Anwar [Tue, 25 Jun 2024 15:33:15 +0000 (21:03 +0530)]
MAINTAINERS: Add entry for ti,pruss.yaml to TI KEYSTONE MULTICORE NAVIGATOR DRIVERS
Currently there is no entry for
Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml file. The driver
file corresponding to this binding file is drivers/soc/ti/pruss.c which
is maintained in TI KEYSTONE MULTICORE NAVIGATOR DRIVERS. Add the
binding file also to the same section so that this could be maintained.
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Link: https://lore.kernel.org/r/20240625153319.795665-2-danishanwar@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Neha Malcom Francis [Mon, 24 Jun 2024 06:52:05 +0000 (12:22 +0530)]
soc: ti: k3-socinfo: Add J721E SR2.0
Add support to detect J721E SR2.0
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Link: https://lore.kernel.org/r/20240624065205.718449-1-n-francis@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Christophe JAILLET [Sun, 23 Jun 2024 16:11:31 +0000 (18:11 +0200)]
soc: ti: knav_qmss: Constify struct knav_range_ops
'struct knav_range_ops' is not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
7498 1193 0 8691 21f3 drivers/soc/ti/knav_qmss_acc.o
After:
=====
text data bss dec hex filename
7566 1145 0 8711 2207 drivers/soc/ti/knav_qmss_acc.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/a8b4b428f97fc584f38bf45100aa9da241aeb935.1719159074.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Nishanth Menon <nm@ti.com>
Richard Genoud [Tue, 18 Jun 2024 15:09:33 +0000 (17:09 +0200)]
firmware: ti_sci: fix TISCI protocol URL link
The http://processors.wiki.ti.com EOL in january 2021
Fix the old URL with the new one.
Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Link: https://lore.kernel.org/r/20240618150933.1824185-3-richard.genoud@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Richard Genoud [Tue, 18 Jun 2024 15:09:32 +0000 (17:09 +0200)]
dt-bindings: ti: fix TISCI protocol URL link
The http://processors.wiki.ti.com EOL in january 2021
Fix the old URL with the new one.
Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240618150933.1824185-2-richard.genoud@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Vasyl Gomonovych [Fri, 17 May 2024 21:29:10 +0000 (14:29 -0700)]
soc: ti: pm33xx: Fix missing newlines in log statements
Add the missing newline characters to two pm33xx log statements
to ensure proper log formatting.
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Link: https://lore.kernel.org/r/20240517212930.2019962-1-gomonovych@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Conor Dooley [Wed, 26 Jun 2024 15:54:16 +0000 (16:54 +0100)]
MAINTAINERS: add microchip soc binding directory to microchip soc driver entry
I noticed that there's technically not an explicit maintainer for this
directory, even if the files currently in it are covered by either the
Mircochip FPGA or AT91 entries. Add it to the entry covering the
corresponding driver directory.
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Wed, 26 Jun 2024 15:54:17 +0000 (16:54 +0100)]
MAINTAINERS: add cache binding directory to cache driver entry
The directory covering cache controller bindings has no MAINTAINER other
than the fallback to myself, Rob and Krzysztof. Add it to the entry for
the corresponding drivers.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Arnd Bergmann [Thu, 27 Jun 2024 14:44:37 +0000 (16:44 +0200)]
Merge tag 'optee-notif-wait-timeout-for-v6.11' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers
optee: add timeout parameter for notification wait
* tag 'optee-notif-wait-timeout-for-v6.11' of https://git.linaro.org/people/jens.wiklander/linux-tee:
optee: add timeout value to optee_notif_wait() to support timeout
Link: https://lore.kernel.org/r/20240627095325.GA2585076@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Thu, 27 Jun 2024 14:43:17 +0000 (16:43 +0200)]
Merge tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux into soc/drivers
Reset controller updates for v6.11
Move reset controller registration to the end in rzg2l-usbphy-ctrl, to
simplify the probe error path, add a new i.MX8MP AudioMix reset driver,
allow to build some drivers under COMPILE_TEST with fewer dependencies,
and use the devm_clk_get_enabled convenience wrapper in meson-audio-arb.
The latter causes a trivial merge conflict [1] with
b99e9c096148f ("reset: meson-audio-arb: Convert to platform remove callback returning void")
because I didn't manage to send that in last round. There is no overlap
though.
[1] https://lore.kernel.org/all/Znmufb9L78FCoSSS@sirena.org.uk/
* tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux:
reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXC
reset: zynqmp: allow building under COMPILE_TEST
reset: imx8mp-audiomix: Add AudioMix Block Control reset driver
reset: meson-audio-arb: Use devm_clk_get_enabled()
reset: sti: allow building under COMPILE_TEST
reset: rzg2l-usbphy-ctrl: Move reset controller registration
Link: https://lore.kernel.org/r/20240626163258.61222-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Jeff Johnson [Tue, 25 Jun 2024 17:04:15 +0000 (10:04 -0700)]
soc: add missing MODULE_DESCRIPTION() macros
With ARCH=x86, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/imx/soc-imx8m.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-qmgr.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-npe.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/mediatek/mtk-cmdq-helper.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/amlogic/meson-clk-measure.o
Add the missing invocations of the MODULE_DESCRIPTION() macro.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> # for amlogic/meson-clk-measure.c
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240625-md-drivers-soc-v2-1-8bc7c03e3e69@quicinc.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Thu, 27 Jun 2024 14:41:41 +0000 (16:41 +0200)]
Merge tag 'ffa-updates-6.11' of git://git./linux/kernel/git/sudeep.holla/linux into soc/drivers
Arm FF-A driver updates for v6.11
The main addition is the split of bus and driver into distinct modules
The FF-A bus module is initialized at subsys_initcall level when builtin.
FF-A drivers initialization is now changed to module_init level so that
pKVM ffa proxy is all setup and running in case pKVM hypervisor needs to
trap and handle FF-A calls.
One of the reason for not having this split from the beginning is the
need to workaround the FF-A v1.0 NULL UUID. The FF-A bus layer called
into FF-A driver and populated the device UUID if it matches with the
driver attempting to match. Moving the workaround away from the FF-A
bus layer to the FF-A core driver as a bus notifier will help to remove
the dependency.
* tag 'ffa-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
firmware: arm_ffa: Split bus and driver into distinct modules
firmware: arm_ffa: Move the FF-A v1.0 NULL UUID workaround to bus notifier
Link: https://lore.kernel.org/r/20240624103451.2870146-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Thu, 27 Jun 2024 14:40:33 +0000 (16:40 +0200)]
Merge tag 'scmi-updates-6.11' of git://git./linux/kernel/git/sudeep.holla/linux into soc/drivers
Arm SCMI driver updates for v6.11
The main addition this time is the support for platform to agent(p2a
also referred sometimes as notification or Rx) channel completion via
interrupt driven method. Currently, the OSPM agent clears or
acknowledge the receipt of the norification or delayed response by
updating the flags in the shared memory region which the platform is
expected to poll.
On some platforms that are completely interrupt driven, the OSPM
agent is expected to send a response message instead. This change
adds the support for the same.
Other changes include addition of a separate mailing list specific to
SCMI to allow open discussions about the interface itself in addition
to the kernel driver updates and support for system suspend via the
platform noification used on some systems.
* tag 'scmi-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
firmware: arm_scmi: Add support for platform to agent channel completion
dt-bindings: firmware: arm,scmi: Add support for notification completion channel
firmware: arm_scmi: Add support for system suspend in power control driver
MAINTAINERS: Add mailing list for SCMI drivers
Link: https://lore.kernel.org/r/20240620093924.375244-3-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Jason-JH.Lin [Tue, 25 Jun 2024 08:39:57 +0000 (16:39 +0800)]
soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation
Add cmdq_pkt_logic_command to support math operation.
cmdq_pkt_logic_command can append logic command to the CMDQ packet,
ask GCE to execute a arithmetic calculate instruction,
such as add, subtract, multiply, AND, OR and NOT, etc.
Note that all arithmetic instructions are unsigned calculations.
If there are any overflows, GCE will sent the invalid IRQ to notify
CMDQ driver.
Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Link: https://lore.kernel.org/r/20240625083957.3540-1-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Hsiao Chien Sung [Wed, 19 Jun 2024 16:50:24 +0000 (00:50 +0800)]
soc: mediatek: Disable 9-bit alpha in ETHDR
When 9-bit alpha is enabled, its value will be converted from 0-255 to
0-256 (255 = not defined). This is designed for special HDR related
calculation, which should be disabled by default, otherwise, alpha
blending will not work correctly.
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240620-9bit_alpha-v1-1-13c69daaf29f@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
AngeloGioacchino Del Regno [Wed, 19 Jun 2024 10:30:34 +0000 (12:30 +0200)]
soc: mediatek: mtk-mutex: Add MDP_TCC0 mod to MT8188 mutex table
MT8188's MDP3 is able to use MDP_TCC0, this mutex_mod bit does
actually exist and it's the same as MT8195: add it to the table.
Fixes:
26bb17dae6fa ("soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS")
Reviewed-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20240619103034.110377-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Jon Hunter [Tue, 11 Jun 2024 07:56:03 +0000 (08:56 +0100)]
soc/tegra: pmc: Simplify resource lookup
Commit
6f4429e21a7f ("soc/tegra: pmc: Update address mapping sequence
for PMC apertures") updated the resource lookup code in the PMC driver.
Instead of calling platform_get_resource_byname() and
devm_ioremap_resource() simplify the code by simply calling
devm_platform_ioremap_resource_byname().
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Biju Das [Sun, 16 Jun 2024 10:53:55 +0000 (11:53 +0100)]
regulator: core: Add helper for allow HW access to enable/disable regulator
Add a helper function that allow regulator consumers to allow low-level
HW access, in order to enable/disable regulator in atomic context.
The use-case for RZ/G2L SoC is to enable VBUS selection register based
on vbus detection that happens in interrupt context.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20240616105402.45211-4-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sibi Sankar [Mon, 24 Jun 2024 09:22:13 +0000 (14:52 +0530)]
soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances
The multiple BWMONv4 instances available on the X1E80100 SoC use the
same interrupt number. Mark them are shared to allow for re-use across
instances.
Using IRQF_SHARED coupled with devm_request_threaded_irq implies that
the irq can still trigger during/after bwmon_remove due to other active
bwmon instances. Handle this race by relying on bwmon_disable to disable
the interrupt and coupled with explicit request/free irqs.
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240624092214.146935-4-quic_sibis@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Sibi Sankar [Mon, 24 Jun 2024 09:22:12 +0000 (14:52 +0530)]
dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances
Document X1E80100 BWMONs, which has multiple (one per cluster) BWMONv4
instances for the CPU->LLCC path and one BWMONv5 instance for LLCC->DDR
path.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Acked-by: Georgi Djakov <djakov@kernel.org>
Link: https://lore.kernel.org/r/20240624092214.146935-3-quic_sibis@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Sibi Sankar [Mon, 24 Jun 2024 09:22:11 +0000 (14:52 +0530)]
dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list
Remove opp-table from the required list as the bindings shouldn't care
where the OPP tables (referenced by the operating-points-v2 property)
comes from.
Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Georgi Djakov <djakov@kernel.org>
Link: https://lore.kernel.org/r/20240624092214.146935-2-quic_sibis@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Geert Uytterhoeven [Tue, 25 Jun 2024 11:57:48 +0000 (13:57 +0200)]
reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXC
The i.MX8MP AudioMix reset controller is only present on Freescale i.MX8
SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user
about this driver when configuring a kernel without i.MX SoC support.
Fixes:
fe125601d17cc1ea ("reset: imx8mp-audiomix: Add AudioMix Block Control reset driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/6d8116a56186fbf468229e823c7c8dfcd9488959.1719316665.git.geert+renesas@glider.be
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Bartosz Golaszewski [Mon, 24 Jun 2024 19:06:14 +0000 (21:06 +0200)]
firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new()
EXPORT_SYMBOL_GPL() is missing for devm_qcom_tzmem_pool_new() which
causes build failures with randconfig. Add it and fix the issue.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202406250127.8Pl2kqFp-lkp@intel.com
Fixes:
84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240624190615.36282-1-brgl@bgdev.pl
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bjorn Andersson [Mon, 24 Jun 2024 03:41:51 +0000 (22:41 -0500)]
Merge branch '
20240622-qcom-pd-mapper-v9-0-
a84ee3591c8e@linaro.org' into drivers-for-6.11
Merge the in-kernel protection-domain mapper implementation through a
feature branch, to allow sharing with the remoteproc tree.
Dmitry Baryshkov [Fri, 21 Jun 2024 22:03:43 +0000 (01:03 +0300)]
soc: qcom: add pd-mapper implementation
Existing userspace protection domain mapper implementation has several
issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't
reread JSON files if firmware location is changed (or if firmware was
not available at the time pd-mapper was started but the corresponding
directory is mounted later), etc.
Provide in-kernel service implementing protection domain mapping
required to work with several services, which are provided by the DSP
firmware.
This module is loaded automatically by the remoteproc drivers when
necessary via the symbol dependency. It uses a root node to match a
protection domains map for a particular board. It is not possible to
implement it as a 'driver' as there is no corresponding device.
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-4-a84ee3591c8e@linaro.org
[bjorn: include linux/slab.h]
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Philipp Zabel [Fri, 21 Jun 2024 15:24:47 +0000 (17:24 +0200)]
reset: zynqmp: allow building under COMPILE_TEST
The ZynqMP reset driver can be compiled without ARCH_ZYNQMP being
enabled. Allow it to be built under COMPILE_TEST.
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240621-reset-compile-zynqmp-v1-1-ede43ab18101@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Shengjiu Wang [Mon, 24 Jun 2024 03:39:05 +0000 (11:39 +0800)]
reset: imx8mp-audiomix: Add AudioMix Block Control reset driver
Add support for the resets on i.MX8MP Audio Block Control module,
which includes the EARC PHY software reset and EARC controller
software reset. The reset controller is created using the auxiliary
device framework and set up in the clock driver.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/1719200345-32006-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Jeff Johnson [Thu, 13 Jun 2024 21:18:48 +0000 (14:18 -0700)]
firmware: meson_sm: add missing MODULE_DESCRIPTION() macro
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/meson/meson_sm.o
Add the missing invocation of the MODULE_DESCRIPTION() macro.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-firmware-meson-v1-1-28e4138a8597@quicinc.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Philipp Zabel [Fri, 21 Jun 2024 15:28:12 +0000 (17:28 +0200)]
reset: meson-audio-arb: Use devm_clk_get_enabled()
Use devm_clk_get_enabled() to reduce a bit of boilerplate and to
disable the clock in case devm_reset_controller_register() fails.
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240621-reset-devm-clk-get-enabled-v1-1-8408c7962b6c@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Philipp Zabel [Fri, 21 Jun 2024 15:21:09 +0000 (17:21 +0200)]
reset: sti: allow building under COMPILE_TEST
The STIH407 reset driver can be compiled without ARCH_STI being
enabled. Allow it to be built under COMPILE_TEST.
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20240621-reset-compile-sti-v1-1-b7a66ce29911@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Dmitry Baryshkov [Fri, 21 Jun 2024 22:03:42 +0000 (01:03 +0300)]
soc: qcom: pdr: extract PDR message marshalling data
The in-kernel PD mapper is going to use same message structures as the
QCOM_PDR_HELPERS module. Extract message marshalling data to separate
module that can be used by both PDR helpers and by PD mapper.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-3-a84ee3591c8e@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Dmitry Baryshkov [Fri, 21 Jun 2024 22:03:41 +0000 (01:03 +0300)]
soc: qcom: pdr: fix parsing of domains lists
While parsing the domains list, start offsets from 0 rather than from
domains_read. The domains_read is equal to the total count of the
domains we have seen, while the domains list in the message starts from
offset 0.
Fixes:
fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-2-a84ee3591c8e@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Dmitry Baryshkov [Fri, 21 Jun 2024 22:03:40 +0000 (01:03 +0300)]
soc: qcom: pdr: protect locator_addr with the main mutex
If the service locator server is restarted fast enough, the PDR can
rewrite locator_addr fields concurrently. Protect them by placing
modification of those fields under the main pdr->lock.
Fixes:
fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-1-a84ee3591c8e@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Linus Torvalds [Sun, 23 Jun 2024 21:08:54 +0000 (17:08 -0400)]
Linux 6.10-rc5
Bartosz Golaszewski [Mon, 27 May 2024 12:55:03 +0000 (14:55 +0200)]
firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image()
The "memory protection" mechanism mentioned in the comment is the SHM
Bridge. This is also the reason why we do not convert this call to using
the TZ memory allocator.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-13-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:55:02 +0000 (14:55 +0200)]
firmware: qcom: scm: add support for SHM bridge memory carveout
Parse the "memory-region" property and - if present - use it to assign
the dedicated reserved memory to the underlying DMA callbacks which will
then allocate memory for the SCM calls from it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-12-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:55:01 +0000 (14:55 +0200)]
firmware: qcom: tzmem: enable SHM Bridge support
SHM Bridge is a safety mechanism allowing to limit the amount of memory
shared between the kernel and the TrustZone to regions explicitly marked
as such.
Add a variant of the tzmem allocator that configures the memory pools as
SHM bridges. It also enables the SHM bridge globally so non-SHM bridge
memory will no longer work with SCM calls.
If enabled at build-time, it will still be checked for availability at
run-time. If the architecture doesn't support SHM Bridge, the allocator
will fall back to the generic mode.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-11-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:55:00 +0000 (14:55 +0200)]
firmware: qcom: scm: add support for SHM bridge operations
SHM Bridge is a safety mechanism allowing to limit the amount of memory
shared between the kernel and the TrustZone to regions explicitly marked
as such.
Add low-level primitives for enabling SHM bridge support as well as
creating and destroying SHM bridges to qcom-scm.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-10-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:59 +0000 (14:54 +0200)]
firmware: qcom: qseecom: convert to using the TZ allocator
Drop the DMA mapping operations from qcom_scm_qseecom_app_send() and
convert all users of it in the qseecom module to using the TZ allocator
for creating SCM call buffers. As this is largely a module separate from
the SCM driver, let's use a separate memory pool. Set the initial size to
4K and - if we run out - add twice the current amount to the pool.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Amirreza Zarrabi <quic_azarrabi@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-9-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:58 +0000 (14:54 +0200)]
firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator
Let's use the new TZ memory allocator to obtain a buffer for this call
instead of manually kmalloc()ing it and then mapping to physical space.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-8-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:57 +0000 (14:54 +0200)]
firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator
Let's use the new TZ memory allocator to obtain a buffer for this call
instead of using dma_alloc_coherent().
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-7-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:56 +0000 (14:54 +0200)]
firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator
Let's use the new TZ memory allocator to obtain a buffer for this call
instead of using dma_alloc_coherent().
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-6-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:55 +0000 (14:54 +0200)]
firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator
Let's use the new TZ memory allocator to obtain a buffer for this call
instead of using dma_alloc_coherent().
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-5-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:54 +0000 (14:54 +0200)]
firmware: qcom: scm: smc: switch to using the SCM allocator
We need to allocate, map and pass a buffer to the trustzone if we have
more than 4 arguments for a given SCM call. Let's use the new TrustZone
allocator for that memory and shrink the code in process.
As this code lives in a different compilation unit than the rest of the
SCM code, we need to provide a helper in the form of
qcom_scm_get_tzmem_pool() that allows the SMC low-level routines to
access the SCM memory pool.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-4-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:53 +0000 (14:54 +0200)]
firmware: qcom: scm: enable the TZ mem allocator
Select the TrustZone memory allocator in Kconfig and create a pool of
memory shareable with the TrustZone when probing the SCM driver.
This will allow a gradual conversion of all relevant SCM calls to using
the dedicated allocator.
The policy used for the pool is "on-demand" and the initial size is 0
as - depending on the config - it's possible that no SCM calls needing
to allocate memory will be called. The sizes of possible allocations also
vary substiantially further warranting the "on-demand" approach.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-3-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:52 +0000 (14:54 +0200)]
firmware: qcom: add a dedicated TrustZone buffer allocator
We have several SCM calls that require passing buffers to the TrustZone
on top of the SMC core which allocates memory for calls that require
more than 4 arguments.
Currently every user does their own thing which leads to code
duplication. Many users call dma_alloc_coherent() for every call which
is terribly unperformant (speed- and size-wise).
Provide a set of library functions for creating and managing pools of
memory which is suitable for sharing with the TrustZone, that is:
page-aligned, contiguous and non-cachable as well as provides a way of
mapping of kernel virtual addresses to physical space.
Make the allocator ready for extending with additional modes of operation
which will allow us to support the SHM bridge safety mechanism once all
users convert.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-2-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bartosz Golaszewski [Mon, 27 May 2024 12:54:51 +0000 (14:54 +0200)]
dt-bindings: firmware: qcom,scm: add memory-region for sa8775p
Document a new property (currently only for sa8775p) that describes the
memory region reserved for communicating with the TrustZone.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-1-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Linus Torvalds [Sun, 23 Jun 2024 15:06:01 +0000 (11:06 -0400)]
Merge tag 'i2c-for-6.10-rc5' of git://git./linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"The core gains placeholders for recently added functions when
CONFIG_I2C is not defined as well documentation fixes to start using
inclusive terminology.
The drivers get paths in DT bindings fixed as well as proper interrupt
handling for the ocores driver"
* tag 'i2c-for-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
docs: i2c: summary: be clearer with 'controller/target' and 'adapter/client' pairs
docs: i2c: summary: document 'local' and 'remote' targets
docs: i2c: summary: document use of inclusive language
docs: i2c: summary: update speed mode description
docs: i2c: summary: update I2C specification link
docs: i2c: summary: start sentences consistently.
i2c: Add nop fwnode operations
i2c: ocores: set IACK bit after core is enabled
dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema
dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema
Linus Torvalds [Sun, 23 Jun 2024 15:01:57 +0000 (11:01 -0400)]
Merge tag '6.10-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French:
"Five smb3 client fixes
- three nets/fiolios cifs fixes
- fix typo in module parameters description
- fix incorrect swap warning"
* tag '6.10-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Move the 'pid' from the subreq to the req
cifs: Only pick a channel once per read request
cifs: Defer read completion
cifs: fix typo in module parameter enable_gcm_256
cifs: drop the incorrect assertion in cifs_swap_rw()
Linus Torvalds [Sun, 23 Jun 2024 14:32:24 +0000 (10:32 -0400)]
Merge tag 'fixes-2024-06-23' of git://git./linux/kernel/git/rppt/memblock
Pull memblock fix from Mike Rapoport:
"Fix fragility in checks for unset node ID.
Use numa_valid_node() function to verify that nid is a valid node
ID instead of inconsistent comparisons with either NUMA_NO_NODE or
MAX_NUMNODES"
* tag 'fixes-2024-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
memblock: use numa_valid_node() helper to check for invalid node ID
Linus Torvalds [Sun, 23 Jun 2024 14:20:02 +0000 (07:20 -0700)]
Merge tag 'mips-fixes_6.10_2' of git://git./linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer:
- fix lseek in o32 compat mode
- fix for microMIPS MT ASE helpers
* tag 'mips-fixes_6.10_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
mips: fix compat_sys_lseek syscall
MIPS: mipsmtregs: Fix target register for MFTC0
Linus Torvalds [Sun, 23 Jun 2024 14:16:13 +0000 (07:16 -0700)]
Merge tag 'x86_urgent_for_v6.10_rc5' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Borislav Petkov:
- An ARM-relevant fix to not free default RMIDs of a resource control
group
- A randconfig build fix for the VMware virtual GPU driver
* tag 'x86_urgent_for_v6.10_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/resctrl: Don't try to free nonexistent RMIDs
drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
Linus Torvalds [Sun, 23 Jun 2024 14:13:23 +0000 (07:13 -0700)]
Merge tag 'powerpc-6.10-3' of git://git./linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
- Prevent use-after-free in 64-bit KVM VFIO
- Add generated Power8 crypto asm to .gitignore
Thanks to Al Viro and Nathan Lynch.
* tag 'powerpc-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
powerpc/crypto: Add generated P8 asm to .gitignore
Wolfram Sang [Sun, 23 Jun 2024 00:13:27 +0000 (02:13 +0200)]
Merge tag 'i2c-host-fixes-6.10-rc5' of git://git./linux/kernel/git/andi.shyti/linux into i2c/for-current
This pull request fixes the paths of the dt-schema to their
complete locations for the ChromeOS EC tunnel driver and the
Atmel at91sam drivers.
Additionally, the OpenCores driver receives a fix for an issue
that dates back to version 2.6.18. Specifically, the interrupts
need to be acknowledged (clearing all pending interrupts) after
enabling the core.
Linus Torvalds [Sat, 22 Jun 2024 22:29:49 +0000 (15:29 -0700)]
Merge tag 'rust-fixes-6.10' of https://github.com/Rust-for-Linux/linux
Pull rust fix from Miguel Ojeda:
- Avoid unused import warning in 'rusttest'.
* tag 'rust-fixes-6.10' of https://github.com/Rust-for-Linux/linux:
rust: avoid unused import warning in `rusttest`