| a4cb9066 | 04-Mar-2025 |
Arnd Bergmann <[email protected]> |
pmdomain: rockchip: add regulator dependency
When CONFIG_REGULATOR is disabled, this pmdomain driver fails to build:
drivers/pmdomain/rockchip/pm-domains.c:653:30: error: implicit declaration of fu
pmdomain: rockchip: add regulator dependency
When CONFIG_REGULATOR is disabled, this pmdomain driver fails to build:
drivers/pmdomain/rockchip/pm-domains.c:653:30: error: implicit declaration of function 'devm_of_regulator_get'; did you mean 'devm_regulator_get'? [-Wimplicit-function-declaration] 653 | pd->supply = devm_of_regulator_get(pmu->dev, pd->node, "domain"); | ^~~~~~~~~~~~~~~~~~~~~ | devm_regulator_get drivers/pmdomain/rockchip/pm-domains.c:653:28: error: assignment to 'struct regulator *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 653 | pd->supply = devm_of_regulator_get(pmu->dev, pd->node, "domain"); | ^
Add a Kconfig dependency.
Fixes: db6df2e3fc16 ("pmdomain: rockchip: add regulator support") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Reviewed-by: Dragan Simic <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| db6df2e3 | 20-Feb-2025 |
Sebastian Reichel <[email protected]> |
pmdomain: rockchip: add regulator support
Some power domains require extra voltages to be applied. For example trying to enable the GPU power domain on RK3588 fails when the SoC does not have VDD GP
pmdomain: rockchip: add regulator support
Some power domains require extra voltages to be applied. For example trying to enable the GPU power domain on RK3588 fails when the SoC does not have VDD GPU enabled. The same is expected to happen for the NPU, which also has a dedicated supply line.
We get the regulator using devm_of_regulator_get(), so a missing dependency in the devicetree is handled gracefully by printing a warning and creating a dummy regulator. This is necessary, since existing DTs do not have the regulator described. They might still work if the regulator is marked as always-on. It is also working if the regulator is enabled at boot time and the GPU driver is probed before the kernel disables unused regulators.
The regulator itself is not acquired at driver probe time, since that creates an unsolvable circular dependency. The power domain driver must be probed early, since SoC peripherals need it. Regulators on the other hand depend on SoC peripherals like SPI, I2C or GPIO. MediaTek does not run into this, since they have two power domain drivers.
Tested-by: Heiko Stuebner <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-7-a4f9c24e5b81@kernel.org [Ulf: Fixed conflict when applying] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| 6b2690df | 20-Feb-2025 |
Peter Geis <[email protected]> |
pmdomain: rockchip: fix rockchip_pd_power error handling
The calls rockchip_pd_power makes to rockchip_pmu_set_idle_request lack any return error handling, causing device drivers to incorrectly beli
pmdomain: rockchip: fix rockchip_pd_power error handling
The calls rockchip_pd_power makes to rockchip_pmu_set_idle_request lack any return error handling, causing device drivers to incorrectly believe the hardware idle requests succeed when they may have failed. This leads to software possibly accessing hardware that is powered off and the subsequent SError panic that follows.
Add error checking and return errors to the calling function to prevent such crashes.
gst-launch-1.0 videotestsrc num-buffers=2000 ! v4l2jpegenc ! fakesink Setting pipeline to PAUSED ...er-x64 Pipeline is PREROLLING ... Redistribute latency... rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'hevc', val=0x98260 SError Interrupt on CPU2, code 0x00000000bf000002 -- SError
Signed-off-by: Peter Geis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-5-a4f9c24e5b81@kernel.org Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| edcef667 | 20-Feb-2025 |
Sebastian Reichel <[email protected]> |
pmdomain: rockchip: reduce indentation in rockchip_pd_power
Rework the logic, so that the function exits early when the power domain state is already correct to reduce code indentation.
No function
pmdomain: rockchip: reduce indentation in rockchip_pd_power
Rework the logic, so that the function exits early when the power domain state is already correct to reduce code indentation.
No functional change intended.
Reviewed-by: Heiko Stuebner <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Tested-by: Adrian Larumbe <[email protected]> # On Rock 5B Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-4-a4f9c24e5b81@kernel.org Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| 7ab6c930 | 20-Feb-2025 |
Sebastian Reichel <[email protected]> |
pmdomain: rockchip: forward rockchip_do_pmu_set_power_domain errors
Currently rockchip_do_pmu_set_power_domain prints a warning if there have been errors turning on the power domain, but it does not
pmdomain: rockchip: forward rockchip_do_pmu_set_power_domain errors
Currently rockchip_do_pmu_set_power_domain prints a warning if there have been errors turning on the power domain, but it does not return any errors and rockchip_pd_power() tries to continue setting up the QOS registers. This usually results in accessing unpowered registers, which triggers an SError and a full system hang.
This improves the error handling by forwarding the error to avoid kernel panics.
Reviewed-by: Heiko Stuebner <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Tested-by: Adrian Larumbe <[email protected]> # On Rock 5B Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-3-a4f9c24e5b81@kernel.org [Ulf: Fixed conflict when applying] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| bc4bc2a1 | 24-Feb-2025 |
Ulf Hansson <[email protected]> |
pmdomain: rockchip: Fix build error
To resolve the build error with undefined reference to `arm_smccc_1_1_get_conduit', let's add a build dependency to HAVE_ARM_SMCCC_DISCOVERY.
Reported-by: Stephe
pmdomain: rockchip: Fix build error
To resolve the build error with undefined reference to `arm_smccc_1_1_get_conduit', let's add a build dependency to HAVE_ARM_SMCCC_DISCOVERY.
Reported-by: Stephen Rothwell <[email protected]> Fixes: 61eeb9678789 ("pmdomain: rockchip: Check if SMC could be handled by TA") Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| 61eeb967 | 19-Feb-2025 |
Shawn Lin <[email protected]> |
pmdomain: rockchip: Check if SMC could be handled by TA
Non-existent trusted-firmware could lead to SMC calls into some unset location, that breaks the system. Let's check that it's supported before
pmdomain: rockchip: Check if SMC could be handled by TA
Non-existent trusted-firmware could lead to SMC calls into some unset location, that breaks the system. Let's check that it's supported before executing the SMC.
Reported-by: Steven Price <[email protected]> Suggested-by: Heiko Stuebner <[email protected]> Fixes: 58ebba35ddab ("pmdomain: rockchip: Add smc call to inform firmware") Signed-off-by: Shawn Lin <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Tested-by: Steven Price <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| d030e94d | 29-Aug-2024 |
Detlev Casanova <[email protected]> |
pmdomain: rockchip: Add gating masks for rk3576
The RK3576 SoC needs to ungate the power domains before their status can be modified.
The values have been taken from the rockchip downstream driver.
pmdomain: rockchip: Add gating masks for rk3576
The RK3576 SoC needs to ungate the power domains before their status can be modified.
The values have been taken from the rockchip downstream driver.
Signed-off-by: Detlev Casanova <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|
| 8b579881 | 29-Aug-2024 |
Detlev Casanova <[email protected]> |
pmdomain: rockchip: Add gating support
Some rockchip SoC need to ungate power domains before their power status can be changed.
Each power domain has a gate mask that is set to 1 to ungate it when
pmdomain: rockchip: Add gating support
Some rockchip SoC need to ungate power domains before their power status can be changed.
Each power domain has a gate mask that is set to 1 to ungate it when manipulating power status, then set back to 0 to gate it again.
Signed-off-by: Detlev Casanova <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
show more ...
|