Message ID | 20200405173601.24331-5-peron.clem@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for Allwinner H6 DVFS | expand |
On Sun, Apr 05, 2020 at 07:35:58PM +0200, Clément Péron wrote: > Add an Operating Performance Points table for the GPU to > enable Dynamic Voltage & Frequency Scaling on the H6. > > Signed-off-by: Clément Péron <peron.clem@gmail.com> > --- > .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 74 +++++++++++++++++++ > 1 file changed, 74 insertions(+) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > new file mode 100644 > index 000000000000..4a1814844fe0 > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > @@ -0,0 +1,74 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com> > + > +/ { > + gpu_opp_table: opp_table1 { A node name is supposed to be a generic description, so what about using gpu-opp-table (and cpu-opp-table) instead? > + compatible = "operating-points-v2"; > + > + opp@756000000 { > + opp-hz = /bits/ 64 <756000000>; > + opp-microvolt = <1040000>; > + }; > + opp@624000000 { > + opp-hz = /bits/ 64 <624000000>; > + opp-microvolt = <950000>; > + }; Ordering by ascending frequency would be great here. Also, why did you need to create a new DTSI for it? Is there some downside to enabling it for all the users? Maxime
Hi Maxime, On Mon, 6 Apr 2020 at 10:16, Maxime Ripard <maxime@cerno.tech> wrote: > > On Sun, Apr 05, 2020 at 07:35:58PM +0200, Clément Péron wrote: > > Add an Operating Performance Points table for the GPU to > > enable Dynamic Voltage & Frequency Scaling on the H6. > > > > Signed-off-by: Clément Péron <peron.clem@gmail.com> > > --- > > .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 74 +++++++++++++++++++ > > 1 file changed, 74 insertions(+) > > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > > new file mode 100644 > > index 000000000000..4a1814844fe0 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > > @@ -0,0 +1,74 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com> > > + > > +/ { > > + gpu_opp_table: opp_table1 { > > A node name is supposed to be a generic description, so what about > using gpu-opp-table (and cpu-opp-table) instead? > > > + compatible = "operating-points-v2"; > > + > > + opp@756000000 { > > + opp-hz = /bits/ 64 <756000000>; > > + opp-microvolt = <1040000>; > > + }; > > + opp@624000000 { > > + opp-hz = /bits/ 64 <624000000>; > > + opp-microvolt = <950000>; > > + }; > > Ordering by ascending frequency would be great here. Indeed will fix it. > > Also, why did you need to create a new DTSI for it? Is there some > downside to enabling it for all the users? I didn't want to enable it for all boards as I can't test them and not all board have a dedicated regulator for VDD-GPU. Hence my question in the cover, But with Jernej Škrabec test on Tanix TX6 I think it can be safely enable on all boards. Regards, Clement > > Maxime
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi new file mode 100644 index 000000000000..4a1814844fe0 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com> + +/ { + gpu_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000>; + }; + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000>; + }; + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000>; + }; + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000>; + }; + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000>; + }; + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000>; + }; + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000>; + }; + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000>; + }; + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000>; + }; + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000>; + }; + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000>; + }; + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000>; + }; + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000>; + }; + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000>; + }; + opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000>; + }; + }; +}; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; + #cooling-cells = <2>; +};
Add an Operating Performance Points table for the GPU to enable Dynamic Voltage & Frequency Scaling on the H6. Signed-off-by: Clément Péron <peron.clem@gmail.com> --- .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi