Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-06 Thread Maxime Ripard
On Wed, Jun 06, 2018 at 12:02:20AM +0800, Chen-Yu Tsai wrote:
> On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard  
> wrote:
> > On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
> >> The cooling device properties, like "#cooling-cells" and
> >> "dynamic-power-coefficient", should either be present for all the CPUs
> >> of a cluster or none. If these are present only for a subset of CPUs of
> >> a cluster then things will start falling apart as soon as the CPUs are
> >> brought online in a different order. For example, this will happen
> >> because the operating system looks for such properties in the CPU node
> >> it is trying to bring up, so that it can register a cooling device.
> >>
> >> Add such missing properties.
> >>
> >> Fix other missing properties (clocks, OPP, clock latency) as well to
> >> make it all work.
> >>
> >> Signed-off-by: Viresh Kumar 
> >
> > Applied both, thanks!
> 
> Please fix the "ARM" prefix when applying. :)

Done, thanks for the reminder :)

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-06 Thread Maxime Ripard
On Wed, Jun 06, 2018 at 12:02:20AM +0800, Chen-Yu Tsai wrote:
> On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard  
> wrote:
> > On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
> >> The cooling device properties, like "#cooling-cells" and
> >> "dynamic-power-coefficient", should either be present for all the CPUs
> >> of a cluster or none. If these are present only for a subset of CPUs of
> >> a cluster then things will start falling apart as soon as the CPUs are
> >> brought online in a different order. For example, this will happen
> >> because the operating system looks for such properties in the CPU node
> >> it is trying to bring up, so that it can register a cooling device.
> >>
> >> Add such missing properties.
> >>
> >> Fix other missing properties (clocks, OPP, clock latency) as well to
> >> make it all work.
> >>
> >> Signed-off-by: Viresh Kumar 
> >
> > Applied both, thanks!
> 
> Please fix the "ARM" prefix when applying. :)

Done, thanks for the reminder :)

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-05 Thread Chen-Yu Tsai
On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard  wrote:
> On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
>> The cooling device properties, like "#cooling-cells" and
>> "dynamic-power-coefficient", should either be present for all the CPUs
>> of a cluster or none. If these are present only for a subset of CPUs of
>> a cluster then things will start falling apart as soon as the CPUs are
>> brought online in a different order. For example, this will happen
>> because the operating system looks for such properties in the CPU node
>> it is trying to bring up, so that it can register a cooling device.
>>
>> Add such missing properties.
>>
>> Fix other missing properties (clocks, OPP, clock latency) as well to
>> make it all work.
>>
>> Signed-off-by: Viresh Kumar 
>
> Applied both, thanks!

Please fix the "ARM" prefix when applying. :)

ChenYu


Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-05 Thread Chen-Yu Tsai
On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard  wrote:
> On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
>> The cooling device properties, like "#cooling-cells" and
>> "dynamic-power-coefficient", should either be present for all the CPUs
>> of a cluster or none. If these are present only for a subset of CPUs of
>> a cluster then things will start falling apart as soon as the CPUs are
>> brought online in a different order. For example, this will happen
>> because the operating system looks for such properties in the CPU node
>> it is trying to bring up, so that it can register a cooling device.
>>
>> Add such missing properties.
>>
>> Fix other missing properties (clocks, OPP, clock latency) as well to
>> make it all work.
>>
>> Signed-off-by: Viresh Kumar 
>
> Applied both, thanks!

Please fix the "ARM" prefix when applying. :)

ChenYu


Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-05 Thread Maxime Ripard
On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
> The cooling device properties, like "#cooling-cells" and
> "dynamic-power-coefficient", should either be present for all the CPUs
> of a cluster or none. If these are present only for a subset of CPUs of
> a cluster then things will start falling apart as soon as the CPUs are
> brought online in a different order. For example, this will happen
> because the operating system looks for such properties in the CPU node
> it is trying to bring up, so that it can register a cooling device.
> 
> Add such missing properties.
> 
> Fix other missing properties (clocks, OPP, clock latency) as well to
> make it all work.
> 
> Signed-off-by: Viresh Kumar 

Applied both, thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-05 Thread Maxime Ripard
On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
> The cooling device properties, like "#cooling-cells" and
> "dynamic-power-coefficient", should either be present for all the CPUs
> of a cluster or none. If these are present only for a subset of CPUs of
> a cluster then things will start falling apart as soon as the CPUs are
> brought online in a different order. For example, this will happen
> because the operating system looks for such properties in the CPU node
> it is trying to bring up, so that it can register a cooling device.
> 
> Add such missing properties.
> 
> Fix other missing properties (clocks, OPP, clock latency) as well to
> make it all work.
> 
> Signed-off-by: Viresh Kumar 

Applied both, thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


[PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-04 Thread Viresh Kumar
The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Fix other missing properties (clocks, OPP, clock latency) as well to
make it all work.

Signed-off-by: Viresh Kumar 
---
V2:
- Separated patch for h3
- Fixed subject s/sun/sunxi/

 arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++
 arch/arm/boot/dts/sun7i-a20.dtsi | 13 +
 arch/arm/boot/dts/sun8i-a33.dtsi |  9 +
 3 files changed, 52 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c72992556a86..debc0bf22ea3 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -119,18 +119,48 @@
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
 
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
 
cpu@3 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <3>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
};
 
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e529e4ff2174..35372a0cfc8d 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -122,6 +122,19 @@
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   96  140
+   912000  140
+   864000  130
+   72  120
+   528000  110
+   312000  100
+   144000  100
+   >;
+   #cooling-cells = <2>;
};
};
 
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 8d278ee001e9..4e92741b24a7 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -132,21 +132,30 @@
};
 
cpu@1 {
+   clocks = < CLK_CPUX>;
+   clock-names = "cpu";
operating-points-v2 = <_opp_table>;
+   #cooling-cells = <2>;
};
 
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
+   clocks = < CLK_CPUX>;
+   clock-names = "cpu";
operating-points-v2 = <_opp_table>;
+   #cooling-cells = <2>;
};
 
cpu@3 {

[PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs

2018-06-04 Thread Viresh Kumar
The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Fix other missing properties (clocks, OPP, clock latency) as well to
make it all work.

Signed-off-by: Viresh Kumar 
---
V2:
- Separated patch for h3
- Fixed subject s/sun/sunxi/

 arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++
 arch/arm/boot/dts/sun7i-a20.dtsi | 13 +
 arch/arm/boot/dts/sun8i-a33.dtsi |  9 +
 3 files changed, 52 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c72992556a86..debc0bf22ea3 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -119,18 +119,48 @@
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
 
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
 
cpu@3 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <3>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   1008000 120
+   864000  120
+   72  110
+   48  100
+   >;
+   #cooling-cells = <2>;
};
};
 
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e529e4ff2174..35372a0cfc8d 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -122,6 +122,19 @@
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
+   clocks = < CLK_CPU>;
+   clock-latency = <244144>; /* 8 32k periods */
+   operating-points = <
+   /* kHzuV */
+   96  140
+   912000  140
+   864000  130
+   72  120
+   528000  110
+   312000  100
+   144000  100
+   >;
+   #cooling-cells = <2>;
};
};
 
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 8d278ee001e9..4e92741b24a7 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -132,21 +132,30 @@
};
 
cpu@1 {
+   clocks = < CLK_CPUX>;
+   clock-names = "cpu";
operating-points-v2 = <_opp_table>;
+   #cooling-cells = <2>;
};
 
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
+   clocks = < CLK_CPUX>;
+   clock-names = "cpu";
operating-points-v2 = <_opp_table>;
+   #cooling-cells = <2>;
};
 
cpu@3 {