diff mbox

[v3,2/6] ARM: dts: r8a7794: add MSTP5 clocks

Message ID 1576909.nm8MtQ2Ln5@wasted.cogentembedded.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Sergei Shtylyov May 12, 2016, 8:45 p.m. UTC
Add some MSTP5 clocks to the R8A7794 device tree.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Changes in version 3:
- refreshed the patch.

Changes in version 2:
- added "the" article to the change log.

 arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
 include/dt-bindings/clock/r8a7794-clock.h |    1 +
 2 files changed, 10 insertions(+)

Comments

Geert Uytterhoeven May 19, 2016, 4:25 p.m. UTC | #1
Hi Sergei,

On Thu, May 12, 2016 at 10:45 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Add some MSTP5 clocks to the R8A7794 device tree.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> Changes in version 3:
> - refreshed the patch.
>
> Changes in version 2:
> - added "the" article to the change log.
>
>  arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
>  include/dt-bindings/clock/r8a7794-clock.h |    1 +
>  2 files changed, 10 insertions(+)
>
> Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
> +++ renesas/arch/arm/boot/dts/r8a7794.dtsi
> @@ -1172,6 +1172,15 @@
>                         clock-indices = <R8A7794_CLK_IRQC>;
>                         clock-output-names = "irqc";
>                 };
> +               mstp5_clks: mstp5_clks@e6150144 {
> +                       compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
> +                       clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <R8A7794_CLK_AUDIO_DMAC0
> +                                        R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
> +                       clock-output-names = "audmac0", "thermal", "pwm";

R-Car E2 does not have the thermal module.

> +               };
>                 mstp7_clks: mstp7_clks@e615014c {
>                         compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
>                         reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
> Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
> ===================================================================
> --- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
> +++ renesas/include/dt-bindings/clock/r8a7794-clock.h
> @@ -67,6 +67,7 @@
>  #define R8A7794_CLK_IRQC               7
>
>  /* MSTP5 */
> +#define R8A7794_CLK_AUDIO_DMAC0                2
>  #define R8A7794_CLK_THERMAL            22

Hence R8A7794_CLK_THERMAL should be removed.

>  #define R8A7794_CLK_PWM                        23

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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 Torvalds
Sergei Shtylyov May 19, 2016, 5:30 p.m. UTC | #2
On 05/19/2016 07:25 PM, Geert Uytterhoeven wrote:

>> Add some MSTP5 clocks to the R8A7794 device tree.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>> Changes in version 3:
>> - refreshed the patch.
>>
>> Changes in version 2:
>> - added "the" article to the change log.
>>
>>  arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
>>  include/dt-bindings/clock/r8a7794-clock.h |    1 +
>>  2 files changed, 10 insertions(+)
>>
>> Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
>> ===================================================================
>> --- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
>> +++ renesas/arch/arm/boot/dts/r8a7794.dtsi
>> @@ -1172,6 +1172,15 @@
>>                         clock-indices = <R8A7794_CLK_IRQC>;
>>                         clock-output-names = "irqc";
>>                 };
>> +               mstp5_clks: mstp5_clks@e6150144 {
>> +                       compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
>> +                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
>> +                       clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
>> +                       #clock-cells = <1>;
>> +                       clock-indices = <R8A7794_CLK_AUDIO_DMAC0
>> +                                        R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
>> +                       clock-output-names = "audmac0", "thermal", "pwm";
>
> R-Car E2 does not have the thermal module.

    My "R-Car Series, 2nd Generation User’s Manual: Hardware, Rev.1.02 Oct 
2014" says it does. What's your source?

>> +               };
>>                 mstp7_clks: mstp7_clks@e615014c {
>>                         compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
>>                         reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
>> Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
>> ===================================================================
>> --- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
>> +++ renesas/include/dt-bindings/clock/r8a7794-clock.h
>> @@ -67,6 +67,7 @@
>>  #define R8A7794_CLK_IRQC               7
>>
>>  /* MSTP5 */
>> +#define R8A7794_CLK_AUDIO_DMAC0                2
>>  #define R8A7794_CLK_THERMAL            22
>
> Hence R8A7794_CLK_THERMAL should be removed.

    Well, remove it then. ;-)

>>  #define R8A7794_CLK_PWM                        23
>
> Gr{oetje,eeting}s,

MBR, Sergei
Simon Horman May 20, 2016, 4:20 a.m. UTC | #3
On Thu, May 19, 2016 at 08:30:12PM +0300, Sergei Shtylyov wrote:
> On 05/19/2016 07:25 PM, Geert Uytterhoeven wrote:
> 
> >>Add some MSTP5 clocks to the R8A7794 device tree.
> >>
> >>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>
> >>---
> >>Changes in version 3:
> >>- refreshed the patch.
> >>
> >>Changes in version 2:
> >>- added "the" article to the change log.
> >>
> >> arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
> >> include/dt-bindings/clock/r8a7794-clock.h |    1 +
> >> 2 files changed, 10 insertions(+)
> >>
> >>Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
> >>===================================================================
> >>--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
> >>+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
> >>@@ -1172,6 +1172,15 @@
> >>                        clock-indices = <R8A7794_CLK_IRQC>;
> >>                        clock-output-names = "irqc";
> >>                };
> >>+               mstp5_clks: mstp5_clks@e6150144 {
> >>+                       compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
> >>+                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
> >>+                       clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
> >>+                       #clock-cells = <1>;
> >>+                       clock-indices = <R8A7794_CLK_AUDIO_DMAC0
> >>+                                        R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
> >>+                       clock-output-names = "audmac0", "thermal", "pwm";
> >
> >R-Car E2 does not have the thermal module.
> 
>    My "R-Car Series, 2nd Generation User’s Manual: Hardware, Rev.1.02 Oct
> 2014" says it does. What's your source?

Please see chapter 80 of v2.00.
I have also confirmed with the hw team that the thermal sensor is not present.

FWIW until recently I was also going off the older documentation in this
regards and the absence of the thermal block was a bit of a revelation to
me.

> >>+               };
> >>                mstp7_clks: mstp7_clks@e615014c {
> >>                        compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
> >>                        reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
> >>Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
> >>===================================================================
> >>--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
> >>+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
> >>@@ -67,6 +67,7 @@
> >> #define R8A7794_CLK_IRQC               7
> >>
> >> /* MSTP5 */
> >>+#define R8A7794_CLK_AUDIO_DMAC0                2
> >> #define R8A7794_CLK_THERMAL            22
> >
> >Hence R8A7794_CLK_THERMAL should be removed.
> 
>    Well, remove it then. ;-)
> 
> >> #define R8A7794_CLK_PWM                        23
> >
> >Gr{oetje,eeting}s,
> 
> MBR, Sergei
>
diff mbox

Patch

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1172,6 +1172,15 @@ 
 			clock-indices = <R8A7794_CLK_IRQC>;
 			clock-output-names = "irqc";
 		};
+		mstp5_clks: mstp5_clks@e6150144 {
+			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+			clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7794_CLK_AUDIO_DMAC0
+					 R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
+			clock-output-names = "audmac0", "thermal", "pwm";
+		};
 		mstp7_clks: mstp7_clks@e615014c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
@@ -67,6 +67,7 @@ 
 #define R8A7794_CLK_IRQC		7
 
 /* MSTP5 */
+#define R8A7794_CLK_AUDIO_DMAC0		2
 #define R8A7794_CLK_THERMAL		22
 #define R8A7794_CLK_PWM			23