2019-10-02 16:44:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 01/10] dt-bindings: sram: Convert SRAM bindings to json-schema

Convert generic mmio-sram bindings to DT schema format using
json-schema. Require the address/size cells to be 1, not equal to root
node.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Changes since v2:
1. Add Rob as maintainer,
2. Use "contains" for compatible,
3. Fix address and size cells to 1,
4. Add maxitems to reg under children,
5. Remove unneeded string type from label.

Changes since v1:
1. Indent example with four spaces (more readable).
---
.../devicetree/bindings/sram/sram.txt | 80 -----------
.../devicetree/bindings/sram/sram.yaml | 134 ++++++++++++++++++
2 files changed, 134 insertions(+), 80 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sram/sram.txt
create mode 100644 Documentation/devicetree/bindings/sram/sram.yaml

diff --git a/Documentation/devicetree/bindings/sram/sram.txt b/Documentation/devicetree/bindings/sram/sram.txt
deleted file mode 100644
index e98908bd4227..000000000000
--- a/Documentation/devicetree/bindings/sram/sram.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-Generic on-chip SRAM
-
-Simple IO memory regions to be managed by the genalloc API.
-
-Required properties:
-
-- compatible : mmio-sram or atmel,sama5d2-securam
-
-- 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
-
-Optional properties in the sram node:
-
-- no-memory-wc : the flag indicating, that SRAM memory region has not to
- be remapped as write combining. WC is used by default.
-
-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
-- protect-exec : Same as 'pool' above but with the additional
- constraint that code wil be run from the region and
- that the memory is maintained as read-only, executable
- during code execution. NOTE: This region must be page
- aligned on start and end in order to properly allow
- manipulation of the page attributes.
-- label : the name for the reserved partition, if omitted, the label
- is taken from the node name excluding the unit address.
-- clocks : a list of phandle and clock specifier pair that controls the
- single SRAM clock.
-
-Example:
-
-sram: sram@5c000000 {
- compatible = "mmio-sram";
- reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
-
- #address-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/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
new file mode 100644
index 000000000000..a1c1ec2183f2
--- /dev/null
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic on-chip SRAM
+
+maintainers:
+ - Rob Herring <[email protected]>
+
+description: |+
+ Simple IO memory regions to be managed by the genalloc API.
+
+ 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.
+
+properties:
+ $nodename:
+ pattern: "^sram(@.*)?"
+
+ compatible:
+ contains:
+ enum:
+ - mmio-sram
+ - atmel,sama5d2-securam
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ ranges:
+ description:
+ Should translate from local addresses within the sram to bus addresses.
+
+ no-memory-wc:
+ description:
+ The flag indicating, that SRAM memory region has not to be remapped
+ as write combining. WC is used by default.
+ type: boolean
+
+patternProperties:
+ "^([a-z]*-)?sram@[a-f0-9]$":
+ type: object
+ description:
+ Each child of the sram node specifies a region of reserved memory.
+ properties:
+ reg:
+ description:
+ IO mem address range, relative to the SRAM range.
+ maxItems: 1
+
+ compatible:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Should contain a vendor specific string in the form
+ <vendor>,[<device>-]<usage>
+
+ pool:
+ description:
+ Indicates that the particular reserved SRAM area is addressable
+ and in use by another device or devices.
+ type: boolean
+
+ export:
+ description:
+ Indicates that the reserved SRAM area may be accessed outside
+ of the kernel, e.g. by bootloader or userspace.
+ type: boolean
+
+ protect-exec:
+ description: |
+ Same as 'pool' above but with the additional constraint that code
+ will be run from the region and that the memory is maintained as
+ read-only, executable during code execution. NOTE: This region must
+ be page aligned on start and end in order to properly allow
+ manipulation of the page attributes.
+ type: boolean
+
+ label:
+ description:
+ The name for the reserved partition, if omitted, the label is taken
+ from the node name excluding the unit address.
+
+ clocks:
+ description:
+ A list of phandle and clock specifier pair that controls the
+ single SRAM clock.
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+ - ranges
+
+examples:
+ - |
+ sram: sram@5c000000 {
+ compatible = "mmio-sram";
+ reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
+
+ #address-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;
+ };
+ };
--
2.17.1


2019-10-02 16:44:46

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 02/10] dt-bindings: sram: Convert Samsung Exynos SYSRAM bindings to json-schema

Convert Samsung Exynos SYSRAM bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Changes since v2:
1. Use sram as name of node in example.

Changes since v1:
1. Indent example with four spaces (more readable).
---
.../devicetree/bindings/sram/samsung-sram.txt | 38 ------------
.../bindings/sram/samsung-sram.yaml | 58 +++++++++++++++++++
MAINTAINERS | 2 +-
3 files changed, 59 insertions(+), 39 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.txt
create mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.yaml

diff --git a/Documentation/devicetree/bindings/sram/samsung-sram.txt b/Documentation/devicetree/bindings/sram/samsung-sram.txt
deleted file mode 100644
index 61a9bbed303d..000000000000
--- a/Documentation/devicetree/bindings/sram/samsung-sram.txt
+++ /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 Documentation/devicetree/bindings/sram/sram.txt
-
-Example:
-
- sysram@2020000 {
- 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/samsung-sram.yaml b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
new file mode 100644
index 000000000000..3e77c434ecca
--- /dev/null
+++ b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/samsung-sram.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos SoC SYSRAM for SMP bringup
+
+maintainers:
+ - Krzysztof Kozlowski <[email protected]>
+
+description: |+
+ 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.
+
+allOf:
+ - $ref: "sram.yaml#"
+
+properties:
+ $nodename:
+ pattern: "^sysram(@.*)?"
+
+patternProperties:
+ "^([a-z]*-)?sysram@[a-f0-9]$":
+ type: object
+
+ properties:
+ compatible:
+ description:
+ Depending upon boot mode
+ enum:
+ - samsung,exynos4210-sysram # for Secure SYSRAM
+ - samsung,exynos4210-sysram-ns # for Non-secure SYSRAM
+
+examples:
+ - |
+ sram@2020000 {
+ 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/MAINTAINERS b/MAINTAINERS
index b26b2009c230..53b426e27f30 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2235,7 +2235,7 @@ F: drivers/soc/samsung/
F: include/linux/soc/samsung/
F: Documentation/arm/samsung/
F: Documentation/devicetree/bindings/arm/samsung/
-F: Documentation/devicetree/bindings/sram/samsung-sram.txt
+F: Documentation/devicetree/bindings/sram/samsung-sram.yaml
F: Documentation/devicetree/bindings/power/pd-samsung.txt
N: exynos

--
2.17.1

2019-10-02 16:44:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 03/10] ARM: dts: exynos: Rename SysRAM node to "sram"

The device node name should reflect generic class of a device so rename
the SysRAM node from "sysram" to "sram". The child nodes stay as before
as "smp-sysram" to match their real purpose. This will be also in sync
with upcoming DT schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/exynos3250.dtsi | 2 +-
arch/arm/boot/dts/exynos4210.dtsi | 2 +-
arch/arm/boot/dts/exynos4412.dtsi | 2 +-
arch/arm/boot/dts/exynos5250.dtsi | 2 +-
arch/arm/boot/dts/exynos54xx.dtsi | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index d122fb52d3d4..cf422b48cb15 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -138,7 +138,7 @@
#size-cells = <1>;
ranges;

- sysram@2020000 {
+ sram@2020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x40000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index 298b8ddc0545..554819ae1446 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -72,7 +72,7 @@
};

soc: soc {
- sysram: sysram@2020000 {
+ sysram: sram@2020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x20000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index 6cf0e259fb39..5022aa574b26 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -188,7 +188,7 @@
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
};

- sysram@2020000 {
+ sram@2020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x40000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index f01e3156191d..2780bf5c83c8 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -164,7 +164,7 @@
};

soc: soc {
- sysram@2020000 {
+ sram@2020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x30000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 06ae40a2f1e9..dff9ef3ad0ef 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -46,7 +46,7 @@
};

soc: soc {
- sysram@2020000 {
+ sram@2020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x54000>;
#address-cells = <1>;
--
2.17.1

2019-10-02 16:45:06

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 04/10] arm64: dts: tegra: Rename sysram node to "sram"

The device node name should reflect generic class of a device so rename
the "sysram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/nvidia/tegra186.dtsi | 2 +-
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
index 47cd831fcf44..90a3a5978369 100644
--- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
@@ -1174,7 +1174,7 @@
power-domains = <&bpmp TEGRA186_POWER_DOMAIN_GPU>;
};

- sysram@30000000 {
+ sram@30000000 {
compatible = "nvidia,tegra186-sysram", "mmio-sram";
reg = <0x0 0x30000000 0x0 0x50000>;
#address-cells = <2>;
diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
index 3c0cf54f0aab..29118ca417e5 100644
--- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
@@ -1430,7 +1430,7 @@
0x82000000 0x0 0x40000000 0x1f 0x40000000 0x0 0xc0000000>; /* non-prefetchable memory (3GB) */
};

- sysram@40000000 {
+ sram@40000000 {
compatible = "nvidia,tegra194-sysram", "mmio-sram";
reg = <0x0 0x40000000 0x0 0x50000>;
#address-cells = <1>;
--
2.17.1

2019-10-02 16:45:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 05/10] ARM: dts: dove: Rename "sa-sram" node to "sram"

The device node name should reflect generic class of a device so rename
the "sa-sram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/dove.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 2e8a3977219f..3081b04e8c08 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -784,7 +784,7 @@
status = "disabled";
};

- crypto_sram: sa-sram@ffffe000 {
+ crypto_sram: sram@ffffe000 {
compatible = "mmio-sram";
reg = <0xffffe000 0x800>;
clocks = <&gate_clk 15>;
--
2.17.1

2019-10-02 16:45:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 06/10] ARM: dts: imx: Rename "iram" node to "sram"

The device node name should reflect generic class of a device so rename
the "iram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/imx27.dtsi | 2 +-
arch/arm/boot/dts/imx31.dtsi | 2 +-
arch/arm/boot/dts/imx51.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 3652f5556b29..f3464cf52e49 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -585,7 +585,7 @@
status = "disabled";
};

- iram: iram@ffff4c00 {
+ iram: sram@ffff4c00 {
compatible = "mmio-sram";
reg = <0xffff4c00 0xb400>;
};
diff --git a/arch/arm/boot/dts/imx31.dtsi b/arch/arm/boot/dts/imx31.dtsi
index d7f6fb764997..6b62f0745b82 100644
--- a/arch/arm/boot/dts/imx31.dtsi
+++ b/arch/arm/boot/dts/imx31.dtsi
@@ -55,7 +55,7 @@
interrupt-parent = <&avic>;
ranges;

- iram: iram@1fffc000 {
+ iram: sram@1fffc000 {
compatible = "mmio-sram";
reg = <0x1fffc000 0x4000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 0a4b9a5d9a9c..dea86b98e9c3 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -116,7 +116,7 @@
interrupt-parent = <&tzic>;
ranges;

- iram: iram@1ffe0000 {
+ iram: sram@1ffe0000 {
compatible = "mmio-sram";
reg = <0x1ffe0000 0x20000>;
};
--
2.17.1

2019-10-02 16:45:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 07/10] ARM: dts: keystone: Rename "msmram" node to "sram"

The device node name should reflect generic class of a device so rename
the "msmram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/keystone-k2e.dtsi | 2 +-
arch/arm/boot/dts/keystone-k2g.dtsi | 2 +-
arch/arm/boot/dts/keystone-k2hk.dtsi | 2 +-
arch/arm/boot/dts/keystone-k2l.dtsi | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/keystone-k2e.dtsi b/arch/arm/boot/dts/keystone-k2e.dtsi
index 085e7326ea8e..c84dc49e441e 100644
--- a/arch/arm/boot/dts/keystone-k2e.dtsi
+++ b/arch/arm/boot/dts/keystone-k2e.dtsi
@@ -86,7 +86,7 @@
};
};

- msm_ram: msmram@c000000 {
+ msm_ram: sram@c000000 {
compatible = "mmio-sram";
reg = <0x0c000000 0x200000>;
ranges = <0x0 0x0c000000 0x200000>;
diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi
index 1c833105d6c5..fa6be1b2cb8a 100644
--- a/arch/arm/boot/dts/keystone-k2g.dtsi
+++ b/arch/arm/boot/dts/keystone-k2g.dtsi
@@ -95,7 +95,7 @@
ranges = <0x0 0x0 0x0 0xc0000000>;
dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;

- msm_ram: msmram@c000000 {
+ msm_ram: sram@c000000 {
compatible = "mmio-sram";
reg = <0x0c000000 0x100000>;
ranges = <0x0 0x0c000000 0x100000>;
diff --git a/arch/arm/boot/dts/keystone-k2hk.dtsi b/arch/arm/boot/dts/keystone-k2hk.dtsi
index ca0f198ba627..2c00f11cd146 100644
--- a/arch/arm/boot/dts/keystone-k2hk.dtsi
+++ b/arch/arm/boot/dts/keystone-k2hk.dtsi
@@ -57,7 +57,7 @@
&soc0 {
/include/ "keystone-k2hk-clocks.dtsi"

- msm_ram: msmram@c000000 {
+ msm_ram: sram@c000000 {
compatible = "mmio-sram";
reg = <0x0c000000 0x600000>;
ranges = <0x0 0x0c000000 0x600000>;
diff --git a/arch/arm/boot/dts/keystone-k2l.dtsi b/arch/arm/boot/dts/keystone-k2l.dtsi
index 374c80124c4e..ff086132576b 100644
--- a/arch/arm/boot/dts/keystone-k2l.dtsi
+++ b/arch/arm/boot/dts/keystone-k2l.dtsi
@@ -255,7 +255,7 @@
};
};

- msm_ram: msmram@c000000 {
+ msm_ram: sram@c000000 {
compatible = "mmio-sram";
reg = <0x0c000000 0x200000>;
ranges = <0x0 0x0c000000 0x200000>;
--
2.17.1

2019-10-02 16:46:42

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 10/10] ARM: dts: omap: Rename "ocmcram" node to "sram"

The device node name should reflect generic class of a device so rename
the "ocmcram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/omap4.dtsi | 2 +-
arch/arm/boot/dts/omap5.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 7cc95bc1598b..413304540f8b 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -148,7 +148,7 @@
l4_abe: interconnect@40100000 {
};

- ocmcram: ocmcram@40304000 {
+ ocmcram: sram@40304000 {
compatible = "mmio-sram";
reg = <0x40304000 0xa000>; /* 40k */
};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 1fb7937638f0..9f1621f554d7 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -162,7 +162,7 @@
l4_abe: interconnect@40100000 {
};

- ocmcram: ocmcram@40300000 {
+ ocmcram: sram@40300000 {
compatible = "mmio-sram";
reg = <0x40300000 0x20000>; /* 128k */
};
--
2.17.1

2019-10-02 16:47:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 08/10] ARM: dts: tegra: Rename "iram" node to "sram"

The device node name should reflect generic class of a device so rename
the "iram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/tegra20.dtsi | 2 +-
arch/arm/boot/dts/tegra30.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 8c942e60703e..a7cf42cde13e 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -16,7 +16,7 @@
reg = <0 0>;
};

- iram@40000000 {
+ sram@40000000 {
compatible = "mmio-sram";
reg = <0x40000000 0x40000>;
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index e074258d4518..55860a46f2b4 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -96,7 +96,7 @@
};
};

- iram@40000000 {
+ sram@40000000 {
compatible = "mmio-sram";
reg = <0x40000000 0x40000>;
#address-cells = <1>;
--
2.17.1

2019-10-02 16:47:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 09/10] ARM: dts: am: Rename "ocmcram" node to "sram"

The device node name should reflect generic class of a device so rename
the "ocmcram" node to "sram". This will be also in sync with upcoming DT
schema. No functional change.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/am33xx.dtsi | 2 +-
arch/arm/boot/dts/am4372.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index fb6b8aa12cc5..3e37ae7241a4 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -393,7 +393,7 @@
};
};

- ocmcram: ocmcram@40300000 {
+ ocmcram: sram@40300000 {
compatible = "mmio-sram";
reg = <0x40300000 0x10000>; /* 64k */
ranges = <0x0 0x40300000 0x10000>;
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 848e2a8884e2..d7775aed7483 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -349,7 +349,7 @@
};
};

- ocmcram: ocmcram@40300000 {
+ ocmcram: sram@40300000 {
compatible = "mmio-sram";
reg = <0x40300000 0x40000>; /* 256k */
ranges = <0x0 0x40300000 0x40000>;
--
2.17.1

2019-10-06 15:52:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 03/10] ARM: dts: exynos: Rename SysRAM node to "sram"

On Wed, Oct 02, 2019 at 06:43:09PM +0200, Krzysztof Kozlowski wrote:
> The device node name should reflect generic class of a device so rename
> the SysRAM node from "sysram" to "sram". The child nodes stay as before
> as "smp-sysram" to match their real purpose. This will be also in sync
> with upcoming DT schema. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/exynos3250.dtsi | 2 +-
> arch/arm/boot/dts/exynos4210.dtsi | 2 +-
> arch/arm/boot/dts/exynos4412.dtsi | 2 +-
> arch/arm/boot/dts/exynos5250.dtsi | 2 +-
> arch/arm/boot/dts/exynos54xx.dtsi | 2 +-

Applied this one to samsung-soc.

Best regards,
Krzysztof

2019-10-08 09:46:00

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH v3 05/10] ARM: dts: dove: Rename "sa-sram" node to "sram"

Hi Krzysztof Kozlowski,

> The device node name should reflect generic class of a device so rename
> the "sa-sram" node to "sram". This will be also in sync with upcoming DT
> schema. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied on mvebu/dt

Thanks,

Gregory

> ---
> arch/arm/boot/dts/dove.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
> index 2e8a3977219f..3081b04e8c08 100644
> --- a/arch/arm/boot/dts/dove.dtsi
> +++ b/arch/arm/boot/dts/dove.dtsi
> @@ -784,7 +784,7 @@
> status = "disabled";
> };
>
> - crypto_sram: sa-sram@ffffe000 {
> + crypto_sram: sram@ffffe000 {
> compatible = "mmio-sram";
> reg = <0xffffe000 0x800>;
> clocks = <&gate_clk 15>;
> --
> 2.17.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

2019-10-10 19:13:29

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3 01/10] dt-bindings: sram: Convert SRAM bindings to json-schema

On Wed, Oct 02, 2019 at 06:43:07PM +0200, Krzysztof Kozlowski wrote:
> Convert generic mmio-sram bindings to DT schema format using
> json-schema. Require the address/size cells to be 1, not equal to root
> node.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Changes since v2:
> 1. Add Rob as maintainer,
> 2. Use "contains" for compatible,
> 3. Fix address and size cells to 1,
> 4. Add maxitems to reg under children,
> 5. Remove unneeded string type from label.
>
> Changes since v1:
> 1. Indent example with four spaces (more readable).
> ---
> .../devicetree/bindings/sram/sram.txt | 80 -----------
> .../devicetree/bindings/sram/sram.yaml | 134 ++++++++++++++++++
> 2 files changed, 134 insertions(+), 80 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sram/sram.txt
> create mode 100644 Documentation/devicetree/bindings/sram/sram.yaml


> diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
> new file mode 100644
> index 000000000000..a1c1ec2183f2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sram/sram.yaml
> @@ -0,0 +1,134 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sram/sram.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic on-chip SRAM
> +
> +maintainers:
> + - Rob Herring <[email protected]>
> +
> +description: |+
> + Simple IO memory regions to be managed by the genalloc API.
> +
> + 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.
> +
> +properties:
> + $nodename:
> + pattern: "^sram(@.*)?"
> +
> + compatible:
> + contains:
> + enum:
> + - mmio-sram
> + - atmel,sama5d2-securam
> +
> + reg:
> + maxItems: 1
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 1
> +
> + ranges:
> + description:
> + Should translate from local addresses within the sram to bus addresses.
> +
> + no-memory-wc:
> + description:
> + The flag indicating, that SRAM memory region has not to be remapped
> + as write combining. WC is used by default.
> + type: boolean
> +
> +patternProperties:
> + "^([a-z]*-)?sram@[a-f0-9]$":
> + type: object
> + description:
> + Each child of the sram node specifies a region of reserved memory.
> + properties:
> + reg:
> + description:
> + IO mem address range, relative to the SRAM range.
> + maxItems: 1
> +
> + compatible:
> + $ref: /schemas/types.yaml#/definitions/string

No need to define the type again. We can say 'maxItems: 1' if we really
want to force it to 1 entry.

> + description:
> + Should contain a vendor specific string in the form
> + <vendor>,[<device>-]<usage>
> +
> + pool:
> + description:
> + Indicates that the particular reserved SRAM area is addressable
> + and in use by another device or devices.
> + type: boolean
> +
> + export:
> + description:
> + Indicates that the reserved SRAM area may be accessed outside
> + of the kernel, e.g. by bootloader or userspace.
> + type: boolean
> +
> + protect-exec:
> + description: |
> + Same as 'pool' above but with the additional constraint that code
> + will be run from the region and that the memory is maintained as
> + read-only, executable during code execution. NOTE: This region must
> + be page aligned on start and end in order to properly allow
> + manipulation of the page attributes.
> + type: boolean
> +
> + label:
> + description:
> + The name for the reserved partition, if omitted, the label is taken
> + from the node name excluding the unit address.
> +
> + clocks:

Shouldn't this be up one level? Looks like this is the only case
(Marvell and i.MX are the only ones I see with clocks).

> + description:
> + A list of phandle and clock specifier pair that controls the
> + single SRAM clock.

maxItems: 1

> +
> + required:
> + - reg
> +
> +required:
> + - compatible
> + - reg
> + - "#address-cells"
> + - "#size-cells"
> + - ranges

Does 'additionalProperties' work here and/or in the child node? I guess
not if we keep some node names.

> +
> +examples:
> + - |
> + sram: sram@5c000000 {
> + compatible = "mmio-sram";
> + reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
> +
> + #address-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 {

This one doesn't match the pattern. That's fine I guess for dts files,
but examples should be good examples.

> + reg = <0x20000 0x20000>;
> + export;
> + };
> + };
> --
> 2.17.1
>

2019-10-10 19:34:46

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3 02/10] dt-bindings: sram: Convert Samsung Exynos SYSRAM bindings to json-schema

On Wed, Oct 02, 2019 at 06:43:08PM +0200, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos SYSRAM bindings to DT schema format using
> json-schema.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Changes since v2:
> 1. Use sram as name of node in example.
>
> Changes since v1:
> 1. Indent example with four spaces (more readable).
> ---
> .../devicetree/bindings/sram/samsung-sram.txt | 38 ------------
> .../bindings/sram/samsung-sram.yaml | 58 +++++++++++++++++++
> MAINTAINERS | 2 +-
> 3 files changed, 59 insertions(+), 39 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.txt
> create mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.yaml


> diff --git a/Documentation/devicetree/bindings/sram/samsung-sram.yaml b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
> new file mode 100644
> index 000000000000..3e77c434ecca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sram/samsung-sram.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung Exynos SoC SYSRAM for SMP bringup
> +
> +maintainers:
> + - Krzysztof Kozlowski <[email protected]>
> +
> +description: |+
> + 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.
> +
> +allOf:
> + - $ref: "sram.yaml#"
> +
> +properties:
> + $nodename:
> + pattern: "^sysram(@.*)?"

As you are renaming all the node names, this will no longer work. If you
change it to 'sram', that's going to match others, but would still work
as long as the child node names are unique to Samsung. If you change
them to '*-sram' then, you'd have to come up with something else. That
probably means using 'compatible' strings. At that point, it's kind of
silly to just be validating what your are using to select the schema. It
may be better to just add the compatible strings into sram.yaml if
that's the only difference.

> +
> +patternProperties:
> + "^([a-z]*-)?sysram@[a-f0-9]$":
> + type: object
> +
> + properties:
> + compatible:
> + description:
> + Depending upon boot mode
> + enum:
> + - samsung,exynos4210-sysram # for Secure SYSRAM
> + - samsung,exynos4210-sysram-ns # for Non-secure SYSRAM
> +

2019-10-11 07:55:41

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 02/10] dt-bindings: sram: Convert Samsung Exynos SYSRAM bindings to json-schema

On Thu, Oct 10, 2019 at 02:33:56PM -0500, Rob Herring wrote:
> On Wed, Oct 02, 2019 at 06:43:08PM +0200, Krzysztof Kozlowski wrote:
> > Convert Samsung Exynos SYSRAM bindings to DT schema format using
> > json-schema.
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> >
> > ---
> >
> > Changes since v2:
> > 1. Use sram as name of node in example.
> >
> > Changes since v1:
> > 1. Indent example with four spaces (more readable).
> > ---
> > .../devicetree/bindings/sram/samsung-sram.txt | 38 ------------
> > .../bindings/sram/samsung-sram.yaml | 58 +++++++++++++++++++
> > MAINTAINERS | 2 +-
> > 3 files changed, 59 insertions(+), 39 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.txt
> > create mode 100644 Documentation/devicetree/bindings/sram/samsung-sram.yaml
>
>
> > diff --git a/Documentation/devicetree/bindings/sram/samsung-sram.yaml b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
> > new file mode 100644
> > index 000000000000..3e77c434ecca
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sram/samsung-sram.yaml
> > @@ -0,0 +1,58 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sram/samsung-sram.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung Exynos SoC SYSRAM for SMP bringup
> > +
> > +maintainers:
> > + - Krzysztof Kozlowski <[email protected]>
> > +
> > +description: |+
> > + 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.
> > +
> > +allOf:
> > + - $ref: "sram.yaml#"
> > +
> > +properties:
> > + $nodename:
> > + pattern: "^sysram(@.*)?"
>
> As you are renaming all the node names, this will no longer work. If you
> change it to 'sram', that's going to match others, but would still work
> as long as the child node names are unique to Samsung. If you change
> them to '*-sram' then, you'd have to come up with something else. That
> probably means using 'compatible' strings. At that point, it's kind of
> silly to just be validating what your are using to select the schema. It
> may be better to just add the compatible strings into sram.yaml if
> that's the only difference.

You're right. I'll move them to sram.yaml and maybe add also example.


Best regards,
Krzysztof

2019-10-14 11:35:21

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v3 06/10] ARM: dts: imx: Rename "iram" node to "sram"

On Wed, Oct 02, 2019 at 06:43:12PM +0200, Krzysztof Kozlowski wrote:
> The device node name should reflect generic class of a device so rename
> the "iram" node to "sram". This will be also in sync with upcoming DT
> schema. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Acked-by: Shawn Guo <[email protected]>

Let me know if you want it go through IMX tree.

Shawn

2019-10-17 11:07:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 06/10] ARM: dts: imx: Rename "iram" node to "sram"

On Mon, 14 Oct 2019 at 14:33, Shawn Guo <[email protected]> wrote:
>
> On Wed, Oct 02, 2019 at 06:43:12PM +0200, Krzysztof Kozlowski wrote:
> > The device node name should reflect generic class of a device so rename
> > the "iram" node to "sram". This will be also in sync with upcoming DT
> > schema. No functional change.
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> Acked-by: Shawn Guo <[email protected]>
>
> Let me know if you want it go through IMX tree.

Yes please, I think each of these should go through soc maintainers.

Best regards,
Krzysztof

2019-10-21 13:26:19

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 01/10] dt-bindings: sram: Convert SRAM bindings to json-schema

On Thu, Oct 10, 2019 at 02:12:40PM -0500, Rob Herring wrote:
> On Wed, Oct 02, 2019 at 06:43:07PM +0200, Krzysztof Kozlowski wrote:
> > Convert generic mmio-sram bindings to DT schema format using
> > json-schema. Require the address/size cells to be 1, not equal to root
> > node.
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> >
> > ---
> >
> > Changes since v2:
> > 1. Add Rob as maintainer,
> > 2. Use "contains" for compatible,
> > 3. Fix address and size cells to 1,
> > 4. Add maxitems to reg under children,
> > 5. Remove unneeded string type from label.
> >
> > Changes since v1:
> > 1. Indent example with four spaces (more readable).
> > ---
> > .../devicetree/bindings/sram/sram.txt | 80 -----------
> > .../devicetree/bindings/sram/sram.yaml | 134 ++++++++++++++++++
> > 2 files changed, 134 insertions(+), 80 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/sram/sram.txt
> > create mode 100644 Documentation/devicetree/bindings/sram/sram.yaml
>
>
> > diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
> > new file mode 100644
> > index 000000000000..a1c1ec2183f2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sram/sram.yaml
> > @@ -0,0 +1,134 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sram/sram.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Generic on-chip SRAM
> > +
> > +maintainers:
> > + - Rob Herring <[email protected]>
> > +
> > +description: |+
> > + Simple IO memory regions to be managed by the genalloc API.
> > +
> > + 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.
> > +
> > +properties:
> > + $nodename:
> > + pattern: "^sram(@.*)?"
> > +
> > + compatible:
> > + contains:
> > + enum:
> > + - mmio-sram
> > + - atmel,sama5d2-securam
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 1
> > +
> > + ranges:
> > + description:
> > + Should translate from local addresses within the sram to bus addresses.
> > +
> > + no-memory-wc:
> > + description:
> > + The flag indicating, that SRAM memory region has not to be remapped
> > + as write combining. WC is used by default.
> > + type: boolean
> > +
> > +patternProperties:
> > + "^([a-z]*-)?sram@[a-f0-9]$":
> > + type: object
> > + description:
> > + Each child of the sram node specifies a region of reserved memory.
> > + properties:
> > + reg:
> > + description:
> > + IO mem address range, relative to the SRAM range.
> > + maxItems: 1
> > +
> > + compatible:
> > + $ref: /schemas/types.yaml#/definitions/string
>
> No need to define the type again. We can say 'maxItems: 1' if we really
> want to force it to 1 entry.

I'll fix it and integrate Samsung compatibles here.

>
> > + description:
> > + Should contain a vendor specific string in the form
> > + <vendor>,[<device>-]<usage>
> > +
> > + pool:
> > + description:
> > + Indicates that the particular reserved SRAM area is addressable
> > + and in use by another device or devices.
> > + type: boolean
> > +
> > + export:
> > + description:
> > + Indicates that the reserved SRAM area may be accessed outside
> > + of the kernel, e.g. by bootloader or userspace.
> > + type: boolean
> > +
> > + protect-exec:
> > + description: |
> > + Same as 'pool' above but with the additional constraint that code
> > + will be run from the region and that the memory is maintained as
> > + read-only, executable during code execution. NOTE: This region must
> > + be page aligned on start and end in order to properly allow
> > + manipulation of the page attributes.
> > + type: boolean
> > +
> > + label:
> > + description:
> > + The name for the reserved partition, if omitted, the label is taken
> > + from the node name excluding the unit address.
> > +
> > + clocks:
>
> Shouldn't this be up one level? Looks like this is the only case
> (Marvell and i.MX are the only ones I see with clocks).

Yes, that's a mistake in original bindings.

>
> > + description:
> > + A list of phandle and clock specifier pair that controls the
> > + single SRAM clock.
>
> maxItems: 1

Yes.

>
> > +
> > + required:
> > + - reg
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - "#address-cells"
> > + - "#size-cells"
> > + - ranges
>
> Does 'additionalProperties' work here and/or in the child node? I guess
> not if we keep some node names.

It seems that it works.

>
> > +
> > +examples:
> > + - |
> > + sram: sram@5c000000 {
> > + compatible = "mmio-sram";
> > + reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
> > +
> > + #address-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 {
>
> This one doesn't match the pattern. That's fine I guess for dts files,
> but examples should be good examples.

Sure.

Best regards,
Krzysztof

>
> > + reg = <0x20000 0x20000>;
> > + export;
> > + };
> > + };
> > --
> > 2.17.1
> >

2019-10-22 17:19:33

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH v3 10/10] ARM: dts: omap: Rename "ocmcram" node to "sram"

* Krzysztof Kozlowski <[email protected]> [191002 09:45]:
> The device node name should reflect generic class of a device so rename
> the "ocmcram" node to "sram". This will be also in sync with upcoming DT
> schema. No functional change.

Applying this into omap-for-v5.5/dt thanks.

Tony

2019-10-25 19:21:59

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v3 06/10] ARM: dts: imx: Rename "iram" node to "sram"

On Wed, Oct 02, 2019 at 06:43:12PM +0200, Krzysztof Kozlowski wrote:
> The device node name should reflect generic class of a device so rename
> the "iram" node to "sram". This will be also in sync with upcoming DT
> schema. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied, thanks.