diff mbox series

[V2,1/2] dt-bindings: reset: document Broadcom's PMB binding

Message ID 20201119125600.8559-2-zajec5@gmail.com
State New
Headers show
Series [V2,1/2] dt-bindings: reset: document Broadcom's PMB binding | expand

Commit Message

Rafał Miłecki Nov. 19, 2020, 12:55 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Broadcom's PMB is reset controller used for disabling and enabling SoC
devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
V2: Fix example compilation
    Describe #reset-cells
---
 .../devicetree/bindings/reset/brcm,pmb.yaml   | 54 +++++++++++++++++++
 include/dt-bindings/reset/brcm,pmb.h          |  9 ++++
 2 files changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/brcm,pmb.yaml
 create mode 100644 include/dt-bindings/reset/brcm,pmb.h

Comments

Rob Herring (Arm) Dec. 7, 2020, 10:05 p.m. UTC | #1
On Thu, 19 Nov 2020 13:55:59 +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>

> 

> Broadcom's PMB is reset controller used for disabling and enabling SoC

> devices.

> 

> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

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

> ---

> V2: Fix example compilation

>     Describe #reset-cells

> ---

>  .../devicetree/bindings/reset/brcm,pmb.yaml   | 54 +++++++++++++++++++

>  include/dt-bindings/reset/brcm,pmb.h          |  9 ++++

>  2 files changed, 63 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/reset/brcm,pmb.yaml

>  create mode 100644 include/dt-bindings/reset/brcm,pmb.h

> 


Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/reset/brcm,pmb.yaml b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml
new file mode 100644
index 000000000000..2b5dd2faa4b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml
@@ -0,0 +1,54 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/brcm,pmb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom PMB Master reset controller
+
+description: This document describes Broadcom's PMB controller. It supports
+  resetting various types of connected devices (e.g. PCIe, USB, SATA). It
+  requires specifying device address.
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm4908-pmb # PMB on BCM4908 and compatible SoCs
+
+  reg:
+    maxItems: 1
+
+  big-endian:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Flag to use for block working in big endian mode.
+
+  "#reset-cells":
+    description: |
+      The first cell defines type of device to reset (see brcm,pmb.h)
+      The second cell specifies device address (range: 0 - 255)
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/reset/brcm,pmb.h>
+
+    pmb: reset-controller@802800e0 {
+        compatible = "brcm,bcm4908-pmb";
+        reg = <0x802800e0 0x20>;
+        #reset-cells = <2>;
+    };
+
+    foo {
+        resets = <&pmb BRCM_PMB_USB 17>;
+    };
diff --git a/include/dt-bindings/reset/brcm,pmb.h b/include/dt-bindings/reset/brcm,pmb.h
new file mode 100644
index 000000000000..1b724e451de1
--- /dev/null
+++ b/include/dt-bindings/reset/brcm,pmb.h
@@ -0,0 +1,9 @@ 
+/* SPDX-License-Identifier: GPL-2.0-or-later OR MIT */
+
+#ifndef _DT_BINDINGS_RESET_BRCM_PMB
+#define _DT_BINDINGS_RESET_BRCM_PMB
+
+#define BRCM_PMB_USB		0x01
+#define BRCM_PMB_PCIE		0x02
+
+#endif