linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers
@ 2022-10-28 11:53 Rafał Miłecki
  2022-10-28 12:49 ` Krzysztof Kozlowski
  2022-10-31 15:33 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Rafał Miłecki @ 2022-10-28 11:53 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Daniel Lezcano, Thomas Gleixner, Lee Jones, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli, devicetree,
	linux-arm-kernel, bcm-kernel-feedback-list,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

BCA is a big set / family of Broadcom devices sharing multiple hardware
blocks. One of them is timer that actually exists in two versions. It's
a part of TWD MFD block.

Add binding for it so SoCs can be properly described. Linux (and
probably any other OS) doesn't really seem to need a driver for it. it
may be needed for bootloaders (e.g. U-Boot) though. Especially for SoCs
with CPUs other than Cortex-A9 (which contains arch timers).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Limit to 1 example (they were almost the same)
    Drop "," in "e.g.,"
---
 .../devicetree/bindings/mfd/brcm,twd.yaml     |  8 ++++
 .../bindings/timer/brcm,bcmbca-timer.yaml     | 40 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml

diff --git a/Documentation/devicetree/bindings/mfd/brcm,twd.yaml b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml
index 634526f790b8..e5136a37b0a3 100644
--- a/Documentation/devicetree/bindings/mfd/brcm,twd.yaml
+++ b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml
@@ -36,6 +36,9 @@ properties:
     const: 1
 
 patternProperties:
+  '^timer@[a-f0-9]+$':
+    $ref: /schemas/timer/brcm,bcmbca-timer.yaml
+
   '^watchdog@[a-f0-9]+$':
     $ref: /schemas/watchdog/brcm,bcm7038-wdt.yaml
 
@@ -54,6 +57,11 @@ examples:
         #address-cells = <1>;
         #size-cells = <1>;
 
+        timer@0 {
+            compatible = "brcm,bcm63138-timer";
+            reg = <0x0 0x28>;
+        };
+
         watchdog@28 {
             compatible = "brcm,bcm7038-wdt";
             reg = <0x28 0x8>;
diff --git a/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml b/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml
new file mode 100644
index 000000000000..6707d9760857
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/brcm,bcmbca-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Broadband SoC timer
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+
+properties:
+  compatible:
+    oneOf:
+      - const: brcm,bcm6345-timer
+        description: >
+          An old block with 3 timers.
+
+          It can be found in BCM6345, BCM6838 and BCM63268.
+      - const: brcm,bcm63138-timer
+        description: >
+          Updated block with 4 timers and control regs at the beginning.
+
+          It can be found in newer SoCs, e.g. BCM63138, BCM63148, BCM63381,
+          BCM68360, BCM6848, BCM6858, BCM4908.
+
+  reg:
+    maxItems: 1
+
+additionalProperties: false
+
+required:
+  - reg
+
+examples:
+  - |
+    timer@fffe0200 {
+      compatible = "brcm,bcm6345-timer";
+      reg = <0xfffe0200 0x1c>;
+    };
-- 
2.34.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] 3+ messages in thread

* Re: [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers
  2022-10-28 11:53 [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers Rafał Miłecki
@ 2022-10-28 12:49 ` Krzysztof Kozlowski
  2022-10-31 15:33 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-28 12:49 UTC (permalink / raw)
  To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski
  Cc: Daniel Lezcano, Thomas Gleixner, Lee Jones, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli, devicetree,
	linux-arm-kernel, bcm-kernel-feedback-list,
	Rafał Miłecki

On 28/10/2022 07:53, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> BCA is a big set / family of Broadcom devices sharing multiple hardware
> blocks. One of them is timer that actually exists in two versions. It's
> a part of TWD MFD block.
> 
> Add binding for it so SoCs can be properly described. Linux (and
> probably any other OS) doesn't really seem to need a driver for it. it
> may be needed for bootloaders (e.g. U-Boot) though. Especially for SoCs
> with CPUs other than Cortex-A9 (which contains arch timers).


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


_______________________________________________
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] 3+ messages in thread

* Re: [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers
  2022-10-28 11:53 [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers Rafał Miłecki
  2022-10-28 12:49 ` Krzysztof Kozlowski
@ 2022-10-31 15:33 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2022-10-31 15:33 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Rob Herring, Krzysztof Kozlowski, Daniel Lezcano,
	Thomas Gleixner, William Zhang, Anand Gore, Kursad Oney,
	Florian Fainelli, devicetree, linux-arm-kernel,
	bcm-kernel-feedback-list, Rafał Miłecki

On Fri, 28 Oct 2022, Rafał Miłecki wrote:

> From: Rafał Miłecki <rafal@milecki.pl>
> 
> BCA is a big set / family of Broadcom devices sharing multiple hardware
> blocks. One of them is timer that actually exists in two versions. It's
> a part of TWD MFD block.
> 
> Add binding for it so SoCs can be properly described. Linux (and
> probably any other OS) doesn't really seem to need a driver for it. it
> may be needed for bootloaders (e.g. U-Boot) though. Especially for SoCs
> with CPUs other than Cortex-A9 (which contains arch timers).
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Limit to 1 example (they were almost the same)
>     Drop "," in "e.g.,"
> ---
>  .../devicetree/bindings/mfd/brcm,twd.yaml     |  8 ++++
>  .../bindings/timer/brcm,bcmbca-timer.yaml     | 40 +++++++++++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml

Applied, thanks.

-- 
Lee Jones [李琼斯]

_______________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2022-10-31 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 11:53 [PATCH V2] dt-bindings: timer: add Broadcom's BCMBCA timers Rafał Miłecki
2022-10-28 12:49 ` Krzysztof Kozlowski
2022-10-31 15:33 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).