summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-02Revert "dt-bindings: reset: mobileye,eyeq5-reset: add bindings"Théo Lebrun
Switch from one sub-node per functionality in the system-controller to a single node representing the entire OLB instance. This is the recommended approach for controllers handling many different functionalities; it is a single controller and should be represented by a single devicetree node. The reset bindings is removed and all properties will be described by: soc/mobileye/mobileye,eyeq5-olb.yaml Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240730-mbly-reset-v2-1-00b870a6a2ff@bootlin.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: reset-meson: Add support for Amlogic T7 SoC reset controllerZelong Dong
There are 7 sets of Reset Source in Amlogic T7 SoC reset controller, and the offset between base and level registers is 0x40. Add a new compatible string and struct meson_reset_param to support the reset controller on T7 SoC. Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240422-t7-reset-v2-2-cb82271d3296@amlogic.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02dt-bindings: reset: Add Amlogic T7 reset controllerZelong Dong
Add a new compatible for Amlogic T7 reset controller. Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240422-t7-reset-v2-1-cb82271d3296@amlogic.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: core: add get_device()/put_device on rcdevClément Léger
Since the rcdev structure is allocated by the reset controller drivers themselves, they need to exists as long as there is a consumer. A call to module_get() is already existing but that does not work when using device-tree overlays. In order to guarantee that the underlying reset controller device does not vanish while using it, add a get_device() call when retrieving a reset control from a reset controller device and a put_device() when releasing that control. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240808154658.247873-8-herve.codina@bootlin.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: lpc18xx: simplify with devm_clk_get_enabled()Krzysztof Kozlowski
Use devm_clk_get_enabled() to drop clock prepare/unprepare parts and make the code simpler. Change to dev_err_probe() in handling reset_controller_register() error to make it even simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-5-03f6d834f8c0@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: lpc18xx: simplify with dev_err_probe()Krzysztof Kozlowski
Use dev_err_probe() to avoid dmesg flood on actual defer. This makes the code also simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-4-03f6d834f8c0@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: simplify locking with guard()Krzysztof Kozlowski
Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-3-03f6d834f8c0@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: k210: fix OF node leak in probe() error pathKrzysztof Kozlowski
Driver is leaking OF node reference on memory allocation failure. Acquire the OF node reference after memory allocation to fix this and keep it simple. Fixes: 5a2308da9f60 ("riscv: Add Canaan Kendryte K210 reset controller") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-2-03f6d834f8c0@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02reset: berlin: fix OF node leak in probe() error pathKrzysztof Kozlowski
Driver is leaking OF node reference on memory allocation failure. Acquire the OF node reference after memory allocation to fix this and keep it simple. Fixes: aed6f3cadc86 ("reset: berlin: convert to a platform driver") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-1-03f6d834f8c0@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02Merge tag 'v6.12-rockchip-drivers-1' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/drivers rk3308 io-domains, and some default settings for bits in the general register files for rk3128 and the new rk3576 soc. * tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: grf: Add rk3576 default GRF values dt-bindings: soc: rockchip: Add rk3576 syscon compatibles soc: rockchip: grf: Set RK3128's vpu main clock soc: rockchip: io-domain: Add RK3308 IO voltage domains dt-bindings: power: rockchip: Document RK3308 IO voltage domains Link: https://lore.kernel.org/r/23316481.ssLaC8jLEa@diego Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02Merge tag 'memory-controller-drv-6.12' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.12 1. Tegra210 EMC: Driver refactoring and rework. 2. Tegra186 EMC: Drop unused function. 3. FSL WEIM: Correct fsl,weim-cs-timing property to properly validate it as an array. 4. TI AEMIF: Drop platform data support. 5. TI EMIF: Switch to of_property_read_bool(). 6. Several cleanups in multiple drivers: TI AEMIF and EMIF, Tegra EMC/MC, Atmel EBI, Samsung Exynos5422 DMC, STM32 FMC2 EBI, OMAP GPMC, PL172 and PL1353 SMC. These are mostly code simplifying around probe() like using - devm_clk_get_enabled(), - dev_err_probe(), - scoped device node handling (cleanup.h), - scoped for each OF child loops, - scoped/guard locks. * tag 'memory-controller-drv-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (35 commits) memory: mtk-smi: Use devm_clk_get_enabled() memory: pl353-smc: simplify with devm_clk_get_enabled() memory: pl353-smc: simplify with dev_err_probe() memory: pl172: simplify with devm_clk_get_enabled() memory: pl172: simplify with dev_err_probe() memory: omap-gpmc: simplify locking with guard() memory: emif: simplify locking with guard() memory: emif: drop unused 'irq_state' member memory: ti-aemif: Revert "memory: ti-aemif: don't needlessly iterate over child nodes" memory: ti-aemif: simplify with scoped for each OF child loop memory: ti-aemif: simplify with dev_err_probe() memory: tegra30-emc: simplify with scoped for each OF child loop memory: tegra20-emc: simplify with scoped for each OF child loop memory: tegra124-emc: simplify with scoped for each OF child loop memory: tegra-mc: simplify with scoped for each OF child loop memory: stm32-fmc2-ebi: simplify with dev_err_probe() memory: stm32-fmc2-ebi: simplify with scoped for each OF child loop memory: samsung: exynos5422-dmc: use scoped device node handling to simplify error paths memory: samsung: exynos5422-dmc: simplify dmc->dev usage memory: atmel-ebi: simplify with scoped for each OF child loop ... Link: https://lore.kernel.org/r/20240827122926.30794-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02Merge tag 'samsung-drivers-6.12' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC drivers for v6.12 1. Improve Samsung USI (Universal Serial Interface) DT binding, 2. Cleanup old Samsung MFC TXT binding. * tag 'samsung-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: media: s5p-mfc: Remove s5p-mfc.txt binding dt-bindings: samsung: exynos-usi: add missing constraints Link: https://lore.kernel.org/r/20240827121638.29707-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Deduplicate command execution codeMarek Behún
Deduplicate rWTM command execution calls mbox_send_message() wait_for_completion() mox_get_status() to one function mox_rwtm_exec() Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-17-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use ALIGN() instead of hardcodingMarek Behún
Use ALIGN(max, 4) instead of hardcoding ((max + 3) & ~3). Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-16-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use EOPNOTSUPP instead of ENOSYSMarek Behún
Checkpatch warns agains -ENOSYS: WARNING: ENOSYS means 'invalid syscall nr' and nothing else Use EOPNOTSUPP instead. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-15-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use container_of() instead of hwrng .priv memberMarek Behún
Use container_of() to get driver private structure from hwnrg structure, instead of the hwrng's .priv member, as suggested by Herbert for another driver. Link: https://lore.kernel.org/soc/ZmLhQBdmg613KdET@gondor.apana.org.au/ Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-14-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use devm_mutex_init() instead of mutex_init()Marek Behún
Use devm_mutex_init() instead of mutex_init(), to properly call mutex_destroy() on probe failure / driver unbind. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-13-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Drop redundant device pointerMarek Behún
Drop redundant device pointer from driver's private structure. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-12-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use dev_err_probe() where possibleMarek Behún
Use dev_err_probe() where possible in the driver's .probe() method. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-11-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Convert rest to devm_* and get rid of driver ↵Marek Behún
.remove() Use devm resource management for driver's mailbox. This allows us to get rid of the driver's .remove() method and the gotos in .probe(). Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-10-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Simplify debugfs codeMarek Behún
Simplify debugfs code: do not check for errors, as debugfs errors should be ignored, and use devm action for dropping the debugfs directory. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-9-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Don't create own kobject typeMarek Behún
In order to create attribute files in /sys/firmware/turris-mox-rwtm, this driver creates it's own kobject type. Simplify this by dropping this own kobject creation, and instead creating standard device attribute files. For backwards compatibility with sysfs ABI, create a symlink /sys/firmware/turris-mox-rwtm, pointing to this device's sysfs directory. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-8-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use sysfs_emit() instead of sprintf()Marek Behún
Use sysfs_emit() instead of sprintf() in sysfs attribute .show() method. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-7-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Fix driver includesMarek Behún
Drop including of.h, include several other headers that are used but not included directly. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-6-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Hide signature related constants behind macrosMarek Behún
Hide signature generation related constants behind macros instead of hardcoding the values. Use SHA512_DIGEST_SIZE from crypto/sha2.h instead of hardcoded 64 as the message size. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-5-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use the boolean type where appropriateMarek Behún
Use the boolean type for has_board_info, has_pubkey and last_sig_done members of the driver's private structure. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-4-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use ETH_ALEN instead of hardcoded 6Marek Behún
Use the ETH_ALEN macro instead of hardcoded 6 for MAC address length. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-3-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02firmware: turris-mox-rwtm: Use macro constant instead of hardcoded 4096Marek Behún
The 4096 bytes limit in mox_hwrng_read() is due to the DMA buffer being allocated to one PAGE_SIZE bytes. Use new local macro constant RWTM_DMA_BUFFER_SIZE at allocation time and when used in mox_hwrng_read(). Use SZ_4K instead of PAGE_SIZE. Although PAGE_SIZE is never set to a larger value on Armada 3720, it theoretically could, and this would be a waste of space. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240831092050.23093-2-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02dt-bindings: reset: socionext,uniphier-glue-reset: add top-level constraintsKrzysztof Kozlowski
Properties with variable number of items per each device are expected to have widest constraints in top-level "properties:" block and further customized (narrowed) in "if:then:". Add missing top-level constraints for clock-names and reset-names. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240818172819.121697-1-krzysztof.kozlowski@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02bus: integrator-lm: fix OF node leak in probe()Krzysztof Kozlowski
Driver code is leaking OF node reference from of_find_matching_node() in probe(). Fixes: ccea5e8a5918 ("bus: Add driver for Integrator/AP logic modules") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/20240826054934.10724-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-09-02ARM: versatile: fix OF node leak in CPUs prepareKrzysztof Kozlowski
Machine code is leaking OF node reference from of_find_matching_node() in realview_smp_prepare_cpus(). Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/20240826054934.10724-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30soc: versatile: enable compile testingKrzysztof Kozlowski
Enable compile testing for broader build coverage. None of the drivers use anything from "asm", so code should build everywhere. CONFIG_PLAT_VERSATILE is being selected by driver dependencies (CONFIG_ARCH_INTEGRATOR and CONFIG_ARCH_REALVIEW), so directory can be always added to Makefile targets without impacting other configurations. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-4-ff4b35abed83@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30soc: versatile: realview: fix soc_dev leak during device removeKrzysztof Kozlowski
If device is unbound, the soc_dev should be unregistered to prevent memory leak. Fixes: a2974c9c1f83 ("soc: add driver for the ARM RealView") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-3-ff4b35abed83@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30soc: versatile: realview: fix memory leak during device removeKrzysztof Kozlowski
If device is unbound, the memory allocated for soc_dev_attr should be freed to prevent leaks. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-2-ff4b35abed83@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30soc: versatile: integrator: fix OF node leak in probe() error pathKrzysztof Kozlowski
Driver is leaking OF node reference obtained from of_find_matching_node(). Fixes: f956a785a282 ("soc: move SoC driver for the ARM Integrator") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-1-ff4b35abed83@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-29soc/tegra: pmc: Simplify with scoped for each OF child loopJinjie Ruan
Use scoped for_each_child_of_node_scoped() when iterating over device nodes to make code a bit simpler. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-08-28rtc: support i.MX95 BBM RTCPeng Fan
The BBM module provides RTC feature. To i.MX95, this module is managed by System Manager and exported System Control Management Interface(SCMI). Linux could use i.MX SCMI BBM Extension protocol to use RTC feature. This driver is to use SCMI interface to get/set RTC. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-6-e600ed9e9271@nxp.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28input: keyboard: support i.MX95 BBM modulePeng Fan
The BBM module provides BUTTON feature. To i.MX95, this module is managed by System Manager and exported using System Management Control Interface(SCMI). Linux could use i.MX SCMI BBM Extension protocol to use BUTTON feature. This driver is to use SCMI interface to enable pwrkey. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-7-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: imx: Add i.MX95 MISC driverPeng Fan
The i.MX95 System manager exports SCMI MISC protocol for linux to do various settings, such as set board gpio expander as wakeup source. The driver is to add the support. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-5-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: arm_scmi: Add initial support for i.MX MISC protocolPeng Fan
i.MX95 System Manager(SM) firmware includes a SCMI vendor protocol, SCMI MISC protocol which includes controls that are misc settings/actions that must be exposed from the SM to agents. They are device specific and are usually define to access bit fields in various mix block control modules, IOMUX_GPR, and other General Purpose registers, Control Status Registers owned by the SM. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-3-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: arm_scmi: Add initial support for i.MX BBM protocolPeng Fan
i.MX95 has a battery-backed module(BBM), which has persistent storage (GPR), an RTC, and the ON/OFF button. The System Manager(SM) firmware use SCMI vendor protocol(SCMI BBM) to let agent be able to use GPR, RTC and ON/OFF button. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-2-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: arm_scmi: Add NXP i.MX95 SCMI documentationPeng Fan
Add NXP i.MX95 System Control Management Interface(SCMI) vendor extensions protocol documentation. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-4-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28dt-bindings: firmware: Add i.MX95 SCMI Extension protocolPeng Fan
Add i.MX SCMI Extension protocols bindings for: - Battery Backed Module(BBM) Protocol This contains persistent storage (GPR), an RTC, and the ON/OFF button. The protocol can also provide access to similar functions implemented via external board components. - MISC Protocol. This includes controls that are misc settings/actions that must be exposed from the SM to agents. They are device specific and are usually define to access bit fields in various mix block control modules, IOMUX_GPR, and other GPR/CSR owned by the SM. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-Id: <20240823-imx95-bbm-misc-v2-v8-1-e600ed9e9271@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28soc: ti: pm33xx: do device_node auto cleanupKousik Sanagavarapu
Use scope based cleanup instead of manual of_node_put() calls, hence simplifying the handling of error paths. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240825085714.10736-5-five231003@gmail.com Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28soc: ti: knav_qmss_queue: do device_node auto cleanupKousik Sanagavarapu
Use scope based cleanup, instead of manual of_node_put() calls, which automatically free()s "struct device_node". While at it, refactor the code from knav_queue_probe() into the separate functions to make auto cleanup look more neat. Doing the cleanup this way has the advantage of reducing the chance of memory leaks in case we need to read from new OF nodes in the future when we probe. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240825085714.10736-4-five231003@gmail.com Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28soc: ti: pruss: do device_node auto cleanupKousik Sanagavarapu
Use scope based cleanup instead of manual of_node_put() calls, hence simplifying the handling of error paths at various places. While at it, use dev_err_probe() instead of dev_err() in all the code paths touched. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240825085714.10736-3-five231003@gmail.com Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28soc: ti: pruss: factor out memories setupKousik Sanagavarapu
Factor out memories setup code from probe() into a new function pruss_of_setup_memories(). This sets the stage for introducing auto cleanup of the device node (done in the subsequent patch), since the clean up depends on the scope of the pointer and factoring out code into a separate function obviously limits the scope of the various variables used in that function. Apart from the above, this change also has the advantage of making the code look more neat. While at it, use dev_err_probe() instead of plain dev_err() as this new function is called by the probe(). Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240825085714.10736-2-five231003@gmail.com Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28firmware: arm_scmi: Replace comma with the semicolonSudeep Holla
Replace the typo comma with the semicolon. No functional change. Message-Id: <20240827143838.1465913-4-sudeep.holla@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)Sudeep Holla
Use __free for device_node values, and thus drop calls to of_node_put. The goal is simplify of_node reference cleanup by using this scope-based of_node_put() cleanup to simplify function exit handling. When using __free a resource is allocated within a block, it is automatically freed at the end of the block. This cleanup aligns well with the recent change in shmem.c to use __free instead of explicit of_node_put() calls. Message-Id: <20240827143838.1465913-3-sudeep.holla@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28firmware: arm_scmi: Fix trivial whitespace/coding style issuesSudeep Holla
Fix couple of unnecessary multiple blank lines and spaces instead of tabs. No functional change. Message-Id: <20240827143838.1465913-2-sudeep.holla@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>