Commit 582271a3 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'renesas-dt4-for-v4.3' of...

Merge tag 'renesas-dt4-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Fourth Round of Renesas ARM Based SoC DT Updates for v4.3

* Enable Clock Domain support of the Clock Pulse Generator (CPG)
  Module Stop (MSTP) Clocks driver.

* tag 'renesas-dt4-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7794 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r8a7793 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r8a7791 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r8a7790 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r8a7779 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r8a7778 dtsi: Add CPG/MSTP Clock Domain
  ARM: shmobile: r7s72100 dtsi: Add CPG/MSTP Clock Domain
  clk: shmobile: rz: Add CPG/MSTP Clock Domain support
  clk: shmobile: rcar-gen2: Add CPG/MSTP Clock Domain support
  clk: shmobile: r8a7779: Add CPG/MSTP Clock Domain support
  clk: shmobile: r8a7778: Add CPG/MSTP Clock Domain support
  clk: shmobile: Add CPG/MSTP Clock Domain support
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 3cf6a067 60c0745a
* Renesas R8A7778 Clock Pulse Generator (CPG) * Renesas R8A7778 Clock Pulse Generator (CPG)
The CPG generates core clocks for the R8A7778. It includes two PLLs and The CPG generates core clocks for the R8A7778. It includes two PLLs and
several fixed ratio dividers several fixed ratio dividers.
The CPG also provides a Clock Domain for SoC devices, in combination with the
CPG Module Stop (MSTP) Clocks.
Required Properties: Required Properties:
...@@ -10,10 +12,18 @@ Required Properties: ...@@ -10,10 +12,18 @@ Required Properties:
- #clock-cells: Must be 1 - #clock-cells: Must be 1
- clock-output-names: The names of the clocks. Supported clocks are - clock-output-names: The names of the clocks. Supported clocks are
"plla", "pllb", "b", "out", "p", "s", and "s1". "plla", "pllb", "b", "out", "p", "s", and "s1".
- #power-domain-cells: Must be 0
SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
through an MSTP clock should refer to the CPG device node in their
"power-domains" property, as documented by the generic PM domain bindings in
Documentation/devicetree/bindings/power/power_domain.txt.
Example
------- Examples
--------
- CPG device node:
cpg_clocks: cpg_clocks@ffc80000 { cpg_clocks: cpg_clocks@ffc80000 {
compatible = "renesas,r8a7778-cpg-clocks"; compatible = "renesas,r8a7778-cpg-clocks";
...@@ -22,4 +32,17 @@ Example ...@@ -22,4 +32,17 @@ Example
clocks = <&extal_clk>; clocks = <&extal_clk>;
clock-output-names = "plla", "pllb", "b", clock-output-names = "plla", "pllb", "b",
"out", "p", "s", "s1"; "out", "p", "s", "s1";
#power-domain-cells = <0>;
};
- CPG/MSTP Clock Domain member device node:
sdhi0: sd@ffe4c000 {
compatible = "renesas,sdhi-r8a7778";
reg = <0xffe4c000 0x100>;
interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7778_CLK_SDHI0>;
power-domains = <&cpg_clocks>;
status = "disabled";
}; };
* Renesas R8A7779 Clock Pulse Generator (CPG) * Renesas R8A7779 Clock Pulse Generator (CPG)
The CPG generates core clocks for the R8A7779. It includes one PLL and The CPG generates core clocks for the R8A7779. It includes one PLL and
several fixed ratio dividers several fixed ratio dividers.
The CPG also provides a Clock Domain for SoC devices, in combination with the
CPG Module Stop (MSTP) Clocks.
Required Properties: Required Properties:
...@@ -12,16 +14,36 @@ Required Properties: ...@@ -12,16 +14,36 @@ Required Properties:
- #clock-cells: Must be 1 - #clock-cells: Must be 1
- clock-output-names: The names of the clocks. Supported clocks are "plla", - clock-output-names: The names of the clocks. Supported clocks are "plla",
"z", "zs", "s", "s1", "p", "b", "out". "z", "zs", "s", "s1", "p", "b", "out".
- #power-domain-cells: Must be 0
SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
through an MSTP clock should refer to the CPG device node in their
"power-domains" property, as documented by the generic PM domain bindings in
Documentation/devicetree/bindings/power/power_domain.txt.
Example
------- Examples
--------
- CPG device node:
cpg_clocks: cpg_clocks@ffc80000 { cpg_clocks: cpg_clocks@ffc80000 {
compatible = "renesas,r8a7779-cpg-clocks"; compatible = "renesas,r8a7779-cpg-clocks";
reg = <0 0xffc80000 0 0x30>; reg = <0xffc80000 0x30>;
clocks = <&extal_clk>; clocks = <&extal_clk>;
#clock-cells = <1>; #clock-cells = <1>;
clock-output-names = "plla", "z", "zs", "s", "s1", "p", clock-output-names = "plla", "z", "zs", "s", "s1", "p",
"b", "out"; "b", "out";
#power-domain-cells = <0>;
};
- CPG/MSTP Clock Domain member device node:
sata: sata@fc600000 {
compatible = "renesas,sata-r8a7779", "renesas,rcar-sata";
reg = <0xfc600000 0x2000>;
interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7779_CLK_SATA>;
power-domains = <&cpg_clocks>;
}; };
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
The CPG generates core clocks for the R-Car Gen2 SoCs. It includes three PLLs The CPG generates core clocks for the R-Car Gen2 SoCs. It includes three PLLs
and several fixed ratio dividers. and several fixed ratio dividers.
The CPG also provides a Clock Domain for SoC devices, in combination with the
CPG Module Stop (MSTP) Clocks.
Required Properties: Required Properties:
...@@ -20,10 +22,18 @@ Required Properties: ...@@ -20,10 +22,18 @@ Required Properties:
- clock-output-names: The names of the clocks. Supported clocks are "main", - clock-output-names: The names of the clocks. Supported clocks are "main",
"pll0", "pll1", "pll3", "lb", "qspi", "sdh", "sd0", "sd1", "z", "rcan", and "pll0", "pll1", "pll3", "lb", "qspi", "sdh", "sd0", "sd1", "z", "rcan", and
"adsp" "adsp"
- #power-domain-cells: Must be 0
SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
through an MSTP clock should refer to the CPG device node in their
"power-domains" property, as documented by the generic PM domain bindings in
Documentation/devicetree/bindings/power/power_domain.txt.
Example
------- Examples
--------
- CPG device node:
cpg_clocks: cpg_clocks@e6150000 { cpg_clocks: cpg_clocks@e6150000 {
compatible = "renesas,r8a7790-cpg-clocks", compatible = "renesas,r8a7790-cpg-clocks",
...@@ -34,4 +44,16 @@ Example ...@@ -34,4 +44,16 @@ Example
clock-output-names = "main", "pll0, "pll1", "pll3", clock-output-names = "main", "pll0, "pll1", "pll3",
"lb", "qspi", "sdh", "sd0", "sd1", "z", "lb", "qspi", "sdh", "sd0", "sd1", "z",
"rcan", "adsp"; "rcan", "adsp";
#power-domain-cells = <0>;
};
- CPG/MSTP Clock Domain member device node:
thermal@e61f0000 {
compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal";
reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp5_clks R8A7790_CLK_THERMAL>;
power-domains = <&cpg_clocks>;
}; };
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
The CPG generates core clocks for the RZ SoCs. It includes the PLL, variable The CPG generates core clocks for the RZ SoCs. It includes the PLL, variable
CPU and GPU clocks, and several fixed ratio dividers. CPU and GPU clocks, and several fixed ratio dividers.
The CPG also provides a Clock Domain for SoC devices, in combination with the
CPG Module Stop (MSTP) Clocks.
Required Properties: Required Properties:
...@@ -14,10 +16,18 @@ Required Properties: ...@@ -14,10 +16,18 @@ Required Properties:
- #clock-cells: Must be 1 - #clock-cells: Must be 1
- clock-output-names: The names of the clocks. Supported clocks are "pll", - clock-output-names: The names of the clocks. Supported clocks are "pll",
"i", and "g" "i", and "g"
- #power-domain-cells: Must be 0
SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
through an MSTP clock should refer to the CPG device node in their
"power-domains" property, as documented by the generic PM domain bindings in
Documentation/devicetree/bindings/power/power_domain.txt.
Example
------- Examples
--------
- CPG device node:
cpg_clocks: cpg_clocks@fcfe0000 { cpg_clocks: cpg_clocks@fcfe0000 {
#clock-cells = <1>; #clock-cells = <1>;
...@@ -26,4 +36,19 @@ Example ...@@ -26,4 +36,19 @@ Example
reg = <0xfcfe0000 0x18>; reg = <0xfcfe0000 0x18>;
clocks = <&extal_clk>, <&usb_x1_clk>; clocks = <&extal_clk>, <&usb_x1_clk>;
clock-output-names = "pll", "i", "g"; clock-output-names = "pll", "i", "g";
#power-domain-cells = <0>;
};
- CPG/MSTP Clock Domain member device node:
mtu2: timer@fcff0000 {
compatible = "renesas,mtu2-r7s72100", "renesas,mtu2";
reg = <0xfcff0000 0x400>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "tgi0a";
clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
clock-names = "fck";
power-domains = <&cpg_clocks>;
status = "disabled";
}; };
...@@ -86,6 +86,7 @@ cpg_clocks: cpg_clocks@fcfe0000 { ...@@ -86,6 +86,7 @@ cpg_clocks: cpg_clocks@fcfe0000 {
reg = <0xfcfe0000 0x18>; reg = <0xfcfe0000 0x18>;
clocks = <&extal_clk>, <&usb_x1_clk>; clocks = <&extal_clk>, <&usb_x1_clk>;
clock-output-names = "pll", "i", "g"; clock-output-names = "pll", "i", "g";
#power-domain-cells = <0>;
}; };
/* MSTP clocks */ /* MSTP clocks */
...@@ -157,6 +158,7 @@ scif0: serial@e8007000 { ...@@ -157,6 +158,7 @@ scif0: serial@e8007000 {
<0 189 IRQ_TYPE_LEVEL_HIGH>; <0 189 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF0>; clocks = <&mstp4_clks R7S72100_CLK_SCIF0>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -169,6 +171,7 @@ scif1: serial@e8007800 { ...@@ -169,6 +171,7 @@ scif1: serial@e8007800 {
<0 193 IRQ_TYPE_LEVEL_HIGH>; <0 193 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF1>; clocks = <&mstp4_clks R7S72100_CLK_SCIF1>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -181,6 +184,7 @@ scif2: serial@e8008000 { ...@@ -181,6 +184,7 @@ scif2: serial@e8008000 {
<0 197 IRQ_TYPE_LEVEL_HIGH>; <0 197 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF2>; clocks = <&mstp4_clks R7S72100_CLK_SCIF2>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -193,6 +197,7 @@ scif3: serial@e8008800 { ...@@ -193,6 +197,7 @@ scif3: serial@e8008800 {
<0 201 IRQ_TYPE_LEVEL_HIGH>; <0 201 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF3>; clocks = <&mstp4_clks R7S72100_CLK_SCIF3>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -205,6 +210,7 @@ scif4: serial@e8009000 { ...@@ -205,6 +210,7 @@ scif4: serial@e8009000 {
<0 205 IRQ_TYPE_LEVEL_HIGH>; <0 205 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF4>; clocks = <&mstp4_clks R7S72100_CLK_SCIF4>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -217,6 +223,7 @@ scif5: serial@e8009800 { ...@@ -217,6 +223,7 @@ scif5: serial@e8009800 {
<0 209 IRQ_TYPE_LEVEL_HIGH>; <0 209 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF5>; clocks = <&mstp4_clks R7S72100_CLK_SCIF5>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -229,6 +236,7 @@ scif6: serial@e800a000 { ...@@ -229,6 +236,7 @@ scif6: serial@e800a000 {
<0 213 IRQ_TYPE_LEVEL_HIGH>; <0 213 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF6>; clocks = <&mstp4_clks R7S72100_CLK_SCIF6>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -241,6 +249,7 @@ scif7: serial@e800a800 { ...@@ -241,6 +249,7 @@ scif7: serial@e800a800 {
<0 217 IRQ_TYPE_LEVEL_HIGH>; <0 217 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R7S72100_CLK_SCIF7>; clocks = <&mstp4_clks R7S72100_CLK_SCIF7>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -252,6 +261,7 @@ spi0: spi@e800c800 { ...@@ -252,6 +261,7 @@ spi0: spi@e800c800 {
<0 240 IRQ_TYPE_LEVEL_HIGH>; <0 240 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "error", "rx", "tx"; interrupt-names = "error", "rx", "tx";
clocks = <&mstp10_clks R7S72100_CLK_SPI0>; clocks = <&mstp10_clks R7S72100_CLK_SPI0>;
power-domains = <&cpg_clocks>;
num-cs = <1>; num-cs = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -266,6 +276,7 @@ spi1: spi@e800d000 { ...@@ -266,6 +276,7 @@ spi1: spi@e800d000 {
<0 243 IRQ_TYPE_LEVEL_HIGH>; <0 243 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "error", "rx", "tx"; interrupt-names = "error", "rx", "tx";
clocks = <&mstp10_clks R7S72100_CLK_SPI1>; clocks = <&mstp10_clks R7S72100_CLK_SPI1>;
power-domains = <&cpg_clocks>;
num-cs = <1>; num-cs = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -280,6 +291,7 @@ spi2: spi@e800d800 { ...@@ -280,6 +291,7 @@ spi2: spi@e800d800 {
<0 246 IRQ_TYPE_LEVEL_HIGH>; <0 246 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "error", "rx", "tx"; interrupt-names = "error", "rx", "tx";
clocks = <&mstp10_clks R7S72100_CLK_SPI2>; clocks = <&mstp10_clks R7S72100_CLK_SPI2>;
power-domains = <&cpg_clocks>;
num-cs = <1>; num-cs = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -294,6 +306,7 @@ spi3: spi@e800e000 { ...@@ -294,6 +306,7 @@ spi3: spi@e800e000 {
<0 249 IRQ_TYPE_LEVEL_HIGH>; <0 249 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "error", "rx", "tx"; interrupt-names = "error", "rx", "tx";
clocks = <&mstp10_clks R7S72100_CLK_SPI3>; clocks = <&mstp10_clks R7S72100_CLK_SPI3>;
power-domains = <&cpg_clocks>;
num-cs = <1>; num-cs = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -308,6 +321,7 @@ spi4: spi@e800e800 { ...@@ -308,6 +321,7 @@ spi4: spi@e800e800 {
<0 252 IRQ_TYPE_LEVEL_HIGH>; <0 252 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "error", "rx", "tx"; interrupt-names = "error", "rx", "tx";
clocks = <&mstp10_clks R7S72100_CLK_SPI4>; clocks = <&mstp10_clks R7S72100_CLK_SPI4>;
power-domains = <&cpg_clocks>;
num-cs = <1>; num-cs = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -338,6 +352,7 @@ i2c0: i2c@fcfee000 { ...@@ -338,6 +352,7 @@ i2c0: i2c@fcfee000 {
<0 164 IRQ_TYPE_LEVEL_HIGH>; <0 164 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R7S72100_CLK_I2C0>; clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
clock-frequency = <100000>; clock-frequency = <100000>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -356,6 +371,7 @@ i2c1: i2c@fcfee400 { ...@@ -356,6 +371,7 @@ i2c1: i2c@fcfee400 {
<0 172 IRQ_TYPE_LEVEL_HIGH>; <0 172 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R7S72100_CLK_I2C1>; clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
clock-frequency = <100000>; clock-frequency = <100000>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -374,6 +390,7 @@ i2c2: i2c@fcfee800 { ...@@ -374,6 +390,7 @@ i2c2: i2c@fcfee800 {
<0 180 IRQ_TYPE_LEVEL_HIGH>; <0 180 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R7S72100_CLK_I2C2>; clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
clock-frequency = <100000>; clock-frequency = <100000>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -392,6 +409,7 @@ i2c3: i2c@fcfeec00 { ...@@ -392,6 +409,7 @@ i2c3: i2c@fcfeec00 {
<0 188 IRQ_TYPE_LEVEL_HIGH>; <0 188 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R7S72100_CLK_I2C3>; clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
clock-frequency = <100000>; clock-frequency = <100000>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -402,6 +420,7 @@ mtu2: timer@fcff0000 { ...@@ -402,6 +420,7 @@ mtu2: timer@fcff0000 {
interrupt-names = "tgi0a"; interrupt-names = "tgi0a";
clocks = <&mstp3_clks R7S72100_CLK_MTU2>; clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
}; };
...@@ -53,6 +53,7 @@ ether: ethernet@fde00000 { ...@@ -53,6 +53,7 @@ ether: ethernet@fde00000 {
reg = <0xfde00000 0x400>; reg = <0xfde00000 0x400>;
interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7778_CLK_ETHER>; clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
power-domains = <&cpg_clocks>;
phy-mode = "rmii"; phy-mode = "rmii";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -152,6 +153,7 @@ i2c0: i2c@ffc70000 { ...@@ -152,6 +153,7 @@ i2c0: i2c@ffc70000 {
reg = <0xffc70000 0x1000>; reg = <0xffc70000 0x1000>;
interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_I2C0>; clocks = <&mstp0_clks R8A7778_CLK_I2C0>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -162,6 +164,7 @@ i2c1: i2c@ffc71000 { ...@@ -162,6 +164,7 @@ i2c1: i2c@ffc71000 {
reg = <0xffc71000 0x1000>; reg = <0xffc71000 0x1000>;
interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_I2C1>; clocks = <&mstp0_clks R8A7778_CLK_I2C1>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -172,6 +175,7 @@ i2c2: i2c@ffc72000 { ...@@ -172,6 +175,7 @@ i2c2: i2c@ffc72000 {
reg = <0xffc72000 0x1000>; reg = <0xffc72000 0x1000>;
interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_I2C2>; clocks = <&mstp0_clks R8A7778_CLK_I2C2>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -182,6 +186,7 @@ i2c3: i2c@ffc73000 { ...@@ -182,6 +186,7 @@ i2c3: i2c@ffc73000 {
reg = <0xffc73000 0x1000>; reg = <0xffc73000 0x1000>;
interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_I2C3>; clocks = <&mstp0_clks R8A7778_CLK_I2C3>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -193,6 +198,7 @@ tmu0: timer@ffd80000 { ...@@ -193,6 +198,7 @@ tmu0: timer@ffd80000 {
<0 34 IRQ_TYPE_LEVEL_HIGH>; <0 34 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_TMU0>; clocks = <&mstp0_clks R8A7778_CLK_TMU0>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -207,6 +213,7 @@ tmu1: timer@ffd81000 { ...@@ -207,6 +213,7 @@ tmu1: timer@ffd81000 {
<0 38 IRQ_TYPE_LEVEL_HIGH>; <0 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_TMU1>; clocks = <&mstp0_clks R8A7778_CLK_TMU1>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -221,6 +228,7 @@ tmu2: timer@ffd82000 { ...@@ -221,6 +228,7 @@ tmu2: timer@ffd82000 {
<0 42 IRQ_TYPE_LEVEL_HIGH>; <0 42 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_TMU2>; clocks = <&mstp0_clks R8A7778_CLK_TMU2>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -288,6 +296,7 @@ scif0: serial@ffe40000 { ...@@ -288,6 +296,7 @@ scif0: serial@ffe40000 {
interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF0>; clocks = <&mstp0_clks R8A7778_CLK_SCIF0>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -297,6 +306,7 @@ scif1: serial@ffe41000 { ...@@ -297,6 +306,7 @@ scif1: serial@ffe41000 {
interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF1>; clocks = <&mstp0_clks R8A7778_CLK_SCIF1>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -306,6 +316,7 @@ scif2: serial@ffe42000 { ...@@ -306,6 +316,7 @@ scif2: serial@ffe42000 {
interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF2>; clocks = <&mstp0_clks R8A7778_CLK_SCIF2>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -315,6 +326,7 @@ scif3: serial@ffe43000 { ...@@ -315,6 +326,7 @@ scif3: serial@ffe43000 {
interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF3>; clocks = <&mstp0_clks R8A7778_CLK_SCIF3>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -324,6 +336,7 @@ scif4: serial@ffe44000 { ...@@ -324,6 +336,7 @@ scif4: serial@ffe44000 {
interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF4>; clocks = <&mstp0_clks R8A7778_CLK_SCIF4>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -333,6 +346,7 @@ scif5: serial@ffe45000 { ...@@ -333,6 +346,7 @@ scif5: serial@ffe45000 {
interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_SCIF5>; clocks = <&mstp0_clks R8A7778_CLK_SCIF5>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -341,6 +355,7 @@ mmcif: mmc@ffe4e000 { ...@@ -341,6 +355,7 @@ mmcif: mmc@ffe4e000 {
reg = <0xffe4e000 0x100>; reg = <0xffe4e000 0x100>;
interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7778_CLK_MMC>; clocks = <&mstp3_clks R8A7778_CLK_MMC>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -349,6 +364,7 @@ sdhi0: sd@ffe4c000 { ...@@ -349,6 +364,7 @@ sdhi0: sd@ffe4c000 {
reg = <0xffe4c000 0x100>; reg = <0xffe4c000 0x100>;
interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7778_CLK_SDHI0>; clocks = <&mstp3_clks R8A7778_CLK_SDHI0>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -357,6 +373,7 @@ sdhi1: sd@ffe4d000 { ...@@ -357,6 +373,7 @@ sdhi1: sd@ffe4d000 {
reg = <0xffe4d000 0x100>; reg = <0xffe4d000 0x100>;
interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7778_CLK_SDHI1>; clocks = <&mstp3_clks R8A7778_CLK_SDHI1>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -365,6 +382,7 @@ sdhi2: sd@ffe4f000 { ...@@ -365,6 +382,7 @@ sdhi2: sd@ffe4f000 {
reg = <0xffe4f000 0x100>; reg = <0xffe4f000 0x100>;
interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7778_CLK_SDHI2>; clocks = <&mstp3_clks R8A7778_CLK_SDHI2>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -373,6 +391,7 @@ hspi0: spi@fffc7000 { ...@@ -373,6 +391,7 @@ hspi0: spi@fffc7000 {
reg = <0xfffc7000 0x18>; reg = <0xfffc7000 0x18>;
interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_HSPI>; clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
power-domains = <&cpg_clocks>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
status = "disabled"; status = "disabled";
...@@ -383,6 +402,7 @@ hspi1: spi@fffc8000 { ...@@ -383,6 +402,7 @@ hspi1: spi@fffc8000 {
reg = <0xfffc8000 0x18>; reg = <0xfffc8000 0x18>;
interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_HSPI>; clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
power-domains = <&cpg_clocks>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
status = "disabled"; status = "disabled";
...@@ -393,6 +413,7 @@ hspi2: spi@fffc6000 { ...@@ -393,6 +413,7 @@ hspi2: spi@fffc6000 {
reg = <0xfffc6000 0x18>; reg = <0xfffc6000 0x18>;
interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7778_CLK_HSPI>; clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
power-domains = <&cpg_clocks>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
status = "disabled"; status = "disabled";
...@@ -419,6 +440,7 @@ cpg_clocks: cpg_clocks@ffc80000 { ...@@ -419,6 +440,7 @@ cpg_clocks: cpg_clocks@ffc80000 {
clocks = <&extal_clk>; clocks = <&extal_clk>;
clock-output-names = "plla", "pllb", "b", clock-output-names = "plla", "pllb", "b",
"out", "p", "s", "s1"; "out", "p", "s", "s1";
#power-domain-cells = <0>;
}; };
/* Audio clocks; frequencies are set by boards if applicable. */ /* Audio clocks; frequencies are set by boards if applicable. */
......
...@@ -173,6 +173,7 @@ i2c0: i2c@ffc70000 { ...@@ -173,6 +173,7 @@ i2c0: i2c@ffc70000 {
reg = <0xffc70000 0x1000>; reg = <0xffc70000 0x1000>;
interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_I2C0>; clocks = <&mstp0_clks R8A7779_CLK_I2C0>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -183,6 +184,7 @@ i2c1: i2c@ffc71000 { ...@@ -183,6 +184,7 @@ i2c1: i2c@ffc71000 {
reg = <0xffc71000 0x1000>; reg = <0xffc71000 0x1000>;
interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_I2C1>; clocks = <&mstp0_clks R8A7779_CLK_I2C1>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -193,6 +195,7 @@ i2c2: i2c@ffc72000 { ...@@ -193,6 +195,7 @@ i2c2: i2c@ffc72000 {
reg = <0xffc72000 0x1000>; reg = <0xffc72000 0x1000>;
interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_I2C2>; clocks = <&mstp0_clks R8A7779_CLK_I2C2>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -203,6 +206,7 @@ i2c3: i2c@ffc73000 { ...@@ -203,6 +206,7 @@ i2c3: i2c@ffc73000 {
reg = <0xffc73000 0x1000>; reg = <0xffc73000 0x1000>;
interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_I2C3>; clocks = <&mstp0_clks R8A7779_CLK_I2C3>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -212,6 +216,7 @@ scif0: serial@ffe40000 { ...@@ -212,6 +216,7 @@ scif0: serial@ffe40000 {
interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF0>; clocks = <&mstp0_clks R8A7779_CLK_SCIF0>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -221,6 +226,7 @@ scif1: serial@ffe41000 { ...@@ -221,6 +226,7 @@ scif1: serial@ffe41000 {
interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF1>; clocks = <&mstp0_clks R8A7779_CLK_SCIF1>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -230,6 +236,7 @@ scif2: serial@ffe42000 { ...@@ -230,6 +236,7 @@ scif2: serial@ffe42000 {
interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF2>; clocks = <&mstp0_clks R8A7779_CLK_SCIF2>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -239,6 +246,7 @@ scif3: serial@ffe43000 { ...@@ -239,6 +246,7 @@ scif3: serial@ffe43000 {
interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF3>; clocks = <&mstp0_clks R8A7779_CLK_SCIF3>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -248,6 +256,7 @@ scif4: serial@ffe44000 { ...@@ -248,6 +256,7 @@ scif4: serial@ffe44000 {
interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF4>; clocks = <&mstp0_clks R8A7779_CLK_SCIF4>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -257,6 +266,7 @@ scif5: serial@ffe45000 { ...@@ -257,6 +266,7 @@ scif5: serial@ffe45000 {
interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_SCIF5>; clocks = <&mstp0_clks R8A7779_CLK_SCIF5>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -278,6 +288,7 @@ tmu0: timer@ffd80000 { ...@@ -278,6 +288,7 @@ tmu0: timer@ffd80000 {
<0 34 IRQ_TYPE_LEVEL_HIGH>; <0 34 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_TMU0>; clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -292,6 +303,7 @@ tmu1: timer@ffd81000 { ...@@ -292,6 +303,7 @@ tmu1: timer@ffd81000 {
<0 38 IRQ_TYPE_LEVEL_HIGH>; <0 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_TMU1>; clocks = <&mstp0_clks R8A7779_CLK_TMU1>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -306,6 +318,7 @@ tmu2: timer@ffd82000 { ...@@ -306,6 +318,7 @@ tmu2: timer@ffd82000 {
<0 42 IRQ_TYPE_LEVEL_HIGH>; <0 42 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7779_CLK_TMU2>; clocks = <&mstp0_clks R8A7779_CLK_TMU2>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#renesas,channels = <3>; #renesas,channels = <3>;
...@@ -317,6 +330,7 @@ sata: sata@fc600000 { ...@@ -317,6 +330,7 @@ sata: sata@fc600000 {
reg = <0xfc600000 0x2000>; reg = <0xfc600000 0x2000>;
interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7779_CLK_SATA>; clocks = <&mstp1_clks R8A7779_CLK_SATA>;
power-domains = <&cpg_clocks>;
}; };
sdhi0: sd@ffe4c000 { sdhi0: sd@ffe4c000 {
...@@ -324,6 +338,7 @@ sdhi0: sd@ffe4c000 { ...@@ -324,6 +338,7 @@ sdhi0: sd@ffe4c000 {
reg = <0xffe4c000 0x100>; reg = <0xffe4c000 0x100>;
interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7779_CLK_SDHI0>; clocks = <&mstp3_clks R8A7779_CLK_SDHI0>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -332,6 +347,7 @@ sdhi1: sd@ffe4d000 { ...@@ -332,6 +347,7 @@ sdhi1: sd@ffe4d000 {
reg = <0xffe4d000 0x100>; reg = <0xffe4d000 0x100>;
interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7779_CLK_SDHI1>; clocks = <&mstp3_clks R8A7779_CLK_SDHI1>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -340,6 +356,7 @@ sdhi2: sd@ffe4e000 { ...@@ -340,6 +356,7 @@ sdhi2: sd@ffe4e000 {
reg = <0xffe4e000 0x100>; reg = <0xffe4e000 0x100>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7779_CLK_SDHI2>; clocks = <&mstp3_clks R8A7779_CLK_SDHI2>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -348,6 +365,7 @@ sdhi3: sd@ffe4f000 { ...@@ -348,6 +365,7 @@ sdhi3: sd@ffe4f000 {
reg = <0xffe4f000 0x100>; reg = <0xffe4f000 0x100>;
interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7779_CLK_SDHI3>; clocks = <&mstp3_clks R8A7779_CLK_SDHI3>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -358,6 +376,7 @@ hspi0: spi@fffc7000 { ...@@ -358,6 +376,7 @@ hspi0: spi@fffc7000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
clocks = <&mstp0_clks R8A7779_CLK_HSPI>; clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -368,6 +387,7 @@ hspi1: spi@fffc8000 { ...@@ -368,6 +387,7 @@ hspi1: spi@fffc8000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
clocks = <&mstp0_clks R8A7779_CLK_HSPI>; clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -378,6 +398,7 @@ hspi2: spi@fffc6000 { ...@@ -378,6 +398,7 @@ hspi2: spi@fffc6000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
clocks = <&mstp0_clks R8A7779_CLK_HSPI>; clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -386,6 +407,7 @@ du: display@fff80000 { ...@@ -386,6 +407,7 @@ du: display@fff80000 {
reg = <0 0xfff80000 0 0x40000>; reg = <0 0xfff80000 0 0x40000>;
interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7779_CLK_DU>; clocks = <&mstp1_clks R8A7779_CLK_DU>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
ports { ports {
...@@ -427,6 +449,7 @@ cpg_clocks: clocks@ffc80000 { ...@@ -427,6 +449,7 @@ cpg_clocks: clocks@ffc80000 {
#clock-cells = <1>; #clock-cells = <1>;
clock-output-names = "plla", "z", "zs", "s", clock-output-names = "plla", "z", "zs", "s",
"s1", "p", "b", "out"; "s1", "p", "b", "out";
#power-domain-cells = <0>;
}; };
/* Fixed factor clocks */ /* Fixed factor clocks */
......
This diff is collapsed.
This diff is collapsed.
...@@ -68,6 +68,7 @@ cmt0: timer@ffca0000 { ...@@ -68,6 +68,7 @@ cmt0: timer@ffca0000 {
<0 143 IRQ_TYPE_LEVEL_HIGH>; <0 143 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7793_CLK_CMT0>; clocks = <&mstp1_clks R8A7793_CLK_CMT0>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
renesas,channels-mask = <0x60>; renesas,channels-mask = <0x60>;
...@@ -87,6 +88,7 @@ cmt1: timer@e6130000 { ...@@ -87,6 +88,7 @@ cmt1: timer@e6130000 {
<0 127 IRQ_TYPE_LEVEL_HIGH>; <0 127 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7793_CLK_CMT1>; clocks = <&mstp3_clks R8A7793_CLK_CMT1>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
renesas,channels-mask = <0xff>; renesas,channels-mask = <0xff>;
...@@ -109,6 +111,7 @@ irqc0: interrupt-controller@e61c0000 { ...@@ -109,6 +111,7 @@ irqc0: interrupt-controller@e61c0000 {
<0 16 IRQ_TYPE_LEVEL_HIGH>, <0 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 IRQ_TYPE_LEVEL_HIGH>; <0 17 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R8A7793_CLK_IRQC>; clocks = <&mstp4_clks R8A7793_CLK_IRQC>;
power-domains = <&cpg_clocks>;
}; };
scif0: serial@e6e60000 { scif0: serial@e6e60000 {
...@@ -117,6 +120,7 @@ scif0: serial@e6e60000 { ...@@ -117,6 +120,7 @@ scif0: serial@e6e60000 {
interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp7_clks R8A7793_CLK_SCIF0>; clocks = <&mstp7_clks R8A7793_CLK_SCIF0>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -126,6 +130,7 @@ scif1: serial@e6e68000 { ...@@ -126,6 +130,7 @@ scif1: serial@e6e68000 {
interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp7_clks R8A7793_CLK_SCIF1>; clocks = <&mstp7_clks R8A7793_CLK_SCIF1>;
clock-names = "sci_ick"; clock-names = "sci_ick";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -134,6 +139,7 @@ ether: ethernet@ee700000 { ...@@ -134,6 +139,7 @@ ether: ethernet@ee700000 {
reg = <0 0xee700000 0 0x400>; reg = <0 0xee700000 0 0x400>;
interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp8_clks R8A7793_CLK_ETHER>; clocks = <&mstp8_clks R8A7793_CLK_ETHER>;
power-domains = <&cpg_clocks>;
phy-mode = "rmii"; phy-mode = "rmii";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -164,6 +170,7 @@ cpg_clocks: cpg_clocks@e6150000 { ...@@ -164,6 +170,7 @@ cpg_clocks: cpg_clocks@e6150000 {
clock-output-names = "main", "pll0", "pll1", "pll3", clock-output-names = "main", "pll0", "pll1", "pll3",
"lb", "qspi", "sdh", "sd0", "z", "lb", "qspi", "sdh", "sd0", "z",
"rcan", "adsp"; "rcan", "adsp";
#power-domain-cells = <0>;
}; };
/* Variable factor clocks */ /* Variable factor clocks */
......
...@@ -57,6 +57,7 @@ cmt0: timer@ffca0000 { ...@@ -57,6 +57,7 @@ cmt0: timer@ffca0000 {
<0 143 IRQ_TYPE_LEVEL_HIGH>; <0 143 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7794_CLK_CMT0>; clocks = <&mstp1_clks R8A7794_CLK_CMT0>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
renesas,channels-mask = <0x60>; renesas,channels-mask = <0x60>;
...@@ -76,6 +77,7 @@ cmt1: timer@e6130000 { ...@@ -76,6 +77,7 @@ cmt1: timer@e6130000 {
<0 127 IRQ_TYPE_LEVEL_HIGH>; <0 127 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7794_CLK_CMT1>; clocks = <&mstp3_clks R8A7794_CLK_CMT1>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
renesas,channels-mask = <0xff>; renesas,channels-mask = <0xff>;
...@@ -106,6 +108,7 @@ irqc0: interrupt-controller@e61c0000 { ...@@ -106,6 +108,7 @@ irqc0: interrupt-controller@e61c0000 {
<0 16 IRQ_TYPE_LEVEL_HIGH>, <0 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 IRQ_TYPE_LEVEL_HIGH>; <0 17 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp4_clks R8A7794_CLK_IRQC>; clocks = <&mstp4_clks R8A7794_CLK_IRQC>;
power-domains = <&cpg_clocks>;
}; };
pfc: pin-controller@e6060000 { pfc: pin-controller@e6060000 {
...@@ -140,6 +143,7 @@ dmac0: dma-controller@e6700000 { ...@@ -140,6 +143,7 @@ dmac0: dma-controller@e6700000 {
"ch12", "ch13", "ch14"; "ch12", "ch13", "ch14";
clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC0>; clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC0>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#dma-cells = <1>; #dma-cells = <1>;
dma-channels = <15>; dma-channels = <15>;
}; };
...@@ -170,6 +174,7 @@ dmac1: dma-controller@e6720000 { ...@@ -170,6 +174,7 @@ dmac1: dma-controller@e6720000 {
"ch12", "ch13", "ch14"; "ch12", "ch13", "ch14";
clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC1>; clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC1>;
clock-names = "fck"; clock-names = "fck";
power-domains = <&cpg_clocks>;
#dma-cells = <1>; #dma-cells = <1>;
dma-channels = <15>; dma-channels = <15>;
}; };
...@@ -182,6 +187,7 @@ scifa0: serial@e6c40000 { ...@@ -182,6 +187,7 @@ scifa0: serial@e6c40000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x21>, <&dmac0 0x22>; dmas = <&dmac0 0x21>, <&dmac0 0x22>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -193,6 +199,7 @@ scifa1: serial@e6c50000 { ...@@ -193,6 +199,7 @@ scifa1: serial@e6c50000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x25>, <&dmac0 0x26>; dmas = <&dmac0 0x25>, <&dmac0 0x26>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -204,6 +211,7 @@ scifa2: serial@e6c60000 { ...@@ -204,6 +211,7 @@ scifa2: serial@e6c60000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x27>, <&dmac0 0x28>; dmas = <&dmac0 0x27>, <&dmac0 0x28>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -215,6 +223,7 @@ scifa3: serial@e6c70000 { ...@@ -215,6 +223,7 @@ scifa3: serial@e6c70000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x1b>, <&dmac0 0x1c>; dmas = <&dmac0 0x1b>, <&dmac0 0x1c>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -226,6 +235,7 @@ scifa4: serial@e6c78000 { ...@@ -226,6 +235,7 @@ scifa4: serial@e6c78000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x1f>, <&dmac0 0x20>; dmas = <&dmac0 0x1f>, <&dmac0 0x20>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -237,6 +247,7 @@ scifa5: serial@e6c80000 { ...@@ -237,6 +247,7 @@ scifa5: serial@e6c80000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x23>, <&dmac0 0x24>; dmas = <&dmac0 0x23>, <&dmac0 0x24>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -248,6 +259,7 @@ scifb0: serial@e6c20000 { ...@@ -248,6 +259,7 @@ scifb0: serial@e6c20000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x3d>, <&dmac0 0x3e>; dmas = <&dmac0 0x3d>, <&dmac0 0x3e>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -259,6 +271,7 @@ scifb1: serial@e6c30000 { ...@@ -259,6 +271,7 @@ scifb1: serial@e6c30000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x19>, <&dmac0 0x1a>; dmas = <&dmac0 0x19>, <&dmac0 0x1a>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -270,6 +283,7 @@ scifb2: serial@e6ce0000 { ...@@ -270,6 +283,7 @@ scifb2: serial@e6ce0000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x1d>, <&dmac0 0x1e>; dmas = <&dmac0 0x1d>, <&dmac0 0x1e>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -281,6 +295,7 @@ scif0: serial@e6e60000 { ...@@ -281,6 +295,7 @@ scif0: serial@e6e60000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x29>, <&dmac0 0x2a>; dmas = <&dmac0 0x29>, <&dmac0 0x2a>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -292,6 +307,7 @@ scif1: serial@e6e68000 { ...@@ -292,6 +307,7 @@ scif1: serial@e6e68000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x2d>, <&dmac0 0x2e>; dmas = <&dmac0 0x2d>, <&dmac0 0x2e>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -303,6 +319,7 @@ scif2: serial@e6e58000 { ...@@ -303,6 +319,7 @@ scif2: serial@e6e58000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x2b>, <&dmac0 0x2c>; dmas = <&dmac0 0x2b>, <&dmac0 0x2c>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -314,6 +331,7 @@ scif3: serial@e6ea8000 { ...@@ -314,6 +331,7 @@ scif3: serial@e6ea8000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x2f>, <&dmac0 0x30>; dmas = <&dmac0 0x2f>, <&dmac0 0x30>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -325,6 +343,7 @@ scif4: serial@e6ee0000 { ...@@ -325,6 +343,7 @@ scif4: serial@e6ee0000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0xfb>, <&dmac0 0xfc>; dmas = <&dmac0 0xfb>, <&dmac0 0xfc>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -336,6 +355,7 @@ scif5: serial@e6ee8000 { ...@@ -336,6 +355,7 @@ scif5: serial@e6ee8000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0xfd>, <&dmac0 0xfe>; dmas = <&dmac0 0xfd>, <&dmac0 0xfe>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -347,6 +367,7 @@ hscif0: serial@e62c0000 { ...@@ -347,6 +367,7 @@ hscif0: serial@e62c0000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x39>, <&dmac0 0x3a>; dmas = <&dmac0 0x39>, <&dmac0 0x3a>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -358,6 +379,7 @@ hscif1: serial@e62c8000 { ...@@ -358,6 +379,7 @@ hscif1: serial@e62c8000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x4d>, <&dmac0 0x4e>; dmas = <&dmac0 0x4d>, <&dmac0 0x4e>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -369,6 +391,7 @@ hscif2: serial@e62d0000 { ...@@ -369,6 +391,7 @@ hscif2: serial@e62d0000 {
clock-names = "sci_ick"; clock-names = "sci_ick";
dmas = <&dmac0 0x3b>, <&dmac0 0x3c>; dmas = <&dmac0 0x3b>, <&dmac0 0x3c>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -377,6 +400,7 @@ ether: ethernet@ee700000 { ...@@ -377,6 +400,7 @@ ether: ethernet@ee700000 {
reg = <0 0xee700000 0 0x400>; reg = <0 0xee700000 0 0x400>;
interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp8_clks R8A7794_CLK_ETHER>; clocks = <&mstp8_clks R8A7794_CLK_ETHER>;
power-domains = <&cpg_clocks>;
phy-mode = "rmii"; phy-mode = "rmii";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -390,6 +414,7 @@ mmcif0: mmc@ee200000 { ...@@ -390,6 +414,7 @@ mmcif0: mmc@ee200000 {
clocks = <&mstp3_clks R8A7794_CLK_MMCIF0>; clocks = <&mstp3_clks R8A7794_CLK_MMCIF0>;
dmas = <&dmac0 0xd1>, <&dmac0 0xd2>; dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
power-domains = <&cpg_clocks>;
reg-io-width = <4>; reg-io-width = <4>;
status = "disabled"; status = "disabled";
}; };
...@@ -399,6 +424,7 @@ sdhi0: sd@ee100000 { ...@@ -399,6 +424,7 @@ sdhi0: sd@ee100000 {
reg = <0 0xee100000 0 0x200>; reg = <0 0xee100000 0 0x200>;
interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7794_CLK_SDHI0>; clocks = <&mstp3_clks R8A7794_CLK_SDHI0>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -407,6 +433,7 @@ sdhi1: sd@ee140000 { ...@@ -407,6 +433,7 @@ sdhi1: sd@ee140000 {
reg = <0 0xee140000 0 0x100>; reg = <0 0xee140000 0 0x100>;
interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7794_CLK_SDHI1>; clocks = <&mstp3_clks R8A7794_CLK_SDHI1>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -415,6 +442,7 @@ sdhi2: sd@ee160000 { ...@@ -415,6 +442,7 @@ sdhi2: sd@ee160000 {
reg = <0 0xee160000 0 0x100>; reg = <0 0xee160000 0 0x100>;
interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7794_CLK_SDHI2>; clocks = <&mstp3_clks R8A7794_CLK_SDHI2>;
power-domains = <&cpg_clocks>;
status = "disabled"; status = "disabled";
}; };
...@@ -441,6 +469,7 @@ cpg_clocks: cpg_clocks@e6150000 { ...@@ -441,6 +469,7 @@ cpg_clocks: cpg_clocks@e6150000 {
#clock-cells = <1>; #clock-cells = <1>;
clock-output-names = "main", "pll0", "pll1", "pll3", clock-output-names = "main", "pll0", "pll1", "pll3",
"lb", "qspi", "sdh", "sd0", "z"; "lb", "qspi", "sdh", "sd0", "z";
#power-domain-cells = <0>;
}; };
/* Variable factor clocks */ /* Variable factor clocks */
sd2_clk: sd2_clk@e6150078 { sd2_clk: sd2_clk@e6150078 {
......
...@@ -4,6 +4,7 @@ config ARCH_SHMOBILE ...@@ -4,6 +4,7 @@ config ARCH_SHMOBILE
config PM_RCAR config PM_RCAR
bool bool
select PM_GENERIC_DOMAINS if PM
config PM_RMOBILE config PM_RMOBILE
bool bool
...@@ -50,6 +51,7 @@ config ARCH_EMEV2 ...@@ -50,6 +51,7 @@ config ARCH_EMEV2
config ARCH_R7S72100 config ARCH_R7S72100
bool "RZ/A1H (R7S72100)" bool "RZ/A1H (R7S72100)"
select PM_GENERIC_DOMAINS if PM
select SYS_SUPPORTS_SH_MTU2 select SYS_SUPPORTS_SH_MTU2
config ARCH_R8A73A4 config ARCH_R8A73A4
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* R-Car MSTP clocks * R-Car MSTP clocks
* *
* Copyright (C) 2013 Ideas On Board SPRL * Copyright (C) 2013 Ideas On Board SPRL
* Copyright (C) 2015 Glider bvba
* *
* Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* *
...@@ -10,11 +11,16 @@ ...@@ -10,11 +11,16 @@
* the Free Software Foundation; version 2 of the License. * the Free Software Foundation; version 2 of the License.
*/ */
#include <linux/clk.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/clk/shmobile.h>
#include <linux/device.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/pm_clock.h>
#include <linux/pm_domain.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
/* /*
...@@ -236,3 +242,84 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -236,3 +242,84 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
of_clk_add_provider(np, of_clk_src_onecell_get, &group->data); of_clk_add_provider(np, of_clk_src_onecell_get, &group->data);
} }
CLK_OF_DECLARE(cpg_mstp_clks, "renesas,cpg-mstp-clocks", cpg_mstp_clocks_init); CLK_OF_DECLARE(cpg_mstp_clks, "renesas,cpg-mstp-clocks", cpg_mstp_clocks_init);
#ifdef CONFIG_PM_GENERIC_DOMAINS_OF
int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev)
{
struct device_node *np = dev->of_node;
struct of_phandle_args clkspec;
struct clk *clk;
int i = 0;
int error;
while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i,
&clkspec)) {
if (of_device_is_compatible(clkspec.np,
"renesas,cpg-mstp-clocks"))
goto found;
of_node_put(clkspec.np);
i++;
}
return 0;
found:
clk = of_clk_get_from_provider(&clkspec);
of_node_put(clkspec.np);
if (IS_ERR(clk))
return PTR_ERR(clk);
error = pm_clk_create(dev);
if (error) {
dev_err(dev, "pm_clk_create failed %d\n", error);
goto fail_put;
}
error = pm_clk_add_clk(dev, clk);
if (error) {
dev_err(dev, "pm_clk_add_clk %pC failed %d\n", clk, error);
goto fail_destroy;
}
return 0;
fail_destroy:
pm_clk_destroy(dev);
fail_put:
clk_put(clk);
return error;
}
void cpg_mstp_detach_dev(struct generic_pm_domain *domain, struct device *dev)
{
if (!list_empty(&dev->power.subsys_data->clock_list))
pm_clk_destroy(dev);
}
void __init cpg_mstp_add_clk_domain(struct device_node *np)
{
struct generic_pm_domain *pd;
u32 ncells;
if (of_property_read_u32(np, "#power-domain-cells", &ncells)) {
pr_warn("%s lacks #power-domain-cells\n", np->full_name);
return;
}
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd)
return;
pd->name = np->name;
pd->flags = GENPD_FLAG_PM_CLK;
pm_genpd_init(pd, &simple_qos_governor, false);
pd->attach_dev = cpg_mstp_attach_dev;
pd->detach_dev = cpg_mstp_detach_dev;
of_genpd_add_provider_simple(np, pd);
}
#endif /* !CONFIG_PM_GENERIC_DOMAINS_OF */
...@@ -124,6 +124,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np) ...@@ -124,6 +124,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
} }
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
cpg_mstp_add_clk_domain(np);
} }
CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks", CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
......
...@@ -168,6 +168,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) ...@@ -168,6 +168,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
} }
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
cpg_mstp_add_clk_domain(np);
} }
CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks", CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks",
r8a7779_cpg_clocks_init); r8a7779_cpg_clocks_init);
......
...@@ -415,6 +415,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np) ...@@ -415,6 +415,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
} }
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
cpg_mstp_add_clk_domain(np);
} }
CLK_OF_DECLARE(rcar_gen2_cpg_clks, "renesas,rcar-gen2-cpg-clocks", CLK_OF_DECLARE(rcar_gen2_cpg_clks, "renesas,rcar-gen2-cpg-clocks",
rcar_gen2_cpg_clocks_init); rcar_gen2_cpg_clocks_init);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
*/ */
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/clk/shmobile.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -99,5 +100,7 @@ static void __init rz_cpg_clocks_init(struct device_node *np) ...@@ -99,5 +100,7 @@ static void __init rz_cpg_clocks_init(struct device_node *np)
} }
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
cpg_mstp_add_clk_domain(np);
} }
CLK_OF_DECLARE(rz_cpg_clks, "renesas,rz-cpg-clocks", rz_cpg_clocks_init); CLK_OF_DECLARE(rz_cpg_clks, "renesas,rz-cpg-clocks", rz_cpg_clocks_init);
...@@ -16,8 +16,20 @@ ...@@ -16,8 +16,20 @@
#include <linux/types.h> #include <linux/types.h>
struct device;
struct device_node;
struct generic_pm_domain;
void r8a7778_clocks_init(u32 mode); void r8a7778_clocks_init(u32 mode);
void r8a7779_clocks_init(u32 mode); void r8a7779_clocks_init(u32 mode);
void rcar_gen2_clocks_init(u32 mode); void rcar_gen2_clocks_init(u32 mode);
#ifdef CONFIG_PM_GENERIC_DOMAINS_OF
void cpg_mstp_add_clk_domain(struct device_node *np);
int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev);
void cpg_mstp_detach_dev(struct generic_pm_domain *domain, struct device *dev);
#else
static inline void cpg_mstp_add_clk_domain(struct device_node *np) {}
#endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment