Message ID | 3dbf3c6b01b4c372544127d61746e2d9b62108d7.1576076393.git.leonard.crestez@nxp.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v2] ARM: dts: imx6ul-evk: Fix peripheral regulator | expand |
On 19-12-11 17:02, Leonard Crestez wrote: > Many peripherals are affected by gpio5/2, not just sensors. One of those > is ethernet phy so network boot is current broken. > > Fix by renaming reg_sensors and marking it as "always on". Also add a > comment asking for careful testing if this is to be made dynamic in the > future. > > The "peri_3v3" naming is similar to imx6sx-sdb and regulator-name is > same string as in schematics (VPERI_3V3). > > Fixes: 09e2b1048954 ("ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator") > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> > --- > Changes since v1: > * Properly set phy-supply so that ethernet works even without > regulator-always-on > * Change regulator-name to VPERI_3V3 to match pdf schematics > * List affected peripherals in comment Thanks :) Regards, Marco > Link to v1: https://patchwork.kernel.org/patch/11284851/ > > It seems the wm8960 doesn't have regulator support so making this > work dynamically might also require changes in sound drivers. > > arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 26 +++++++++++++++++++------ > 1 file changed, 20 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi > index e5dafb49ef12..212144511b66 100644 > --- a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi > +++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi > @@ -28,18 +28,30 @@ > regulator-max-microvolt = <3300000>; > gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; > enable-active-high; > }; > > - reg_sensors: regulator-sensors { > + reg_peri_3v3: regulator-peri-3v3 { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_sensors_reg>; > - regulator-name = "sensors-supply"; > + pinctrl-0 = <&pinctrl_peri_3v3>; > + regulator-name = "VPERI_3V3"; > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > gpio = <&gpio5 2 GPIO_ACTIVE_LOW>; > + /* > + * If you want to want to make this dynamic please > + * check schematics and test all affected peripherals: > + * > + * - sensors > + * - ethernet phy > + * - can > + * - bluetooth > + * - wm8960 audio codec > + * - ov5640 camera > + */ > + regulator-always-on; > }; > > reg_can_3v3: regulator-can-3v3 { > compatible = "regulator-fixed"; > regulator-name = "can-3v3"; > @@ -138,18 +150,20 @@ > &fec1 { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_enet1>; > phy-mode = "rmii"; > phy-handle = <ðphy0>; > + phy-supply = <®_peri_3v3>; > status = "okay"; > }; > > &fec2 { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_enet2>; > phy-mode = "rmii"; > phy-handle = <ðphy1>; > + phy-supply = <®_peri_3v3>; > status = "okay"; > > mdio { > #address-cells = <1>; > #size-cells = <0>; > @@ -191,12 +205,12 @@ > status = "okay"; > > magnetometer@e { > compatible = "fsl,mag3110"; > reg = <0x0e>; > - vdd-supply = <®_sensors>; > - vddio-supply = <®_sensors>; > + vdd-supply = <®_peri_3v3>; > + vddio-supply = <®_peri_3v3>; > }; > }; > > &lcdif { > assigned-clocks = <&clks IMX6UL_CLK_LCDIF_PRE_SEL>; > @@ -460,11 +474,11 @@ > MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088 > MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059 > >; > }; > > - pinctrl_sensors_reg: sensorsreggrp { > + pinctrl_peri_3v3: peri3v3grp { > fsl,pins = < > MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1b0b0 > >; > }; > > -- > 2.17.1 > >
On Wed, Dec 11, 2019 at 05:02:47PM +0200, Leonard Crestez wrote: > Many peripherals are affected by gpio5/2, not just sensors. One of those > is ethernet phy so network boot is current broken. > > Fix by renaming reg_sensors and marking it as "always on". Also add a > comment asking for careful testing if this is to be made dynamic in the > future. > > The "peri_3v3" naming is similar to imx6sx-sdb and regulator-name is > same string as in schematics (VPERI_3V3). > > Fixes: 09e2b1048954 ("ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator") > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Applied, thanks.
> -----Original Message----- > From: Leonard Crestez <leonard.crestez@nxp.com> > Sent: Wednesday, December 11, 2019 11:03 PM > To: Shawn Guo <shawnguo@kernel.org>; Marco Felsch > <m.felsch@pengutronix.de>; Anson Huang <anson.huang@nxp.com> > Cc: Fabio Estevam <fabio.estevam@nxp.com>; Aisheng Dong > <aisheng.dong@nxp.com>; Daniel Baluta <daniel.baluta@nxp.com>; > kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>; linux-arm- > kernel@lists.infradead.org > Subject: [PATCH v2] ARM: dts: imx6ul-evk: Fix peripheral regulator > > Many peripherals are affected by gpio5/2, not just sensors. One of those is > ethernet phy so network boot is current broken. > > Fix by renaming reg_sensors and marking it as "always on". Also add a > comment asking for careful testing if this is to be made dynamic in the future. > > The "peri_3v3" naming is similar to imx6sx-sdb and regulator-name is same > string as in schematics (VPERI_3V3). > > Fixes: 09e2b1048954 ("ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO > regulator") > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi index e5dafb49ef12..212144511b66 100644 --- a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi +++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi @@ -28,18 +28,30 @@ regulator-max-microvolt = <3300000>; gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; enable-active-high; }; - reg_sensors: regulator-sensors { + reg_peri_3v3: regulator-peri-3v3 { compatible = "regulator-fixed"; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_sensors_reg>; - regulator-name = "sensors-supply"; + pinctrl-0 = <&pinctrl_peri_3v3>; + regulator-name = "VPERI_3V3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio5 2 GPIO_ACTIVE_LOW>; + /* + * If you want to want to make this dynamic please + * check schematics and test all affected peripherals: + * + * - sensors + * - ethernet phy + * - can + * - bluetooth + * - wm8960 audio codec + * - ov5640 camera + */ + regulator-always-on; }; reg_can_3v3: regulator-can-3v3 { compatible = "regulator-fixed"; regulator-name = "can-3v3"; @@ -138,18 +150,20 @@ &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; phy-mode = "rmii"; phy-handle = <ðphy0>; + phy-supply = <®_peri_3v3>; status = "okay"; }; &fec2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet2>; phy-mode = "rmii"; phy-handle = <ðphy1>; + phy-supply = <®_peri_3v3>; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; @@ -191,12 +205,12 @@ status = "okay"; magnetometer@e { compatible = "fsl,mag3110"; reg = <0x0e>; - vdd-supply = <®_sensors>; - vddio-supply = <®_sensors>; + vdd-supply = <®_peri_3v3>; + vddio-supply = <®_peri_3v3>; }; }; &lcdif { assigned-clocks = <&clks IMX6UL_CLK_LCDIF_PRE_SEL>; @@ -460,11 +474,11 @@ MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088 MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059 >; }; - pinctrl_sensors_reg: sensorsreggrp { + pinctrl_peri_3v3: peri3v3grp { fsl,pins = < MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1b0b0 >; };
Many peripherals are affected by gpio5/2, not just sensors. One of those is ethernet phy so network boot is current broken. Fix by renaming reg_sensors and marking it as "always on". Also add a comment asking for careful testing if this is to be made dynamic in the future. The "peri_3v3" naming is similar to imx6sx-sdb and regulator-name is same string as in schematics (VPERI_3V3). Fixes: 09e2b1048954 ("ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> --- Changes since v1: * Properly set phy-supply so that ethernet works even without regulator-always-on * Change regulator-name to VPERI_3V3 to match pdf schematics * List affected peripherals in comment Link to v1: https://patchwork.kernel.org/patch/11284851/ It seems the wm8960 doesn't have regulator support so making this work dynamically might also require changes in sound drivers. arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 26 +++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)