diff mbox series

[v7,1/3] arm64: dts: imx8mm-evk: move PMIC configuration

Message ID 20230110152316.1149940-2-johannes.schneider@leica-geosystems.com (mailing list archive)
State New, archived
Headers show
Series pmic on imx8mm | expand

Commit Message

SCHNEIDER Johannes Jan. 10, 2023, 3:23 p.m. UTC
Move the PMIC configuration out of imx8mm-evk.dtsi into a separate
file; to accommodate devicetrees for the rev-b EVK, which comes with a
different PMIC.

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
 .../boot/dts/freescale/imx8mm-ddr4-evk.dts    |   1 +
 .../dts/freescale/imx8mm-evk-rohm-pmic.dtsi   | 118 ++++++++++++++++++
 arch/arm64/boot/dts/freescale/imx8mm-evk.dts  |   1 +
 arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 112 -----------------
 4 files changed, 120 insertions(+), 112 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi

Comments

Marco Felsch Jan. 19, 2023, 9:51 a.m. UTC | #1
Hi Johannes,

thanks for your patch.

On 23-01-10, Johannes Schneider wrote:
> Move the PMIC configuration out of imx8mm-evk.dtsi into a separate
> file; to accommodate devicetrees for the rev-b EVK, which comes with a

I'm not sure if we should call it rev-b since this is quite confusing.
The whole EVK bundle (cpu-board + baseboard) is called EVKB. The most
recent cpu board revision is A4 and the the cpu board itself is called
8MMINILPD4-CPU2 whereas the older cpu board is called 8MMINILPD4-CPU.

So dts file name imx8mm-evkb is correct, but mention it as rev-b in your
commit message is wrong in my opinion.

> different PMIC.


> 
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
> ---
>  .../boot/dts/freescale/imx8mm-ddr4-evk.dts    |   1 +
>  .../dts/freescale/imx8mm-evk-rohm-pmic.dtsi   | 118 ++++++++++++++++++
>  arch/arm64/boot/dts/freescale/imx8mm-evk.dts  |   1 +
>  arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 112 -----------------
>  4 files changed, 120 insertions(+), 112 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
> index 6c079c0a3a48..f39182ce65b4 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
> @@ -6,6 +6,7 @@
>  /dts-v1/;
>  
>  #include "imx8mm-evk.dtsi"
> +#include "imx8mm-evk-rohm-pmic.dtsi"

Do we really need to move it into another dtsi file? I would either
suggest to move the pmic description into the .dts file since it is not
common anymore. This way we can avoid the imx8mm-evk-rohm-pmic.dtsi.

Regards,
  Marco

>  / {
>  	model = "FSL i.MX8MM DDR4 EVK with CYW43455 WIFI/BT board";
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
> new file mode 100644
> index 000000000000..0b056996a27b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
> @@ -0,0 +1,118 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright 2020 NXP
> + */
> +
> +&i2c1 {
> +	pmic@4b {
> +		compatible = "rohm,bd71847";
> +		reg = <0x4b>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_pmic>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> +		rohm,reset-snvs-powered;
> +
> +		#clock-cells = <0>;
> +		clocks = <&osc_32k 0>;
> +		clock-output-names = "clk-32k-out";
> +
> +		regulators {
> +			buck1_reg: BUCK1 {
> +				regulator-name = "buck1";
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <1250>;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "buck2";
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <1250>;
> +				rohm,dvs-run-voltage = <1000000>;
> +				rohm,dvs-idle-voltage = <900000>;
> +			};
> +
> +			buck3_reg: BUCK3 {
> +				// BUCK5 in datasheet
> +				regulator-name = "buck3";
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			buck4_reg: BUCK4 {
> +				// BUCK6 in datasheet
> +				regulator-name = "buck4";
> +				regulator-min-microvolt = <3000000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			buck5_reg: BUCK5 {
> +				// BUCK7 in datasheet
> +				regulator-name = "buck5";
> +				regulator-min-microvolt = <1605000>;
> +				regulator-max-microvolt = <1995000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			buck6_reg: BUCK6 {
> +				// BUCK8 in datasheet
> +				regulator-name = "buck6";
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <1400000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo1_reg: LDO1 {
> +				regulator-name = "ldo1";
> +				regulator-min-microvolt = <1600000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "ldo2";
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <900000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo3_reg: LDO3 {
> +				regulator-name = "ldo3";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo4_reg: LDO4 {
> +				regulator-name = "ldo4";
> +				regulator-min-microvolt = <900000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo6_reg: LDO6 {
> +				regulator-name = "ldo6";
> +				regulator-min-microvolt = <900000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> index a2b24d4d4e3e..d2b6d7de7e53 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> @@ -7,6 +7,7 @@
>  
>  #include <dt-bindings/usb/pd.h>
>  #include "imx8mm-evk.dtsi"
> +#include "imx8mm-evk-rohm-pmic.dtsi"
>  
>  / {
>  	model = "FSL i.MX8MM EVK board";
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> index 7d6317d95b13..21d0614af44c 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> @@ -182,118 +182,6 @@ &i2c1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_i2c1>;
>  	status = "okay";
> -
> -	pmic@4b {
> -		compatible = "rohm,bd71847";
> -		reg = <0x4b>;
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&pinctrl_pmic>;
> -		interrupt-parent = <&gpio1>;
> -		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> -		rohm,reset-snvs-powered;
> -
> -		#clock-cells = <0>;
> -		clocks = <&osc_32k 0>;
> -		clock-output-names = "clk-32k-out";
> -
> -		regulators {
> -			buck1_reg: BUCK1 {
> -				regulator-name = "buck1";
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <1300000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -				regulator-ramp-delay = <1250>;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "buck2";
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <1300000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -				regulator-ramp-delay = <1250>;
> -				rohm,dvs-run-voltage = <1000000>;
> -				rohm,dvs-idle-voltage = <900000>;
> -			};
> -
> -			buck3_reg: BUCK3 {
> -				// BUCK5 in datasheet
> -				regulator-name = "buck3";
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			buck4_reg: BUCK4 {
> -				// BUCK6 in datasheet
> -				regulator-name = "buck4";
> -				regulator-min-microvolt = <3000000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			buck5_reg: BUCK5 {
> -				// BUCK7 in datasheet
> -				regulator-name = "buck5";
> -				regulator-min-microvolt = <1605000>;
> -				regulator-max-microvolt = <1995000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			buck6_reg: BUCK6 {
> -				// BUCK8 in datasheet
> -				regulator-name = "buck6";
> -				regulator-min-microvolt = <800000>;
> -				regulator-max-microvolt = <1400000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			ldo1_reg: LDO1 {
> -				regulator-name = "ldo1";
> -				regulator-min-microvolt = <1600000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "ldo2";
> -				regulator-min-microvolt = <800000>;
> -				regulator-max-microvolt = <900000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			ldo3_reg: LDO3 {
> -				regulator-name = "ldo3";
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			ldo4_reg: LDO4 {
> -				regulator-name = "ldo4";
> -				regulator-min-microvolt = <900000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -
> -			ldo6_reg: LDO6 {
> -				regulator-name = "ldo6";
> -				regulator-min-microvolt = <900000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-boot-on;
> -				regulator-always-on;
> -			};
> -		};
> -	};
>  };
>  
>  &i2c2 {
> -- 
> 2.25.1
> 
> 
>
Ahmad Fatoum Jan. 19, 2023, 10:02 a.m. UTC | #2
Hello Marco,

On 19.01.23 10:51, Marco Felsch wrote:
> Do we really need to move it into another dtsi file? I would either
> suggest to move the pmic description into the .dts file since it is not
> common anymore. This way we can avoid the imx8mm-evk-rohm-pmic.dtsi.

The PMIC DTSIs were my suggestion. The Rohm PMIC is still common between
old LPDDR4 EVK and DDR4 EVK.

Cheers,
Ahmad

> 
> Regards,
>   Marco
> 
>>  / {
>>  	model = "FSL i.MX8MM DDR4 EVK with CYW43455 WIFI/BT board";
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
>> new file mode 100644
>> index 000000000000..0b056996a27b
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
>> @@ -0,0 +1,118 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Copyright 2020 NXP
>> + */
>> +
>> +&i2c1 {
>> +	pmic@4b {
>> +		compatible = "rohm,bd71847";
>> +		reg = <0x4b>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&pinctrl_pmic>;
>> +		interrupt-parent = <&gpio1>;
>> +		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>> +		rohm,reset-snvs-powered;
>> +
>> +		#clock-cells = <0>;
>> +		clocks = <&osc_32k 0>;
>> +		clock-output-names = "clk-32k-out";
>> +
>> +		regulators {
>> +			buck1_reg: BUCK1 {
>> +				regulator-name = "buck1";
>> +				regulator-min-microvolt = <700000>;
>> +				regulator-max-microvolt = <1300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +				regulator-ramp-delay = <1250>;
>> +			};
>> +
>> +			buck2_reg: BUCK2 {
>> +				regulator-name = "buck2";
>> +				regulator-min-microvolt = <700000>;
>> +				regulator-max-microvolt = <1300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +				regulator-ramp-delay = <1250>;
>> +				rohm,dvs-run-voltage = <1000000>;
>> +				rohm,dvs-idle-voltage = <900000>;
>> +			};
>> +
>> +			buck3_reg: BUCK3 {
>> +				// BUCK5 in datasheet
>> +				regulator-name = "buck3";
>> +				regulator-min-microvolt = <700000>;
>> +				regulator-max-microvolt = <1350000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			buck4_reg: BUCK4 {
>> +				// BUCK6 in datasheet
>> +				regulator-name = "buck4";
>> +				regulator-min-microvolt = <3000000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			buck5_reg: BUCK5 {
>> +				// BUCK7 in datasheet
>> +				regulator-name = "buck5";
>> +				regulator-min-microvolt = <1605000>;
>> +				regulator-max-microvolt = <1995000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			buck6_reg: BUCK6 {
>> +				// BUCK8 in datasheet
>> +				regulator-name = "buck6";
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <1400000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo1_reg: LDO1 {
>> +				regulator-name = "ldo1";
>> +				regulator-min-microvolt = <1600000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo2_reg: LDO2 {
>> +				regulator-name = "ldo2";
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <900000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo3_reg: LDO3 {
>> +				regulator-name = "ldo3";
>> +				regulator-min-microvolt = <1800000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo4_reg: LDO4 {
>> +				regulator-name = "ldo4";
>> +				regulator-min-microvolt = <900000>;
>> +				regulator-max-microvolt = <1800000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo6_reg: LDO6 {
>> +				regulator-name = "ldo6";
>> +				regulator-min-microvolt = <900000>;
>> +				regulator-max-microvolt = <1800000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +		};
>> +	};
>> +};
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> index a2b24d4d4e3e..d2b6d7de7e53 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> @@ -7,6 +7,7 @@
>>  
>>  #include <dt-bindings/usb/pd.h>
>>  #include "imx8mm-evk.dtsi"
>> +#include "imx8mm-evk-rohm-pmic.dtsi"
>>  
>>  / {
>>  	model = "FSL i.MX8MM EVK board";
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
>> index 7d6317d95b13..21d0614af44c 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
>> @@ -182,118 +182,6 @@ &i2c1 {
>>  	pinctrl-names = "default";
>>  	pinctrl-0 = <&pinctrl_i2c1>;
>>  	status = "okay";
>> -
>> -	pmic@4b {
>> -		compatible = "rohm,bd71847";
>> -		reg = <0x4b>;
>> -		pinctrl-names = "default";
>> -		pinctrl-0 = <&pinctrl_pmic>;
>> -		interrupt-parent = <&gpio1>;
>> -		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>> -		rohm,reset-snvs-powered;
>> -
>> -		#clock-cells = <0>;
>> -		clocks = <&osc_32k 0>;
>> -		clock-output-names = "clk-32k-out";
>> -
>> -		regulators {
>> -			buck1_reg: BUCK1 {
>> -				regulator-name = "buck1";
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <1300000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -				regulator-ramp-delay = <1250>;
>> -			};
>> -
>> -			buck2_reg: BUCK2 {
>> -				regulator-name = "buck2";
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <1300000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -				regulator-ramp-delay = <1250>;
>> -				rohm,dvs-run-voltage = <1000000>;
>> -				rohm,dvs-idle-voltage = <900000>;
>> -			};
>> -
>> -			buck3_reg: BUCK3 {
>> -				// BUCK5 in datasheet
>> -				regulator-name = "buck3";
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <1350000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			buck4_reg: BUCK4 {
>> -				// BUCK6 in datasheet
>> -				regulator-name = "buck4";
>> -				regulator-min-microvolt = <3000000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			buck5_reg: BUCK5 {
>> -				// BUCK7 in datasheet
>> -				regulator-name = "buck5";
>> -				regulator-min-microvolt = <1605000>;
>> -				regulator-max-microvolt = <1995000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			buck6_reg: BUCK6 {
>> -				// BUCK8 in datasheet
>> -				regulator-name = "buck6";
>> -				regulator-min-microvolt = <800000>;
>> -				regulator-max-microvolt = <1400000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			ldo1_reg: LDO1 {
>> -				regulator-name = "ldo1";
>> -				regulator-min-microvolt = <1600000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			ldo2_reg: LDO2 {
>> -				regulator-name = "ldo2";
>> -				regulator-min-microvolt = <800000>;
>> -				regulator-max-microvolt = <900000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			ldo3_reg: LDO3 {
>> -				regulator-name = "ldo3";
>> -				regulator-min-microvolt = <1800000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			ldo4_reg: LDO4 {
>> -				regulator-name = "ldo4";
>> -				regulator-min-microvolt = <900000>;
>> -				regulator-max-microvolt = <1800000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -
>> -			ldo6_reg: LDO6 {
>> -				regulator-name = "ldo6";
>> -				regulator-min-microvolt = <900000>;
>> -				regulator-max-microvolt = <1800000>;
>> -				regulator-boot-on;
>> -				regulator-always-on;
>> -			};
>> -		};
>> -	};
>>  };
>>  
>>  &i2c2 {
>> -- 
>> 2.25.1
>>
>>
>>
> 
>
Marco Felsch Jan. 19, 2023, 10:45 a.m. UTC | #3
Hi Ahamd,

On 23-01-19, Ahmad Fatoum wrote:
> Hello Marco,
> 
> On 19.01.23 10:51, Marco Felsch wrote:
> > Do we really need to move it into another dtsi file? I would either
> > suggest to move the pmic description into the .dts file since it is not
> > common anymore. This way we can avoid the imx8mm-evk-rohm-pmic.dtsi.
> 
> The PMIC DTSIs were my suggestion. The Rohm PMIC is still common between
> old LPDDR4 EVK and DDR4 EVK.

Ah okay but still it is one indirection more while reading the dts file.
Therefore I would prefer to put it into the dts file or keep it in the
dtsi file and delete the node within the imx8mm-evkb.dts file. But this
is just my opinion.

Regards,
  Marco


> 
> Cheers,
> Ahmad
> 
> > 
> > Regards,
> >   Marco
> > 
> >>  / {
> >>  	model = "FSL i.MX8MM DDR4 EVK with CYW43455 WIFI/BT board";
> >> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
> >> new file mode 100644
> >> index 000000000000..0b056996a27b
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
> >> @@ -0,0 +1,118 @@
> >> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >> +/*
> >> + * Copyright 2020 NXP
> >> + */
> >> +
> >> +&i2c1 {
> >> +	pmic@4b {
> >> +		compatible = "rohm,bd71847";
> >> +		reg = <0x4b>;
> >> +		pinctrl-names = "default";
> >> +		pinctrl-0 = <&pinctrl_pmic>;
> >> +		interrupt-parent = <&gpio1>;
> >> +		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> >> +		rohm,reset-snvs-powered;
> >> +
> >> +		#clock-cells = <0>;
> >> +		clocks = <&osc_32k 0>;
> >> +		clock-output-names = "clk-32k-out";
> >> +
> >> +		regulators {
> >> +			buck1_reg: BUCK1 {
> >> +				regulator-name = "buck1";
> >> +				regulator-min-microvolt = <700000>;
> >> +				regulator-max-microvolt = <1300000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +				regulator-ramp-delay = <1250>;
> >> +			};
> >> +
> >> +			buck2_reg: BUCK2 {
> >> +				regulator-name = "buck2";
> >> +				regulator-min-microvolt = <700000>;
> >> +				regulator-max-microvolt = <1300000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +				regulator-ramp-delay = <1250>;
> >> +				rohm,dvs-run-voltage = <1000000>;
> >> +				rohm,dvs-idle-voltage = <900000>;
> >> +			};
> >> +
> >> +			buck3_reg: BUCK3 {
> >> +				// BUCK5 in datasheet
> >> +				regulator-name = "buck3";
> >> +				regulator-min-microvolt = <700000>;
> >> +				regulator-max-microvolt = <1350000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			buck4_reg: BUCK4 {
> >> +				// BUCK6 in datasheet
> >> +				regulator-name = "buck4";
> >> +				regulator-min-microvolt = <3000000>;
> >> +				regulator-max-microvolt = <3300000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			buck5_reg: BUCK5 {
> >> +				// BUCK7 in datasheet
> >> +				regulator-name = "buck5";
> >> +				regulator-min-microvolt = <1605000>;
> >> +				regulator-max-microvolt = <1995000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			buck6_reg: BUCK6 {
> >> +				// BUCK8 in datasheet
> >> +				regulator-name = "buck6";
> >> +				regulator-min-microvolt = <800000>;
> >> +				regulator-max-microvolt = <1400000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			ldo1_reg: LDO1 {
> >> +				regulator-name = "ldo1";
> >> +				regulator-min-microvolt = <1600000>;
> >> +				regulator-max-microvolt = <3300000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			ldo2_reg: LDO2 {
> >> +				regulator-name = "ldo2";
> >> +				regulator-min-microvolt = <800000>;
> >> +				regulator-max-microvolt = <900000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			ldo3_reg: LDO3 {
> >> +				regulator-name = "ldo3";
> >> +				regulator-min-microvolt = <1800000>;
> >> +				regulator-max-microvolt = <3300000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			ldo4_reg: LDO4 {
> >> +				regulator-name = "ldo4";
> >> +				regulator-min-microvolt = <900000>;
> >> +				regulator-max-microvolt = <1800000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +
> >> +			ldo6_reg: LDO6 {
> >> +				regulator-name = "ldo6";
> >> +				regulator-min-microvolt = <900000>;
> >> +				regulator-max-microvolt = <1800000>;
> >> +				regulator-boot-on;
> >> +				regulator-always-on;
> >> +			};
> >> +		};
> >> +	};
> >> +};
> >> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> >> index a2b24d4d4e3e..d2b6d7de7e53 100644
> >> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> >> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> >> @@ -7,6 +7,7 @@
> >>  
> >>  #include <dt-bindings/usb/pd.h>
> >>  #include "imx8mm-evk.dtsi"
> >> +#include "imx8mm-evk-rohm-pmic.dtsi"
> >>  
> >>  / {
> >>  	model = "FSL i.MX8MM EVK board";
> >> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> >> index 7d6317d95b13..21d0614af44c 100644
> >> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> >> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> >> @@ -182,118 +182,6 @@ &i2c1 {
> >>  	pinctrl-names = "default";
> >>  	pinctrl-0 = <&pinctrl_i2c1>;
> >>  	status = "okay";
> >> -
> >> -	pmic@4b {
> >> -		compatible = "rohm,bd71847";
> >> -		reg = <0x4b>;
> >> -		pinctrl-names = "default";
> >> -		pinctrl-0 = <&pinctrl_pmic>;
> >> -		interrupt-parent = <&gpio1>;
> >> -		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> >> -		rohm,reset-snvs-powered;
> >> -
> >> -		#clock-cells = <0>;
> >> -		clocks = <&osc_32k 0>;
> >> -		clock-output-names = "clk-32k-out";
> >> -
> >> -		regulators {
> >> -			buck1_reg: BUCK1 {
> >> -				regulator-name = "buck1";
> >> -				regulator-min-microvolt = <700000>;
> >> -				regulator-max-microvolt = <1300000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -				regulator-ramp-delay = <1250>;
> >> -			};
> >> -
> >> -			buck2_reg: BUCK2 {
> >> -				regulator-name = "buck2";
> >> -				regulator-min-microvolt = <700000>;
> >> -				regulator-max-microvolt = <1300000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -				regulator-ramp-delay = <1250>;
> >> -				rohm,dvs-run-voltage = <1000000>;
> >> -				rohm,dvs-idle-voltage = <900000>;
> >> -			};
> >> -
> >> -			buck3_reg: BUCK3 {
> >> -				// BUCK5 in datasheet
> >> -				regulator-name = "buck3";
> >> -				regulator-min-microvolt = <700000>;
> >> -				regulator-max-microvolt = <1350000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			buck4_reg: BUCK4 {
> >> -				// BUCK6 in datasheet
> >> -				regulator-name = "buck4";
> >> -				regulator-min-microvolt = <3000000>;
> >> -				regulator-max-microvolt = <3300000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			buck5_reg: BUCK5 {
> >> -				// BUCK7 in datasheet
> >> -				regulator-name = "buck5";
> >> -				regulator-min-microvolt = <1605000>;
> >> -				regulator-max-microvolt = <1995000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			buck6_reg: BUCK6 {
> >> -				// BUCK8 in datasheet
> >> -				regulator-name = "buck6";
> >> -				regulator-min-microvolt = <800000>;
> >> -				regulator-max-microvolt = <1400000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			ldo1_reg: LDO1 {
> >> -				regulator-name = "ldo1";
> >> -				regulator-min-microvolt = <1600000>;
> >> -				regulator-max-microvolt = <3300000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			ldo2_reg: LDO2 {
> >> -				regulator-name = "ldo2";
> >> -				regulator-min-microvolt = <800000>;
> >> -				regulator-max-microvolt = <900000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			ldo3_reg: LDO3 {
> >> -				regulator-name = "ldo3";
> >> -				regulator-min-microvolt = <1800000>;
> >> -				regulator-max-microvolt = <3300000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			ldo4_reg: LDO4 {
> >> -				regulator-name = "ldo4";
> >> -				regulator-min-microvolt = <900000>;
> >> -				regulator-max-microvolt = <1800000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -
> >> -			ldo6_reg: LDO6 {
> >> -				regulator-name = "ldo6";
> >> -				regulator-min-microvolt = <900000>;
> >> -				regulator-max-microvolt = <1800000>;
> >> -				regulator-boot-on;
> >> -				regulator-always-on;
> >> -			};
> >> -		};
> >> -	};
> >>  };
> >>  
> >>  &i2c2 {
> >> -- 
> >> 2.25.1
> >>
> >>
> >>
> > 
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
index 6c079c0a3a48..f39182ce65b4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dts
@@ -6,6 +6,7 @@ 
 /dts-v1/;
 
 #include "imx8mm-evk.dtsi"
+#include "imx8mm-evk-rohm-pmic.dtsi"
 
 / {
 	model = "FSL i.MX8MM DDR4 EVK with CYW43455 WIFI/BT board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
new file mode 100644
index 000000000000..0b056996a27b
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk-rohm-pmic.dtsi
@@ -0,0 +1,118 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2020 NXP
+ */
+
+&i2c1 {
+	pmic@4b {
+		compatible = "rohm,bd71847";
+		reg = <0x4b>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_pmic>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+		rohm,reset-snvs-powered;
+
+		#clock-cells = <0>;
+		clocks = <&osc_32k 0>;
+		clock-output-names = "clk-32k-out";
+
+		regulators {
+			buck1_reg: BUCK1 {
+				regulator-name = "buck1";
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1300000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <1250>;
+			};
+
+			buck2_reg: BUCK2 {
+				regulator-name = "buck2";
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1300000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <1250>;
+				rohm,dvs-run-voltage = <1000000>;
+				rohm,dvs-idle-voltage = <900000>;
+			};
+
+			buck3_reg: BUCK3 {
+				// BUCK5 in datasheet
+				regulator-name = "buck3";
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck4_reg: BUCK4 {
+				// BUCK6 in datasheet
+				regulator-name = "buck4";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck5_reg: BUCK5 {
+				// BUCK7 in datasheet
+				regulator-name = "buck5";
+				regulator-min-microvolt = <1605000>;
+				regulator-max-microvolt = <1995000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck6_reg: BUCK6 {
+				// BUCK8 in datasheet
+				regulator-name = "buck6";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo1_reg: LDO1 {
+				regulator-name = "ldo1";
+				regulator-min-microvolt = <1600000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "ldo2";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <900000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo3_reg: LDO3 {
+				regulator-name = "ldo3";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo4_reg: LDO4 {
+				regulator-name = "ldo4";
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo6_reg: LDO6 {
+				regulator-name = "ldo6";
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
index a2b24d4d4e3e..d2b6d7de7e53 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
@@ -7,6 +7,7 @@ 
 
 #include <dt-bindings/usb/pd.h>
 #include "imx8mm-evk.dtsi"
+#include "imx8mm-evk-rohm-pmic.dtsi"
 
 / {
 	model = "FSL i.MX8MM EVK board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
index 7d6317d95b13..21d0614af44c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
@@ -182,118 +182,6 @@  &i2c1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_i2c1>;
 	status = "okay";
-
-	pmic@4b {
-		compatible = "rohm,bd71847";
-		reg = <0x4b>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_pmic>;
-		interrupt-parent = <&gpio1>;
-		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
-		rohm,reset-snvs-powered;
-
-		#clock-cells = <0>;
-		clocks = <&osc_32k 0>;
-		clock-output-names = "clk-32k-out";
-
-		regulators {
-			buck1_reg: BUCK1 {
-				regulator-name = "buck1";
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1300000>;
-				regulator-boot-on;
-				regulator-always-on;
-				regulator-ramp-delay = <1250>;
-			};
-
-			buck2_reg: BUCK2 {
-				regulator-name = "buck2";
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1300000>;
-				regulator-boot-on;
-				regulator-always-on;
-				regulator-ramp-delay = <1250>;
-				rohm,dvs-run-voltage = <1000000>;
-				rohm,dvs-idle-voltage = <900000>;
-			};
-
-			buck3_reg: BUCK3 {
-				// BUCK5 in datasheet
-				regulator-name = "buck3";
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			buck4_reg: BUCK4 {
-				// BUCK6 in datasheet
-				regulator-name = "buck4";
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			buck5_reg: BUCK5 {
-				// BUCK7 in datasheet
-				regulator-name = "buck5";
-				regulator-min-microvolt = <1605000>;
-				regulator-max-microvolt = <1995000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			buck6_reg: BUCK6 {
-				// BUCK8 in datasheet
-				regulator-name = "buck6";
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <1400000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo1_reg: LDO1 {
-				regulator-name = "ldo1";
-				regulator-min-microvolt = <1600000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo2_reg: LDO2 {
-				regulator-name = "ldo2";
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <900000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo3_reg: LDO3 {
-				regulator-name = "ldo3";
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo4_reg: LDO4 {
-				regulator-name = "ldo4";
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo6_reg: LDO6 {
-				regulator-name = "ldo6";
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-		};
-	};
 };
 
 &i2c2 {