* [PATCH v2 0/4] Add watchdog support for bcm2712
@ 2025-10-31 10:24 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 1/4] pmdomain: bcm: bcm2835-power: Prepare to support BCM2712 Stanimir Varbanov
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 10:24 UTC (permalink / raw)
To: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Ray Jui, Scott Branden, Lee Jones, Ulf Hansson,
Willow Cunningham, Stefan Wahren, Saenz Julienne,
Andrea della Porta, Phil Elwell, Jonathan Bell, Dave Stevenson,
Stanimir Varbanov
Hello,
Changes since v1:
* 2/4 - add else clause and move $ref inside allOf (Conor).
* 4/4 - span reg space size to 0x604 (Florian).
Comments are welcome!
regards,
~Stan
Stanimir Varbanov (4):
pmdomain: bcm: bcm2835-power: Prepare to support BCM2712
dt-bindings: soc: bcm: Add bcm2712 compatible
mfd: bcm2835-pm: Add support for BCM2712
arm64: dts: broadcom: bcm2712: Add watchdog DT node
.../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 38 ++++++++++++++++---
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 9 +++++
drivers/mfd/bcm2835-pm.c | 1 +
drivers/pmdomain/bcm/bcm2835-power.c | 17 +++++++--
4 files changed, 55 insertions(+), 10 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] pmdomain: bcm: bcm2835-power: Prepare to support BCM2712
2025-10-31 10:24 [PATCH v2 0/4] Add watchdog support for bcm2712 Stanimir Varbanov
@ 2025-10-31 10:24 ` Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible Stanimir Varbanov
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 10:24 UTC (permalink / raw)
To: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Ray Jui, Scott Branden, Lee Jones, Ulf Hansson,
Willow Cunningham, Stefan Wahren, Saenz Julienne,
Andrea della Porta, Phil Elwell, Jonathan Bell, Dave Stevenson,
Stanimir Varbanov
BCM2712 has a PM block but lacks asb and rpivid_asb register
spaces. To avoid unwanted results add a check for asb existence
during probe and also add a new register offset for bcm2712 to
control grafx_v3d power domain. The decision to use the new
register is implicit - if asb register base is null then the
driver is probed for bcm2712 (the other supported SoCs have
asb register space).
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/pmdomain/bcm/bcm2835-power.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/pmdomain/bcm/bcm2835-power.c b/drivers/pmdomain/bcm/bcm2835-power.c
index f5289fd184d0..1d29addfe036 100644
--- a/drivers/pmdomain/bcm/bcm2835-power.c
+++ b/drivers/pmdomain/bcm/bcm2835-power.c
@@ -79,6 +79,7 @@
#define PM_IMAGE 0x108
#define PM_GRAFX 0x10c
#define PM_PROC 0x110
+#define PM_GRAFX_2712 0x304
#define PM_ENAB BIT(12)
#define PM_ISPRSTN BIT(8)
#define PM_H264RSTN BIT(7)
@@ -381,6 +382,9 @@ static int bcm2835_power_pd_power_on(struct generic_pm_domain *domain)
return bcm2835_power_power_on(pd, PM_GRAFX);
case BCM2835_POWER_DOMAIN_GRAFX_V3D:
+ if (!power->asb)
+ return bcm2835_asb_power_on(pd, PM_GRAFX_2712,
+ 0, 0, PM_V3DRSTN);
return bcm2835_asb_power_on(pd, PM_GRAFX,
ASB_V3D_M_CTRL, ASB_V3D_S_CTRL,
PM_V3DRSTN);
@@ -447,6 +451,9 @@ static int bcm2835_power_pd_power_off(struct generic_pm_domain *domain)
return bcm2835_power_power_off(pd, PM_GRAFX);
case BCM2835_POWER_DOMAIN_GRAFX_V3D:
+ if (!power->asb)
+ return bcm2835_asb_power_off(pd, PM_GRAFX_2712,
+ 0, 0, PM_V3DRSTN);
return bcm2835_asb_power_off(pd, PM_GRAFX,
ASB_V3D_M_CTRL, ASB_V3D_S_CTRL,
PM_V3DRSTN);
@@ -635,10 +642,12 @@ static int bcm2835_power_probe(struct platform_device *pdev)
power->asb = pm->asb;
power->rpivid_asb = pm->rpivid_asb;
- id = readl(power->asb + ASB_AXI_BRDG_ID);
- if (id != BCM2835_BRDG_ID /* "BRDG" */) {
- dev_err(dev, "ASB register ID returned 0x%08x\n", id);
- return -ENODEV;
+ if (power->asb) {
+ id = readl(power->asb + ASB_AXI_BRDG_ID);
+ if (id != BCM2835_BRDG_ID /* "BRDG" */) {
+ dev_err(dev, "ASB register ID returned 0x%08x\n", id);
+ return -ENODEV;
+ }
}
if (power->rpivid_asb) {
--
2.47.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
2025-10-31 10:24 [PATCH v2 0/4] Add watchdog support for bcm2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 1/4] pmdomain: bcm: bcm2835-power: Prepare to support BCM2712 Stanimir Varbanov
@ 2025-10-31 10:24 ` Stanimir Varbanov
2025-10-31 15:04 ` Conor Dooley
2025-10-31 10:24 ` [PATCH v2 3/4] mfd: bcm2835-pm: Add support for BCM2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 4/4] arm64: dts: broadcom: bcm2712: Add watchdog DT node Stanimir Varbanov
3 siblings, 1 reply; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 10:24 UTC (permalink / raw)
To: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Ray Jui, Scott Branden, Lee Jones, Ulf Hansson,
Willow Cunningham, Stefan Wahren, Saenz Julienne,
Andrea della Porta, Phil Elwell, Jonathan Bell, Dave Stevenson,
Stanimir Varbanov
Add bcm2712-pm compatible and update the bindings to satisfy it's
requirements. The PM hardware block inside bcm2712 lacks the "asb"
and "rpivid_asb" register ranges and also does not have clocks, update
the bindings accordingly.
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
.../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 38 ++++++++++++++++---
1 file changed, 32 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index e28ef198a801..ce910802ee9d 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -13,23 +13,21 @@ description: |
maintainers:
- Nicolas Saenz Julienne <nsaenz@kernel.org>
-allOf:
- - $ref: /schemas/watchdog/watchdog.yaml#
-
properties:
compatible:
items:
- enum:
- brcm,bcm2835-pm
- brcm,bcm2711-pm
+ - brcm,bcm2712-pm
- const: brcm,bcm2835-pm-wdt
reg:
- minItems: 2
+ minItems: 1
maxItems: 3
reg-names:
- minItems: 2
+ minItems: 1
items:
- const: pm
- const: asb
@@ -62,7 +60,35 @@ required:
- reg
- "#power-domain-cells"
- "#reset-cells"
- - clocks
+
+allOf:
+ - $ref: /schemas/watchdog/watchdog.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm2835-pm
+ - brcm,bcm2711-pm
+ then:
+ required:
+ - clocks
+
+ properties:
+ reg:
+ minItems: 2
+
+ reg-names:
+ minItems: 2
+
+ else:
+ properties:
+ reg:
+ minItems: 1
+
+ reg-names:
+ minItems: 1
additionalProperties: false
--
2.47.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] mfd: bcm2835-pm: Add support for BCM2712
2025-10-31 10:24 [PATCH v2 0/4] Add watchdog support for bcm2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 1/4] pmdomain: bcm: bcm2835-power: Prepare to support BCM2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible Stanimir Varbanov
@ 2025-10-31 10:24 ` Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 4/4] arm64: dts: broadcom: bcm2712: Add watchdog DT node Stanimir Varbanov
3 siblings, 0 replies; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 10:24 UTC (permalink / raw)
To: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Ray Jui, Scott Branden, Lee Jones, Ulf Hansson,
Willow Cunningham, Stefan Wahren, Saenz Julienne,
Andrea della Porta, Phil Elwell, Jonathan Bell, Dave Stevenson,
Stanimir Varbanov
The BCM2712 SoC has PM block but lacks the "asb" and "rpivid_asb"
register spaces, and doesn't need clock(s). Add a compatible
string for bcm2712 to allow probe of bcm2835-wdt and
bcm2835-power drivers.
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/mfd/bcm2835-pm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 3cb2b9423121..8bed59816e82 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -108,6 +108,7 @@ static const struct of_device_id bcm2835_pm_of_match[] = {
{ .compatible = "brcm,bcm2835-pm-wdt", },
{ .compatible = "brcm,bcm2835-pm", },
{ .compatible = "brcm,bcm2711-pm", },
+ { .compatible = "brcm,bcm2712-pm", },
{},
};
MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match);
--
2.47.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] arm64: dts: broadcom: bcm2712: Add watchdog DT node
2025-10-31 10:24 [PATCH v2 0/4] Add watchdog support for bcm2712 Stanimir Varbanov
` (2 preceding siblings ...)
2025-10-31 10:24 ` [PATCH v2 3/4] mfd: bcm2835-pm: Add support for BCM2712 Stanimir Varbanov
@ 2025-10-31 10:24 ` Stanimir Varbanov
3 siblings, 0 replies; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 10:24 UTC (permalink / raw)
To: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Ray Jui, Scott Branden, Lee Jones, Ulf Hansson,
Willow Cunningham, Stefan Wahren, Saenz Julienne,
Andrea della Porta, Phil Elwell, Jonathan Bell, Dave Stevenson,
Stanimir Varbanov
Add watchdog device-tree node for bcm2712 SoC.
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
---
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index e77a66adc22a..08905034ffc1 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -250,6 +250,15 @@ uart10: serial@7d001000 {
status = "disabled";
};
+ pm: watchdog@7d200000 {
+ compatible = "brcm,bcm2712-pm", "brcm,bcm2835-pm-wdt";
+ reg = <0x7d200000 0x604>;
+ reg-names = "pm";
+ #power-domain-cells = <1>;
+ #reset-cells = <1>;
+ system-power-controller;
+ };
+
pinctrl: pinctrl@7d504100 {
compatible = "brcm,bcm2712c0-pinctrl";
reg = <0x7d504100 0x30>;
--
2.47.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
2025-10-31 10:24 ` [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible Stanimir Varbanov
@ 2025-10-31 15:04 ` Conor Dooley
2025-10-31 18:22 ` Stanimir Varbanov
0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2025-10-31 15:04 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli, Ray Jui,
Scott Branden, Lee Jones, Ulf Hansson, Willow Cunningham,
Stefan Wahren, Saenz Julienne, Andrea della Porta, Phil Elwell,
Jonathan Bell, Dave Stevenson
[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]
On Fri, Oct 31, 2025 at 12:24:21PM +0200, Stanimir Varbanov wrote:
> Add bcm2712-pm compatible and update the bindings to satisfy it's
> requirements. The PM hardware block inside bcm2712 lacks the "asb"
> and "rpivid_asb" register ranges and also does not have clocks, update
> the bindings accordingly.
>
> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 38 ++++++++++++++++---
> 1 file changed, 32 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> index e28ef198a801..ce910802ee9d 100644
> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> @@ -13,23 +13,21 @@ description: |
> maintainers:
> - Nicolas Saenz Julienne <nsaenz@kernel.org>
>
> -allOf:
> - - $ref: /schemas/watchdog/watchdog.yaml#
> -
> properties:
> compatible:
> items:
> - enum:
> - brcm,bcm2835-pm
> - brcm,bcm2711-pm
> + - brcm,bcm2712-pm
> - const: brcm,bcm2835-pm-wdt
>
> reg:
> - minItems: 2
> + minItems: 1
> maxItems: 3
>
> reg-names:
> - minItems: 2
> + minItems: 1
> items:
> - const: pm
> - const: asb
> @@ -62,7 +60,35 @@ required:
> - reg
> - "#power-domain-cells"
> - "#reset-cells"
> - - clocks
> +
> +allOf:
> + - $ref: /schemas/watchdog/watchdog.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - brcm,bcm2835-pm
> + - brcm,bcm2711-pm
> + then:
> + required:
> + - clocks
> +
> + properties:
> + reg:
> + minItems: 2
> +
> + reg-names:
> + minItems: 2
> +
> + else:
> + properties:
> + reg:
> + minItems: 1
> +
> + reg-names:
> + minItems: 1
This else has no impact, was it meant to be maxItems?
pw-bot: changes-requested
>
> additionalProperties: false
>
> --
> 2.47.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
2025-10-31 15:04 ` Conor Dooley
@ 2025-10-31 18:22 ` Stanimir Varbanov
0 siblings, 0 replies; 7+ messages in thread
From: Stanimir Varbanov @ 2025-10-31 18:22 UTC (permalink / raw)
To: Conor Dooley, Stanimir Varbanov
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-rpi-kernel,
Broadcom internal kernel review list, linux-pm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli, Ray Jui,
Scott Branden, Lee Jones, Ulf Hansson, Willow Cunningham,
Stefan Wahren, Saenz Julienne, Andrea della Porta, Phil Elwell,
Jonathan Bell, Dave Stevenson
Hi Conor,
On 10/31/25 5:04 PM, Conor Dooley wrote:
> On Fri, Oct 31, 2025 at 12:24:21PM +0200, Stanimir Varbanov wrote:
>> Add bcm2712-pm compatible and update the bindings to satisfy it's
>> requirements. The PM hardware block inside bcm2712 lacks the "asb"
>> and "rpivid_asb" register ranges and also does not have clocks, update
>> the bindings accordingly.
>>
>> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
>> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
>> ---
>> .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 38 ++++++++++++++++---
>> 1 file changed, 32 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> index e28ef198a801..ce910802ee9d 100644
>> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> @@ -13,23 +13,21 @@ description: |
>> maintainers:
>> - Nicolas Saenz Julienne <nsaenz@kernel.org>
>>
>> -allOf:
>> - - $ref: /schemas/watchdog/watchdog.yaml#
>> -
>> properties:
>> compatible:
>> items:
>> - enum:
>> - brcm,bcm2835-pm
>> - brcm,bcm2711-pm
>> + - brcm,bcm2712-pm
>> - const: brcm,bcm2835-pm-wdt
>>
>> reg:
>> - minItems: 2
>> + minItems: 1
>> maxItems: 3
>>
>> reg-names:
>> - minItems: 2
>> + minItems: 1
>> items:
>> - const: pm
>> - const: asb
>> @@ -62,7 +60,35 @@ required:
>> - reg
>> - "#power-domain-cells"
>> - "#reset-cells"
>> - - clocks
>> +
>> +allOf:
>> + - $ref: /schemas/watchdog/watchdog.yaml#
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - brcm,bcm2835-pm
>> + - brcm,bcm2711-pm
>> + then:
>> + required:
>> + - clocks
>> +
>> + properties:
>> + reg:
>> + minItems: 2
>> +
>> + reg-names:
>> + minItems: 2
>
>> +
>> + else:
>> + properties:
>> + reg:
>> + minItems: 1
>> +
>> + reg-names:
>> + minItems: 1
>
> This else has no impact, was it meant to be maxItems?
Oops, yes it should be maxItems. Sending new version ...
~Stan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-31 18:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-31 10:24 [PATCH v2 0/4] Add watchdog support for bcm2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 1/4] pmdomain: bcm: bcm2835-power: Prepare to support BCM2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible Stanimir Varbanov
2025-10-31 15:04 ` Conor Dooley
2025-10-31 18:22 ` Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 3/4] mfd: bcm2835-pm: Add support for BCM2712 Stanimir Varbanov
2025-10-31 10:24 ` [PATCH v2 4/4] arm64: dts: broadcom: bcm2712: Add watchdog DT node Stanimir Varbanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®