Remove syscon compatible from google,gs101-pmu node
Subsystems (3)
Peter Griffin
maintainerv2 cover Remove syscon compatible from google,gs101-pmu node
Hi folks,
This series removes the syscon compatible from the pmu_system_controller node, by updating both yaml bindings and device tree.
Since commit ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible") it is possible to register a regmap without the syscon compatible in the node.
As noted in that commit, it isn't really correct to claim we are compatible with syscon, as a MMIO regmap created by syscon driver won't work on gs101. Removing the syscon compatible means the syscon driver won't ever attempt to create a mmio regmap.
Currently we rely on exynos-pmu running and registering its regmap at a very early initcall level, so no mmio created regmap is returned. For pinctrl driver that runs at the same initcall level as exynos-pmu today we have a custom exynos_get_pmu_regmap_by_phandle() API that supports -EPROBE_DEFER.
However with the changes proposed in [1] -EPROBE_DEFER will become supported in the syscon driver directly making this whole approach more robust especially in a highly modularized system with other drivers at the same initcall level. We should also be able to remove the custom API referenced above.
Technically this is a ABI break but no other platforms are affected. With an old DT we will have the behaviour of today (rely on early initcall levels). But once [1] is merged, with a new DT we will benefit from -EPROBE_DEFER. Additionally PMU write register access was never working with a mmio syscon so the ABI break is justified.
regards,
Peter
---
Changes in v2:
- Update commit description (Krzysztof)
- Change Items to enum, remove const (Krzysztof)
- Checkpatch warning commit msg length (Krzysztof)
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Peter Griffin (2):
dt-bindings: soc: samsung: exynos-pmu: remove syscon for google,gs101-pmu
arm64: dts: exynos: gs101: remove syscon compatible from pmu node
Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 3 ++- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
---
base-commit: 72fb0170ef1f45addf726319c52a0562b6913707
change-id: 20251102-remove-pmu-syscon-compat-dbbc492a4eea
Best regards,
Signature · 1 line
Peter Griffin <[email protected]>
Peter Griffin
maintainerPATCH v2 1/2 dt-bindings: soc: samsung: exynos-pmu: remove syscon for google,gs101-pmu
Since commit ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible") it is possible to register a regmap without the syscon compatible in the node.
Update the bindings for google,gs101-pmu so that the syscon compatible is no longer required. As it isn't really correct to claim we are compatible with syscon (as a mmio regmap created by syscon will not work on gs101).
Additionally (with the benefit of hindsight) PMU register writes were never working with a MMIO syscon on gs101, so the ABI break is justified.
---
Changes in v2:
- Update commit description (Krzysztof)
- Change Items to enum, remove const (Krzysztof)
- Checkpatch warning commit msg length (Krzysztof)
--- Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml +2 -1
@@ -34,9 +34,10 @@ select: properties: compatible: oneOf: + - enum: + - google,gs101-pmu - items: - enum: - - google,gs101-pmu - samsung,exynos3250-pmu - samsung,exynos4210-pmu - samsung,exynos4212-pmu
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Re: [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: remove syscon for google,gs101-pmu
Quoted 12 lines · Peter Griffin
Since commit
ba5095ebbc7a("mfd: syscon: Allow syscon nodes without a "syscon" compatible") it is possible to register a regmap without the syscon compatible in the node.Update the bindings for google,gs101-pmu so that the syscon compatible is no longer required. As it isn't really correct to claim we are compatible with syscon (as a mmio regmap created by syscon will not work on gs101).
Additionally (with the benefit of hindsight) PMU register writes were never working with a MMIO syscon on gs101, so the ABI break is justified.
Signed-off-by Peter Griffin <[email protected]>
Quoted 9 lines
---
Changes in v2:
- Update commit description (Krzysztof)
- Change Items to enum, remove const (Krzysztof)
- Checkpatch warning commit msg length (Krzysztof)--- Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Peter Griffin
maintainerPATCH v2 2/2 arm64: dts: exynos: gs101: remove syscon compatible from pmu node
In reply to Peter GriffinSince commit ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible") it is possible to register a regmap without the syscon compatible in the node.
As mentioned in that commit, it's not correct to claim we are compatible with syscon, as a MMIO regmap created by syscon won't work. Removing the syscon compatible means syscon driver won't ever create a mmio regmap.
Note this isn't usually an issue today as exynos-pmu runs at an early initcall so the custom regmap will have been registered first. However changes proposed in [1] will bring -EPROBE_DEFER support to syscon allowing this mechanism to be more robust, especially in highly modularized systems.
Technically this is a ABI break but no other platforms are affected. Additionally (with the benefit of hindsight) a MMIO syscon has never worked for PMU register writes, thus the ABI break is justified.
---
Changes in v2:
- Update commit message (Krzysztof)
--- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/exynos/google/gs101.dtsi +1 -1
@@ -1705,7 +1705,7 @@ sysreg_apm: syscon@17420000 { }; pmu_system_controller: system-controller@17460000 { - compatible = "google,gs101-pmu", "syscon"; + compatible = "google,gs101-pmu"; reg = <0x17460000 0x10000>; google,pmu-intr-gen-syscon = <&pmu_intr_gen>;
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Quoted 8 lines · Peter Griffin
This series removes the syscon compatible from the
pmu_system_controllernode, by updating both yaml bindings and device tree.Since commit
ba5095ebbc7a("mfd: syscon: Allow syscon nodes without a "syscon" compatible") it is possible to register a regmap without the syscon compatible in the node.[...]
Applied, thanks!
[1/2] dt-bindings: soc: samsung: exynos-pmu: remove syscon for google,gs101-pmu
https://git.kernel.org/krzk/linux/c/411727d9182d7a067fdd16a125d2069f52e8bb7f [2/2] arm64: dts: exynos: gs101: remove syscon compatible from pmu node https://git.kernel.org/krzk/linux/c/a21d38b5e209c60e73f81e467cc53ad57b5d4080
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>