From: Shawn Guo <shawnguo@kernel.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: Stephen Boyd <sboyd@kernel.org>, Jacky Bai <ping.bai@nxp.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Robin Gong <yibin.gong@nxp.com>,
Aisheng Dong <aisheng.dong@nxp.com>,
Angus Ainslie <angus@akkea.ca>,
Fabio Estevam <fabio.estevam@nxp.com>,
Abel Vesa <abel.vesa@nxp.com>,
"linux-pm@lists.infradead.org" <linux-pm@lists.infradead.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 4/4] arm64: dts: imx8mm-evk: Add BD71847 PMIC
Date: Mon, 22 Apr 2019 08:18:41 +0800 [thread overview]
Message-ID: <20190422001840.GG19962@dragon> (raw)
In-Reply-To: <7df309d19cf7f311afe736c95666afe8697e1e5a.1555077720.git.leonard.crestez@nxp.com>
On Fri, Apr 12, 2019 at 02:10:05PM +0000, Leonard Crestez wrote:
> The BUCK2 regulator is used for cpufreq voltage control, otherwise
> configuration is mostly static.
>
> This uses the newly-implemented rohm,reset-snvs-powered property to
> properly handle the SNVS state of imx8mm.
>
> Between BD71837 and BD71847 the BUCK3/4 regulators were removed but
> datasheet and board schematics kept the names for BUCK5/6/7/8. The
> driver however renumbered 5/6/7/8 to 3/4/5/6. Use the names from DT
> bindings and add comments to signal this.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 145 +++++++++++++++++++
> 1 file changed, 145 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> index 2d5d89475b76..098ccaefd169 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> @@ -37,10 +37,14 @@
> gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> };
> };
>
> +&A53_0 {
> + cpu-supply = <&buck2_reg>;
> +};
> +
> &fec1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_fec1>;
> phy-mode = "rgmii-id";
> phy-handle = <ðphy0>;
> @@ -93,10 +97,138 @@
> pinctrl-0 = <&pinctrl_wdog>;
> fsl,ext-reset-output;
> status = "okay";
> };
>
> +&i2c1 {
> + clock-frequency = <400000>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_i2c1>;
> + status = "okay";
> +
> + pmic@4b {
> + reg = <0x4b>;
> + compatible = "rohm,bd71847";
We usually start properties with 'compatible' than anything else. So
please move 'reg' afterwards.
> + pinctrl-0 = <&pinctrl_pmic>;
> + interrupt-parent = <&gpio1>;
> + interrupts = <3 GPIO_ACTIVE_LOW>;
> + rohm,reset-snvs-powered;
> +
> + regulators {
> + #address-cells = <1>;
> + #size-cells = <0>;
Looking at bindings doc, I'm not sure if we want the artificial address
cell (unit address and 'reg' property). I think node names like
regulator-xxx should just work?
Shawn
> +
> + buck1_reg: regulator@0 {
> + reg = <0>;
> + regulator-compatible = "BUCK1";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + regulator-ramp-delay = <1250>;
> + };
> +
> + buck2_reg: regulator@1 {
> + reg = <1>;
> + regulator-compatible = "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: regulator@2 {
> + // BUCK5 in datasheet
> + reg = <2>;
> + regulator-compatible = "BUCK3";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buck4_reg: regulator@3 {
> + // BUCK6 in datasheet
> + reg = <3>;
> + regulator-compatible = "BUCK4";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buck5_reg: regulator@4 {
> + // BUCK7 in datasheet
> + reg = <4>;
> + regulator-compatible = "BUCK5";
> + regulator-min-microvolt = <1605000>;
> + regulator-max-microvolt = <1995000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buck6_reg: regulator@5 {
> + // BUCK8 in datasheet
> + reg = <5>;
> + regulator-compatible = "BUCK6";
> + regulator-min-microvolt = <800000>;
> + regulator-max-microvolt = <1400000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo1_reg: regulator@6 {
> + reg = <6>;
> + regulator-compatible = "LDO1";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo2_reg: regulator@7 {
> + reg = <7>;
> + regulator-compatible = "LDO2";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <900000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo3_reg: regulator@8 {
> + reg = <8>;
> + regulator-compatible = "LDO3";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo4_reg: regulator@9 {
> + reg = <9>;
> + regulator-compatible = "LDO4";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo6_reg: regulator@11 {
> + reg = <11>;
> + regulator-compatible = "LDO6";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> + };
> +};
> +
> &iomuxc {
> pinctrl-names = "default";
>
> pinctrl_fec1: fec1grp {
> fsl,pins = <
> @@ -122,10 +254,23 @@
> fsl,pins = <
> MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16 0x19
> >;
> };
>
> + pinctrl_i2c1: i2c1grp {
> + fsl,pins = <
> + MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3
> + MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3
> + >;
> + };
> +
> + pinctrl_pmic: pmicirq {
> + fsl,pins = <
> + MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41
> + >;
> + };
> +
> pinctrl_reg_usdhc2_vmmc: regusdhc2vmmc {
> fsl,pins = <
> MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
> >;
> };
> --
> 2.17.1
>
prev parent reply other threads:[~2019-04-22 0:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 14:10 [PATCH 0/4] imx8mm-evk: Enable CPU freq and voltage switching Leonard Crestez
2019-04-12 14:10 ` [PATCH 2/4] arm64: dts: imx8mm: Add cpufreq properties Leonard Crestez
2019-04-22 0:42 ` Shawn Guo
2019-04-12 14:10 ` [PATCH 1/4] clk: imx: Fix PLL_1416X not rounding rates Leonard Crestez
2019-04-12 16:43 ` Stephen Boyd
2019-04-12 16:51 ` Leonard Crestez
2019-04-12 18:34 ` Stephen Boyd
2019-04-12 19:02 ` Leonard Crestez
2019-04-12 21:21 ` Stephen Boyd
2019-04-12 14:10 ` [PATCH 3/4] arm64: defconfig: Enable ROHM_BD718XX PMIC for imx8mm-evk Leonard Crestez
2019-04-22 0:43 ` Shawn Guo
2019-04-12 14:10 ` [PATCH 4/4] arm64: dts: imx8mm-evk: Add BD71847 PMIC Leonard Crestez
2019-04-15 4:58 ` Vaittinen, Matti
2019-04-22 0:18 ` Shawn Guo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190422001840.GG19962@dragon \
--to=shawnguo@kernel.org \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=angus@akkea.ca \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-pm@lists.infradead.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=ping.bai@nxp.com \
--cc=sboyd@kernel.org \
--cc=yibin.gong@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.