Pengfei Li
374de39d38
pmdomain: imx: Make imx pgc power domain also set the fwnode
...
Currently, The imx pgc power domain doesn't set the fwnode
pointer, which results in supply regulator device can't get
consumer imx pgc power domain device from fwnode when creating
a link.
This causes the driver core to instead try to create a link
between the parent gpc device of imx pgc power domain device and
supply regulator device. However, at this point, the gpc device
has already been bound, and the link creation will fail. So adding
the fwnode pointer to the imx pgc power domain device will fix
this issue.
Signed-off-by: Pengfei Li <pengfei.li_1@nxp.com >
Tested-by: Emil Kronborg <emil.kronborg@protonmail.com >
Fixes: 3fb16866b5 ("driver core: fw_devlink: Make cycle detection more robust")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231020185949.537083-1-pengfei.li_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-26 15:55:05 +02:00
Otto Pflüger
fad5bf2e2c
pmdomain: qcom: rpmpd: Add QM215 power domains
...
QM215 is typically paired with a PM8916 PMIC and uses its SMPA1 and
LDOA2 regulators in voltage level mode for VDDCX and VDDMX, respectively.
Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231014133823.14088-4-otto.pflueger@abscue.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-24 12:50:31 +02:00
Otto Pflüger
d975a9a9d6
pmdomain: qcom: rpmpd: Add MSM8917 power domains
...
MSM8917 uses the SMPA2 and LDOA3 regulators provided by the PM8937 PMIC
for the VDDCX and VDDMX power domains in voltage level mode,
respectively. These definitions should also work on MSM8937.
Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231014133823.14088-3-otto.pflueger@abscue.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-24 12:50:11 +02:00
Maíra Canal
2e75396f1d
pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable
...
The commit c494a447c1 ("soc: bcm: bcm2835-power: Refactor ASB control")
refactored the ASB control by using a general function to handle both
the enable and disable. But this patch introduced a subtle regression:
we need to check if !!(readl(base + reg) & ASB_ACK) == enable, not just
check if (readl(base + reg) & ASB_ACK) == true.
Currently, this is causing an invalid register state in V3D when
unloading and loading the driver, because `bcm2835_asb_disable()` will
return -ETIMEDOUT and `bcm2835_asb_power_off()` will fail to disable the
ASB slave for V3D.
Fixes: c494a447c1 ("soc: bcm: bcm2835-power: Refactor ASB control")
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com >
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com >
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231024101251.6357-2-mcanal@igalia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-24 12:44:24 +02:00
Ulf Hansson
55089e1fb2
pmdomain: qcom: rpmhpd: Drop the ->opp_to_performance_state() callback
...
Since commit 7c41cdcd3b ("OPP: Simplify the over-designed pstate <->
level dance"), there is no longer any need for genpd providers to assign
the ->opp_to_performance_state(), hence let's drop it.
Cc: Bjorn Andersson <andersson@kernel.org >
Cc: Konrad Dybcio <konrad.dybcio@linaro.org >
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231012153607.101465-1-ulf.hansson@linaro.org
2023-10-17 13:57:18 +02:00
Ulf Hansson
40d7f4d2e6
pmdomain: qcom: rpmpd: Drop the ->opp_to_performance_state() callback
...
Since commit 7c41cdcd3b ("OPP: Simplify the over-designed pstate <->
level dance"), there is no longer any need for genpd providers to assign
the ->opp_to_performance_state(), hence let's drop it.
Cc: Bjorn Andersson <andersson@kernel.org >
Cc: Konrad Dybcio <konrad.dybcio@linaro.org >
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231012153558.101445-1-ulf.hansson@linaro.org
2023-10-17 13:57:13 +02:00
Ulf Hansson
016b4e5e28
pmdomain: qcom: cpr: Drop the ->opp_to_performance_state() callback
...
Since commit 7c41cdcd3b ("OPP: Simplify the over-designed pstate <->
level dance"), there is no longer any need for genpd providers to assign
the ->opp_to_performance_state(), hence let's drop it.
Cc: Bjorn Andersson <andersson@kernel.org >
Cc: Konrad Dybcio <konrad.dybcio@linaro.org >
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231012153550.101425-1-ulf.hansson@linaro.org
2023-10-17 13:56:38 +02:00
Rob Herring
3ba9fdfaa5
pmdomain: Use device_get_match_data()
...
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20231006224614.444488-1-robh@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:45:11 +02:00
Ulf Hansson
e8fa18de71
pmdomain: Merge branch fixes into next
...
Merge the pmdomain fixes for v6.6-rc[n] into the next branch, to allow them
to get tested together with the new pmdomain changes that are targeted for
v6.7.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:44:16 +02:00
Julia Lawall
bc0d59d757
pmdomain: ti: add missing of_node_put
...
for_each_node_with_property performs an of_node_get on
each iteration, so a break out of the loop requires an
of_node_put.
This was done using the Coccinelle semantic patch
iterators/for_each_child.cocci
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr >
Link: https://lore.kernel.org/r/20230907095521.14053-5-Julia.Lawall@inria.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:42:29 +02:00
Fabien Parent
c5b5831f3c
pmdomain: mediatek: Add support for MT8365
...
Add the needed board data to support MT8365 SoC.
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-9-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Alexandre Bailon
d2567a8452
pmdomain: mediatek: Add support for MTK_SCPD_STRICT_BUS_PROTECTION cap
...
This adds support for MTK_SCPD_STRICT_BUS_PROTECTION capability. It is a
strict bus protection policy that requires the bus protection to be
disabled before accessing the bus.
This is required by the mt8365, for the MM power domain.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com >
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-8-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Alexandre Bailon
ecaf11aaee
pmdomain: mediatek: Add support for WAY_EN operations
...
This updates the power domain to support WAY_EN operations. WAY_EN
operations on mt8365 are using a different component to check for the
acknowledgment, namely the infracfg-nao component. Also to enable a way
it the bit needs to be cleared while disabling a way needs a bit to be
set. To support these two operations two flags are added,
BUS_PROT_INVERTED and BUS_PROT_STA_COMPONENT_INFRA_NAO. Additionally
another regmap is created if the INFRA_NAO capability is set.
This operation is required by the mt8365 for the MM power domain.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com >
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-7-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Markus Schneider-Pargmann
151bd6c55f
pmdomain: mediatek: Unify configuration for infracfg and smi
...
Use flags to distinguish between infracfg and smi subsystem for a bus
protection configuration. It simplifies enabling/disabling and prepares
the driver for the use of another regmap for mt8365.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-6-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Markus Schneider-Pargmann
2ec81379ea
pmdomain: mediatek: Create bus protection operation functions
...
Separate the register access used for bus protection enable/disable into
their own functions. These will be used later for WAY_EN support.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-5-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Markus Schneider-Pargmann
ae442ba85a
pmdomain: mediatek: Split bus_prot_mask
...
bus_prot_mask is used for all operations, set clear and acknowledge. In
preparation of m8365 power domain support split this one mask into two,
one mask for set and clear, another one for acknowledge.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-4-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Markus Schneider-Pargmann
c6bee73207
pmdomain: mediatek: Move bools to a flags field
...
To simplify the macros, use a flags field for simple bools. This is in
preparation for more flags.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com >
Tested-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20230918093751.1188668-3-msp@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-17 11:41:42 +02:00
Ulf Hansson
0a81b0eb81
firmware: arm_scmi: Add generic OPP support to the SCMI performance domain
...
To allow a consumer driver to use the OPP library to scale the performance
for its device, let's dynamically add the OPP table when the device gets
attached to its SCMI performance domain.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Link: https://lore.kernel.org/r/20230925131715.138411-10-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com >
2023-10-06 09:41:03 +01:00
Peng Fan
767881c470
pmdomain: imx: scu-pd: correct DMA2 channel
...
Per "dt-bindings/firmware/imx/rsrc.h", `IMX_SC_R_DMA_2_CH0 + 5` not
equals to IMX_SC_R_DMA_2_CH5, so there should be two entries in
imx8qxp_scu_pd_ranges, otherwise the imx_scu_add_pm_domain may filter
out wrong power domains.
Fixes: 927b7d15dc ("genpd: imx: scu-pd: enlarge PD range")
Reported-by: Dong Aisheng <Aisheng.dong@nxp.com >
Signed-off-by: Peng Fan <peng.fan@nxp.com >
Link: https://lore.kernel.org/r/20231001123853.200773-1-peng.fan@oss.nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-05 00:28:52 +02:00
Changhuang Liang
a7de2727e5
pmdomain: starfive: Update prefixes for AON power domain
...
Use "JH7110_AON_PD_" prefix for AON power doamin for JH7110 SoC.
Reviewed-by: Walker Chen <walker.chen@starfivetech.com >
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com >
Link: https://lore.kernel.org/r/20230927130734.9921-3-changhuang.liang@starfivetech.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:57 +02:00
Danila Tikhonov
0958eccbeb
pmdomain: qcom: rpmhpd: Add support for SM7150 rpmh clocks
...
This adds the RPMH clocks present in SM7150 SoC.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230916175952.178611-3-danila@jiaxyga.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:57 +02:00
Justin Stitt
38c2efa260
pmdomain: renesas: rmobile-sysc: fix -Wvoid-pointer-to-enum-cast warning
...
When building with clang 18 I see the following warning:
| drivers/soc/renesas/rmobile-sysc.c:193:22: warning: cast to smaller integer
| type 'enum pd_types' from 'const void *' [-Wvoid-pointer-to-enum-cast]
| 193 | add_special_pd(np, (enum pd_types)id->data);
This is due to the fact that `id->data` is a void* and `enum pd_types`
has the size of an integer. This cast from pointer-width to int-width
causes truncation and possible data loss. Instead, cast to `uintptr_t`
which has the same width as void*.
Reported-by: Nathan Chancellor <nathan@kernel.org >
Closes: https://github.com/ClangBuiltLinux/linux/issues/1910
Signed-off-by: Justin Stitt <justinstitt@google.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230814-void-drivers-soc-renesas-rmobile-sysc-v1-1-6648dfd854de@google.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:57 +02:00
Ulf Hansson
d8237f8733
pmdomain: xilinx: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Michal Simek <michal.simek@amd.com >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
02c24a1203
pmdomain: ti: Move and add Kconfig options to the pmdomain subsystem
...
The TI_SCI_PM_DOMAINS Kconfig option belongs closer to its corresponding
implementation, hence let's move it from the soc subsystem to the pmdomain
subsystem.
While at it, let's also add a Kconfig option the omap_prm driver, rather
than using ARCH_OMAP2PLUS directly.
Cc: Nishanth Menon <nm@ti.com >
Cc: Santosh Shilimkar <ssantosh@kernel.org >
Cc: Tero Kristo <kristo@kernel.org >
Cc: Tony Lindgren <tony@atomide.com >
Reviewed-by: Dhruva Gole <d-gole@ti.com >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
f28cd69750
pmdomain: tegra: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Jonathan Hunter <jonathanh@nvidia.com >
Cc: Mikko Perttunen <mperttunen@nvidia.com >
Cc: <linux-tegra@vger.kernel.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
fe78050a00
pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Chen-Yu Tsai <wens@csie.org >
Cc: Jernej Skrabec <jernej.skrabec@gmail.com >
Cc: Samuel Holland <samuel@sholland.org >
Cc: <linux-sunxi@lists.linux.dev >
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
ac68b50d15
pmdomain: starfive: Move Kconfig file to the pmdomain subsystem
...
The Kconfig belongs closer to the corresponding implementation, hence let's
move it from the soc subsystem to the pmdomain subsystem.
Cc: Walker Chen <walker.chen@starfivetech.com >
Cc: Conor Dooley <conor@kernel.org >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
c6d6afb840
pmdomain: st: Add a Kconfig option for the ux500 power domain
...
We shouldn't really use the CONFIG_ARCH_U8500 option directly, but rather
have our own dedicated Kconfig option, so let's add that.
Cc: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
70556c57ea
pmdomain: samsung: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Cc: Alim Akhtar <alim.akhtar@samsung.com >
Cc: <linux-samsung-soc@vger.kernel.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:56 +02:00
Ulf Hansson
70a69266b3
pmdomain: rockchip: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Heiko Stuebner <heiko@sntech.de >
Cc: <linux-rockchip@lists.infradead.org >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:18 +02:00
Ulf Hansson
a3aa70f972
pmdomain: renesas: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.
Cc: Geert Uytterhoeven <geert+renesas@glider.be >
Cc: Magnus Damm <magnus.damm@gmail.com >
Cc: <linux-renesas-soc@vger.kernel.org >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:18 +02:00
Ulf Hansson
4eb42e5bd8
pmdomain: qcom: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.
Cc: Bjorn Andersson <andersson@kernel.org >
Cc: Konrad Dybcio <konrad.dybcio@linaro.org >
Cc: Andy Gross <agross@kernel.org >
Cc: <linux-arm-msm@vger.kernel.org >
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:18 +02:00
Ulf Hansson
8b1d7a2785
pmdomain: mediatek: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.
Cc: Matthias Brugger <matthias.bgg@gmail.com >
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Cc: <linux-mediatek@lists.infradead.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:41:18 +02:00
Ulf Hansson
24a11a1e82
pmdomain: imx: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc- and firmware subsystem to the pmdomain
subsystem.
Cc: Shawn Guo <shawnguo@kernel.org >
Cc: Sascha Hauer <s.hauer@pengutronix.de >
Cc: Fabio Estevam <festevam@gmail.com >
Cc: Peng Fan <peng.fan@nxp.com >
Cc: <kernel@pengutronix.de >
Cc: <linux-imx@nxp.com >
Acked-by: Peng Fan <peng.fan@nxp.com >
Acked-by: Shawn Guo <shawnguo@kernel.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-10-04 23:40:36 +02:00
Sudeep Holla
af78e5c309
firmware: arm_scmi: Move power-domain driver to the pmdomain dir
...
To simplify with maintenance let's move the Arm SCMI power-domain driver
to the new pmdomain directory.
Link: https://lore.kernel.org/all/20230921113328.3208651-1-sudeep.holla@arm.com
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org >
Cc: Cristian Marussi <cristian.marussi@arm.com >
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com >
2023-09-21 16:35:14 +01:00
Ulf Hansson
2af23ceb86
pmdomain: arm: Add the SCMI performance domain
...
To enable support for performance scaling (DVFS) for generic devices with
the SCMI performance protocol, let's add an SCMI performance domain. This
is being modelled as a genpd provider, with support for performance scaling
through genpd's ->set_performance_state() callback.
Note that, this adds the initial support that allows consumer drivers for
attached devices, to vote for a new performance state via calling the
dev_pm_genpd_set_performance_state(). However, this should be avoided as
it's in most cases preferred to use the OPP library to vote for a new OPP
instead. The support using the OPP library isn't part of this change, but
needs to be implemented from subsequent changes.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Link: https://lore.kernel.org/r/20230919121605.7304-1-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com >
2023-09-21 16:35:14 +01:00
Ulf Hansson
c067e7ffb3
pmdomain: bcm: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.
Cc: Florian Fainelli <florian.fainelli@broadcom.com >
Cc: Ray Jui <rjui@broadcom.com >
Cc: Scott Branden <sbranden@broadcom.com >
Cc: <linux-mips@vger.kernel.org >
Cc: <linux-rpi-kernel@lists.infradead.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-20 12:08:54 +02:00
Ulf Hansson
1bfadf2edd
pmdomain: apple: Move Kconfig option to the pmdomain subsystem
...
The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.
Cc: Hector Martin <marcan@marcan.st >
Cc: Sven Peter <sven@svenpeter.dev >
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Cc: <asahi@lists.linux.dev >
Reviewed-by: Eric Curtin <ecurtin@redhat.com >
Reviewed-by: Neal Gompa <neal@gompa.dev >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-20 10:08:49 +02:00
Ulf Hansson
2dfb28355d
pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem
...
The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Kevin Hilman <khilman@baylibre.com >
Cc: Jerome Brunet <jbrunet@baylibre.com >
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com >
Cc: <linux-amlogic@lists.infradead.org >
Acked-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-20 10:08:45 +02:00
Ulf Hansson
4db570466c
pmdomain: actions: Move Kconfig file to the pmdomain subsystem
...
The Kconfig belongs closer to the corresponding implementation, hence let's
move it from the soc subsystem to the pmdomain subsystem.
Cc: "Andreas Färber" <afaerber@suse.de >
Cc: Manivannan Sadhasivam <mani@kernel.org >
Cc: <linux-actions@lists.infradead.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-20 10:07:52 +02:00
Ulf Hansson
d149718ea2
pmdomain: Prepare to move Kconfig files into the pmdomain subsystem
...
Rather than having the various Kconfig files for the genpd providers
sprinkled across subsystems, let's prepare to move them into the pmdomain
subsystem along with the implementations.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-20 10:06:53 +02:00
Changhuang Liang
ae3a94e4ad
pmdomain: starfive: Add JH7110 AON PMU support
...
Add AON PMU for StarFive JH7110 SoC. It can be used to turn on/off the
dphy rx/tx power switch.
Reviewed-by: Walker Chen <walker.chen@starfivetech.com >
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com >
Signed-off-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20230913-dude-imprecise-fc32622bc947@spud
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:23:04 +02:00
Changhuang Liang
296eea5612
pmdomain: starfive: Extract JH7110 pmu private operations
...
Move JH7110 private operation into private data of compatible. Convenient
to add AON PMU which would not have interrupts property.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com >
Reviewed-by: Walker Chen <walker.chen@starfivetech.com >
Signed-off-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20230913-slideshow-luckiness-38ff17de84c6@spud
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:23:04 +02:00
Rob Herring
e925bcee7d
pmdomain: starfive: Explicitly include correct DT includes
...
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org >
Signed-off-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20230913-swooned-ecosphere-aff4a05c1556@spud
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:16:09 +02:00
xianwei.zhao
ca75e4b214
pmdomain: amlogic: Add support for T7 power domains controller
...
Add support for T7 power controller. T7 power control
registers are in secure domain, and should be accessed by SMC.
Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20230911025223.3433776-6-xianwei.zhao@amlogic.com
[Ulf: Re-based to fit the pmdomain subsystem]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:10:45 +02:00
xianwei.zhao
0a7bd33c99
pmdomain: amlogic: init power domain state
...
If initial power domain with 'AWAY_ON' property state is off,
turn on the power.
Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com >
Link: https://lore.kernel.org/r/20230911025223.3433776-4-xianwei.zhao@amlogic.com
[Ulf: Re-based to fit the pmdomain subsystem]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:10:28 +02:00
xianwei.zhao
efa529b31a
pmdomain: amlogic: add driver to support power parent node
...
Some power domains depends on other domains, Such as Amlogic T7 SoC.
Add parent node to support this case.
Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com >
Link: https://lore.kernel.org/r/20230911025223.3433776-3-xianwei.zhao@amlogic.com
[Ulf: Re-based to fit the pmdomain subsystem]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-14 00:10:00 +02:00
xianwei.zhao
278adec939
pmdomain: amlogic: modify some power domains property
...
Some power domains for C3 can be using runtime PM,
remove ALWAYS_ON property. And add some power domains
description when ALWAYS_ON property.
Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20230911025223.3433776-2-xianwei.zhao@amlogic.com
[Ulf: Re-based to fit the pmdomain subsystem]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2023-09-13 11:16:23 +02:00
Ulf Hansson
e2ad626f8f
pmdomain: Rename the genpd subsystem to pmdomain
...
It has been pointed out that naming a subsystem "genpd" isn't very
self-explanatory and the acronym itself that means Generic PM Domain, is
known only by a limited group of people.
In a way to improve the situation, let's rename the subsystem to pmdomain,
which ideally should indicate that this is about so called Power Domains or
"PM domains" as we often also use within the Linux Kernel terminology.
Suggested-by: Rafael J. Wysocki <rafael@kernel.org >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Acked-by: Rafael J. Wysocki <rafael@kernel.org >
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230912221127.487327-1-ulf.hansson@linaro.org
2023-09-13 11:09:21 +02:00