Geert Uytterhoeven | 3686d3e | 2015-10-12 11:05:24 +0200 | [diff] [blame] | 1 | * Renesas Clock Pulse Generator / Module Standby and Software Reset |
| 2 | |
| 3 | On Renesas ARM SoCs (SH/R-Mobile, R-Car, RZ), the CPG (Clock Pulse Generator) |
| 4 | and MSSR (Module Standby and Software Reset) blocks are intimately connected, |
| 5 | and share the same register block. |
| 6 | |
| 7 | They provide the following functionalities: |
| 8 | - The CPG block generates various core clocks, |
| 9 | - The MSSR block provides two functions: |
| 10 | 1. Module Standby, providing a Clock Domain to control the clock supply |
| 11 | to individual SoC devices, |
| 12 | 2. Reset Control, to perform a software reset of individual SoC devices. |
| 13 | |
| 14 | Required Properties: |
| 15 | - compatible: Must be one of: |
Sergei Shtylyov | c0b2d75 | 2016-11-09 00:21:50 +0300 | [diff] [blame^] | 16 | - "renesas,r8a7743-cpg-mssr" for the r8a7743 SoC (RZ/G1M) |
Geert Uytterhoeven | 1faf869 | 2016-05-03 09:37:08 +0200 | [diff] [blame] | 17 | - "renesas,r8a7795-cpg-mssr" for the r8a7795 SoC (R-Car H3) |
| 18 | - "renesas,r8a7796-cpg-mssr" for the r8a7796 SoC (R-Car M3-W) |
Geert Uytterhoeven | 3686d3e | 2015-10-12 11:05:24 +0200 | [diff] [blame] | 19 | |
| 20 | - reg: Base address and length of the memory resource used by the CPG/MSSR |
| 21 | block |
| 22 | |
| 23 | - clocks: References to external parent clocks, one entry for each entry in |
| 24 | clock-names |
| 25 | - clock-names: List of external parent clock names. Valid names are: |
Sergei Shtylyov | c0b2d75 | 2016-11-09 00:21:50 +0300 | [diff] [blame^] | 26 | - "extal" (r8a7743, r8a7795, r8a7796) |
Geert Uytterhoeven | 1faf869 | 2016-05-03 09:37:08 +0200 | [diff] [blame] | 27 | - "extalr" (r8a7795, r8a7796) |
Sergei Shtylyov | c0b2d75 | 2016-11-09 00:21:50 +0300 | [diff] [blame^] | 28 | - "usb_extal" (r8a7743) |
Geert Uytterhoeven | 3686d3e | 2015-10-12 11:05:24 +0200 | [diff] [blame] | 29 | |
| 30 | - #clock-cells: Must be 2 |
| 31 | - For CPG core clocks, the two clock specifier cells must be "CPG_CORE" |
| 32 | and a core clock reference, as defined in |
| 33 | <dt-bindings/clock/*-cpg-mssr.h>. |
| 34 | - For module clocks, the two clock specifier cells must be "CPG_MOD" and |
| 35 | a module number, as defined in the datasheet. |
| 36 | |
| 37 | - #power-domain-cells: Must be 0 |
| 38 | - SoC devices that are part of the CPG/MSSR Clock Domain and can be |
| 39 | power-managed through Module Standby should refer to the CPG device |
| 40 | node in their "power-domains" property, as documented by the generic PM |
| 41 | Domain bindings in |
| 42 | Documentation/devicetree/bindings/power/power_domain.txt. |
| 43 | |
| 44 | |
| 45 | Examples |
| 46 | -------- |
| 47 | |
| 48 | - CPG device node: |
| 49 | |
| 50 | cpg: clock-controller@e6150000 { |
| 51 | compatible = "renesas,r8a7795-cpg-mssr"; |
| 52 | reg = <0 0xe6150000 0 0x1000>; |
| 53 | clocks = <&extal_clk>, <&extalr_clk>; |
| 54 | clock-names = "extal", "extalr"; |
| 55 | #clock-cells = <2>; |
| 56 | #power-domain-cells = <0>; |
| 57 | }; |
| 58 | |
| 59 | |
| 60 | - CPG/MSSR Clock Domain member device node: |
| 61 | |
| 62 | scif2: serial@e6e88000 { |
| 63 | compatible = "renesas,scif-r8a7795", "renesas,scif"; |
| 64 | reg = <0 0xe6e88000 0 64>; |
| 65 | interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; |
| 66 | clocks = <&cpg CPG_MOD 310>; |
Geert Uytterhoeven | ca00c38 | 2015-10-20 10:21:49 +0200 | [diff] [blame] | 67 | clock-names = "fck"; |
Geert Uytterhoeven | 3686d3e | 2015-10-12 11:05:24 +0200 | [diff] [blame] | 68 | dmas = <&dmac1 0x13>, <&dmac1 0x12>; |
| 69 | dma-names = "tx", "rx"; |
| 70 | power-domains = <&cpg>; |
| 71 | status = "disabled"; |
| 72 | }; |