* [PATCH v3 01/10] dt-bindings: power: samsung: add google,gs101-pd
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-22 6:31 ` Krzysztof Kozlowski
2025-10-16 15:58 ` [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding André Draszik
` (9 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
Add support for the Google gs101 version of the Exynos power domains. A
new compatible is needed because register fields have changed.
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Documentation/devicetree/bindings/power/pd-samsung.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/power/pd-samsung.yaml b/Documentation/devicetree/bindings/power/pd-samsung.yaml
index 9c2c51133457112ca0098c043e123f0a02fa1291..c35c9cb0115d79e5c36142da2c2a5dd30cd2ad47 100644
--- a/Documentation/devicetree/bindings/power/pd-samsung.yaml
+++ b/Documentation/devicetree/bindings/power/pd-samsung.yaml
@@ -19,6 +19,7 @@ allOf:
properties:
compatible:
enum:
+ - google,gs101-pd
- samsung,exynos4210-pd
- samsung,exynos5433-pd
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 01/10] dt-bindings: power: samsung: add google,gs101-pd
2025-10-16 15:58 ` [PATCH v3 01/10] dt-bindings: power: samsung: add google,gs101-pd André Draszik
@ 2025-10-22 6:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-22 6:31 UTC (permalink / raw)
To: André Draszik
Cc: Alim Akhtar, Rob Herring, Conor Dooley, Krzysztof Kozlowski,
Ulf Hansson, Marek Szyprowski, Peter Griffin, Tudor Ambarus,
Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, linux-pm
On Thu, Oct 16, 2025 at 04:58:34PM +0100, André Draszik wrote:
> Add support for the Google gs101 version of the Exynos power domains. A
> new compatible is needed because register fields have changed.
>
> Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> Documentation/devicetree/bindings/power/pd-samsung.yaml | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
2025-10-16 15:58 ` [PATCH v3 01/10] dt-bindings: power: samsung: add google,gs101-pd André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-22 6:34 ` Krzysztof Kozlowski
2025-10-16 15:58 ` [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children André Draszik
` (8 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
The gs101-pmu binding is going to acquire various additional (pattern)
properties that don't apply to other PMUs supported by this binding.
To enable this, move google,gs101-pmu into a separate binding.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
v3:
- use additionalProperties, not unevaluatedProperties
- fix path in $id (Rob)
- drop comment around 'select' (Rob)
---
.../bindings/soc/google/google,gs101-pmu.yaml | 66 ++++++++++++++++++++++
.../bindings/soc/samsung/exynos-pmu.yaml | 20 -------
MAINTAINERS | 1 +
3 files changed, 67 insertions(+), 20 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..f7119e7a39a3fe0a0a23d1faa251d356f83ba501
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/google/google,gs101-pmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google GS101 Power Management Unit (PMU)
+
+maintainers:
+ - André Draszik <andre.draszik@linaro.org>
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: google,gs101-pmu
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - const: google,gs101-pmu
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ reboot-mode:
+ $ref: /schemas/power/reset/syscon-reboot-mode.yaml
+ type: object
+ description:
+ Reboot mode to alter bootloader behavior for the next boot
+
+ syscon-poweroff:
+ $ref: /schemas/power/reset/syscon-poweroff.yaml#
+ type: object
+ description:
+ Node for power off method
+
+ syscon-reboot:
+ $ref: /schemas/power/reset/syscon-reboot.yaml#
+ type: object
+ description:
+ Node for reboot method
+
+ google,pmu-intr-gen-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to PMU interrupt generation interface.
+
+required:
+ - compatible
+ - reg
+ - google,pmu-intr-gen-syscon
+
+additionalProperties: false
+
+examples:
+ - |
+ system-controller@17460000 {
+ compatible = "google,gs101-pmu", "syscon";
+ reg = <0x17460000 0x10000>;
+
+ google,pmu-intr-gen-syscon = <&pmu_intr_gen>;
+ };
diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
index f0fb24156da9b8980dcfd5339ae75f12a71cf6d6..83f18a92fa1c4de75a90f00475cf17d5f0b652e4 100644
--- a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
+++ b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
@@ -15,7 +15,6 @@ select:
compatible:
contains:
enum:
- - google,gs101-pmu
- samsung,exynos3250-pmu
- samsung,exynos4210-pmu
- samsung,exynos4212-pmu
@@ -36,7 +35,6 @@ properties:
oneOf:
- items:
- enum:
- - google,gs101-pmu
- samsung,exynos3250-pmu
- samsung,exynos4210-pmu
- samsung,exynos4212-pmu
@@ -129,11 +127,6 @@ properties:
description:
Node for reboot method
- google,pmu-intr-gen-syscon:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- Phandle to PMU interrupt generation interface.
-
required:
- compatible
- reg
@@ -194,19 +187,6 @@ allOf:
properties:
dp-phy: false
- - if:
- properties:
- compatible:
- contains:
- enum:
- - google,gs101-pmu
- then:
- required:
- - google,pmu-intr-gen-syscon
- else:
- properties:
- google,pmu-intr-gen-syscon: false
-
examples:
- |
#include <dt-bindings/clock/exynos5250.h>
diff --git a/MAINTAINERS b/MAINTAINERS
index 8cb7a124f6e81372060c38ac2b3c9a11505ae004..22573869586eacdac0d0a075d4a691849272442e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10597,6 +10597,7 @@ S: Maintained
P: Documentation/process/maintainer-soc-clean-dts.rst
C: irc://irc.oftc.net/pixel6-kernel-dev
F: Documentation/devicetree/bindings/clock/google,gs101-clock.yaml
+F: Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
F: Documentation/devicetree/bindings/soc/google/google,gs101-pmu-intr-gen.yaml
F: arch/arm64/boot/dts/exynos/google/
F: drivers/clk/samsung/clk-gs101.c
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding
2025-10-16 15:58 ` [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding André Draszik
@ 2025-10-22 6:34 ` Krzysztof Kozlowski
2025-10-22 6:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-22 6:34 UTC (permalink / raw)
To: André Draszik
Cc: Alim Akhtar, Rob Herring, Conor Dooley, Krzysztof Kozlowski,
Ulf Hansson, Marek Szyprowski, Peter Griffin, Tudor Ambarus,
Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, linux-pm
On Thu, Oct 16, 2025 at 04:58:35PM +0100, André Draszik wrote:
> The gs101-pmu binding is going to acquire various additional (pattern)
> properties that don't apply to other PMUs supported by this binding.
>
> To enable this, move google,gs101-pmu into a separate binding.
You did not copy all the properties which effectively drops certain
things from the binding, e.g. clocks, interrupt-controller and maybe
more. Please list them in commit msg and explain they are not applicable
to GS101.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>
> ---
> v3:
> - use additionalProperties, not unevaluatedProperties
> - fix path in $id (Rob)
> - drop comment around 'select' (Rob)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding
2025-10-22 6:34 ` Krzysztof Kozlowski
@ 2025-10-22 6:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-22 6:36 UTC (permalink / raw)
To: André Draszik
Cc: Alim Akhtar, Rob Herring, Conor Dooley, Krzysztof Kozlowski,
Ulf Hansson, Marek Szyprowski, Peter Griffin, Tudor Ambarus,
Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, linux-pm
On 22/10/2025 08:34, Krzysztof Kozlowski wrote:
> On Thu, Oct 16, 2025 at 04:58:35PM +0100, André Draszik wrote:
>> The gs101-pmu binding is going to acquire various additional (pattern)
>> properties that don't apply to other PMUs supported by this binding.
>>
>> To enable this, move google,gs101-pmu into a separate binding.
>
> You did not copy all the properties which effectively drops certain
> things from the binding, e.g. clocks, interrupt-controller and maybe
> more. Please list them in commit msg and explain they are not applicable
> to GS101.
>
>>
>> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>>
>> ---
>> v3:
>> - use additionalProperties, not unevaluatedProperties
>> - fix path in $id (Rob)
>> - drop comment around 'select' (Rob)
Ah, and please make the example complete by adding
syscon-reboot/poweroff nodes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
2025-10-16 15:58 ` [PATCH v3 01/10] dt-bindings: power: samsung: add google,gs101-pd André Draszik
2025-10-16 15:58 ` [PATCH v3 02/10] dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-21 12:59 ` Ulf Hansson
2025-10-22 6:39 ` Krzysztof Kozlowski
2025-10-16 15:58 ` [PATCH v3 04/10] pmdomain: samsung: plug potential memleak during probe André Draszik
` (7 subsequent siblings)
10 siblings, 2 replies; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
The power domains are a property of / implemented in the PMU. As such,
they should be modelled as child nodes of the PMU.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Note: Ideally, the newly added properties (ranges, etc.) should only be
'required' if "^power-domain@[0-9a-f]+$" exists as a patternProperty,
as they're needed only in that case. As-is, this patch now causes
warnings for existing DTs as they don't specify the new properties (and
they shouldn't need to). Only if DTs are updated to include
power-domains, such an update should also add the new properties.
I've not been able to come up with the correct schema syntax to achieve
that. dependencies, dependentRequired, and dependentSchemas don't seem
to support patterns. Similarly,
- if:
required:
- ...
then:
required:
- ...
doesn't allow patterns in the 'if' block (or I didn't get the syntax
right).
Rob said in
https://lore.kernel.org/all/20251010141357.GA219719-robh@kernel.org/
that this is a known limitation in json-schema.
---
.../bindings/soc/google/google,gs101-pmu.yaml | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
index f7119e7a39a3fe0a0a23d1faa251d356f83ba501..a24390f6d2a54afe1aa84935e03f719a62f4fc8e 100644
--- a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
+++ b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
@@ -26,6 +26,14 @@ properties:
reg:
maxItems: 1
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ ranges: true
+
reboot-mode:
$ref: /schemas/power/reset/syscon-reboot-mode.yaml
type: object
@@ -49,9 +57,23 @@ properties:
description:
Phandle to PMU interrupt generation interface.
+patternProperties:
+ "^power-domain@[0-9a-f]+$":
+ type: object
+ description: Child node describing one power domain within the PMU
+
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: google,gs101-pd
+
required:
- compatible
- reg
+ - '#address-cells'
+ - '#size-cells'
+ - ranges
- google,pmu-intr-gen-syscon
additionalProperties: false
@@ -61,6 +83,24 @@ examples:
system-controller@17460000 {
compatible = "google,gs101-pmu", "syscon";
reg = <0x17460000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
google,pmu-intr-gen-syscon = <&pmu_intr_gen>;
+
+ pd_g3d: power-domain@1e00 {
+ compatible = "google,gs101-pd";
+ reg = <0x1e00 0x80>;
+ #power-domain-cells = <0>;
+ label = "g3d";
+ };
+
+ power-domain@2000 {
+ compatible = "google,gs101-pd";
+ reg = <0x2000 0x80>;
+ #power-domain-cells = <0>;
+ power-domains = <&pd_g3d>;
+ label = "embedded_g3d";
+ };
};
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
2025-10-16 15:58 ` [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children André Draszik
@ 2025-10-21 12:59 ` Ulf Hansson
2025-10-21 16:18 ` Krzysztof Kozlowski
2025-10-22 6:39 ` Krzysztof Kozlowski
1 sibling, 1 reply; 27+ messages in thread
From: Ulf Hansson @ 2025-10-21 12:59 UTC (permalink / raw)
To: André Draszik
Cc: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Marek Szyprowski, Peter Griffin,
Tudor Ambarus, Will McVicker, kernel-team, linux-arm-kernel,
linux-samsung-soc, devicetree, linux-kernel, linux-pm
On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
>
> The power domains are a property of / implemented in the PMU. As such,
> they should be modelled as child nodes of the PMU.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>
> ---
> Note: Ideally, the newly added properties (ranges, etc.) should only be
> 'required' if "^power-domain@[0-9a-f]+$" exists as a patternProperty,
> as they're needed only in that case. As-is, this patch now causes
> warnings for existing DTs as they don't specify the new properties (and
> they shouldn't need to). Only if DTs are updated to include
> power-domains, such an update should also add the new properties.
>
> I've not been able to come up with the correct schema syntax to achieve
> that. dependencies, dependentRequired, and dependentSchemas don't seem
> to support patterns. Similarly,
> - if:
> required:
> - ...
> then:
> required:
> - ...
>
> doesn't allow patterns in the 'if' block (or I didn't get the syntax
> right).
>
> Rob said in
> https://lore.kernel.org/all/20251010141357.GA219719-robh@kernel.org/
> that this is a known limitation in json-schema.
> ---
> .../bindings/soc/google/google,gs101-pmu.yaml | 40 ++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> index f7119e7a39a3fe0a0a23d1faa251d356f83ba501..a24390f6d2a54afe1aa84935e03f719a62f4fc8e 100644
> --- a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> +++ b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> @@ -26,6 +26,14 @@ properties:
> reg:
> maxItems: 1
>
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 1
> +
> + ranges: true
> +
> reboot-mode:
> $ref: /schemas/power/reset/syscon-reboot-mode.yaml
> type: object
> @@ -49,9 +57,23 @@ properties:
> description:
> Phandle to PMU interrupt generation interface.
>
> +patternProperties:
> + "^power-domain@[0-9a-f]+$":
> + type: object
> + description: Child node describing one power domain within the PMU
> +
I think we should specify the power-domain-cells too, along the lines
of the below.
'#power-domain-cells'
const: 0
> + additionalProperties: true
> +
> + properties:
> + compatible:
> + const: google,gs101-pd
> +
> required:
> - compatible
> - reg
> + - '#address-cells'
> + - '#size-cells'
> + - ranges
> - google,pmu-intr-gen-syscon
>
> additionalProperties: false
> @@ -61,6 +83,24 @@ examples:
> system-controller@17460000 {
> compatible = "google,gs101-pmu", "syscon";
> reg = <0x17460000 0x10000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
>
> google,pmu-intr-gen-syscon = <&pmu_intr_gen>;
> +
> + pd_g3d: power-domain@1e00 {
> + compatible = "google,gs101-pd";
> + reg = <0x1e00 0x80>;
> + #power-domain-cells = <0>;
> + label = "g3d";
> + };
> +
> + power-domain@2000 {
> + compatible = "google,gs101-pd";
> + reg = <0x2000 0x80>;
> + #power-domain-cells = <0>;
> + power-domains = <&pd_g3d>;
> + label = "embedded_g3d";
> + };
> };
>
> --
> 2.51.0.788.g6d19910ace-goog
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
2025-10-21 12:59 ` Ulf Hansson
@ 2025-10-21 16:18 ` Krzysztof Kozlowski
2025-10-22 10:03 ` Ulf Hansson
0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-21 16:18 UTC (permalink / raw)
To: Ulf Hansson, André Draszik
Cc: Alim Akhtar, Rob Herring, Conor Dooley, Krzysztof Kozlowski,
Marek Szyprowski, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-arm-kernel, linux-samsung-soc, devicetree,
linux-kernel, linux-pm
On 21/10/2025 14:59, Ulf Hansson wrote:
>> + "^power-domain@[0-9a-f]+$":
>> + type: object
>> + description: Child node describing one power domain within the PMU
>> +
>
> I think we should specify the power-domain-cells too, along the lines
> of the below.
>
> '#power-domain-cells'
> const: 0
That's not needed. The child (this child device node) schema will
enforce it. Parent (so the PMU) is supposed only to list compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
2025-10-21 16:18 ` Krzysztof Kozlowski
@ 2025-10-22 10:03 ` Ulf Hansson
0 siblings, 0 replies; 27+ messages in thread
From: Ulf Hansson @ 2025-10-22 10:03 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: André Draszik, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Marek Szyprowski, Peter Griffin,
Tudor Ambarus, Will McVicker, kernel-team, linux-arm-kernel,
linux-samsung-soc, devicetree, linux-kernel, linux-pm
On Tue, 21 Oct 2025 at 18:18, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 21/10/2025 14:59, Ulf Hansson wrote:
> >> + "^power-domain@[0-9a-f]+$":
> >> + type: object
> >> + description: Child node describing one power domain within the PMU
> >> +
> >
> > I think we should specify the power-domain-cells too, along the lines
> > of the below.
> >
> > '#power-domain-cells'
> > const: 0
>
> That's not needed. The child (this child device node) schema will
> enforce it. Parent (so the PMU) is supposed only to list compatible.
Ah, I see. Thanks for clarifying!
Kind regards
Uffe
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
2025-10-16 15:58 ` [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children André Draszik
2025-10-21 12:59 ` Ulf Hansson
@ 2025-10-22 6:39 ` Krzysztof Kozlowski
1 sibling, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-22 6:39 UTC (permalink / raw)
To: André Draszik
Cc: Alim Akhtar, Rob Herring, Conor Dooley, Krzysztof Kozlowski,
Ulf Hansson, Marek Szyprowski, Peter Griffin, Tudor Ambarus,
Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, linux-pm
On Thu, Oct 16, 2025 at 04:58:36PM +0100, André Draszik wrote:
> The power domains are a property of / implemented in the PMU. As such,
> they should be modelled as child nodes of the PMU.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>
> ---
> Note: Ideally, the newly added properties (ranges, etc.) should only be
> 'required' if "^power-domain@[0-9a-f]+$" exists as a patternProperty,
> as they're needed only in that case. As-is, this patch now causes
> warnings for existing DTs as they don't specify the new properties (and
> they shouldn't need to). Only if DTs are updated to include
> power-domains, such an update should also add the new properties.
>
> I've not been able to come up with the correct schema syntax to achieve
> that. dependencies, dependentRequired, and dependentSchemas don't seem
> to support patterns. Similarly,
> - if:
> required:
> - ...
> then:
> required:
> - ...
>
> doesn't allow patterns in the 'if' block (or I didn't get the syntax
> right).
>
> Rob said in
> https://lore.kernel.org/all/20251010141357.GA219719-robh@kernel.org/
> that this is a known limitation in json-schema.
> ---
> .../bindings/soc/google/google,gs101-pmu.yaml | 40 ++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> index f7119e7a39a3fe0a0a23d1faa251d356f83ba501..a24390f6d2a54afe1aa84935e03f719a62f4fc8e 100644
> --- a/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> +++ b/Documentation/devicetree/bindings/soc/google/google,gs101-pmu.yaml
> @@ -26,6 +26,14 @@ properties:
> reg:
> maxItems: 1
>
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 1
> +
> + ranges: true
> +
> reboot-mode:
> $ref: /schemas/power/reset/syscon-reboot-mode.yaml
> type: object
> @@ -49,9 +57,23 @@ properties:
> description:
> Phandle to PMU interrupt generation interface.
>
> +patternProperties:
> + "^power-domain@[0-9a-f]+$":
Keep consistent quotes, ' or "
The problem is that you mix children without and with unit address. I
guess that's the limitation of syscon-xxx drivers because they could
take the reg/unit-address, so it's fine.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 04/10] pmdomain: samsung: plug potential memleak during probe
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (2 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 03/10] dt-bindings: soc: samsung: gs101-pmu: allow power domains as children André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-21 13:54 ` Ulf Hansson
2025-10-16 15:58 ` [PATCH v3 05/10] pmdomain: samsung: convert to using regmap André Draszik
` (6 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik, stable, Krzysztof Kozlowski
of_genpd_add_provider_simple() could fail, in which case this code
leaks the domain name, pd->pd.name.
Use devm_kstrdup_const() to plug this leak. As a side-effect, we can
simplify existing error handling.
Fixes: c09a3e6c97f0 ("soc: samsung: pm_domains: Convert to regular platform driver")
Cc: stable@vger.kernel.org
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
v2:
mark as fix, as this isn't a pure simplification
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 5d478bb37ad68afc7aed7c6ae19b5fefc94a9035..f53e1bd2479807988f969774b4b7b4c5739c1aba 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -92,13 +92,14 @@ static const struct of_device_id exynos_pm_domain_of_match[] = {
{ },
};
-static const char *exynos_get_domain_name(struct device_node *node)
+static const char *exynos_get_domain_name(struct device *dev,
+ struct device_node *node)
{
const char *name;
if (of_property_read_string(node, "label", &name) < 0)
name = kbasename(node->full_name);
- return kstrdup_const(name, GFP_KERNEL);
+ return devm_kstrdup_const(dev, name, GFP_KERNEL);
}
static int exynos_pd_probe(struct platform_device *pdev)
@@ -115,15 +116,13 @@ static int exynos_pd_probe(struct platform_device *pdev)
if (!pd)
return -ENOMEM;
- pd->pd.name = exynos_get_domain_name(np);
+ pd->pd.name = exynos_get_domain_name(dev, np);
if (!pd->pd.name)
return -ENOMEM;
pd->base = of_iomap(np, 0);
- if (!pd->base) {
- kfree_const(pd->pd.name);
+ if (!pd->base)
return -ENODEV;
- }
pd->pd.power_off = exynos_pd_power_off;
pd->pd.power_on = exynos_pd_power_on;
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 04/10] pmdomain: samsung: plug potential memleak during probe
2025-10-16 15:58 ` [PATCH v3 04/10] pmdomain: samsung: plug potential memleak during probe André Draszik
@ 2025-10-21 13:54 ` Ulf Hansson
0 siblings, 0 replies; 27+ messages in thread
From: Ulf Hansson @ 2025-10-21 13:54 UTC (permalink / raw)
To: André Draszik
Cc: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Marek Szyprowski, Peter Griffin,
Tudor Ambarus, Will McVicker, kernel-team, linux-arm-kernel,
linux-samsung-soc, devicetree, linux-kernel, linux-pm, stable,
Krzysztof Kozlowski
On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
>
> of_genpd_add_provider_simple() could fail, in which case this code
> leaks the domain name, pd->pd.name.
>
> Use devm_kstrdup_const() to plug this leak. As a side-effect, we can
> simplify existing error handling.
>
> Fixes: c09a3e6c97f0 ("soc: samsung: pm_domains: Convert to regular platform driver")
> Cc: stable@vger.kernel.org
> Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
Applied for fixes, thanks!
Kind regards
Uffe
> ---
> v2:
> mark as fix, as this isn't a pure simplification
> ---
> drivers/pmdomain/samsung/exynos-pm-domains.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> index 5d478bb37ad68afc7aed7c6ae19b5fefc94a9035..f53e1bd2479807988f969774b4b7b4c5739c1aba 100644
> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> @@ -92,13 +92,14 @@ static const struct of_device_id exynos_pm_domain_of_match[] = {
> { },
> };
>
> -static const char *exynos_get_domain_name(struct device_node *node)
> +static const char *exynos_get_domain_name(struct device *dev,
> + struct device_node *node)
> {
> const char *name;
>
> if (of_property_read_string(node, "label", &name) < 0)
> name = kbasename(node->full_name);
> - return kstrdup_const(name, GFP_KERNEL);
> + return devm_kstrdup_const(dev, name, GFP_KERNEL);
> }
>
> static int exynos_pd_probe(struct platform_device *pdev)
> @@ -115,15 +116,13 @@ static int exynos_pd_probe(struct platform_device *pdev)
> if (!pd)
> return -ENOMEM;
>
> - pd->pd.name = exynos_get_domain_name(np);
> + pd->pd.name = exynos_get_domain_name(dev, np);
> if (!pd->pd.name)
> return -ENOMEM;
>
> pd->base = of_iomap(np, 0);
> - if (!pd->base) {
> - kfree_const(pd->pd.name);
> + if (!pd->base)
> return -ENODEV;
> - }
>
> pd->pd.power_off = exynos_pd_power_off;
> pd->pd.power_on = exynos_pd_power_on;
>
> --
> 2.51.0.788.g6d19910ace-goog
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 05/10] pmdomain: samsung: convert to using regmap
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (3 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 04/10] pmdomain: samsung: plug potential memleak during probe André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-16 15:58 ` [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout() André Draszik
` (5 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
On platforms such as Google gs101, direct mmio register access to the
PMU registers doesn't necessarily work and access must happen via a
(syscon) regmap created by the PMU driver instead.
In preparation for supporting such SoCs convert the existing mmio
accesses to using a regmap wrapper.
With this change in place, a follow-up patch can update the driver to
optionally acquire the PMU-created regmap without having to change the
rest of the code.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
There is one checkpatch warning, relating to the non-const
regmap_config. It can not easily be made const at this stage, but a
follow-up patch allows us to make it const and the warning will go away
anyway.
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 78 ++++++++++++++++++++--------
1 file changed, 57 insertions(+), 21 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index f53e1bd2479807988f969774b4b7b4c5739c1aba..383126245811cb8e4dbae3b99ced3f06d3093f35 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -9,15 +9,14 @@
// conjunction with runtime-pm. Support for both device-tree and non-device-tree
// based power domain support is included.
-#include <linux/io.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/pm_domain.h>
#include <linux/delay.h>
#include <linux/of.h>
-#include <linux/of_address.h>
#include <linux/pm_runtime.h>
+#include <linux/regmap.h>
struct exynos_pm_domain_config {
/* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
@@ -28,7 +27,7 @@ struct exynos_pm_domain_config {
* Exynos specific wrapper around the generic power domain
*/
struct exynos_pm_domain {
- void __iomem *base;
+ struct regmap *regmap;
struct generic_pm_domain pd;
u32 local_pwr_cfg;
};
@@ -36,31 +35,37 @@ struct exynos_pm_domain {
static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
{
struct exynos_pm_domain *pd;
- void __iomem *base;
u32 timeout, pwr;
- char *op;
+ int err;
pd = container_of(domain, struct exynos_pm_domain, pd);
- base = pd->base;
pwr = power_on ? pd->local_pwr_cfg : 0;
- writel_relaxed(pwr, base);
+ err = regmap_write(pd->regmap, 0, pwr);
+ if (err)
+ return err;
/* Wait max 1ms */
timeout = 10;
-
- while ((readl_relaxed(base + 0x4) & pd->local_pwr_cfg) != pwr) {
- if (!timeout) {
- op = (power_on) ? "enable" : "disable";
- pr_err("Power domain %s %s failed\n", domain->name, op);
- return -ETIMEDOUT;
+ while (timeout-- > 0) {
+ unsigned int val;
+
+ err = regmap_read(pd->regmap, 0x4, &val);
+ if (err || ((val & pd->local_pwr_cfg) != pwr)) {
+ cpu_relax();
+ usleep_range(80, 100);
+ continue;
}
- timeout--;
- cpu_relax();
- usleep_range(80, 100);
+
+ return 0;
}
- return 0;
+ if (!err)
+ err = -ETIMEDOUT;
+ pr_err("Power domain %s %sable failed: %d\n", domain->name,
+ power_on ? "en" : "dis", err);
+
+ return err;
}
static int exynos_pd_power_on(struct generic_pm_domain *domain)
@@ -109,8 +114,18 @@ static int exynos_pd_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
struct of_phandle_args child, parent;
struct exynos_pm_domain *pd;
+ struct resource *res;
+ void __iomem *base;
+ unsigned int val;
int on, ret;
+ struct regmap_config reg_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .use_relaxed_mmio = true,
+ };
+
pm_domain_cfg = of_device_get_match_data(dev);
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
if (!pd)
@@ -120,15 +135,36 @@ static int exynos_pd_probe(struct platform_device *pdev)
if (!pd->pd.name)
return -ENOMEM;
- pd->base = of_iomap(np, 0);
- if (!pd->base)
- return -ENODEV;
+ /*
+ * The resource typically points into the address space of the PMU.
+ * Therefore, avoid using devm_platform_get_and_ioremap_resource() and
+ * instead use platform_get_resource() and devm_ioremap() to avoid
+ * conflicts due to address space overlap.
+ */
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return dev_err_probe(dev, -ENXIO, "missing IO resources");
+
+ base = devm_ioremap(dev, res->start, resource_size(res));
+ if (!base)
+ return dev_err_probe(dev, -ENOMEM,
+ "failed to ioremap PMU registers");
+
+ reg_config.max_register = resource_size(res) - reg_config.reg_stride;
+ pd->regmap = devm_regmap_init_mmio(dev, base, ®_config);
+ if (IS_ERR(pd->regmap))
+ return dev_err_probe(dev, PTR_ERR(base),
+ "failed to init regmap");
pd->pd.power_off = exynos_pd_power_off;
pd->pd.power_on = exynos_pd_power_on;
pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;
- on = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg;
+ ret = regmap_read(pd->regmap, 0x4, &val);
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to read status");
+
+ on = val & pd->local_pwr_cfg;
pm_genpd_init(&pd->pd, NULL, !on);
ret = of_genpd_add_provider_simple(np, &pd->pd);
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout()
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (4 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 05/10] pmdomain: samsung: convert to using regmap André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-21 20:38 ` Marek Szyprowski
2025-10-16 15:58 ` [PATCH v3 07/10] pmdomain: samsung: don't hardcode offset for registers to 0 and 4 André Draszik
` (4 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
Replace the open-coded PD status polling with
regmap_read_poll_timeout(). This change simplifies the code without
altering functionality.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 29 ++++++++--------------------
1 file changed, 8 insertions(+), 21 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 383126245811cb8e4dbae3b99ced3f06d3093f35..431548ad9a7e40c0a77ac6672081b600c90ddd4e 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -13,7 +13,6 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/pm_domain.h>
-#include <linux/delay.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
@@ -35,7 +34,8 @@ struct exynos_pm_domain {
static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
{
struct exynos_pm_domain *pd;
- u32 timeout, pwr;
+ unsigned int val;
+ u32 pwr;
int err;
pd = container_of(domain, struct exynos_pm_domain, pd);
@@ -45,25 +45,12 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
if (err)
return err;
- /* Wait max 1ms */
- timeout = 10;
- while (timeout-- > 0) {
- unsigned int val;
-
- err = regmap_read(pd->regmap, 0x4, &val);
- if (err || ((val & pd->local_pwr_cfg) != pwr)) {
- cpu_relax();
- usleep_range(80, 100);
- continue;
- }
-
- return 0;
- }
-
- if (!err)
- err = -ETIMEDOUT;
- pr_err("Power domain %s %sable failed: %d\n", domain->name,
- power_on ? "en" : "dis", err);
+ err = regmap_read_poll_timeout(pd->regmap, 0x4, val,
+ (val & pd->local_pwr_cfg) == pwr,
+ 100, 1 * USEC_PER_MSEC);
+ if (err)
+ pr_err("Power domain %s %sable failed: %d (%#.2x)\n",
+ domain->name, power_on ? "en" : "dis", err, val);
return err;
}
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout()
2025-10-16 15:58 ` [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout() André Draszik
@ 2025-10-21 20:38 ` Marek Szyprowski
2025-10-22 13:45 ` Marek Szyprowski
0 siblings, 1 reply; 27+ messages in thread
From: Marek Szyprowski @ 2025-10-21 20:38 UTC (permalink / raw)
To: André Draszik, Krzysztof Kozlowski, Alim Akhtar, Rob Herring,
Conor Dooley, Krzysztof Kozlowski, Ulf Hansson
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm
On 16.10.2025 17:58, André Draszik wrote:
> Replace the open-coded PD status polling with
> regmap_read_poll_timeout(). This change simplifies the code without
> altering functionality.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> drivers/pmdomain/samsung/exynos-pm-domains.c | 29 ++++++++--------------------
> 1 file changed, 8 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> index 383126245811cb8e4dbae3b99ced3f06d3093f35..431548ad9a7e40c0a77ac6672081b600c90ddd4e 100644
> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> @@ -13,7 +13,6 @@
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/pm_domain.h>
> -#include <linux/delay.h>
> #include <linux/of.h>
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> @@ -35,7 +34,8 @@ struct exynos_pm_domain {
> static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
> {
> struct exynos_pm_domain *pd;
> - u32 timeout, pwr;
> + unsigned int val;
> + u32 pwr;
> int err;
>
> pd = container_of(domain, struct exynos_pm_domain, pd);
> @@ -45,25 +45,12 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
> if (err)
> return err;
>
> - /* Wait max 1ms */
> - timeout = 10;
> - while (timeout-- > 0) {
> - unsigned int val;
> -
> - err = regmap_read(pd->regmap, 0x4, &val);
> - if (err || ((val & pd->local_pwr_cfg) != pwr)) {
> - cpu_relax();
> - usleep_range(80, 100);
> - continue;
> - }
> -
> - return 0;
> - }
> -
> - if (!err)
> - err = -ETIMEDOUT;
> - pr_err("Power domain %s %sable failed: %d\n", domain->name,
> - power_on ? "en" : "dis", err);
> + err = regmap_read_poll_timeout(pd->regmap, 0x4, val,
> + (val & pd->local_pwr_cfg) == pwr,
> + 100, 1 * USEC_PER_MSEC);
> + if (err)
> + pr_err("Power domain %s %sable failed: %d (%#.2x)\n",
> + domain->name, power_on ? "en" : "dis", err, val);
I've posted my 'tested-by' tag for this patchset, but in meantime I
found that this patch causes regression from time to time on old Exynos
SoCs (especially when all debugs are disabled). It looks that there are
some subtle differences between reading the status register up to 10
times with cpu_relax()+usleep_range() and the
regmap_read_poll_timeout(). I will try to analyze this a bit more and
provide details, but I suspect that the old loop might take a bit longer
than the 1ms from the comment above this code.
> return err;
> }
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout()
2025-10-21 20:38 ` Marek Szyprowski
@ 2025-10-22 13:45 ` Marek Szyprowski
0 siblings, 0 replies; 27+ messages in thread
From: Marek Szyprowski @ 2025-10-22 13:45 UTC (permalink / raw)
To: André Draszik, Krzysztof Kozlowski, Alim Akhtar, Rob Herring,
Conor Dooley, Krzysztof Kozlowski, Ulf Hansson
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm
On 21.10.2025 22:38, Marek Szyprowski wrote:
> On 16.10.2025 17:58, André Draszik wrote:
>> Replace the open-coded PD status polling with
>> regmap_read_poll_timeout(). This change simplifies the code without
>> altering functionality.
>>
>> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>> ---
>> drivers/pmdomain/samsung/exynos-pm-domains.c | 29
>> ++++++++--------------------
>> 1 file changed, 8 insertions(+), 21 deletions(-)
>>
>> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c
>> b/drivers/pmdomain/samsung/exynos-pm-domains.c
>> index
>> 383126245811cb8e4dbae3b99ced3f06d3093f35..431548ad9a7e40c0a77ac6672081b600c90ddd4e
>> 100644
>> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
>> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
>> @@ -13,7 +13,6 @@
>> #include <linux/platform_device.h>
>> #include <linux/slab.h>
>> #include <linux/pm_domain.h>
>> -#include <linux/delay.h>
>> #include <linux/of.h>
>> #include <linux/pm_runtime.h>
>> #include <linux/regmap.h>
>> @@ -35,7 +34,8 @@ struct exynos_pm_domain {
>> static int exynos_pd_power(struct generic_pm_domain *domain, bool
>> power_on)
>> {
>> struct exynos_pm_domain *pd;
>> - u32 timeout, pwr;
>> + unsigned int val;
>> + u32 pwr;
>> int err;
>> pd = container_of(domain, struct exynos_pm_domain, pd);
>> @@ -45,25 +45,12 @@ static int exynos_pd_power(struct
>> generic_pm_domain *domain, bool power_on)
>> if (err)
>> return err;
>> - /* Wait max 1ms */
>> - timeout = 10;
>> - while (timeout-- > 0) {
>> - unsigned int val;
>> -
>> - err = regmap_read(pd->regmap, 0x4, &val);
>> - if (err || ((val & pd->local_pwr_cfg) != pwr)) {
>> - cpu_relax();
>> - usleep_range(80, 100);
>> - continue;
>> - }
>> -
>> - return 0;
>> - }
>> -
>> - if (!err)
>> - err = -ETIMEDOUT;
>> - pr_err("Power domain %s %sable failed: %d\n", domain->name,
>> - power_on ? "en" : "dis", err);
>> + err = regmap_read_poll_timeout(pd->regmap, 0x4, val,
>> + (val & pd->local_pwr_cfg) == pwr,
>> + 100, 1 * USEC_PER_MSEC);
>> + if (err)
>> + pr_err("Power domain %s %sable failed: %d (%#.2x)\n",
>> + domain->name, power_on ? "en" : "dis", err, val);
>
> I've posted my 'tested-by' tag for this patchset, but in meantime I
> found that this patch causes regression from time to time on old
> Exynos SoCs (especially when all debugs are disabled). It looks that
> there are some subtle differences between reading the status register
> up to 10 times with cpu_relax()+usleep_range() and the
> regmap_read_poll_timeout(). I will try to analyze this a bit more and
> provide details, but I suspect that the old loop might take a bit
> longer than the 1ms from the comment above this code.
It looks that during the early boot all calls to
regmap_read_poll_timeout() lasts exactly 10ms (measured with ktime_get()
and ktime_to_ms()), what means that timekeeping source doesn't provide
resolution high enough for the 1ms timeout. This in turn results in
premature end of regmap_read_poll_timeout() loop after only one cycle of
read+wait+read, what is not always enough for power domain to turn on/off.
According to the commit 7349a69cf312 ("iopoll: Do not use timekeeping in
read_poll_timeout_atomic()"), ktime_get(), which is used also by
regmap_read_poll_timeout(), is not reliable in all contexts, so I think
that this patch should be dropped as there is no easy way to fix this.
The alternative would be to use regmap_read_poll_timeout_atomic(), which
need to be fixed the same way as regmap_read_poll_timeout_atomic() by
the mentioned commit, but in such case we would effectively switch from
usleep to udelay.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 07/10] pmdomain: samsung: don't hardcode offset for registers to 0 and 4
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (5 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 06/10] pmdomain: samsung: convert to regmap_read_poll_timeout() André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-16 15:58 ` [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state André Draszik
` (3 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
On platforms such as Google gs101, direct mmio register access to the
PMU registers doesn't necessarily work and access must happen via a
(syscon) regmap created by the PMU driver instead.
When such a regmap is used it will cover the complete PMU memory region
rather than individual power domains. This means the register offsets
for the configuration and status registers will have to take the power
domain offsets into account, rather than unconditionally hardcoding 0
and 4 respectively.
Update the code to allow that.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 431548ad9a7e40c0a77ac6672081b600c90ddd4e..638d286b57f716140b2401092415644a6805870e 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -29,6 +29,8 @@ struct exynos_pm_domain {
struct regmap *regmap;
struct generic_pm_domain pd;
u32 local_pwr_cfg;
+ u32 configuration_reg;
+ u32 status_reg;
};
static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
@@ -41,11 +43,11 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct exynos_pm_domain, pd);
pwr = power_on ? pd->local_pwr_cfg : 0;
- err = regmap_write(pd->regmap, 0, pwr);
+ err = regmap_write(pd->regmap, pd->configuration_reg, pwr);
if (err)
return err;
- err = regmap_read_poll_timeout(pd->regmap, 0x4, val,
+ err = regmap_read_poll_timeout(pd->regmap, pd->status_reg, val,
(val & pd->local_pwr_cfg) == pwr,
100, 1 * USEC_PER_MSEC);
if (err)
@@ -146,8 +148,10 @@ static int exynos_pd_probe(struct platform_device *pdev)
pd->pd.power_off = exynos_pd_power_off;
pd->pd.power_on = exynos_pd_power_on;
pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;
+ pd->configuration_reg += 0;
+ pd->status_reg += 4;
- ret = regmap_read(pd->regmap, 0x4, &val);
+ ret = regmap_read(pd->regmap, pd->status_reg, &val);
if (ret)
return dev_err_probe(dev, ret, "failed to read status");
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (6 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 07/10] pmdomain: samsung: don't hardcode offset for registers to 0 and 4 André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-22 11:06 ` Ulf Hansson
2025-10-16 15:58 ` [PATCH v3 09/10] pmdomain: samsung: add support for google,gs101-pd André Draszik
` (2 subsequent siblings)
10 siblings, 1 reply; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
Unconditionally calling of_genpd_sync_state() causes issues on
platforms with child domains as the parent domain will be turned off
before the child domain was even registered during boot.
This in particular is an issue for the upcoming Google gs101 support -
all operations on child domains registered after the parent domain
misbehave.
Add a flag to the probe data to be able to sync_state conditionally
only, and enable that flag on the two platforms currently supported by
this driver.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
v2:
* use bool for need_early_sync_state (Krzysztof)
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -20,6 +20,7 @@
struct exynos_pm_domain_config {
/* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
u32 local_pwr_cfg;
+ bool need_early_sync_state;
};
/*
@@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
static const struct exynos_pm_domain_config exynos4210_cfg = {
.local_pwr_cfg = 0x7,
+ .need_early_sync_state = true,
};
static const struct exynos_pm_domain_config exynos5433_cfg = {
.local_pwr_cfg = 0xf,
+ .need_early_sync_state = true,
};
static const struct of_device_id exynos_pm_domain_of_match[] = {
@@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
* reset during boot. As a temporary hack to manage this, let's enforce
* a sync_state.
*/
- if (!ret)
+ if (pm_domain_cfg->need_early_sync_state && !ret)
of_genpd_sync_state(np);
pm_runtime_enable(dev);
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-16 15:58 ` [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state André Draszik
@ 2025-10-22 11:06 ` Ulf Hansson
2025-10-22 18:39 ` Marek Szyprowski
0 siblings, 1 reply; 27+ messages in thread
From: Ulf Hansson @ 2025-10-22 11:06 UTC (permalink / raw)
To: André Draszik
Cc: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Marek Szyprowski, Peter Griffin,
Tudor Ambarus, Will McVicker, kernel-team, linux-arm-kernel,
linux-samsung-soc, devicetree, linux-kernel, linux-pm
On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
>
> Unconditionally calling of_genpd_sync_state() causes issues on
> platforms with child domains as the parent domain will be turned off
> before the child domain was even registered during boot.
>
> This in particular is an issue for the upcoming Google gs101 support -
> all operations on child domains registered after the parent domain
> misbehave.
>
> Add a flag to the probe data to be able to sync_state conditionally
> only, and enable that flag on the two platforms currently supported by
> this driver.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>
> ---
> v2:
> * use bool for need_early_sync_state (Krzysztof)
> ---
> drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> @@ -20,6 +20,7 @@
> struct exynos_pm_domain_config {
> /* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
> u32 local_pwr_cfg;
> + bool need_early_sync_state;
> };
>
> /*
> @@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
>
> static const struct exynos_pm_domain_config exynos4210_cfg = {
> .local_pwr_cfg = 0x7,
> + .need_early_sync_state = true,
> };
>
> static const struct exynos_pm_domain_config exynos5433_cfg = {
> .local_pwr_cfg = 0xf,
> + .need_early_sync_state = true,
> };
>
> static const struct of_device_id exynos_pm_domain_of_match[] = {
> @@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
> * reset during boot. As a temporary hack to manage this, let's enforce
> * a sync_state.
> */
> - if (!ret)
> + if (pm_domain_cfg->need_early_sync_state && !ret)
> of_genpd_sync_state(np);
The call to of_genpd_sync_state() was intended as a temporary solution here.
Potentially, if we would be able to distinguish what PM domain that is
causing the problem on the Exynos platforms, we could set
GENPD_FLAG_NO_STAY_ON for that genpd instead.
>
> pm_runtime_enable(dev);
>
> --
> 2.51.0.788.g6d19910ace-goog
>
The above said, $subject patch is still fine as is for me.
Kind regards
Uffe
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-22 11:06 ` Ulf Hansson
@ 2025-10-22 18:39 ` Marek Szyprowski
2025-10-23 10:02 ` Ulf Hansson
0 siblings, 1 reply; 27+ messages in thread
From: Marek Szyprowski @ 2025-10-22 18:39 UTC (permalink / raw)
To: Ulf Hansson, André Draszik
Cc: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-arm-kernel, linux-samsung-soc, devicetree,
linux-kernel, linux-pm
On 22.10.2025 13:06, Ulf Hansson wrote:
> On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
>> Unconditionally calling of_genpd_sync_state() causes issues on
>> platforms with child domains as the parent domain will be turned off
>> before the child domain was even registered during boot.
>>
>> This in particular is an issue for the upcoming Google gs101 support -
>> all operations on child domains registered after the parent domain
>> misbehave.
>>
>> Add a flag to the probe data to be able to sync_state conditionally
>> only, and enable that flag on the two platforms currently supported by
>> this driver.
>>
>> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>>
>> ---
>> v2:
>> * use bool for need_early_sync_state (Krzysztof)
>> ---
>> drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
>> index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
>> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
>> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
>> @@ -20,6 +20,7 @@
>> struct exynos_pm_domain_config {
>> /* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
>> u32 local_pwr_cfg;
>> + bool need_early_sync_state;
>> };
>>
>> /*
>> @@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
>>
>> static const struct exynos_pm_domain_config exynos4210_cfg = {
>> .local_pwr_cfg = 0x7,
>> + .need_early_sync_state = true,
>> };
>>
>> static const struct exynos_pm_domain_config exynos5433_cfg = {
>> .local_pwr_cfg = 0xf,
>> + .need_early_sync_state = true,
>> };
>>
>> static const struct of_device_id exynos_pm_domain_of_match[] = {
>> @@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
>> * reset during boot. As a temporary hack to manage this, let's enforce
>> * a sync_state.
>> */
>> - if (!ret)
>> + if (pm_domain_cfg->need_early_sync_state && !ret)
>> of_genpd_sync_state(np);
> The call to of_genpd_sync_state() was intended as a temporary solution here.
>
> Potentially, if we would be able to distinguish what PM domain that is
> causing the problem on the Exynos platforms, we could set
> GENPD_FLAG_NO_STAY_ON for that genpd instead.
Well, this of_genpd_sync_state() "workaround" has to be applied only to
the power domain of the display controller device. It can be replaced by
the following check on the legacy Exynos systems:
if (IS_ENABLED(CONFIG_ARM) &&
of_device_is_compatible(np, "samsung,exynos4210-pd") &&
(strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP")))
pd->pd.flags = GENPD_FLAG_NO_STAY_ON;
I assume that this information cannot be coded in device tree to make it
somehow generic...
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-22 18:39 ` Marek Szyprowski
@ 2025-10-23 10:02 ` Ulf Hansson
2025-10-23 12:17 ` Marek Szyprowski
0 siblings, 1 reply; 27+ messages in thread
From: Ulf Hansson @ 2025-10-23 10:02 UTC (permalink / raw)
To: Marek Szyprowski, Krzysztof Kozlowski, Rob Herring
Cc: André Draszik, Alim Akhtar, Conor Dooley,
Krzysztof Kozlowski, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-arm-kernel, linux-samsung-soc, devicetree,
linux-kernel, linux-pm
On Wed, 22 Oct 2025 at 20:39, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> On 22.10.2025 13:06, Ulf Hansson wrote:
> > On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
> >> Unconditionally calling of_genpd_sync_state() causes issues on
> >> platforms with child domains as the parent domain will be turned off
> >> before the child domain was even registered during boot.
> >>
> >> This in particular is an issue for the upcoming Google gs101 support -
> >> all operations on child domains registered after the parent domain
> >> misbehave.
> >>
> >> Add a flag to the probe data to be able to sync_state conditionally
> >> only, and enable that flag on the two platforms currently supported by
> >> this driver.
> >>
> >> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> >>
> >> ---
> >> v2:
> >> * use bool for need_early_sync_state (Krzysztof)
> >> ---
> >> drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> >> index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
> >> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> >> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> >> @@ -20,6 +20,7 @@
> >> struct exynos_pm_domain_config {
> >> /* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
> >> u32 local_pwr_cfg;
> >> + bool need_early_sync_state;
> >> };
> >>
> >> /*
> >> @@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
> >>
> >> static const struct exynos_pm_domain_config exynos4210_cfg = {
> >> .local_pwr_cfg = 0x7,
> >> + .need_early_sync_state = true,
> >> };
> >>
> >> static const struct exynos_pm_domain_config exynos5433_cfg = {
> >> .local_pwr_cfg = 0xf,
> >> + .need_early_sync_state = true,
> >> };
> >>
> >> static const struct of_device_id exynos_pm_domain_of_match[] = {
> >> @@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
> >> * reset during boot. As a temporary hack to manage this, let's enforce
> >> * a sync_state.
> >> */
> >> - if (!ret)
> >> + if (pm_domain_cfg->need_early_sync_state && !ret)
> >> of_genpd_sync_state(np);
> > The call to of_genpd_sync_state() was intended as a temporary solution here.
> >
> > Potentially, if we would be able to distinguish what PM domain that is
> > causing the problem on the Exynos platforms, we could set
> > GENPD_FLAG_NO_STAY_ON for that genpd instead.
>
> Well, this of_genpd_sync_state() "workaround" has to be applied only to
> the power domain of the display controller device. It can be replaced by
> the following check on the legacy Exynos systems:
>
> if (IS_ENABLED(CONFIG_ARM) &&
> of_device_is_compatible(np, "samsung,exynos4210-pd") &&
> (strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP")))
> pd->pd.flags = GENPD_FLAG_NO_STAY_ON;
Oh wait, perhaps better to just power-off these PM domains before
calling pm_genpd_init(), if that can be done safely?
At least that would guarantee the reset to happen before the display
driver gets probed. Instead of relying on genpd_power_off_unused()
(late_initcall_sync) to do it.
>
> I assume that this information cannot be coded in device tree to make it
> somehow generic...
Right, in principle we would need a new DT property for a power-domain
provider, like "broken-hw-reset", because we don't have a reset-line
to pull.
>
> Best regards
> --
> Marek Szyprowski, PhD
> Samsung R&D Institute Poland
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-23 10:02 ` Ulf Hansson
@ 2025-10-23 12:17 ` Marek Szyprowski
2025-10-23 13:46 ` Ulf Hansson
0 siblings, 1 reply; 27+ messages in thread
From: Marek Szyprowski @ 2025-10-23 12:17 UTC (permalink / raw)
To: Ulf Hansson, Krzysztof Kozlowski, Rob Herring
Cc: André Draszik, Alim Akhtar, Conor Dooley,
Krzysztof Kozlowski, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-arm-kernel, linux-samsung-soc, devicetree,
linux-kernel, linux-pm
On 23.10.2025 12:02, Ulf Hansson wrote:
> On Wed, 22 Oct 2025 at 20:39, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>> On 22.10.2025 13:06, Ulf Hansson wrote:
>>> On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
>>>> Unconditionally calling of_genpd_sync_state() causes issues on
>>>> platforms with child domains as the parent domain will be turned off
>>>> before the child domain was even registered during boot.
>>>>
>>>> This in particular is an issue for the upcoming Google gs101 support -
>>>> all operations on child domains registered after the parent domain
>>>> misbehave.
>>>>
>>>> Add a flag to the probe data to be able to sync_state conditionally
>>>> only, and enable that flag on the two platforms currently supported by
>>>> this driver.
>>>>
>>>> Signed-off-by: André Draszik <andre.draszik@linaro.org>
>>>>
>>>> ---
>>>> v2:
>>>> * use bool for need_early_sync_state (Krzysztof)
>>>> ---
>>>> drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
>>>> index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
>>>> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
>>>> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
>>>> @@ -20,6 +20,7 @@
>>>> struct exynos_pm_domain_config {
>>>> /* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
>>>> u32 local_pwr_cfg;
>>>> + bool need_early_sync_state;
>>>> };
>>>>
>>>> /*
>>>> @@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
>>>>
>>>> static const struct exynos_pm_domain_config exynos4210_cfg = {
>>>> .local_pwr_cfg = 0x7,
>>>> + .need_early_sync_state = true,
>>>> };
>>>>
>>>> static const struct exynos_pm_domain_config exynos5433_cfg = {
>>>> .local_pwr_cfg = 0xf,
>>>> + .need_early_sync_state = true,
>>>> };
>>>>
>>>> static const struct of_device_id exynos_pm_domain_of_match[] = {
>>>> @@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
>>>> * reset during boot. As a temporary hack to manage this, let's enforce
>>>> * a sync_state.
>>>> */
>>>> - if (!ret)
>>>> + if (pm_domain_cfg->need_early_sync_state && !ret)
>>>> of_genpd_sync_state(np);
>>> The call to of_genpd_sync_state() was intended as a temporary solution here.
>>>
>>> Potentially, if we would be able to distinguish what PM domain that is
>>> causing the problem on the Exynos platforms, we could set
>>> GENPD_FLAG_NO_STAY_ON for that genpd instead.
>> Well, this of_genpd_sync_state() "workaround" has to be applied only to
>> the power domain of the display controller device. It can be replaced by
>> the following check on the legacy Exynos systems:
>>
>> if (IS_ENABLED(CONFIG_ARM) &&
>> of_device_is_compatible(np, "samsung,exynos4210-pd") &&
>> (strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP")))
>> pd->pd.flags = GENPD_FLAG_NO_STAY_ON;
> Oh wait, perhaps better to just power-off these PM domains before
> calling pm_genpd_init(), if that can be done safely?
>
> At least that would guarantee the reset to happen before the display
> driver gets probed. Instead of relying on genpd_power_off_unused()
> (late_initcall_sync) to do it.
Well, yes, this works too:
if ((of_device_is_compatible(np, "samsung,exynos4210-pd") &&
(strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP"))))
exynos_pd_power_off(&pd->pd);
>> I assume that this information cannot be coded in device tree to make it
>> somehow generic...
> Right, in principle we would need a new DT property for a power-domain
> provider, like "broken-hw-reset", because we don't have a reset-line
> to pull.
It is not a matter of broken reset at all. It is a matter of software
configuration and the lack of 'protocol' to pass the information that
the display controller is configured to display splash screen from the
system memory at given address and newly instantiated drivers must to be
aware of that.
Turning display-related power domain off simply resets all that
configuration, so drivers can start from good known 'unconfigured' state.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state
2025-10-23 12:17 ` Marek Szyprowski
@ 2025-10-23 13:46 ` Ulf Hansson
0 siblings, 0 replies; 27+ messages in thread
From: Ulf Hansson @ 2025-10-23 13:46 UTC (permalink / raw)
To: Marek Szyprowski
Cc: Krzysztof Kozlowski, Rob Herring, André Draszik, Alim Akhtar,
Conor Dooley, Krzysztof Kozlowski, Peter Griffin, Tudor Ambarus,
Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, linux-pm
On Thu, 23 Oct 2025 at 14:17, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> On 23.10.2025 12:02, Ulf Hansson wrote:
> > On Wed, 22 Oct 2025 at 20:39, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> >> On 22.10.2025 13:06, Ulf Hansson wrote:
> >>> On Thu, 16 Oct 2025 at 17:58, André Draszik <andre.draszik@linaro.org> wrote:
> >>>> Unconditionally calling of_genpd_sync_state() causes issues on
> >>>> platforms with child domains as the parent domain will be turned off
> >>>> before the child domain was even registered during boot.
> >>>>
> >>>> This in particular is an issue for the upcoming Google gs101 support -
> >>>> all operations on child domains registered after the parent domain
> >>>> misbehave.
> >>>>
> >>>> Add a flag to the probe data to be able to sync_state conditionally
> >>>> only, and enable that flag on the two platforms currently supported by
> >>>> this driver.
> >>>>
> >>>> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> >>>>
> >>>> ---
> >>>> v2:
> >>>> * use bool for need_early_sync_state (Krzysztof)
> >>>> ---
> >>>> drivers/pmdomain/samsung/exynos-pm-domains.c | 5 ++++-
> >>>> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> >>>> index 638d286b57f716140b2401092415644a6805870e..15a1582aa92103a07335eb681600d9415369fefd 100644
> >>>> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> >>>> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> >>>> @@ -20,6 +20,7 @@
> >>>> struct exynos_pm_domain_config {
> >>>> /* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
> >>>> u32 local_pwr_cfg;
> >>>> + bool need_early_sync_state;
> >>>> };
> >>>>
> >>>> /*
> >>>> @@ -69,10 +70,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
> >>>>
> >>>> static const struct exynos_pm_domain_config exynos4210_cfg = {
> >>>> .local_pwr_cfg = 0x7,
> >>>> + .need_early_sync_state = true,
> >>>> };
> >>>>
> >>>> static const struct exynos_pm_domain_config exynos5433_cfg = {
> >>>> .local_pwr_cfg = 0xf,
> >>>> + .need_early_sync_state = true,
> >>>> };
> >>>>
> >>>> static const struct of_device_id exynos_pm_domain_of_match[] = {
> >>>> @@ -179,7 +182,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
> >>>> * reset during boot. As a temporary hack to manage this, let's enforce
> >>>> * a sync_state.
> >>>> */
> >>>> - if (!ret)
> >>>> + if (pm_domain_cfg->need_early_sync_state && !ret)
> >>>> of_genpd_sync_state(np);
> >>> The call to of_genpd_sync_state() was intended as a temporary solution here.
> >>>
> >>> Potentially, if we would be able to distinguish what PM domain that is
> >>> causing the problem on the Exynos platforms, we could set
> >>> GENPD_FLAG_NO_STAY_ON for that genpd instead.
> >> Well, this of_genpd_sync_state() "workaround" has to be applied only to
> >> the power domain of the display controller device. It can be replaced by
> >> the following check on the legacy Exynos systems:
> >>
> >> if (IS_ENABLED(CONFIG_ARM) &&
> >> of_device_is_compatible(np, "samsung,exynos4210-pd") &&
> >> (strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP")))
> >> pd->pd.flags = GENPD_FLAG_NO_STAY_ON;
> > Oh wait, perhaps better to just power-off these PM domains before
> > calling pm_genpd_init(), if that can be done safely?
> >
> > At least that would guarantee the reset to happen before the display
> > driver gets probed. Instead of relying on genpd_power_off_unused()
> > (late_initcall_sync) to do it.
>
> Well, yes, this works too:
>
> if ((of_device_is_compatible(np, "samsung,exynos4210-pd") &&
> (strstr(pd->pd.name, "LCD") || strstr(pd->pd.name, "DISP"))))
> exynos_pd_power_off(&pd->pd);
Okay!
Should we (you or me?) send a patch and change the code like this?
>
> >> I assume that this information cannot be coded in device tree to make it
> >> somehow generic...
> > Right, in principle we would need a new DT property for a power-domain
> > provider, like "broken-hw-reset", because we don't have a reset-line
> > to pull.
>
> It is not a matter of broken reset at all. It is a matter of software
> configuration and the lack of 'protocol' to pass the information that
> the display controller is configured to display splash screen from the
> system memory at given address and newly instantiated drivers must to be
> aware of that.
>
> Turning display-related power domain off simply resets all that
> configuration, so drivers can start from good known 'unconfigured' state.
Alright, thanks for clarifying! Yeah, a DT property would be wrong for this.
In fact, there are some drivers [1] that make use of the genpd on/off
notifiers to manage a reset of its device's PM domain. It works, but
it's a bit messy. Perhaps it could be simplified with some new helper
functions, if more consumers drivers need something similar.
Kind regards
Uffe
[1]
commit c11fa1204fe9 ("drm/msm/a6xx: Use genpd notifier to ensure
cx-gdsc collapse")
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 09/10] pmdomain: samsung: add support for google,gs101-pd
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (7 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 08/10] pmdomain: samsung: selectively handle enforced sync_state André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-16 15:58 ` [PATCH v3 10/10] pmdomain: samsung: use dev_err() instead of pr_err() André Draszik
2025-10-17 6:43 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 Marek Szyprowski
10 siblings, 0 replies; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik
On Google gs101, direct mmio register access to the PMU registers
doesn't work and access must happen via a (syscon) regmap created by
the PMU driver instead.
Try to obtain this regmap using the parent node in DT in case this PD
is a child of the PMU and fall back to the traditional direct mmio
regmap otherwise.
Additionally, the status is just one bit on gs101.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 65 +++++++++++++++++++---------
1 file changed, 45 insertions(+), 20 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 15a1582aa92103a07335eb681600d9415369fefd..a7e55624728a62545eac049c9a51012a229f44c2 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -12,6 +12,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/mfd/syscon.h>
#include <linux/pm_domain.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
@@ -78,8 +79,15 @@ static const struct exynos_pm_domain_config exynos5433_cfg = {
.need_early_sync_state = true,
};
+static const struct exynos_pm_domain_config gs101_cfg = {
+ .local_pwr_cfg = BIT(0),
+};
+
static const struct of_device_id exynos_pm_domain_of_match[] = {
{
+ .compatible = "google,gs101-pd",
+ .data = &gs101_cfg,
+ }, {
.compatible = "samsung,exynos4210-pd",
.data = &exynos4210_cfg,
}, {
@@ -107,17 +115,9 @@ static int exynos_pd_probe(struct platform_device *pdev)
struct of_phandle_args child, parent;
struct exynos_pm_domain *pd;
struct resource *res;
- void __iomem *base;
unsigned int val;
int on, ret;
- struct regmap_config reg_config = {
- .reg_bits = 32,
- .val_bits = 32,
- .reg_stride = 4,
- .use_relaxed_mmio = true,
- };
-
pm_domain_cfg = of_device_get_match_data(dev);
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
if (!pd)
@@ -128,25 +128,50 @@ static int exynos_pd_probe(struct platform_device *pdev)
return -ENOMEM;
/*
- * The resource typically points into the address space of the PMU.
+ * The resource typically points into the address space of the PMU and
+ * we have to consider two cases:
+ * 1) some implementations require a custom syscon regmap
+ * 2) this driver might map the same addresses as the PMU driver
* Therefore, avoid using devm_platform_get_and_ioremap_resource() and
- * instead use platform_get_resource() and devm_ioremap() to avoid
+ * instead use platform_get_resource() here, and below for case 1) use
+ * syscon_node_to_regmap() while for case 2) use devm_ioremap() to avoid
* conflicts due to address space overlap.
*/
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return dev_err_probe(dev, -ENXIO, "missing IO resources");
- base = devm_ioremap(dev, res->start, resource_size(res));
- if (!base)
- return dev_err_probe(dev, -ENOMEM,
- "failed to ioremap PMU registers");
-
- reg_config.max_register = resource_size(res) - reg_config.reg_stride;
- pd->regmap = devm_regmap_init_mmio(dev, base, ®_config);
- if (IS_ERR(pd->regmap))
- return dev_err_probe(dev, PTR_ERR(base),
- "failed to init regmap");
+ if (dev->parent &&
+ of_device_is_compatible(dev->parent->of_node, "syscon")) {
+ pd->regmap = syscon_node_to_regmap(dev->parent->of_node);
+ if (IS_ERR(pd->regmap))
+ return dev_err_probe(dev, PTR_ERR(pd->regmap),
+ "failed to acquire PMU regmap");
+
+ pd->configuration_reg = res->start;
+ pd->status_reg = res->start;
+ } else {
+ void __iomem *base;
+
+ const struct regmap_config reg_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .use_relaxed_mmio = true,
+ .max_register = (resource_size(res)
+ - reg_config.reg_stride),
+ };
+
+ base = devm_ioremap(dev, res->start, resource_size(res));
+ if (!base)
+ return dev_err_probe(dev, -ENOMEM,
+ "failed to ioremap PMU registers");
+
+ pd->regmap = devm_regmap_init_mmio(dev, base, ®_config);
+ if (IS_ERR(pd->regmap))
+ return dev_err_probe(dev, PTR_ERR(base),
+ "failed to init regmap");
+ }
pd->pd.power_off = exynos_pd_power_off;
pd->pd.power_on = exynos_pd_power_on;
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH v3 10/10] pmdomain: samsung: use dev_err() instead of pr_err()
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (8 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 09/10] pmdomain: samsung: add support for google,gs101-pd André Draszik
@ 2025-10-16 15:58 ` André Draszik
2025-10-17 6:43 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 Marek Szyprowski
10 siblings, 0 replies; 27+ messages in thread
From: André Draszik @ 2025-10-16 15:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, Conor Dooley,
Krzysztof Kozlowski, Ulf Hansson, Marek Szyprowski
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, André Draszik, Krzysztof Kozlowski
dev_err() gives us more consistent error messages, which include the
device. Switch to using dev_err().
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index a7e55624728a62545eac049c9a51012a229f44c2..387ee1c91caeae4519237af2ec659f56782e7bd7 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -29,6 +29,7 @@ struct exynos_pm_domain_config {
*/
struct exynos_pm_domain {
struct regmap *regmap;
+ struct device *dev;
struct generic_pm_domain pd;
u32 local_pwr_cfg;
u32 configuration_reg;
@@ -53,8 +54,9 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
(val & pd->local_pwr_cfg) == pwr,
100, 1 * USEC_PER_MSEC);
if (err)
- pr_err("Power domain %s %sable failed: %d (%#.2x)\n",
- domain->name, power_on ? "en" : "dis", err, val);
+ dev_err(pd->dev,
+ "Power domain %s %sable failed: %d (%#.2x)\n",
+ domain->name, power_on ? "en" : "dis", err, val);
return err;
}
@@ -123,6 +125,8 @@ static int exynos_pd_probe(struct platform_device *pdev)
if (!pd)
return -ENOMEM;
+ pd->dev = dev;
+
pd->pd.name = exynos_get_domain_name(dev, np);
if (!pd->pd.name)
return -ENOMEM;
--
2.51.0.788.g6d19910ace-goog
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101
2025-10-16 15:58 ` [PATCH v3 00/10] pmdomain: samsung: add supoort for Google GS101 André Draszik
` (9 preceding siblings ...)
2025-10-16 15:58 ` [PATCH v3 10/10] pmdomain: samsung: use dev_err() instead of pr_err() André Draszik
@ 2025-10-17 6:43 ` Marek Szyprowski
10 siblings, 0 replies; 27+ messages in thread
From: Marek Szyprowski @ 2025-10-17 6:43 UTC (permalink / raw)
To: André Draszik, Krzysztof Kozlowski, Alim Akhtar, Rob Herring,
Conor Dooley, Krzysztof Kozlowski, Ulf Hansson
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-pm, stable, Krzysztof Kozlowski
On 16.10.2025 17:58, André Draszik wrote:
> This series adds support for the power domains on Google GS101. It's
> fairly similar to SoCs already supported by this driver, except that
> register acces does not work via plain ioremap() / readl() / writel().
> Instead, the regmap created by the PMU driver must be used (which uses
> Arm SMCC calls under the hood).
>
> The DT update to add the new required properties on gs101 will be
> posted separately.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
Works fine on existing Exynos based boards.
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Changes in v3:
> - use additionalProperties, not unevaluatedProperties in patch 2
> - fix path in $id in patch 2 (Rob)
> - drop comment around 'select' in patch 2 (Rob)
> - collect tags
> - Link to v2: https://lore.kernel.org/r/20251009-gs101-pd-v2-0-3f4a6db2af39@linaro.org
>
> Changes in v2:
> - Krzysztof:
> - move google,gs101-pmu binding into separate file
> - mark devm_kstrdup_const() patch as fix
> - use bool for need_early_sync_state
> - merge patches 8 and 10 from v1 series into one patch
> - collect tags
> - Link to v1: https://lore.kernel.org/r/20251006-gs101-pd-v1-0-f0cb0c01ea7b@linaro.org
>
> ---
> André Draszik (10):
> dt-bindings: power: samsung: add google,gs101-pd
> dt-bindings: soc: samsung: exynos-pmu: move gs101-pmu into separate binding
> dt-bindings: soc: samsung: gs101-pmu: allow power domains as children
> pmdomain: samsung: plug potential memleak during probe
> pmdomain: samsung: convert to using regmap
> pmdomain: samsung: convert to regmap_read_poll_timeout()
> pmdomain: samsung: don't hardcode offset for registers to 0 and 4
> pmdomain: samsung: selectively handle enforced sync_state
> pmdomain: samsung: add support for google,gs101-pd
> pmdomain: samsung: use dev_err() instead of pr_err()
>
> .../devicetree/bindings/power/pd-samsung.yaml | 1 +
> .../bindings/soc/google/google,gs101-pmu.yaml | 106 +++++++++++++++++
> .../bindings/soc/samsung/exynos-pmu.yaml | 20 ----
> MAINTAINERS | 1 +
> drivers/pmdomain/samsung/exynos-pm-domains.c | 126 +++++++++++++++------
> 5 files changed, 200 insertions(+), 54 deletions(-)
> ---
> base-commit: 58e817956925fdc12c61f1cb86915b82ae1603c1
> change-id: 20251001-gs101-pd-d4dc97d70a84
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 27+ messages in thread