ARM: shmobile: Add DT support for memory controllers
Subsystems (3)
cover ARM: shmobile: Add DT support for memory controllers
Hi Simon, Magnus,
This patch series adds DT binding documentation and devices nodes to describe memory-controllers in R-Mobile and SH-Mobile SoCs.
Currently memory controller device nodes are used only to reference PM domains, and prevent these PM domains from being powered down, which would crash the system.
As such this series is a prerequisite for adding DT PM domain support to sh73a0 (SH-Mobile AG5) and r7a73a4 (R-Mobile APE6).
For r8a7740 (R-Mobile A1), this wasn't a hard prerequisite for PM domain support, as the A4S PM domain is never turned off anyway because its child PM domain A3SM contains the CPU core.
The patches for sh73a0 and r8a7740 have been sent before as part of (patches in) the series "[PATCH RFC 0/7] ARM: shmobile: sh73a0: DT PM domain support" (https://lkml.org/lkml/2014/11/19/404).
"ARM: shmobile: r8a7740 dtsi: Add memory-controller node" depends on the DT R-Mobile PM Domain support for r8a7740 that's queued up in Simon's tree under tag renesas-dt-pm-for-v3.20, as the memory-controller node already contains a power-domains property.
The two other dtsi patches do not add power-domains properties yet. These will be added when adding PM domain support for sh73a0 resp. r8a73a4.
Thanks!
Geert Uytterhoeven (4):
ARM: shmobile: Add DT bindings for Renesas memory controllers
ARM: shmobile: r8a73a4 dtsi: Add memory-controller nodes
ARM: shmobile: r8a7740 dtsi: Add memory-controller node
ARM: shmobile: sh73a0 dtsi: Add memory-controller nodes
.../renesas-memory-controllers.txt | 44 ++++++++++++++++++++++ arch/arm/boot/dts/r8a73a4.dtsi | 10 +++++ arch/arm/boot/dts/r8a7740.dtsi | 6 +++ arch/arm/boot/dts/sh73a0.dtsi | 16 ++++++++ 4 files changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
Signature · 12 lines
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/4 ARM: shmobile: Add DT bindings for Renesas memory controllers
Add DT bindings for Renesas R-Mobile and SH-Mobile memory controllers. Currently memory controller device nodes are used only to reference PM domains, and prevent these PM domains from being powered down, which would crash the system.
--- .../renesas-memory-controllers.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt new file +44 -0
@@ -0,0 +1,44 @@ +DT bindings for Renesas R-Mobile and SH-Mobile memory controllers +================================================================= + +Renesas R-Mobile and SH-Mobile SoCs contain one or more memory controllers. +These memory controllers differ from one SoC variant to another, and are called +by different names ("DDR Bus Controller (DBSC)", "DDR3 Bus State Controller +(DBSC3)", "SDRAM Bus State Controller (SBSC)"). + +Currently memory controller device nodes are used only to reference PM +domains, and prevent these PM domains from being powered down, which would +crash the system. + +As there exist no actual drivers for these controllers yet, these bindings +should be considered EXPERIMENTAL for now. + +Required properties: + - compatible: Must be one of the following SoC-specific values: + - "renesas,dbsc-r8a73a4" (R-Mobile APE6) + - "renesas,dbsc3-r8a7740" (R-Mobile A1) + - "renesas,sbsc-sh73a0" (SH-Mobile AG5) + - reg: Must contain the base address and length of the memory controller's + registers. + +Optional properties: + - interrupts: Must contain a list of interrupt specifiers for memory + controller interrupts, if available. + - interrupts-names: Must contain a list of interrupt names corresponding to + the interrupts in the interrupts property, if available. + Valid interrupt names are: + - "sec" (secure interrupt) + - "temp" (normal (temperature) interrupt) + - power-domains: Must contain a reference to the PM domain that the memory + controller belongs to, if available. + +Example: + + sbsc1: memory-controller at fe400000 { + compatible = "renesas,sbsc-sh73a0"; + reg = <0xfe400000 0x400>; + interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>, + <0 36 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "sec", "temp"; + power-domains = <&pd_a4bc0>; + };
Signature · 1 line
1.9.1
PATCH 2/4 ARM: shmobile: r8a73a4 dtsi: Add memory-controller nodes
In reply to Geert UytterhoevenAdd device nodes for the two DDR Bus State Controllers (DBSC). The DBSCs are located in the A3BC PM domain, which must not be powered down, else the system will crash.
A reference to the A3BC PM domain will be added later.
--- arch/arm/boot/dts/r8a73a4.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi +10 -0
@@ -38,6 +38,16 @@ <1 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; }; + dbsc1: memory-controller at e6790000 { + compatible = "renesas,dbsc-r8a73a4"; + reg = <0 0xe6790000 0 0x10000>; + }; + + dbsc2: memory-controller at e67a0000 { + compatible = "renesas,dbsc-r8a73a4"; + reg = <0 0xe67a0000 0 0x10000>; + }; + dmac: dma-multiplexer { compatible = "renesas,shdma-mux"; #dma-cells = <1>;
Signature · 1 line
1.9.1
PATCH 3/4 ARM: shmobile: r8a7740 dtsi: Add memory-controller node
In reply to Geert UytterhoevenAdd a device node for the DDR3 Bus State Controller (DBSC3). The DBSC3 is located in the A4S PM domain, which must not be powered down, else the system will crash.
This has no visible effect for now, as A4S was never turned off anyway because its child PM domain A3SM contains the CPU core.
--- arch/arm/boot/dts/r8a7740.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/r8a7740.dtsi +6 -0
@@ -37,6 +37,12 @@ <0xc2000000 0x1000>; }; + dbsc3: memory-controller at fe400000 { + compatible = "renesas,dbsc3-r8a7740"; + reg = <0xfe400000 0x400>; + power-domains = <&pd_a4s>; + }; + pmu { compatible = "arm,cortex-a9-pmu"; interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
1.9.1
PATCH 4/4 ARM: shmobile: sh73a0 dtsi: Add memory-controller nodes
In reply to Geert UytterhoevenAdd device nodes for the two SDRAM Bus State Controllers. The SBSCs are located in the A4BC0 resp. A4BC1 PM domains, which must not be powered down, else the system will crash.
References to the A4BC0 and A4BC1 PM domains will be added later.
--- arch/arm/boot/dts/sh73a0.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/sh73a0.dtsi +16 -0
@@ -43,6 +43,22 @@ <0xf0000100 0x100>; }; + sbsc2: memory-controller at fb400000 { + compatible = "renesas,sbsc-sh73a0"; + reg = <0xfb400000 0x400>; + interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>, + <0 38 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "sec", "temp"; + }; + + sbsc1: memory-controller at fe400000 { + compatible = "renesas,sbsc-sh73a0"; + reg = <0xfe400000 0x400>; + interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>, + <0 36 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "sec", "temp"; + }; + pmu { compatible = "arm,cortex-a9-pmu"; interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
1.9.1
cover ARM: shmobile: Add DT support for memory controllers
In reply to Geert UytterhoevenQuoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series adds DT binding documentation and devices nodes to describe memory-controllers in R-Mobile and SH-Mobile SoCs.
Currently memory controller device nodes are used only to reference PM domains, and prevent these PM domains from being powered down, which would crash the system.
As such this series is a prerequisite for adding DT PM domain support to sh73a0 (SH-Mobile AG5) and r7a73a4 (R-Mobile APE6).
For r8a7740 (R-Mobile A1), this wasn't a hard prerequisite for PM domain support, as the A4S PM domain is never turned off anyway because its child PM domain A3SM contains the CPU core.The patches for sh73a0 and r8a7740 have been sent before as part of (patches in) the series "[PATCH RFC 0/7] ARM: shmobile: sh73a0: DT PM domain support" (https://lkml.org/lkml/2014/11/19/404).
"ARM: shmobile: r8a7740 dtsi: Add memory-controller node" depends on the DT R-Mobile PM Domain support for r8a7740 that's queued up in Simon's tree under tag renesas-dt-pm-for-v3.20, as the memory-controller node already contains a power-domains property.
Quoted 5 lines
The two other dtsi patches do not add power-domains properties yet. These will be added when adding PM domain support for sh73a0 resp. r8a73a4.
Thanks!
Thanks Geert, I have queued these up.