All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 00/11] soc: bcm2835-power: Prepare BCM2711 V3D support
@ 2022-06-25 11:36 ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

This series is a split out of version 4 - Raspberry PI 4 V3D enablement send
by Peter Robinson [1]. It attempts to enable BCM2711 V3D support for the
power management driver. It's a rework of the less controversial changes
(excluding V3D GPU driver changes) so this can be reviewed and applied faster.

Changes in V4:
- refactor bcm2835_pm_get_pdata to be easier to read
- remove DT runtime checks and rely on DT schema as suggested by Lee
- fix comment style as found by Lee

Changes in V3:
- add more Reviewed-by by Peter
- fix minItems in Patch #3 found by Rob

Changes in V2:
- add Peter's Reviewed-by
- simplify schema for rpivid_asb as suggested by Rob
- fix reference and clarify fallback & error handling in patch #7
- drop unnecessary newline in patch #9
- improve log messages as noticed by Peter

Changes since the mention series:
- fix DT schema errors
- make rpivid_asb register optional in DT schema
- avoid code duplication in BCM2835 ASB enable/disable
- rework ASB V3D handling so we don't need the V3D flag
- avoid log errors for optional register
- use a define for expected ASB_AXI_BRDG_ID result
- fix copy & paste issues in bcm2835-pm changes

[1] - https://patchwork.kernel.org/project/linux-arm-kernel/cover/20220213225646.67761-1-pbrobinson@gmail.com/

Nicolas Saenz Julienne (6):
  dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
  dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
  ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
  ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
  mfd: bcm2835-pm: Use 'reg-names' to get resources
  soc: bcm: bcm2835-power: Bypass power_on/off() calls

Stefan Wahren (5):
  dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
  mfd: bcm2835-pm: Add support for BCM2711
  soc: bcm: bcm2835-power: Refactor ASB control
  soc: bcm: bcm2835-power: Resolve ASB register macros
  soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB

 .../bindings/soc/bcm/brcm,bcm2835-pm.txt      | 46 ----------
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 86 +++++++++++++++++++
 arch/arm/boot/dts/bcm2711.dtsi                |  3 +-
 arch/arm/boot/dts/bcm2835-common.dtsi         |  1 +
 drivers/mfd/bcm2835-pm.c                      | 74 +++++++++++-----
 drivers/soc/bcm/bcm2835-power.c               | 72 ++++++++++------
 include/linux/mfd/bcm2835-pm.h                |  1 +
 7 files changed, 192 insertions(+), 91 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml

-- 
2.25.1


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH V4 00/11] soc: bcm2835-power: Prepare BCM2711 V3D support
@ 2022-06-25 11:36 ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

This series is a split out of version 4 - Raspberry PI 4 V3D enablement send
by Peter Robinson [1]. It attempts to enable BCM2711 V3D support for the
power management driver. It's a rework of the less controversial changes
(excluding V3D GPU driver changes) so this can be reviewed and applied faster.

Changes in V4:
- refactor bcm2835_pm_get_pdata to be easier to read
- remove DT runtime checks and rely on DT schema as suggested by Lee
- fix comment style as found by Lee

Changes in V3:
- add more Reviewed-by by Peter
- fix minItems in Patch #3 found by Rob

Changes in V2:
- add Peter's Reviewed-by
- simplify schema for rpivid_asb as suggested by Rob
- fix reference and clarify fallback & error handling in patch #7
- drop unnecessary newline in patch #9
- improve log messages as noticed by Peter

Changes since the mention series:
- fix DT schema errors
- make rpivid_asb register optional in DT schema
- avoid code duplication in BCM2835 ASB enable/disable
- rework ASB V3D handling so we don't need the V3D flag
- avoid log errors for optional register
- use a define for expected ASB_AXI_BRDG_ID result
- fix copy & paste issues in bcm2835-pm changes

[1] - https://patchwork.kernel.org/project/linux-arm-kernel/cover/20220213225646.67761-1-pbrobinson@gmail.com/

Nicolas Saenz Julienne (6):
  dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
  dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
  ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
  ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
  mfd: bcm2835-pm: Use 'reg-names' to get resources
  soc: bcm: bcm2835-power: Bypass power_on/off() calls

Stefan Wahren (5):
  dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
  mfd: bcm2835-pm: Add support for BCM2711
  soc: bcm: bcm2835-power: Refactor ASB control
  soc: bcm: bcm2835-power: Resolve ASB register macros
  soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB

 .../bindings/soc/bcm/brcm,bcm2835-pm.txt      | 46 ----------
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 86 +++++++++++++++++++
 arch/arm/boot/dts/bcm2711.dtsi                |  3 +-
 arch/arm/boot/dts/bcm2835-common.dtsi         |  1 +
 drivers/mfd/bcm2835-pm.c                      | 74 +++++++++++-----
 drivers/soc/bcm/bcm2835-power.c               | 72 ++++++++++------
 include/linux/mfd/bcm2835-pm.h                |  1 +
 7 files changed, 192 insertions(+), 91 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Rob Herring,
	Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

This converts the brcm,bcm2835-pm bindings from text to proper schema.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/soc/bcm/brcm,bcm2835-pm.txt      | 46 -----------
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 46 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
deleted file mode 100644
index 72ff033565e5..000000000000
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-BCM2835 PM (Power domains, watchdog)
-
-The PM block controls power domains and some reset lines, and includes
-a watchdog timer.  This binding supersedes the brcm,bcm2835-pm-wdt
-binding which covered some of PM's register range and functionality.
-
-Required properties:
-
-- compatible:		Should be "brcm,bcm2835-pm"
-- reg:			Specifies base physical address and size of the two
-			  register ranges ("PM" and "ASYNC_BRIDGE" in that
-			  order)
-- clocks:		a) v3d: The V3D clock from CPRMAN
-			b) peri_image: The PERI_IMAGE clock from CPRMAN
-			c) h264: The H264 clock from CPRMAN
-			d) isp: The ISP clock from CPRMAN
-- #reset-cells: 	Should be 1.  This property follows the reset controller
-			  bindings[1].
-- #power-domain-cells:	Should be 1.  This property follows the power domain
-			  bindings[2].
-
-Optional properties:
-
-- timeout-sec:		Contains the watchdog timeout in seconds
-- system-power-controller: Whether the watchdog is controlling the
-    system power.  This node follows the power controller bindings[3].
-
-[1] Documentation/devicetree/bindings/reset/reset.txt
-[2] Documentation/devicetree/bindings/power/power-domain.yaml
-[3] Documentation/devicetree/bindings/power/power-controller.txt
-
-Example:
-
-pm {
-	compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
-	#power-domain-cells = <1>;
-	#reset-cells = <1>;
-	reg = <0x7e100000 0x114>,
-	      <0x7e00a000 0x24>;
-	clocks = <&clocks BCM2835_CLOCK_V3D>,
-		 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
-		 <&clocks BCM2835_CLOCK_H264>,
-		 <&clocks BCM2835_CLOCK_ISP>;
-	clock-names = "v3d", "peri_image", "h264", "isp";
-	system-power-controller;
-};
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
new file mode 100644
index 000000000000..5d1ff0f6c8ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/bcm/brcm,bcm2835-pm.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM2835 PM (Power domains, watchdog)
+
+description: |
+  The PM block controls power domains and some reset lines, and includes a
+  watchdog timer.
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+allOf:
+  - $ref: ../../watchdog/watchdog.yaml#
+
+properties:
+  compatible:
+    items:
+      - const: brcm,bcm2835-pm
+      - const: brcm,bcm2835-pm-wdt
+
+  reg:
+    items:
+      - description: PM registers
+      - description: ASB registers
+
+  "#power-domain-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  clocks:
+    minItems: 4
+    maxItems: 4
+
+  clock-names:
+    items:
+      - const: v3d
+      - const: peri_image
+      - const: h264
+      - const: isp
+
+  system-power-controller:
+    type: boolean
+
+  timeout-sec: true
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+  - "#reset-cells"
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/bcm2835.h>
+
+    watchdog@7e100000 {
+        compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
+        #power-domain-cells = <1>;
+        #reset-cells = <1>;
+        reg = <0x7e100000 0x114>,
+              <0x7e00a000 0x24>;
+        clocks = <&clocks BCM2835_CLOCK_V3D>,
+               <&clocks BCM2835_CLOCK_PERI_IMAGE>,
+               <&clocks BCM2835_CLOCK_H264>,
+               <&clocks BCM2835_CLOCK_ISP>;
+        clock-names = "v3d", "peri_image", "h264", "isp";
+        system-power-controller;
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Rob Herring,
	Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

This converts the brcm,bcm2835-pm bindings from text to proper schema.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/soc/bcm/brcm,bcm2835-pm.txt      | 46 -----------
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 46 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
deleted file mode 100644
index 72ff033565e5..000000000000
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-BCM2835 PM (Power domains, watchdog)
-
-The PM block controls power domains and some reset lines, and includes
-a watchdog timer.  This binding supersedes the brcm,bcm2835-pm-wdt
-binding which covered some of PM's register range and functionality.
-
-Required properties:
-
-- compatible:		Should be "brcm,bcm2835-pm"
-- reg:			Specifies base physical address and size of the two
-			  register ranges ("PM" and "ASYNC_BRIDGE" in that
-			  order)
-- clocks:		a) v3d: The V3D clock from CPRMAN
-			b) peri_image: The PERI_IMAGE clock from CPRMAN
-			c) h264: The H264 clock from CPRMAN
-			d) isp: The ISP clock from CPRMAN
-- #reset-cells: 	Should be 1.  This property follows the reset controller
-			  bindings[1].
-- #power-domain-cells:	Should be 1.  This property follows the power domain
-			  bindings[2].
-
-Optional properties:
-
-- timeout-sec:		Contains the watchdog timeout in seconds
-- system-power-controller: Whether the watchdog is controlling the
-    system power.  This node follows the power controller bindings[3].
-
-[1] Documentation/devicetree/bindings/reset/reset.txt
-[2] Documentation/devicetree/bindings/power/power-domain.yaml
-[3] Documentation/devicetree/bindings/power/power-controller.txt
-
-Example:
-
-pm {
-	compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
-	#power-domain-cells = <1>;
-	#reset-cells = <1>;
-	reg = <0x7e100000 0x114>,
-	      <0x7e00a000 0x24>;
-	clocks = <&clocks BCM2835_CLOCK_V3D>,
-		 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
-		 <&clocks BCM2835_CLOCK_H264>,
-		 <&clocks BCM2835_CLOCK_ISP>;
-	clock-names = "v3d", "peri_image", "h264", "isp";
-	system-power-controller;
-};
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
new file mode 100644
index 000000000000..5d1ff0f6c8ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/bcm/brcm,bcm2835-pm.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM2835 PM (Power domains, watchdog)
+
+description: |
+  The PM block controls power domains and some reset lines, and includes a
+  watchdog timer.
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+allOf:
+  - $ref: ../../watchdog/watchdog.yaml#
+
+properties:
+  compatible:
+    items:
+      - const: brcm,bcm2835-pm
+      - const: brcm,bcm2835-pm-wdt
+
+  reg:
+    items:
+      - description: PM registers
+      - description: ASB registers
+
+  "#power-domain-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  clocks:
+    minItems: 4
+    maxItems: 4
+
+  clock-names:
+    items:
+      - const: v3d
+      - const: peri_image
+      - const: h264
+      - const: isp
+
+  system-power-controller:
+    type: boolean
+
+  timeout-sec: true
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+  - "#reset-cells"
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/bcm2835.h>
+
+    watchdog@7e100000 {
+        compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
+        #power-domain-cells = <1>;
+        #reset-cells = <1>;
+        reg = <0x7e100000 0x114>,
+              <0x7e00a000 0x24>;
+        clocks = <&clocks BCM2835_CLOCK_V3D>,
+               <&clocks BCM2835_CLOCK_PERI_IMAGE>,
+               <&clocks BCM2835_CLOCK_H264>,
+               <&clocks BCM2835_CLOCK_ISP>;
+        clock-names = "v3d", "peri_image", "h264", "isp";
+        system-power-controller;
+    };
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Rob Herring,
	Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Anticipating the introduction of BCM2711, of which we'll need to support
its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This
will help to have a consistent mapping between resources and their
meaning.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index 5d1ff0f6c8ce..883ab7cb96e9 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -23,9 +23,13 @@ properties:
       - const: brcm,bcm2835-pm-wdt
 
   reg:
+    minItems: 2
+    maxItems: 2
+
+  reg-names:
     items:
-      - description: PM registers
-      - description: ASB registers
+      - const: pm
+      - const: asb
 
   "#power-domain-cells":
     const: 1
@@ -68,6 +72,7 @@ examples:
         #reset-cells = <1>;
         reg = <0x7e100000 0x114>,
               <0x7e00a000 0x24>;
+        reg-names = "pm", "asb";
         clocks = <&clocks BCM2835_CLOCK_V3D>,
                <&clocks BCM2835_CLOCK_PERI_IMAGE>,
                <&clocks BCM2835_CLOCK_H264>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Rob Herring,
	Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Anticipating the introduction of BCM2711, of which we'll need to support
its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This
will help to have a consistent mapping between resources and their
meaning.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index 5d1ff0f6c8ce..883ab7cb96e9 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -23,9 +23,13 @@ properties:
       - const: brcm,bcm2835-pm-wdt
 
   reg:
+    minItems: 2
+    maxItems: 2
+
+  reg-names:
     items:
-      - description: PM registers
-      - description: ASB registers
+      - const: pm
+      - const: asb
 
   "#power-domain-cells":
     const: 1
@@ -68,6 +72,7 @@ examples:
         #reset-cells = <1>;
         reg = <0x7e100000 0x114>,
               <0x7e00a000 0x24>;
+        reg-names = "pm", "asb";
         clocks = <&clocks BCM2835_CLOCK_V3D>,
                <&clocks BCM2835_CLOCK_PERI_IMAGE>,
                <&clocks BCM2835_CLOCK_H264>,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

Add a new compatible string for BCM2711 and the option to provide a
third reg property for the board's new RPiVid ASB.

In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer
of this driver so far. The old ASB is still be present with ISP and H264
bits but no V3D.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index 883ab7cb96e9..894786640938 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -19,17 +19,21 @@ allOf:
 properties:
   compatible:
     items:
-      - const: brcm,bcm2835-pm
+      - enum:
+          - brcm,bcm2835-pm
+          - brcm,bcm2711-pm
       - const: brcm,bcm2835-pm-wdt
 
   reg:
     minItems: 2
-    maxItems: 2
+    maxItems: 3
 
   reg-names:
+    minItems: 2
     items:
       - const: pm
       - const: asb
+      - const: rpivid_asb
 
   "#power-domain-cells":
     const: 1
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

Add a new compatible string for BCM2711 and the option to provide a
third reg property for the board's new RPiVid ASB.

In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer
of this driver so far. The old ASB is still be present with ISP and H264
bits but no V3D.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index 883ab7cb96e9..894786640938 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -19,17 +19,21 @@ allOf:
 properties:
   compatible:
     items:
-      - const: brcm,bcm2835-pm
+      - enum:
+          - brcm,bcm2835-pm
+          - brcm,bcm2711-pm
       - const: brcm,bcm2835-pm-wdt
 
   reg:
     minItems: 2
-    maxItems: 2
+    maxItems: 3
 
   reg-names:
+    minItems: 2
     items:
       - const: pm
       - const: asb
+      - const: rpivid_asb
 
   "#power-domain-cells":
     const: 1
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use
them.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 arch/arm/boot/dts/bcm2711.dtsi        | 1 +
 arch/arm/boot/dts/bcm2835-common.dtsi | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 89af57482bc8..cbb47e2c9434 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -113,6 +113,7 @@ pm: watchdog@7e100000 {
 			reg = <0x7e100000 0x114>,
 			      <0x7e00a000 0x24>,
 			      <0x7ec11000 0x20>;
+			reg-names = "pm", "asb", "rpivid_asb";
 			clocks = <&clocks BCM2835_CLOCK_V3D>,
 				 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
 				 <&clocks BCM2835_CLOCK_H264>,
diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi
index c25e797b9060..a037d2bc5b11 100644
--- a/arch/arm/boot/dts/bcm2835-common.dtsi
+++ b/arch/arm/boot/dts/bcm2835-common.dtsi
@@ -62,6 +62,7 @@ pm: watchdog@7e100000 {
 			#reset-cells = <1>;
 			reg = <0x7e100000 0x114>,
 			      <0x7e00a000 0x24>;
+			reg-names = "pm", "asb";
 			clocks = <&clocks BCM2835_CLOCK_V3D>,
 				 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
 				 <&clocks BCM2835_CLOCK_H264>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use
them.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 arch/arm/boot/dts/bcm2711.dtsi        | 1 +
 arch/arm/boot/dts/bcm2835-common.dtsi | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 89af57482bc8..cbb47e2c9434 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -113,6 +113,7 @@ pm: watchdog@7e100000 {
 			reg = <0x7e100000 0x114>,
 			      <0x7e00a000 0x24>,
 			      <0x7ec11000 0x20>;
+			reg-names = "pm", "asb", "rpivid_asb";
 			clocks = <&clocks BCM2835_CLOCK_V3D>,
 				 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
 				 <&clocks BCM2835_CLOCK_H264>,
diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi
index c25e797b9060..a037d2bc5b11 100644
--- a/arch/arm/boot/dts/bcm2835-common.dtsi
+++ b/arch/arm/boot/dts/bcm2835-common.dtsi
@@ -62,6 +62,7 @@ pm: watchdog@7e100000 {
 			#reset-cells = <1>;
 			reg = <0x7e100000 0x114>,
 			      <0x7e00a000 0x24>;
+			reg-names = "pm", "asb";
 			clocks = <&clocks BCM2835_CLOCK_V3D>,
 				 <&clocks BCM2835_CLOCK_PERI_IMAGE>,
 				 <&clocks BCM2835_CLOCK_H264>,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

A new compatible string was introduced specifically for BCM2711, so make
use of it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 arch/arm/boot/dts/bcm2711.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index cbb47e2c9434..5eca5207c212 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -107,7 +107,7 @@ dma: dma@7e007000 {
 		};
 
 		pm: watchdog@7e100000 {
-			compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
+			compatible = "brcm,bcm2711-pm", "brcm,bcm2835-pm-wdt";
 			#power-domain-cells = <1>;
 			#reset-cells = <1>;
 			reg = <0x7e100000 0x114>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

A new compatible string was introduced specifically for BCM2711, so make
use of it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 arch/arm/boot/dts/bcm2711.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index cbb47e2c9434..5eca5207c212 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -107,7 +107,7 @@ dma: dma@7e007000 {
 		};
 
 		pm: watchdog@7e100000 {
-			compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
+			compatible = "brcm,bcm2711-pm", "brcm,bcm2835-pm-wdt";
 			#power-domain-cells = <1>;
 			#reset-cells = <1>;
 			reg = <0x7e100000 0x114>,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

If available in firmware, find resources by their 'reg-names' position
instead of relying on hardcoded offsets. Care is taken to support old
firmware nonetheless.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 20 deletions(-)

diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 42fe67f1538e..418c8a16427d 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -25,9 +25,40 @@ static const struct mfd_cell bcm2835_power_devs[] = {
 	{ .name = "bcm2835-power" },
 };
 
+static int bcm2835_pm_get_pdata(struct platform_device *pdev,
+				struct bcm2835_pm *pm)
+{
+	if (of_find_property(pm->dev->of_node, "reg-names", NULL)) {
+		struct resource *res;
+
+		pm->base = devm_platform_ioremap_resource_byname(pdev, "pm");
+		if (IS_ERR(pm->base))
+			return PTR_ERR(pm->base);
+
+		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "asb");
+		if (res) {
+			pm->asb = devm_ioremap_resource(&pdev->dev, res);
+			if (IS_ERR(pm->asb))
+				pm->asb = NULL;
+		}
+
+		return 0;
+	}
+
+	/* If no 'reg-names' property is found we can assume we're using old DTB. */
+	pm->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(pm->base))
+		return PTR_ERR(pm->base);
+
+	pm->asb = devm_platform_ioremap_resource(pdev, 1);
+	if (IS_ERR(pm->asb))
+		pm->asb = NULL;
+
+	return 0;
+}
+
 static int bcm2835_pm_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	struct bcm2835_pm *pm;
 	int ret;
@@ -39,10 +70,9 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 
 	pm->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pm->base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(pm->base))
-		return PTR_ERR(pm->base);
+	ret = bcm2835_pm_get_pdata(pdev, pm);
+	if (ret)
+		return ret;
 
 	ret = devm_mfd_add_devices(dev, -1,
 				   bcm2835_pm_devs, ARRAY_SIZE(bcm2835_pm_devs),
@@ -50,24 +80,15 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	/* We'll use the presence of the AXI ASB regs in the
+	/*
+	 * We'll use the presence of the AXI ASB regs in the
 	 * bcm2835-pm binding as the key for whether we can reference
 	 * the full PM register range and support power domains.
 	 */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (res) {
-		pm->asb = devm_ioremap_resource(dev, res);
-		if (IS_ERR(pm->asb))
-			return PTR_ERR(pm->asb);
-
-		ret = devm_mfd_add_devices(dev, -1,
-					   bcm2835_power_devs,
-					   ARRAY_SIZE(bcm2835_power_devs),
-					   NULL, 0, NULL);
-		if (ret)
-			return ret;
-	}
-
+	if (pm->asb)
+		return devm_mfd_add_devices(dev, -1, bcm2835_power_devs,
+					    ARRAY_SIZE(bcm2835_power_devs),
+					    NULL, 0, NULL);
 	return 0;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

If available in firmware, find resources by their 'reg-names' position
instead of relying on hardcoded offsets. Care is taken to support old
firmware nonetheless.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 20 deletions(-)

diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 42fe67f1538e..418c8a16427d 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -25,9 +25,40 @@ static const struct mfd_cell bcm2835_power_devs[] = {
 	{ .name = "bcm2835-power" },
 };
 
+static int bcm2835_pm_get_pdata(struct platform_device *pdev,
+				struct bcm2835_pm *pm)
+{
+	if (of_find_property(pm->dev->of_node, "reg-names", NULL)) {
+		struct resource *res;
+
+		pm->base = devm_platform_ioremap_resource_byname(pdev, "pm");
+		if (IS_ERR(pm->base))
+			return PTR_ERR(pm->base);
+
+		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "asb");
+		if (res) {
+			pm->asb = devm_ioremap_resource(&pdev->dev, res);
+			if (IS_ERR(pm->asb))
+				pm->asb = NULL;
+		}
+
+		return 0;
+	}
+
+	/* If no 'reg-names' property is found we can assume we're using old DTB. */
+	pm->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(pm->base))
+		return PTR_ERR(pm->base);
+
+	pm->asb = devm_platform_ioremap_resource(pdev, 1);
+	if (IS_ERR(pm->asb))
+		pm->asb = NULL;
+
+	return 0;
+}
+
 static int bcm2835_pm_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	struct bcm2835_pm *pm;
 	int ret;
@@ -39,10 +70,9 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 
 	pm->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pm->base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(pm->base))
-		return PTR_ERR(pm->base);
+	ret = bcm2835_pm_get_pdata(pdev, pm);
+	if (ret)
+		return ret;
 
 	ret = devm_mfd_add_devices(dev, -1,
 				   bcm2835_pm_devs, ARRAY_SIZE(bcm2835_pm_devs),
@@ -50,24 +80,15 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	/* We'll use the presence of the AXI ASB regs in the
+	/*
+	 * We'll use the presence of the AXI ASB regs in the
 	 * bcm2835-pm binding as the key for whether we can reference
 	 * the full PM register range and support power domains.
 	 */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (res) {
-		pm->asb = devm_ioremap_resource(dev, res);
-		if (IS_ERR(pm->asb))
-			return PTR_ERR(pm->asb);
-
-		ret = devm_mfd_add_devices(dev, -1,
-					   bcm2835_power_devs,
-					   ARRAY_SIZE(bcm2835_power_devs),
-					   NULL, 0, NULL);
-		if (ret)
-			return ret;
-	}
-
+	if (pm->asb)
+		return devm_mfd_add_devices(dev, -1, bcm2835_power_devs,
+					    ARRAY_SIZE(bcm2835_power_devs),
+					    NULL, 0, NULL);
 	return 0;
 }
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 07/11] mfd: bcm2835-pm: Add support for BCM2711
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

As per the devicetree bindings, BCM2711 will provide both the old and
new ASB resources, so get both of them and pass them into
'bcm2835-power,' which will take care of selecting which one to use
accordingly.

Since the RPiVid ASB's resources were being provided prior to formalizing
the bindings[1], also support the old DT files that didn't use
'reg-names.'

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

[1] See: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
---
 drivers/mfd/bcm2835-pm.c       | 13 +++++++++++++
 include/linux/mfd/bcm2835-pm.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 418c8a16427d..49cd1f03884a 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -42,6 +42,14 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev,
 				pm->asb = NULL;
 		}
 
+		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+						    "rpivid_asb");
+		if (res) {
+			pm->rpivid_asb = devm_ioremap_resource(&pdev->dev, res);
+			if (IS_ERR(pm->rpivid_asb))
+				pm->rpivid_asb = NULL;
+		}
+
 		return 0;
 	}
 
@@ -54,6 +62,10 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev,
 	if (IS_ERR(pm->asb))
 		pm->asb = NULL;
 
+	pm->rpivid_asb = devm_platform_ioremap_resource(pdev, 2);
+	if (IS_ERR(pm->rpivid_asb))
+		pm->rpivid_asb = NULL;
+
 	return 0;
 }
 
@@ -95,6 +107,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 static const struct of_device_id bcm2835_pm_of_match[] = {
 	{ .compatible = "brcm,bcm2835-pm-wdt", },
 	{ .compatible = "brcm,bcm2835-pm", },
+	{ .compatible = "brcm,bcm2711-pm", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match);
diff --git a/include/linux/mfd/bcm2835-pm.h b/include/linux/mfd/bcm2835-pm.h
index ed37dc40e82a..f70a810c55f7 100644
--- a/include/linux/mfd/bcm2835-pm.h
+++ b/include/linux/mfd/bcm2835-pm.h
@@ -9,6 +9,7 @@ struct bcm2835_pm {
 	struct device *dev;
 	void __iomem *base;
 	void __iomem *asb;
+	void __iomem *rpivid_asb;
 };
 
 #endif /* BCM2835_MFD_PM_H */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 07/11] mfd: bcm2835-pm: Add support for BCM2711
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

As per the devicetree bindings, BCM2711 will provide both the old and
new ASB resources, so get both of them and pass them into
'bcm2835-power,' which will take care of selecting which one to use
accordingly.

Since the RPiVid ASB's resources were being provided prior to formalizing
the bindings[1], also support the old DT files that didn't use
'reg-names.'

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

[1] See: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
---
 drivers/mfd/bcm2835-pm.c       | 13 +++++++++++++
 include/linux/mfd/bcm2835-pm.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 418c8a16427d..49cd1f03884a 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -42,6 +42,14 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev,
 				pm->asb = NULL;
 		}
 
+		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+						    "rpivid_asb");
+		if (res) {
+			pm->rpivid_asb = devm_ioremap_resource(&pdev->dev, res);
+			if (IS_ERR(pm->rpivid_asb))
+				pm->rpivid_asb = NULL;
+		}
+
 		return 0;
 	}
 
@@ -54,6 +62,10 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev,
 	if (IS_ERR(pm->asb))
 		pm->asb = NULL;
 
+	pm->rpivid_asb = devm_platform_ioremap_resource(pdev, 2);
+	if (IS_ERR(pm->rpivid_asb))
+		pm->rpivid_asb = NULL;
+
 	return 0;
 }
 
@@ -95,6 +107,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
 static const struct of_device_id bcm2835_pm_of_match[] = {
 	{ .compatible = "brcm,bcm2835-pm-wdt", },
 	{ .compatible = "brcm,bcm2835-pm", },
+	{ .compatible = "brcm,bcm2711-pm", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match);
diff --git a/include/linux/mfd/bcm2835-pm.h b/include/linux/mfd/bcm2835-pm.h
index ed37dc40e82a..f70a810c55f7 100644
--- a/include/linux/mfd/bcm2835-pm.h
+++ b/include/linux/mfd/bcm2835-pm.h
@@ -9,6 +9,7 @@ struct bcm2835_pm {
 	struct device *dev;
 	void __iomem *base;
 	void __iomem *asb;
+	void __iomem *rpivid_asb;
 };
 
 #endif /* BCM2835_MFD_PM_H */
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

The functions to control the async AXI bridges are almost identical.
So define a general function to handle it and keep the original ones as
wrapper. This should make this driver easier to extend.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e0041ec8132..77dc9e62b207 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -148,7 +148,7 @@ struct bcm2835_power {
 	struct reset_controller_dev reset;
 };
 
-static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
+static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
 {
 	u64 start;
 
@@ -158,7 +158,12 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 	start = ktime_get_ns();
 
 	/* Enable the module's async AXI bridges. */
-	ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+	if (enable) {
+		ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+	} else {
+		ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
+	}
+
 	while (ASB_READ(reg) & ASB_ACK) {
 		cpu_relax();
 		if (ktime_get_ns() - start >= 1000)
@@ -168,24 +173,14 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 	return 0;
 }
 
-static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
+static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 {
-	u64 start;
-
-	if (!reg)
-		return 0;
-
-	start = ktime_get_ns();
-
-	/* Enable the module's async AXI bridges. */
-	ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
-	while (!(ASB_READ(reg) & ASB_ACK)) {
-		cpu_relax();
-		if (ktime_get_ns() - start >= 1000)
-			return -ETIMEDOUT;
-	}
+	return bcm2835_asb_control(power, reg, true);
+}
 
-	return 0;
+static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
+{
+	return bcm2835_asb_control(power, reg, false);
 }
 
 static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

The functions to control the async AXI bridges are almost identical.
So define a general function to handle it and keep the original ones as
wrapper. This should make this driver easier to extend.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e0041ec8132..77dc9e62b207 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -148,7 +148,7 @@ struct bcm2835_power {
 	struct reset_controller_dev reset;
 };
 
-static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
+static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
 {
 	u64 start;
 
@@ -158,7 +158,12 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 	start = ktime_get_ns();
 
 	/* Enable the module's async AXI bridges. */
-	ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+	if (enable) {
+		ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+	} else {
+		ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
+	}
+
 	while (ASB_READ(reg) & ASB_ACK) {
 		cpu_relax();
 		if (ktime_get_ns() - start >= 1000)
@@ -168,24 +173,14 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 	return 0;
 }
 
-static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
+static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
 {
-	u64 start;
-
-	if (!reg)
-		return 0;
-
-	start = ktime_get_ns();
-
-	/* Enable the module's async AXI bridges. */
-	ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
-	while (!(ASB_READ(reg) & ASB_ACK)) {
-		cpu_relax();
-		if (ktime_get_ns() - start >= 1000)
-			return -ETIMEDOUT;
-	}
+	return bcm2835_asb_control(power, reg, true);
+}
 
-	return 0;
+static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
+{
+	return bcm2835_asb_control(power, reg, false);
 }
 
 static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

The macros in order to access the ASB registers have a hard coded base
address. So extending them for other platforms would make them harder
to read. As a solution resolve these macros.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 77dc9e62b207..9c352f66e6d5 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -126,9 +126,6 @@
 
 #define ASB_AXI_BRDG_ID			0x20
 
-#define ASB_READ(reg) readl(power->asb + (reg))
-#define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg))
-
 struct bcm2835_power_domain {
 	struct generic_pm_domain base;
 	struct bcm2835_power *power;
@@ -150,7 +147,9 @@ struct bcm2835_power {
 
 static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
 {
+	void __iomem *base = power->asb;
 	u64 start;
+	u32 val;
 
 	if (!reg)
 		return 0;
@@ -159,12 +158,13 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
 
 	/* Enable the module's async AXI bridges. */
 	if (enable) {
-		ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+		val = readl(base + reg) & ~ASB_REQ_STOP;
 	} else {
-		ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
+		val = readl(base + reg) | ASB_REQ_STOP;
 	}
+	writel(PM_PASSWORD | val, base + reg);
 
-	while (ASB_READ(reg) & ASB_ACK) {
+	while (readl(base + reg) & ASB_ACK) {
 		cpu_relax();
 		if (ktime_get_ns() - start >= 1000)
 			return -ETIMEDOUT;
@@ -622,7 +622,7 @@ static int bcm2835_power_probe(struct platform_device *pdev)
 	power->base = pm->base;
 	power->asb = pm->asb;
 
-	id = ASB_READ(ASB_AXI_BRDG_ID);
+	id = readl(power->asb + ASB_AXI_BRDG_ID);
 	if (id != 0x62726467 /* "BRDG" */) {
 		dev_err(dev, "ASB register ID returned 0x%08x\n", id);
 		return -ENODEV;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

The macros in order to access the ASB registers have a hard coded base
address. So extending them for other platforms would make them harder
to read. As a solution resolve these macros.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 77dc9e62b207..9c352f66e6d5 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -126,9 +126,6 @@
 
 #define ASB_AXI_BRDG_ID			0x20
 
-#define ASB_READ(reg) readl(power->asb + (reg))
-#define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg))
-
 struct bcm2835_power_domain {
 	struct generic_pm_domain base;
 	struct bcm2835_power *power;
@@ -150,7 +147,9 @@ struct bcm2835_power {
 
 static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
 {
+	void __iomem *base = power->asb;
 	u64 start;
+	u32 val;
 
 	if (!reg)
 		return 0;
@@ -159,12 +158,13 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
 
 	/* Enable the module's async AXI bridges. */
 	if (enable) {
-		ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
+		val = readl(base + reg) & ~ASB_REQ_STOP;
 	} else {
-		ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);
+		val = readl(base + reg) | ASB_REQ_STOP;
 	}
+	writel(PM_PASSWORD | val, base + reg);
 
-	while (ASB_READ(reg) & ASB_ACK) {
+	while (readl(base + reg) & ASB_ACK) {
 		cpu_relax();
 		if (ktime_get_ns() - start >= 1000)
 			return -ETIMEDOUT;
@@ -622,7 +622,7 @@ static int bcm2835_power_probe(struct platform_device *pdev)
 	power->base = pm->base;
 	power->asb = pm->asb;
 
-	id = ASB_READ(ASB_AXI_BRDG_ID);
+	id = readl(power->asb + ASB_AXI_BRDG_ID);
 	if (id != 0x62726467 /* "BRDG" */) {
 		dev_err(dev, "ASB register ID returned 0x%08x\n", id);
 		return -ENODEV;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
BCM2711.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 9c352f66e6d5..1e06d91c0739 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -126,6 +126,8 @@
 
 #define ASB_AXI_BRDG_ID			0x20
 
+#define BCM2835_BRDG_ID			0x62726467
+
 struct bcm2835_power_domain {
 	struct generic_pm_domain base;
 	struct bcm2835_power *power;
@@ -139,6 +141,8 @@ struct bcm2835_power {
 	void __iomem		*base;
 	/* AXI Async bridge registers. */
 	void __iomem		*asb;
+	/* RPiVid bridge registers. */
+	void __iomem		*rpivid_asb;
 
 	struct genpd_onecell_data pd_xlate;
 	struct bcm2835_power_domain domains[BCM2835_POWER_DOMAIN_COUNT];
@@ -151,8 +155,15 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
 	u64 start;
 	u32 val;
 
-	if (!reg)
+	switch (reg) {
+	case 0:
 		return 0;
+	case ASB_V3D_S_CTRL:
+	case ASB_V3D_M_CTRL:
+		if (power->rpivid_asb)
+			base = power->rpivid_asb;
+		break;
+	}
 
 	start = ktime_get_ns();
 
@@ -621,13 +632,23 @@ static int bcm2835_power_probe(struct platform_device *pdev)
 	power->dev = dev;
 	power->base = pm->base;
 	power->asb = pm->asb;
+	power->rpivid_asb = pm->rpivid_asb;
 
 	id = readl(power->asb + ASB_AXI_BRDG_ID);
-	if (id != 0x62726467 /* "BRDG" */) {
+	if (id != BCM2835_BRDG_ID /* "BRDG" */) {
 		dev_err(dev, "ASB register ID returned 0x%08x\n", id);
 		return -ENODEV;
 	}
 
+	if (power->rpivid_asb) {
+		id = readl(power->rpivid_asb + ASB_AXI_BRDG_ID);
+		if (id != BCM2835_BRDG_ID /* "BRDG" */) {
+			dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n",
+				     id);
+			return -ENODEV;
+		}
+	}
+
 	power->pd_xlate.domains = devm_kcalloc(dev,
 					       ARRAY_SIZE(power_domain_names),
 					       sizeof(*power->pd_xlate.domains),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Stefan Wahren

In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
BCM2711.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 9c352f66e6d5..1e06d91c0739 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -126,6 +126,8 @@
 
 #define ASB_AXI_BRDG_ID			0x20
 
+#define BCM2835_BRDG_ID			0x62726467
+
 struct bcm2835_power_domain {
 	struct generic_pm_domain base;
 	struct bcm2835_power *power;
@@ -139,6 +141,8 @@ struct bcm2835_power {
 	void __iomem		*base;
 	/* AXI Async bridge registers. */
 	void __iomem		*asb;
+	/* RPiVid bridge registers. */
+	void __iomem		*rpivid_asb;
 
 	struct genpd_onecell_data pd_xlate;
 	struct bcm2835_power_domain domains[BCM2835_POWER_DOMAIN_COUNT];
@@ -151,8 +155,15 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
 	u64 start;
 	u32 val;
 
-	if (!reg)
+	switch (reg) {
+	case 0:
 		return 0;
+	case ASB_V3D_S_CTRL:
+	case ASB_V3D_M_CTRL:
+		if (power->rpivid_asb)
+			base = power->rpivid_asb;
+		break;
+	}
 
 	start = ktime_get_ns();
 
@@ -621,13 +632,23 @@ static int bcm2835_power_probe(struct platform_device *pdev)
 	power->dev = dev;
 	power->base = pm->base;
 	power->asb = pm->asb;
+	power->rpivid_asb = pm->rpivid_asb;
 
 	id = readl(power->asb + ASB_AXI_BRDG_ID);
-	if (id != 0x62726467 /* "BRDG" */) {
+	if (id != BCM2835_BRDG_ID /* "BRDG" */) {
 		dev_err(dev, "ASB register ID returned 0x%08x\n", id);
 		return -ENODEV;
 	}
 
+	if (power->rpivid_asb) {
+		id = readl(power->rpivid_asb + ASB_AXI_BRDG_ID);
+		if (id != BCM2835_BRDG_ID /* "BRDG" */) {
+			dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n",
+				     id);
+			return -ENODEV;
+		}
+	}
+
 	power->pd_xlate.domains = devm_kcalloc(dev,
 					       ARRAY_SIZE(power_domain_names),
 					       sizeof(*power->pd_xlate.domains),
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-06-25 11:36   ` Stefan Wahren
  -1 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Bypass power_on/power_off() when running on BCM2711 as they are not
needed.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e06d91c0739..5bcd047768b6 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -198,6 +198,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
 {
 	struct bcm2835_power *power = pd->power;
 
+	/* We don't run this on BCM2711 */
+	if (power->rpivid_asb)
+		return 0;
+
 	/* Enable functional isolation */
 	PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC);
 
@@ -219,6 +223,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg)
 	int inrush;
 	bool powok;
 
+	/* We don't run this on BCM2711 */
+	if (power->rpivid_asb)
+		return 0;
+
 	/* If it was already powered on by the fw, leave it that way. */
 	if (PM_READ(pm_reg) & PM_POWUP)
 		return 0;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
@ 2022-06-25 11:36   ` Stefan Wahren
  0 siblings, 0 replies; 70+ messages in thread
From: Stefan Wahren @ 2022-06-25 11:36 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Bypass power_on/power_off() when running on BCM2711 as they are not
needed.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/soc/bcm/bcm2835-power.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e06d91c0739..5bcd047768b6 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -198,6 +198,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
 {
 	struct bcm2835_power *power = pd->power;
 
+	/* We don't run this on BCM2711 */
+	if (power->rpivid_asb)
+		return 0;
+
 	/* Enable functional isolation */
 	PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC);
 
@@ -219,6 +223,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg)
 	int inrush;
 	bool powok;
 
+	/* We don't run this on BCM2711 */
+	if (power->rpivid_asb)
+		return 0;
+
 	/* If it was already powered on by the fw, leave it that way. */
 	if (PM_READ(pm_reg) & PM_POWUP)
 		return 0;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 16:22     ` Lee Jones
  -1 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-06-27 16:22 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Sat, 25 Jun 2022, Stefan Wahren wrote:

> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> If available in firmware, find resources by their 'reg-names' position
> instead of relying on hardcoded offsets. Care is taken to support old
> firmware nonetheless.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>  1 file changed, 41 insertions(+), 20 deletions(-)

Anything preventing me from applying the two MFD patches?

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-27 16:22     ` Lee Jones
  0 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-06-27 16:22 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Sat, 25 Jun 2022, Stefan Wahren wrote:

> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> If available in firmware, find resources by their 'reg-names' position
> instead of relying on hardcoded offsets. Care is taken to support old
> firmware nonetheless.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>  1 file changed, 41 insertions(+), 20 deletions(-)

Anything preventing me from applying the two MFD patches?

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-27 16:22     ` Lee Jones
@ 2022-06-27 16:28       ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 16:28 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/27/22 09:22, Lee Jones wrote:
> On Sat, 25 Jun 2022, Stefan Wahren wrote:
> 
>> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>
>> If available in firmware, find resources by their 'reg-names' position
>> instead of relying on hardcoded offsets. Care is taken to support old
>> firmware nonetheless.
>>
>> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
>>   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>>   1 file changed, 41 insertions(+), 20 deletions(-)
> 
> Anything preventing me from applying the two MFD patches?
> 

They are self contained and cater to being backward/forward compatible 
with Device Tree changes, so not really no. If that is how you want it, 
please proceed in taking the 2 MFD patches and I will apply the rest.
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-27 16:28       ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 16:28 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/27/22 09:22, Lee Jones wrote:
> On Sat, 25 Jun 2022, Stefan Wahren wrote:
> 
>> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>
>> If available in firmware, find resources by their 'reg-names' position
>> instead of relying on hardcoded offsets. Care is taken to support old
>> firmware nonetheless.
>>
>> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
>>   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>>   1 file changed, 41 insertions(+), 20 deletions(-)
> 
> Anything preventing me from applying the two MFD patches?
> 

They are self contained and cater to being backward/forward compatible 
with Device Tree changes, so not really no. If that is how you want it, 
please proceed in taking the 2 MFD patches and I will apply the rest.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne,
	Rob Herring

On Sat, 25 Jun 2022 13:36:09 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> This converts the brcm,bcm2835-pm bindings from text to proper schema.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne,
	Rob Herring

On Sat, 25 Jun 2022 13:36:09 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> This converts the brcm,bcm2835-pm bindings from text to proper schema.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne,
	Rob Herring

On Sat, 25 Jun 2022 13:36:10 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Anticipating the introduction of BCM2711, of which we'll need to support
> its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This
> will help to have a consistent mapping between resources and their
> meaning.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne,
	Rob Herring

On Sat, 25 Jun 2022 13:36:10 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Anticipating the introduction of BCM2711, of which we'll need to support
> its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This
> will help to have a consistent mapping between resources and their
> meaning.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:11 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Add a new compatible string for BCM2711 and the option to provide a
> third reg property for the board's new RPiVid ASB.
> 
> In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer
> of this driver so far. The old ASB is still be present with ISP and H264
> bits but no V3D.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:11 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Add a new compatible string for BCM2711 and the option to provide a
> third reg property for the board's new RPiVid ASB.
> 
> In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer
> of this driver so far. The old ASB is still be present with ISP and H264
> bits but no V3D.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:12 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use
> them.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:12 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use
> them.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:13 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> A new compatible string was introduced specifically for BCM2711, so make
> use of it.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:13 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> A new compatible string was introduced specifically for BCM2711, so make
> use of it.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:16 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> The functions to control the async AXI bridges are almost identical.
> So define a general function to handle it and keep the original ones as
> wrapper. This should make this driver easier to extend.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:16 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> The functions to control the async AXI bridges are almost identical.
> So define a general function to handle it and keep the original ones as
> wrapper. This should make this driver easier to extend.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:27     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:17 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> The macros in order to access the ASB registers have a hard coded base
> address. So extending them for other platforms would make them harder
> to read. As a solution resolve these macros.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
@ 2022-06-27 17:27     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:27 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:17 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> The macros in order to access the ASB registers have a hard coded base
> address. So extending them for other platforms would make them harder
> to read. As a solution resolve these macros.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:28     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:28 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:18 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
> BCM2711.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
@ 2022-06-27 17:28     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:28 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel

On Sat, 25 Jun 2022 13:36:18 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
> BCM2711.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-27 17:28     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:28 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:19 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Bypass power_on/power_off() when running on BCM2711 as they are not
> needed.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
@ 2022-06-27 17:28     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-27 17:28 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Stefan Wahren, Ray Jui, Scott Branden,
	Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell, Maxime Ripard,
	devicetree, linux-arm-kernel, Nicolas Saenz Julienne

On Sat, 25 Jun 2022 13:36:19 +0200, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Bypass power_on/power_off() when running on BCM2711 as they are not
> needed.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-27 16:28       ` Florian Fainelli
@ 2022-06-28  2:07         ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28  2:07 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne



On 6/27/2022 9:28 AM, Florian Fainelli wrote:
> On 6/27/22 09:22, Lee Jones wrote:
>> On Sat, 25 Jun 2022, Stefan Wahren wrote:
>>
>>> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>>
>>> If available in firmware, find resources by their 'reg-names' position
>>> instead of relying on hardcoded offsets. Care is taken to support old
>>> firmware nonetheless.
>>>
>>> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>>> ---
>>>   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>>>   1 file changed, 41 insertions(+), 20 deletions(-)
>>
>> Anything preventing me from applying the two MFD patches?
>>
> 
> They are self contained and cater to being backward/forward compatible 
> with Device Tree changes, so not really no. If that is how you want it, 
> please proceed in taking the 2 MFD patches and I will apply the rest.

Actually there is a dependency between patch 10 which uses 
pm->rpivid_asb and patch 7 which introduces it. I can give you my 
acked-by for patches 8-11 so you can take them via the MFD tree if you 
would like.
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-28  2:07         ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28  2:07 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne



On 6/27/2022 9:28 AM, Florian Fainelli wrote:
> On 6/27/22 09:22, Lee Jones wrote:
>> On Sat, 25 Jun 2022, Stefan Wahren wrote:
>>
>>> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>>
>>> If available in firmware, find resources by their 'reg-names' position
>>> instead of relying on hardcoded offsets. Care is taken to support old
>>> firmware nonetheless.
>>>
>>> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>>> ---
>>>   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
>>>   1 file changed, 41 insertions(+), 20 deletions(-)
>>
>> Anything preventing me from applying the two MFD patches?
>>
> 
> They are self contained and cater to being backward/forward compatible 
> with Device Tree changes, so not really no. If that is how you want it, 
> please proceed in taking the 2 MFD patches and I will apply the rest.

Actually there is a dependency between patch 10 which uses 
pm->rpivid_asb and patch 7 which introduces it. I can give you my 
acked-by for patches 8-11 so you can take them via the MFD tree if you 
would like.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-28  2:07         ` Florian Fainelli
@ 2022-06-28  7:44           ` Lee Jones
  -1 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-06-28  7:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Mon, 27 Jun 2022, Florian Fainelli wrote:

> 
> 
> On 6/27/2022 9:28 AM, Florian Fainelli wrote:
> > On 6/27/22 09:22, Lee Jones wrote:
> > > On Sat, 25 Jun 2022, Stefan Wahren wrote:
> > > 
> > > > From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > > > 
> > > > If available in firmware, find resources by their 'reg-names' position
> > > > instead of relying on hardcoded offsets. Care is taken to support old
> > > > firmware nonetheless.
> > > > 
> > > > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > > > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > > > ---
> > > >   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
> > > >   1 file changed, 41 insertions(+), 20 deletions(-)
> > > 
> > > Anything preventing me from applying the two MFD patches?
> > > 
> > 
> > They are self contained and cater to being backward/forward compatible
> > with Device Tree changes, so not really no. If that is how you want it,
> > please proceed in taking the 2 MFD patches and I will apply the rest.
> 
> Actually there is a dependency between patch 10 which uses pm->rpivid_asb
> and patch 7 which introduces it. I can give you my acked-by for patches 8-11
> so you can take them via the MFD tree if you would like.

That works too.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-28  7:44           ` Lee Jones
  0 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-06-28  7:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Mon, 27 Jun 2022, Florian Fainelli wrote:

> 
> 
> On 6/27/2022 9:28 AM, Florian Fainelli wrote:
> > On 6/27/22 09:22, Lee Jones wrote:
> > > On Sat, 25 Jun 2022, Stefan Wahren wrote:
> > > 
> > > > From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > > > 
> > > > If available in firmware, find resources by their 'reg-names' position
> > > > instead of relying on hardcoded offsets. Care is taken to support old
> > > > firmware nonetheless.
> > > > 
> > > > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > > > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > > > ---
> > > >   drivers/mfd/bcm2835-pm.c | 61 +++++++++++++++++++++++++++-------------
> > > >   1 file changed, 41 insertions(+), 20 deletions(-)
> > > 
> > > Anything preventing me from applying the two MFD patches?
> > > 
> > 
> > They are self contained and cater to being backward/forward compatible
> > with Device Tree changes, so not really no. If that is how you want it,
> > please proceed in taking the 2 MFD patches and I will apply the rest.
> 
> Actually there is a dependency between patch 10 which uses pm->rpivid_asb
> and patch 7 which introduces it. I can give you my acked-by for patches 8-11
> so you can take them via the MFD tree if you would like.

That works too.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:24     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/25/22 04:36, Stefan Wahren wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> If available in firmware, find resources by their 'reg-names' position
> instead of relying on hardcoded offsets. Care is taken to support old
> firmware nonetheless.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-06-28 16:24     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/25/22 04:36, Stefan Wahren wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> If available in firmware, find resources by their 'reg-names' position
> instead of relying on hardcoded offsets. Care is taken to support old
> firmware nonetheless.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 07/11] mfd: bcm2835-pm: Add support for BCM2711
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:24     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> As per the devicetree bindings, BCM2711 will provide both the old and
> new ASB resources, so get both of them and pass them into
> 'bcm2835-power,' which will take care of selecting which one to use
> accordingly.
> 
> Since the RPiVid ASB's resources were being provided prior to formalizing
> the bindings[1], also support the old DT files that didn't use
> 'reg-names.'
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 07/11] mfd: bcm2835-pm: Add support for BCM2711
@ 2022-06-28 16:24     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> As per the devicetree bindings, BCM2711 will provide both the old and
> new ASB resources, so get both of them and pass them into
> 'bcm2835-power,' which will take care of selecting which one to use
> accordingly.
> 
> Since the RPiVid ASB's resources were being provided prior to formalizing
> the bindings[1], also support the old DT files that didn't use
> 'reg-names.'
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:24     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> The functions to control the async AXI bridges are almost identical.
> So define a general function to handle it and keep the original ones as
> wrapper. This should make this driver easier to extend.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control
@ 2022-06-28 16:24     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> The functions to control the async AXI bridges are almost identical.
> So define a general function to handle it and keep the original ones as
> wrapper. This should make this driver easier to extend.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:24     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> The macros in order to access the ASB registers have a hard coded base
> address. So extending them for other platforms would make them harder
> to read. As a solution resolve these macros.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros
@ 2022-06-28 16:24     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:24 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> The macros in order to access the ASB registers have a hard coded base
> address. So extending them for other platforms would make them harder
> to read. As a solution resolve these macros.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:25     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:25 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
> BCM2711.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
@ 2022-06-28 16:25     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:25 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 6/25/22 04:36, Stefan Wahren wrote:
> In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
> with the ISP and H264 bits, and V3D is in the same place in the new ASB
> as the old one.
> 
> Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
> BCM2711.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
  2022-06-25 11:36   ` Stefan Wahren
@ 2022-06-28 16:26     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:26 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/25/22 04:36, Stefan Wahren wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Bypass power_on/power_off() when running on BCM2711 as they are not
> needed.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls
@ 2022-06-28 16:26     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-06-28 16:26 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden, Lee Jones
  Cc: Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel, Nicolas Saenz Julienne

On 6/25/22 04:36, Stefan Wahren wrote:
> From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> 
> Bypass power_on/power_off() when running on BCM2711 as they are not
> needed.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-06-28  7:44           ` Lee Jones
@ 2022-07-05 20:51             ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-07-05 20:51 UTC (permalink / raw)
  To: Lee Jones, Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On 6/28/22 00:44, Lee Jones wrote:
>>>> Anything preventing me from applying the two MFD patches?
>>>>
>>>
>>> They are self contained and cater to being backward/forward compatible
>>> with Device Tree changes, so not really no. If that is how you want it,
>>> please proceed in taking the 2 MFD patches and I will apply the rest.
>>
>> Actually there is a dependency between patch 10 which uses pm->rpivid_asb
>> and patch 7 which introduces it. I can give you my acked-by for patches 8-11
>> so you can take them via the MFD tree if you would like.
> 
> That works too.
> 

I took patches 1 through 5, can you apply 6 through 11? Thanks
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-07-05 20:51             ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-07-05 20:51 UTC (permalink / raw)
  To: Lee Jones, Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On 6/28/22 00:44, Lee Jones wrote:
>>>> Anything preventing me from applying the two MFD patches?
>>>>
>>>
>>> They are self contained and cater to being backward/forward compatible
>>> with Device Tree changes, so not really no. If that is how you want it,
>>> please proceed in taking the 2 MFD patches and I will apply the rest.
>>
>> Actually there is a dependency between patch 10 which uses pm->rpivid_asb
>> and patch 7 which introduces it. I can give you my acked-by for patches 8-11
>> so you can take them via the MFD tree if you would like.
> 
> That works too.
> 

I took patches 1 through 5, can you apply 6 through 11? Thanks
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
  2022-07-05 20:51             ` Florian Fainelli
@ 2022-07-06 10:20               ` Lee Jones
  -1 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-07-06 10:20 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Tue, 05 Jul 2022, Florian Fainelli wrote:

> On 6/28/22 00:44, Lee Jones wrote:
> > > > > Anything preventing me from applying the two MFD patches?
> > > > > 
> > > > 
> > > > They are self contained and cater to being backward/forward compatible
> > > > with Device Tree changes, so not really no. If that is how you want it,
> > > > please proceed in taking the 2 MFD patches and I will apply the rest.
> > > 
> > > Actually there is a dependency between patch 10 which uses pm->rpivid_asb
> > > and patch 7 which introduces it. I can give you my acked-by for patches 8-11
> > > so you can take them via the MFD tree if you would like.
> > 
> > That works too.
> > 
> 
> I took patches 1 through 5, can you apply 6 through 11? Thanks

I currently have them in soak.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources
@ 2022-07-06 10:20               ` Lee Jones
  0 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-07-06 10:20 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Stefan Wahren, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel,
	Nicolas Saenz Julienne

On Tue, 05 Jul 2022, Florian Fainelli wrote:

> On 6/28/22 00:44, Lee Jones wrote:
> > > > > Anything preventing me from applying the two MFD patches?
> > > > > 
> > > > 
> > > > They are self contained and cater to being backward/forward compatible
> > > > with Device Tree changes, so not really no. If that is how you want it,
> > > > please proceed in taking the 2 MFD patches and I will apply the rest.
> > > 
> > > Actually there is a dependency between patch 10 which uses pm->rpivid_asb
> > > and patch 7 which introduces it. I can give you my acked-by for patches 8-11
> > > so you can take them via the MFD tree if you would like.
> > 
> > That works too.
> > 
> 
> I took patches 1 through 5, can you apply 6 through 11? Thanks

I currently have them in soak.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [GIT PULL] Immutable branch between MFD and SoC due for the v5.20 merge window
  2022-06-25 11:36 ` Stefan Wahren
@ 2022-07-06 11:58   ` Lee Jones
  -1 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-07-06 11:58 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel

Enjoy!

The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:

  Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-soc-bcm-v5.20

for you to fetch changes up to 9e95c67efa8aa26f03b08147a552eb71e83e1a77:

  soc: bcm: bcm2835-power: Bypass power_on/off() calls (2022-07-04 11:59:55 +0100)

----------------------------------------------------------------
Immutable branch between MFD and SoC due for the v5.20 merge window

----------------------------------------------------------------
Nicolas Saenz Julienne (2):
      mfd: bcm2835-pm: Use 'reg-names' to get resources
      soc: bcm: bcm2835-power: Bypass power_on/off() calls

Stefan Wahren (4):
      mfd: bcm2835-pm: Add support for BCM2711
      soc: bcm: bcm2835-power: Refactor ASB control
      soc: bcm: bcm2835-power: Resolve ASB register macros
      soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB

 drivers/mfd/bcm2835-pm.c        | 74 ++++++++++++++++++++++++++++++-----------
 drivers/soc/bcm/bcm2835-power.c | 72 ++++++++++++++++++++++++++-------------
 include/linux/mfd/bcm2835-pm.h  |  1 +
 3 files changed, 103 insertions(+), 44 deletions(-)

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [GIT PULL] Immutable branch between MFD and SoC due for the v5.20 merge window
@ 2022-07-06 11:58   ` Lee Jones
  0 siblings, 0 replies; 70+ messages in thread
From: Lee Jones @ 2022-07-06 11:58 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Ray Jui, Scott Branden, Peter Robinson,
	Melissa Wen, Phil Elwell, bcm-kernel-feedback-list,
	Maxime Ripard, devicetree, linux-arm-kernel

Enjoy!

The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:

  Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-soc-bcm-v5.20

for you to fetch changes up to 9e95c67efa8aa26f03b08147a552eb71e83e1a77:

  soc: bcm: bcm2835-power: Bypass power_on/off() calls (2022-07-04 11:59:55 +0100)

----------------------------------------------------------------
Immutable branch between MFD and SoC due for the v5.20 merge window

----------------------------------------------------------------
Nicolas Saenz Julienne (2):
      mfd: bcm2835-pm: Use 'reg-names' to get resources
      soc: bcm: bcm2835-power: Bypass power_on/off() calls

Stefan Wahren (4):
      mfd: bcm2835-pm: Add support for BCM2711
      soc: bcm: bcm2835-power: Refactor ASB control
      soc: bcm: bcm2835-power: Resolve ASB register macros
      soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB

 drivers/mfd/bcm2835-pm.c        | 74 ++++++++++++++++++++++++++++++-----------
 drivers/soc/bcm/bcm2835-power.c | 72 ++++++++++++++++++++++++++-------------
 include/linux/mfd/bcm2835-pm.h  |  1 +
 3 files changed, 103 insertions(+), 44 deletions(-)

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [GIT PULL] Immutable branch between MFD and SoC due for the v5.20 merge window
  2022-07-06 11:58   ` Lee Jones
@ 2022-07-06 16:18     ` Florian Fainelli
  -1 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-07-06 16:18 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 7/6/22 04:58, Lee Jones wrote:
> Enjoy!
> 
> The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:
> 
>    Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-soc-bcm-v5.20
> 
> for you to fetch changes up to 9e95c67efa8aa26f03b08147a552eb71e83e1a77:
> 
>    soc: bcm: bcm2835-power: Bypass power_on/off() calls (2022-07-04 11:59:55 +0100)
> 
> ----------------------------------------------------------------
> Immutable branch between MFD and SoC due for the v5.20 merge window

OK, merged into drivers/next, thanks!
-- 
Florian

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [GIT PULL] Immutable branch between MFD and SoC due for the v5.20 merge window
@ 2022-07-06 16:18     ` Florian Fainelli
  0 siblings, 0 replies; 70+ messages in thread
From: Florian Fainelli @ 2022-07-06 16:18 UTC (permalink / raw)
  To: Lee Jones, Stefan Wahren
  Cc: Ray Jui, Scott Branden, Peter Robinson, Melissa Wen, Phil Elwell,
	bcm-kernel-feedback-list, Maxime Ripard, devicetree,
	linux-arm-kernel

On 7/6/22 04:58, Lee Jones wrote:
> Enjoy!
> 
> The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:
> 
>    Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-soc-bcm-v5.20
> 
> for you to fetch changes up to 9e95c67efa8aa26f03b08147a552eb71e83e1a77:
> 
>    soc: bcm: bcm2835-power: Bypass power_on/off() calls (2022-07-04 11:59:55 +0100)
> 
> ----------------------------------------------------------------
> Immutable branch between MFD and SoC due for the v5.20 merge window

OK, merged into drivers/next, thanks!
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2022-07-06 16:20 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25 11:36 [PATCH V4 00/11] soc: bcm2835-power: Prepare BCM2711 V3D support Stefan Wahren
2022-06-25 11:36 ` Stefan Wahren
2022-06-25 11:36 ` [PATCH V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 16:22   ` Lee Jones
2022-06-27 16:22     ` Lee Jones
2022-06-27 16:28     ` Florian Fainelli
2022-06-27 16:28       ` Florian Fainelli
2022-06-28  2:07       ` Florian Fainelli
2022-06-28  2:07         ` Florian Fainelli
2022-06-28  7:44         ` Lee Jones
2022-06-28  7:44           ` Lee Jones
2022-07-05 20:51           ` Florian Fainelli
2022-07-05 20:51             ` Florian Fainelli
2022-07-06 10:20             ` Lee Jones
2022-07-06 10:20               ` Lee Jones
2022-06-28 16:24   ` Florian Fainelli
2022-06-28 16:24     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 07/11] mfd: bcm2835-pm: Add support for BCM2711 Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-28 16:24   ` Florian Fainelli
2022-06-28 16:24     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 08/11] soc: bcm: bcm2835-power: Refactor ASB control Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-28 16:24   ` Florian Fainelli
2022-06-28 16:24     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:27   ` Florian Fainelli
2022-06-27 17:27     ` Florian Fainelli
2022-06-28 16:24   ` Florian Fainelli
2022-06-28 16:24     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:28   ` Florian Fainelli
2022-06-27 17:28     ` Florian Fainelli
2022-06-28 16:25   ` Florian Fainelli
2022-06-28 16:25     ` Florian Fainelli
2022-06-25 11:36 ` [PATCH V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Stefan Wahren
2022-06-25 11:36   ` Stefan Wahren
2022-06-27 17:28   ` Florian Fainelli
2022-06-27 17:28     ` Florian Fainelli
2022-06-28 16:26   ` Florian Fainelli
2022-06-28 16:26     ` Florian Fainelli
2022-07-06 11:58 ` [GIT PULL] Immutable branch between MFD and SoC due for the v5.20 merge window Lee Jones
2022-07-06 11:58   ` Lee Jones
2022-07-06 16:18   ` Florian Fainelli
2022-07-06 16:18     ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.