dt-bindings: Consolidate SRAM bindings from all vendors
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 19 Nov 2015 00:42:49 +0000 (09:42 +0900)
committerRob Herring <robh@kernel.org>
Wed, 9 Dec 2015 21:29:37 +0000 (15:29 -0600)
SRAM bindings for various SoCs, using the mmio-sram genalloc
API, are spread over different places - per SoC vendor. Since all of
these are quite similar (they depend on mmio-sram) move them to a common
place.

Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Kukjin Kim <kgene@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/arm/arm,scpi.txt
Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt [deleted file]
Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt [deleted file]
Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt [deleted file]
Documentation/devicetree/bindings/misc/sram.txt [deleted file]
Documentation/devicetree/bindings/soc/sunxi/sram.txt [deleted file]
Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt [new file with mode: 0644]
Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt [new file with mode: 0644]
Documentation/devicetree/bindings/sram/samsung-sram.txt [new file with mode: 0644]
Documentation/devicetree/bindings/sram/sram.txt [new file with mode: 0644]
Documentation/devicetree/bindings/sram/sunxi-sram.txt [new file with mode: 0644]

index 86302de67c2c73626850c3dfd07b0fd9a63a368b..313dabdc14f9874273e4ed87b32b27c75c3c4bdb 100644 (file)
@@ -63,7 +63,7 @@ Required properties:
 - compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno
 
 The rest of the properties should follow the generic mmio-sram description
-found in ../../misc/sysram.txt
+found in ../../sram/sram.txt
 
 Each sub-node represents the reserved area for SCPI.
 
diff --git a/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt b/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt
deleted file mode 100644 (file)
index 4a0a4f7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-Samsung Exynos SYSRAM for SMP bringup:
-------------------------------------
-
-Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup
-of the secondary cores. Once the core gets powered up it executes the
-code that is residing at some specific location of the SYSRAM.
-
-Therefore reserved section sub-nodes have to be added to the mmio-sram
-declaration. These nodes are of two types depending upon secure or
-non-secure execution environment.
-
-Required sub-node properties:
-- compatible : depending upon boot mode, should be
-               "samsung,exynos4210-sysram" : for Secure SYSRAM
-               "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM
-
-The rest of the properties should follow the generic mmio-sram discription
-found in ../../misc/sysram.txt
-
-Example:
-
-       sysram@02020000 {
-               compatible = "mmio-sram";
-               reg = <0x02020000 0x54000>;
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges = <0 0x02020000 0x54000>;
-
-               smp-sysram@0 {
-                       compatible = "samsung,exynos4210-sysram";
-                       reg = <0x0 0x1000>;
-               };
-
-               smp-sysram@53000 {
-                       compatible = "samsung,exynos4210-sysram-ns";
-                       reg = <0x53000 0x1000>;
-               };
-       };
diff --git a/Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt b/Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt
deleted file mode 100644 (file)
index 6b42fda..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Rockchip SRAM for pmu:
-------------------------------
-
-The sram of pmu is used to store the function of resume from maskrom(the 1st
-level loader). This is a common use of the "pmu-sram" because it keeps power
-even in low power states in the system.
-
-Required node properties:
-- compatible : should be "rockchip,rk3288-pmu-sram"
-- reg : physical base address and the size of the registers window
-
-Example:
-       sram@ff720000 {
-               compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
-               reg = <0xff720000 0x1000>;
-       };
diff --git a/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt b/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt
deleted file mode 100644 (file)
index d9416fb..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Rockchip SRAM for smp bringup:
-------------------------------
-
-Rockchip's smp-capable SoCs use the first part of the sram for the bringup
-of the cores. Once the core gets powered up it executes the code that is
-residing at the very beginning of the sram.
-
-Therefore a reserved section sub-node has to be added to the mmio-sram
-declaration.
-
-Required sub-node properties:
-- compatible : should be "rockchip,rk3066-smp-sram"
-
-The rest of the properties should follow the generic mmio-sram discription
-found in ../../misc/sram.txt
-
-Example:
-
-       sram: sram@10080000 {
-               compatible = "mmio-sram";
-               reg = <0x10080000 0x10000>;
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               smp-sram@10080000 {
-                       compatible = "rockchip,rk3066-smp-sram";
-                       reg = <0x10080000 0x50>;
-               };
-       };
diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/misc/sram.txt
deleted file mode 100644 (file)
index 42ee943..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-Generic on-chip SRAM
-
-Simple IO memory regions to be managed by the genalloc API.
-
-Required properties:
-
-- compatible : mmio-sram
-
-- reg : SRAM iomem address range
-
-Reserving sram areas:
----------------------
-
-Each child of the sram node specifies a region of reserved memory. Each
-child node should use a 'reg' property to specify a specific range of
-reserved memory.
-
-Following the generic-names recommended practice, node names should
-reflect the purpose of the node. Unit address (@<address>) should be
-appended to the name.
-
-Required properties in the sram node:
-
-- #address-cells, #size-cells : should use the same values as the root node
-- ranges : standard definition, should translate from local addresses
-           within the sram to bus addresses
-
-Required properties in the area nodes:
-
-- reg : iomem address range, relative to the SRAM range
-
-Optional properties in the area nodes:
-
-- compatible : standard definition, should contain a vendor specific string
-               in the form <vendor>,[<device>-]<usage>
-- pool : indicates that the particular reserved SRAM area is addressable
-         and in use by another device or devices
-- export : indicates that the reserved SRAM area may be accessed outside
-           of the kernel, e.g. by bootloader or userspace
-- label : the name for the reserved partition, if omitted, the label
-          is taken from the node name excluding the unit address.
-
-Example:
-
-sram: sram@5c000000 {
-       compatible = "mmio-sram";
-       reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
-
-       #adress-cells = <1>;
-       #size-cells = <1>;
-       ranges = <0 0x5c000000 0x40000>;
-
-       smp-sram@100 {
-               compatible = "socvendor,smp-sram";
-               reg = <0x100 0x50>;
-       };
-
-       device-sram@1000 {
-               reg = <0x1000 0x1000>;
-               pool;
-       };
-
-       exported@20000 {
-               reg = <0x20000 0x20000>;
-               export;
-       };
-};
diff --git a/Documentation/devicetree/bindings/soc/sunxi/sram.txt b/Documentation/devicetree/bindings/soc/sunxi/sram.txt
deleted file mode 100644 (file)
index 0676981..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-Allwinnner SoC SRAM controllers
------------------------------------------------------
-
-The SRAM controller found on most Allwinner devices is represented by
-a regular node for the SRAM controller itself, with sub-nodes
-reprensenting the SRAM handled by the SRAM controller.
-
-Controller Node
----------------
-
-Required properties:
-- compatible : "allwinner,sun4i-a10-sram-controller"
-- reg : sram controller register offset + length
-
-SRAM nodes
-----------
-
-Each SRAM is described using the mmio-sram bindings documented in
-Documentation/devicetree/bindings/misc/sram.txt
-
-Each SRAM will have SRAM sections that are going to be handled by the
-SRAM controller as subnodes. These sections are represented following
-once again the representation described in the mmio-sram binding.
-
-The valid sections compatible are:
-    - allwinner,sun4i-a10-sram-a3-a4
-    - allwinner,sun4i-a10-sram-d
-
-Devices using SRAM sections
----------------------------
-
-Some devices need to request to the SRAM controller to map an SRAM for
-their exclusive use.
-
-The relationship between such a device and an SRAM section is
-expressed through the allwinner,sram property, that will take a
-phandle and an argument.
-
-This valid values for this argument are:
-  - 0: CPU
-  - 1: Device
-
-Example
--------
-sram-controller@01c00000 {
-       compatible = "allwinner,sun4i-a10-sram-controller";
-       reg = <0x01c00000 0x30>;
-       #address-cells = <1>;
-       #size-cells = <1>;
-       ranges;
-
-       sram_a: sram@00000000 {
-               compatible = "mmio-sram";
-               reg = <0x00000000 0xc000>;
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges = <0 0x00000000 0xc000>;
-
-               emac_sram: sram-section@8000 {
-                       compatible = "allwinner,sun4i-a10-sram-a3-a4";
-                       reg = <0x8000 0x4000>;
-                       status = "disabled";
-               };
-       };
-};
-
-emac: ethernet@01c0b000 {
-       compatible = "allwinner,sun4i-a10-emac";
-       ...
-
-       allwinner,sram = <&emac_sram 1>;
-};
diff --git a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
new file mode 100644 (file)
index 0000000..6b42fda
--- /dev/null
@@ -0,0 +1,16 @@
+Rockchip SRAM for pmu:
+------------------------------
+
+The sram of pmu is used to store the function of resume from maskrom(the 1st
+level loader). This is a common use of the "pmu-sram" because it keeps power
+even in low power states in the system.
+
+Required node properties:
+- compatible : should be "rockchip,rk3288-pmu-sram"
+- reg : physical base address and the size of the registers window
+
+Example:
+       sram@ff720000 {
+               compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
+               reg = <0xff720000 0x1000>;
+       };
diff --git a/Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt
new file mode 100644 (file)
index 0000000..800701e
--- /dev/null
@@ -0,0 +1,30 @@
+Rockchip SRAM for smp bringup:
+------------------------------
+
+Rockchip's smp-capable SoCs use the first part of the sram for the bringup
+of the cores. Once the core gets powered up it executes the code that is
+residing at the very beginning of the sram.
+
+Therefore a reserved section sub-node has to be added to the mmio-sram
+declaration.
+
+Required sub-node properties:
+- compatible : should be "rockchip,rk3066-smp-sram"
+
+The rest of the properties should follow the generic mmio-sram discription
+found in Documentation/devicetree/bindings/sram/sram.txt
+
+Example:
+
+       sram: sram@10080000 {
+               compatible = "mmio-sram";
+               reg = <0x10080000 0x10000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               smp-sram@10080000 {
+                       compatible = "rockchip,rk3066-smp-sram";
+                       reg = <0x10080000 0x50>;
+               };
+       };
diff --git a/Documentation/devicetree/bindings/sram/samsung-sram.txt b/Documentation/devicetree/bindings/sram/samsung-sram.txt
new file mode 100644 (file)
index 0000000..6bc474b
--- /dev/null
@@ -0,0 +1,38 @@
+Samsung Exynos SYSRAM for SMP bringup:
+------------------------------------
+
+Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup
+of the secondary cores. Once the core gets powered up it executes the
+code that is residing at some specific location of the SYSRAM.
+
+Therefore reserved section sub-nodes have to be added to the mmio-sram
+declaration. These nodes are of two types depending upon secure or
+non-secure execution environment.
+
+Required sub-node properties:
+- compatible : depending upon boot mode, should be
+               "samsung,exynos4210-sysram" : for Secure SYSRAM
+               "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM
+
+The rest of the properties should follow the generic mmio-sram discription
+found in Documentation/devicetree/bindings/sram/sram.txt
+
+Example:
+
+       sysram@02020000 {
+               compatible = "mmio-sram";
+               reg = <0x02020000 0x54000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x02020000 0x54000>;
+
+               smp-sysram@0 {
+                       compatible = "samsung,exynos4210-sysram";
+                       reg = <0x0 0x1000>;
+               };
+
+               smp-sysram@53000 {
+                       compatible = "samsung,exynos4210-sysram-ns";
+                       reg = <0x53000 0x1000>;
+               };
+       };
diff --git a/Documentation/devicetree/bindings/sram/sram.txt b/Documentation/devicetree/bindings/sram/sram.txt
new file mode 100644 (file)
index 0000000..42ee943
--- /dev/null
@@ -0,0 +1,67 @@
+Generic on-chip SRAM
+
+Simple IO memory regions to be managed by the genalloc API.
+
+Required properties:
+
+- compatible : mmio-sram
+
+- reg : SRAM iomem address range
+
+Reserving sram areas:
+---------------------
+
+Each child of the sram node specifies a region of reserved memory. Each
+child node should use a 'reg' property to specify a specific range of
+reserved memory.
+
+Following the generic-names recommended practice, node names should
+reflect the purpose of the node. Unit address (@<address>) should be
+appended to the name.
+
+Required properties in the sram node:
+
+- #address-cells, #size-cells : should use the same values as the root node
+- ranges : standard definition, should translate from local addresses
+           within the sram to bus addresses
+
+Required properties in the area nodes:
+
+- reg : iomem address range, relative to the SRAM range
+
+Optional properties in the area nodes:
+
+- compatible : standard definition, should contain a vendor specific string
+               in the form <vendor>,[<device>-]<usage>
+- pool : indicates that the particular reserved SRAM area is addressable
+         and in use by another device or devices
+- export : indicates that the reserved SRAM area may be accessed outside
+           of the kernel, e.g. by bootloader or userspace
+- label : the name for the reserved partition, if omitted, the label
+          is taken from the node name excluding the unit address.
+
+Example:
+
+sram: sram@5c000000 {
+       compatible = "mmio-sram";
+       reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
+
+       #adress-cells = <1>;
+       #size-cells = <1>;
+       ranges = <0 0x5c000000 0x40000>;
+
+       smp-sram@100 {
+               compatible = "socvendor,smp-sram";
+               reg = <0x100 0x50>;
+       };
+
+       device-sram@1000 {
+               reg = <0x1000 0x1000>;
+               pool;
+       };
+
+       exported@20000 {
+               reg = <0x20000 0x20000>;
+               export;
+       };
+};
diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
new file mode 100644 (file)
index 0000000..8d56654
--- /dev/null
@@ -0,0 +1,72 @@
+Allwinnner SoC SRAM controllers
+-----------------------------------------------------
+
+The SRAM controller found on most Allwinner devices is represented by
+a regular node for the SRAM controller itself, with sub-nodes
+reprensenting the SRAM handled by the SRAM controller.
+
+Controller Node
+---------------
+
+Required properties:
+- compatible : "allwinner,sun4i-a10-sram-controller"
+- reg : sram controller register offset + length
+
+SRAM nodes
+----------
+
+Each SRAM is described using the mmio-sram bindings documented in
+Documentation/devicetree/bindings/sram/sram.txt
+
+Each SRAM will have SRAM sections that are going to be handled by the
+SRAM controller as subnodes. These sections are represented following
+once again the representation described in the mmio-sram binding.
+
+The valid sections compatible are:
+    - allwinner,sun4i-a10-sram-a3-a4
+    - allwinner,sun4i-a10-sram-d
+
+Devices using SRAM sections
+---------------------------
+
+Some devices need to request to the SRAM controller to map an SRAM for
+their exclusive use.
+
+The relationship between such a device and an SRAM section is
+expressed through the allwinner,sram property, that will take a
+phandle and an argument.
+
+This valid values for this argument are:
+  - 0: CPU
+  - 1: Device
+
+Example
+-------
+sram-controller@01c00000 {
+       compatible = "allwinner,sun4i-a10-sram-controller";
+       reg = <0x01c00000 0x30>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+       ranges;
+
+       sram_a: sram@00000000 {
+               compatible = "mmio-sram";
+               reg = <0x00000000 0xc000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x00000000 0xc000>;
+
+               emac_sram: sram-section@8000 {
+                       compatible = "allwinner,sun4i-a10-sram-a3-a4";
+                       reg = <0x8000 0x4000>;
+                       status = "disabled";
+               };
+       };
+};
+
+emac: ethernet@01c0b000 {
+       compatible = "allwinner,sun4i-a10-emac";
+       ...
+
+       allwinner,sram = <&emac_sram 1>;
+};
This page took 0.037801 seconds and 5 git commands to generate.