Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-22 Thread Stefan Agner
Hi Christian,

On 2020-07-19 16:10, Christian Hewitt wrote:
> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
> regulator changess are from the HardKernel Linux kernel sources.

According to the ODROID wiki those values are already in the
overclocking range:
https://wiki.odroid.com/odroid-n2/hardware/overclocking

>From what I can tell, for ODROID-N2 upstream Linux so far used defaults
from meson-g12b-s922x.dtsi, which were 1896MHz for the A53 and 1704MHz
for the A73 (so it seems currently the A73 running even 100MHz below
"Stock").

I guess we should pick either Stock or Overclock for the two models.
Unless there is another good reason not to?

--
Stefan

> 
> Suggested-by: Dongjin Kim 
> Signed-off-by: Christian Hewitt 
> ---
>  arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>  2 files changed, 54 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> 
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile
> b/arch/arm64/boot/dts/amlogic/Makefile
> index 5cac4d1d487d..6dc508b80133 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> new file mode 100644
> index ..99e96be509f8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> @@ -0,0 +1,53 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2019 BayLibre, SAS
> + * Author: Neil Armstrong 
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-g12b-odroid-n2.dtsi"
> +
> +/ {
> + compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> "amlogic,g12b";
> + model = "Hardkernel ODROID-N2+";
> +
> + vddcpu_a: regulator-vddcpu-a {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_ab 0 1500 0>;
> + };
> +
> + vddcpu_b: regulator-vddcpu-b {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_AO_cd 1 1500 0>;
> + };
> +
> + cpu_opp_table_0: opp-table-0 {
> + opp-190800 {
> + opp-hz = /bits/ 64 <190800>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-201600 {
> + opp-hz = /bits/ 64 <201600>;
> + opp-microvolt = <104>;
> + };
> + };
> +
> + cpub_opp_table_1: opp-table-1 {
> + opp-230400 {
> + opp-hz = /bits/ 64 <230400>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-24 {
> + opp-hz = /bits/ 64 <24>;
> + opp-microvolt = <104>;
> + };
> + };
> +};
> +


Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Christian Hewitt


> On 21 Jul 2020, at 1:14 pm, Jerome Brunet  wrote:
> 
> On Sun 19 Jul 2020 at 16:10, Christian Hewitt  
> wrote:
> 
>> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
>> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
>> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
>> regulator changess are from the HardKernel Linux kernel sources.
>> 
>> Suggested-by: Dongjin Kim 
>> Signed-off-by: Christian Hewitt 
>> ---
>> arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>> .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>> 2 files changed, 54 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>> 
>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
>> b/arch/arm64/boot/dts/amlogic/Makefile
>> index 5cac4d1d487d..6dc508b80133 100644
>> --- a/arch/arm64/boot/dts/amlogic/Makefile
>> +++ b/arch/arm64/boot/dts/amlogic/Makefile
>> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
>> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
>> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>> new file mode 100644
>> index ..99e96be509f8
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>> @@ -0,0 +1,53 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Copyright (c) 2019 BayLibre, SAS
>> + * Author: Neil Armstrong 
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "meson-g12b-odroid-n2.dtsi"
>> +
>> +/ {
>> +compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
>> "amlogic,g12b";
>> +model = "Hardkernel ODROID-N2+";
>> +
>> +vddcpu_a: regulator-vddcpu-a {
>> +regulator-min-microvolt = <68>;
>> +regulator-max-microvolt = <104>;
>> +
>> +pwms = <&pwm_ab 0 1500 0>;
>> +};
>> +
>> +vddcpu_b: regulator-vddcpu-b {
>> +regulator-min-microvolt = <68>;
>> +regulator-max-microvolt = <104>;
>> +
>> +pwms = <&pwm_AO_cd 1 1500 0>;
>> +};
>> +
>> +cpu_opp_table_0: opp-table-0 {
>> +opp-190800 {
>> +opp-hz = /bits/ 64 <190800>;
>> +opp-microvolt = <103>;
>> +};
>> +
>> +opp-201600 {
>> +opp-hz = /bits/ 64 <201600>;
>> +opp-microvolt = <104>;
>> +};
>> +};
>> +
>> +cpub_opp_table_1: opp-table-1 {
>> +opp-230400 {
>> +opp-hz = /bits/ 64 <230400>;
>> +opp-microvolt = <103>;
>> +};
>> +
>> +opp-24 {
>> +opp-hz = /bits/ 64 <24>;
>> +opp-microvolt = <104>;
>> +};
>> +};
> 
> Are this opp specific to the N2+ or S922x rev C ?
> If it is the latter, shouldn't these be in s922x-revC dtsi ?

N2+ is currently the only known device with RevC chip (and shipping with
a huge heatsink) so we don’t know. I prefer to to put them in the board
dts for now and move to a common dtsi in the future once we’ve seen more
devices in the wild and proven they can handle the overclock.

Christian



Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Christian Hewitt


> On 21 Jul 2020, at 12:19 pm, Neil Armstrong  wrote:
> 
> On 21/07/2020 10:10, Neil Armstrong wrote:
>> On 19/07/2020 16:10, Christian Hewitt wrote:
>>> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
>>> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
>>> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
>>> regulator changess are from the HardKernel Linux kernel sources.
>>> 
>>> Suggested-by: Dongjin Kim 
>>> Signed-off-by: Christian Hewitt 
>>> ---
>>> arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>>> .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>>> 2 files changed, 54 insertions(+)
>>> create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>>> 
>>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
>>> b/arch/arm64/boot/dts/amlogic/Makefile
>>> index 5cac4d1d487d..6dc508b80133 100644
>>> --- a/arch/arm64/boot/dts/amlogic/Makefile
>>> +++ b/arch/arm64/boot/dts/amlogic/Makefile
>>> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
>>> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>>> dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
>>> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>>> new file mode 100644
>>> index ..99e96be509f8
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>>> @@ -0,0 +1,53 @@
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> +/*
>>> + * Copyright (c) 2019 BayLibre, SAS
>>> + * Author: Neil Armstrong 
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "meson-g12b-odroid-n2.dtsi"
>>> +
>>> +/ {
>>> +   compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
>>> "amlogic,g12b";
>>> +   model = "Hardkernel ODROID-N2+";
>>> +
>>> +   vddcpu_a: regulator-vddcpu-a {
>>> +   regulator-min-microvolt = <68>;
>>> +   regulator-max-microvolt = <104>;
>>> +
>>> +   pwms = <&pwm_ab 0 1500 0>;
>>> +   };
>>> +
>>> +   vddcpu_b: regulator-vddcpu-b {
>>> +   regulator-min-microvolt = <68>;
>>> +   regulator-max-microvolt = <104>;
>>> +
>>> +   pwms = <&pwm_AO_cd 1 1500 0>;
>>> +   };
>>> +
>>> +   cpu_opp_table_0: opp-table-0 {
>>> +   opp-190800 {
>>> +   opp-hz = /bits/ 64 <190800>;
>>> +   opp-microvolt = <103>;
>>> +   };
>>> +
>>> +   opp-201600 {
>>> +   opp-hz = /bits/ 64 <201600>;
>>> +   opp-microvolt = <104>;
>>> +   };
>>> +   };
>>> +
>>> +   cpub_opp_table_1: opp-table-1 {
>>> +   opp-230400 {
>>> +   opp-hz = /bits/ 64 <230400>;
>>> +   opp-microvolt = <103>;
>>> +   };
>>> +
>>> +   opp-24 {
>>> +   opp-hz = /bits/ 64 <24>;
>>> +   opp-microvolt = <104>;
>>> +   };
>>> +   };
>>> +};
>>> +
>>> 
>> Reviewed-by: Neil Armstrong 
>> 
> 
> Wait no, it should be:
> 
> / {
>   compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> "amlogic,g12b";
>   model = "Hardkernel ODROID-N2+";
> };
> 
> &vddcpu_a {
>   regulator-min-microvolt = <68>;
>   regulator-max-microvolt = <104>;
> 
>   pwms = <&pwm_ab 0 1500 0>;
> };
> 
> &vddcpu_b {
>   regulator-min-microvolt = <68>;
>   regulator-max-microvolt = <104>;
> 
>   pwms = <&pwm_AO_cd 1 1500 0>;
> };
> 
> &cpu_opp_table_0 {
>   opp-190800 {
>   opp-hz = /bits/ 64 <190800>;
>   opp-microvolt = <103>;
>   };
> 
>   opp-201600 {
>   opp-hz = /bits/ 64 <201600>;
>   opp-microvolt = <104>;
>   };
> };
> 
> &cpub_opp_table_1 {
>   opp-230400 {
>   opp-hz = /bits/ 64 <230400>;
>   opp-microvolt = <103>;
>   };
> 
>   opp-24 {
>   opp-hz = /bits/ 64 <24>;
>   opp-microvolt = <104>;
>   };
> };
> 
> Neil

Okay, I will send corrected v2 and with model name changed.

Christian

Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Dongjin Kim
Can we use "Hardkernel ODROID-N2Plus" instead of "Hardkernel ODROID-N2+"?

Thanks,
Dongjin.



On Tue, Jul 21, 2020 at 5:24 PM Neil Armstrong  wrote:
>
> On 21/07/2020 10:10, Neil Armstrong wrote:
> > On 19/07/2020 16:10, Christian Hewitt wrote:
> >> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
> >> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
> >> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
> >> regulator changess are from the HardKernel Linux kernel sources.
> >>
> >> Suggested-by: Dongjin Kim 
> >> Signed-off-by: Christian Hewitt 
> >> ---
> >>  arch/arm64/boot/dts/amlogic/Makefile  |  1 +
> >>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
> >>  2 files changed, 54 insertions(+)
> >>  create mode 100644 
> >> arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> >>
> >> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
> >> b/arch/arm64/boot/dts/amlogic/Makefile
> >> index 5cac4d1d487d..6dc508b80133 100644
> >> --- a/arch/arm64/boot/dts/amlogic/Makefile
> >> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> >> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> >> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> >>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
> >> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> >> new file mode 100644
> >> index ..99e96be509f8
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> >> @@ -0,0 +1,53 @@
> >> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >> +/*
> >> + * Copyright (c) 2019 BayLibre, SAS
> >> + * Author: Neil Armstrong 
> >> + */
> >> +
> >> +/dts-v1/;
> >> +
> >> +#include "meson-g12b-odroid-n2.dtsi"
> >> +
> >> +/ {
> >> +compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> >> "amlogic,g12b";
> >> +model = "Hardkernel ODROID-N2+";
> >> +
> >> +vddcpu_a: regulator-vddcpu-a {
> >> +regulator-min-microvolt = <68>;
> >> +regulator-max-microvolt = <104>;
> >> +
> >> +pwms = <&pwm_ab 0 1500 0>;
> >> +};
> >> +
> >> +vddcpu_b: regulator-vddcpu-b {
> >> +regulator-min-microvolt = <68>;
> >> +regulator-max-microvolt = <104>;
> >> +
> >> +pwms = <&pwm_AO_cd 1 1500 0>;
> >> +};
> >> +
> >> +cpu_opp_table_0: opp-table-0 {
> >> +opp-190800 {
> >> +opp-hz = /bits/ 64 <190800>;
> >> +opp-microvolt = <103>;
> >> +};
> >> +
> >> +opp-201600 {
> >> +opp-hz = /bits/ 64 <201600>;
> >> +opp-microvolt = <104>;
> >> +};
> >> +};
> >> +
> >> +cpub_opp_table_1: opp-table-1 {
> >> +opp-230400 {
> >> +opp-hz = /bits/ 64 <230400>;
> >> +opp-microvolt = <103>;
> >> +};
> >> +
> >> +opp-24 {
> >> +opp-hz = /bits/ 64 <24>;
> >> +opp-microvolt = <104>;
> >> +};
> >> +};
> >> +};
> >> +
> >>
> > Reviewed-by: Neil Armstrong 
> >
>
> Wait no, it should be:
>
> / {
> compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> "amlogic,g12b";
> model = "Hardkernel ODROID-N2+";
> };
>
> &vddcpu_a {
> regulator-min-microvolt = <68>;
> regulator-max-microvolt = <104>;
>
> pwms = <&pwm_ab 0 1500 0>;
> };
>
> &vddcpu_b {
> regulator-min-microvolt = <68>;
> regulator-max-microvolt = <104>;
>
> pwms = <&pwm_AO_cd 1 1500 0>;
> };
>
> &cpu_opp_table_0 {
> opp-190800 {
> opp-hz = /bits/ 64 <190800>;
> opp-microvolt = <103>;
> };
>
> opp-201600 {
> opp-hz = /bits/ 64 <201600>;
> opp-microvolt = <104>;
> };
> };
>
> &cpub_opp_table_1 {
> opp-230400 {
> opp-hz = /bits/ 64 <230400>;
> opp-microvolt = <103>;
> };
>
> opp-24 {
> opp-hz = /bits/ 64 <24>;
> opp-microvolt = <104>;
> };
> };
>
> Neil
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Jerome Brunet


On Sun 19 Jul 2020 at 16:10, Christian Hewitt  
wrote:

> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
> regulator changess are from the HardKernel Linux kernel sources.
>
> Suggested-by: Dongjin Kim 
> Signed-off-by: Christian Hewitt 
> ---
>  arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>  2 files changed, 54 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
> b/arch/arm64/boot/dts/amlogic/Makefile
> index 5cac4d1d487d..6dc508b80133 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> new file mode 100644
> index ..99e96be509f8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> @@ -0,0 +1,53 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2019 BayLibre, SAS
> + * Author: Neil Armstrong 
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-g12b-odroid-n2.dtsi"
> +
> +/ {
> + compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> "amlogic,g12b";
> + model = "Hardkernel ODROID-N2+";
> +
> + vddcpu_a: regulator-vddcpu-a {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_ab 0 1500 0>;
> + };
> +
> + vddcpu_b: regulator-vddcpu-b {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_AO_cd 1 1500 0>;
> + };
> +
> + cpu_opp_table_0: opp-table-0 {
> + opp-190800 {
> + opp-hz = /bits/ 64 <190800>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-201600 {
> + opp-hz = /bits/ 64 <201600>;
> + opp-microvolt = <104>;
> + };
> + };
> +
> + cpub_opp_table_1: opp-table-1 {
> + opp-230400 {
> + opp-hz = /bits/ 64 <230400>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-24 {
> + opp-hz = /bits/ 64 <24>;
> + opp-microvolt = <104>;
> + };
> + };

Are this opp specific to the N2+ or S922x rev C ?
If it is the latter, shouldn't these be in s922x-revC dtsi ?

> +};
> +



Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Neil Armstrong
On 21/07/2020 10:10, Neil Armstrong wrote:
> On 19/07/2020 16:10, Christian Hewitt wrote:
>> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
>> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
>> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
>> regulator changess are from the HardKernel Linux kernel sources.
>>
>> Suggested-by: Dongjin Kim 
>> Signed-off-by: Christian Hewitt 
>> ---
>>  arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>>  2 files changed, 54 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
>> b/arch/arm64/boot/dts/amlogic/Makefile
>> index 5cac4d1d487d..6dc508b80133 100644
>> --- a/arch/arm64/boot/dts/amlogic/Makefile
>> +++ b/arch/arm64/boot/dts/amlogic/Makefile
>> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
>> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
>> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>> new file mode 100644
>> index ..99e96be509f8
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
>> @@ -0,0 +1,53 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Copyright (c) 2019 BayLibre, SAS
>> + * Author: Neil Armstrong 
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "meson-g12b-odroid-n2.dtsi"
>> +
>> +/ {
>> +compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
>> "amlogic,g12b";
>> +model = "Hardkernel ODROID-N2+";
>> +
>> +vddcpu_a: regulator-vddcpu-a {
>> +regulator-min-microvolt = <68>;
>> +regulator-max-microvolt = <104>;
>> +
>> +pwms = <&pwm_ab 0 1500 0>;
>> +};
>> +
>> +vddcpu_b: regulator-vddcpu-b {
>> +regulator-min-microvolt = <68>;
>> +regulator-max-microvolt = <104>;
>> +
>> +pwms = <&pwm_AO_cd 1 1500 0>;
>> +};
>> +
>> +cpu_opp_table_0: opp-table-0 {
>> +opp-190800 {
>> +opp-hz = /bits/ 64 <190800>;
>> +opp-microvolt = <103>;
>> +};
>> +
>> +opp-201600 {
>> +opp-hz = /bits/ 64 <201600>;
>> +opp-microvolt = <104>;
>> +};
>> +};
>> +
>> +cpub_opp_table_1: opp-table-1 {
>> +opp-230400 {
>> +opp-hz = /bits/ 64 <230400>;
>> +opp-microvolt = <103>;
>> +};
>> +
>> +opp-24 {
>> +opp-hz = /bits/ 64 <24>;
>> +opp-microvolt = <104>;
>> +};
>> +};
>> +};
>> +
>>
> Reviewed-by: Neil Armstrong 
> 

Wait no, it should be:

/ {
compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
"amlogic,g12b";
model = "Hardkernel ODROID-N2+";
};

&vddcpu_a {
regulator-min-microvolt = <68>;
regulator-max-microvolt = <104>;

pwms = <&pwm_ab 0 1500 0>;
};

&vddcpu_b {
regulator-min-microvolt = <68>;
regulator-max-microvolt = <104>;

pwms = <&pwm_AO_cd 1 1500 0>;
};

&cpu_opp_table_0 {
opp-190800 {
opp-hz = /bits/ 64 <190800>;
opp-microvolt = <103>;
};

opp-201600 {
opp-hz = /bits/ 64 <201600>;
opp-microvolt = <104>;
};
};

&cpub_opp_table_1 {
opp-230400 {
opp-hz = /bits/ 64 <230400>;
opp-microvolt = <103>;
};

opp-24 {
opp-hz = /bits/ 64 <24>;
opp-microvolt = <104>;
};
};

Neil


Re: [PATCH 3/3] arm64: dts: meson: add support for the ODROID-N2+

2020-07-21 Thread Neil Armstrong
On 19/07/2020 16:10, Christian Hewitt wrote:
> HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
> clock speeds than the original ODROID-N2. Hardkernel supports the big cpu
> cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
> regulator changess are from the HardKernel Linux kernel sources.
> 
> Suggested-by: Dongjin Kim 
> Signed-off-by: Christian Hewitt 
> ---
>  arch/arm64/boot/dts/amlogic/Makefile  |  1 +
>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++
>  2 files changed, 54 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> 
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile 
> b/arch/arm64/boot/dts/amlogic/Makefile
> index 5cac4d1d487d..6dc508b80133 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts 
> b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> new file mode 100644
> index ..99e96be509f8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> @@ -0,0 +1,53 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2019 BayLibre, SAS
> + * Author: Neil Armstrong 
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-g12b-odroid-n2.dtsi"
> +
> +/ {
> + compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", 
> "amlogic,g12b";
> + model = "Hardkernel ODROID-N2+";
> +
> + vddcpu_a: regulator-vddcpu-a {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_ab 0 1500 0>;
> + };
> +
> + vddcpu_b: regulator-vddcpu-b {
> + regulator-min-microvolt = <68>;
> + regulator-max-microvolt = <104>;
> +
> + pwms = <&pwm_AO_cd 1 1500 0>;
> + };
> +
> + cpu_opp_table_0: opp-table-0 {
> + opp-190800 {
> + opp-hz = /bits/ 64 <190800>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-201600 {
> + opp-hz = /bits/ 64 <201600>;
> + opp-microvolt = <104>;
> + };
> + };
> +
> + cpub_opp_table_1: opp-table-1 {
> + opp-230400 {
> + opp-hz = /bits/ 64 <230400>;
> + opp-microvolt = <103>;
> + };
> +
> + opp-24 {
> + opp-hz = /bits/ 64 <24>;
> + opp-microvolt = <104>;
> + };
> + };
> +};
> +
> 
Reviewed-by: Neil Armstrong