ARM: dts: imx53-qsb: Use pinctrl for gpio-led
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/3 ARM: dts: imx53-qsb: Use pinctrl for gpio-led
From: Fabio Estevam <[email protected]>
Since commit 8fe4554f (leds: leds-gpio: adopt pinctrl support) gpio-led driver has pinctrl support, so setup the gpio led pin via pinctrl and avoid the following warning:
leds-gpio leds.2: pins are not configured from the driver
--- arch/arm/boot/dts/imx53-qsb.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/imx53-qsb.dts +8 -0
@@ -60,10 +60,16 @@ 697 0x80000000 /* MX53_PAD_EIM_DA12__GPIO3_12 */ 701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */ 868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */ + >; + }; + + led_pin_gpio7_7: led_gpio7_7 at 0 { + fsl,pins = < 873 0x80000000 /* MX53_PAD_PATA_DA_1__GPIO7_7 */ >; }; }; + }; uart1: serial at 53fbc000 {
@@ -216,6 +222,8 @@ leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pin_gpio7_7>; user { label = "Heartbeat";
Signature · 1 line
1.7.9.5
Fabio Estevam
reviewerPATCH 2/3 ARM: dts: imx53-qsb: Make DA9053 regulator functional
From: Fabio Estevam <[email protected]>
Setup the GPIO7_11 pin as interrupt to the DA9053 and also rename the regulator nodes so that they match with the datasheet.
This allows probing of DA9053 to succeed.
--- arch/arm/boot/dts/imx53-qsb.dts | 54 ++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 18 deletions(-)
arch/arm/boot/dts/imx53-qsb.dts +36 -18
@@ -60,6 +60,7 @@ 697 0x80000000 /* MX53_PAD_EIM_DA12__GPIO3_12 */ 701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */ 868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */ + 1149 0x80000000 /* MX53_PAD_GPIO_16__GPIO7_11 */ >; };
@@ -106,76 +107,93 @@ pmic: dialog at 48 { compatible = "dlg,da9053-aa", "dlg,da9052"; reg = <0x48>; + interrupt-parent = <&gpio7>; + interrupts = <11 0x8>; /* low-level active IRQ at GPIO7_11 */ regulators { - buck0 { + buck1_reg: buck1 { regulator-min-microvolt = <500000>; regulator-max-microvolt = <2075000>; + regulator-always-on; }; - buck1 { + buck2_reg: buck2 { regulator-min-microvolt = <500000>; regulator-max-microvolt = <2075000>; + regulator-always-on; }; - buck2 { + buck3_reg: buck3 { regulator-min-microvolt = <925000>; regulator-max-microvolt = <2500000>; + regulator-always-on; }; - buck3 { + buck4_reg: buck4 { regulator-min-microvolt = <925000>; regulator-max-microvolt = <2500000>; + regulator-always-on; }; - ldo4 { + ldo1_reg: ldo1 { regulator-min-microvolt = <600000>; regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; }; - ldo5 { + ldo2_reg: ldo2 { + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + ldo3_reg: ldo3 { regulator-min-microvolt = <600000>; regulator-max-microvolt = <1800000>; + regulator-always-on; }; - ldo6 { + ldo4_reg: ldo4 { regulator-min-microvolt = <1725000>; regulator-max-microvolt = <3300000>; + regulator-always-on; }; - ldo7 { + ldo5_reg: ldo5 { regulator-min-microvolt = <1725000>; regulator-max-microvolt = <3300000>; + regulator-always-on; }; - ldo8 { + ldo6_reg: ldo6 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>; + regulator-always-on; }; - ldo9 { + ldo7_reg: ldo7 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>; + regulator-always-on; }; - ldo10 { + ldo8_reg: ldo8 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>; + regulator-always-on; }; - ldo11 { + ldo9_reg: ldo9 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>; + regulator-always-on; }; - ldo12 { + ldo10_reg: ldo10 { regulator-min-microvolt = <1250000>; regulator-max-microvolt = <3650000>; - }; - - ldo13 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3600000>; + regulator-always-on; }; }; };
Signature · 1 line
1.7.9.5
PATCH 2/3 ARM: dts: imx53-qsb: Make DA9053 regulator functional
Dear Fabio Estevam,
[...]
Review
Quoted 2 lines
(quoted diff) +2
-0+ interrupt-parent = <&gpio7>; + interrupts = <11 0x8>; /* low-level
active IRQ at GPIO7_11 */
You mean active-low ? :-)
[...]
What was the conclusion on over-using regulator-always-on ?
Best regards,
Marek Vasut
Fabio Estevam
reviewerPATCH 2/3 ARM: dts: imx53-qsb: Make DA9053 regulator functional
Hi Marek,
Quoted 9 lines · Marek Vasut
Dear Fabio Estevam,
[...]
Review
Quoted 2 lines
(quoted diff) +2
-0+ interrupt-parent = <&gpio7>; + interrupts = <11 0x8>; /* low-levelactive IRQ at
GPIO7_11*/You mean active-low ? :-)
Actually I meant 'active low level-sensitive':
Quoted 1 line
From
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt:
The second cell bits[3:0] is used to specify trigger type and level flags:
1 = low-to-high edge triggered.
2 = high-to-low edge triggered.
4 = active high level-sensitive.
8 = active low level-sensitive
Quoted 1 line
What was the conclusion on over-using regulator-always-on ?
I will be glad to get some suggestions about this.
With the original code the regulators were getting disabled, which caused some key power supplies to be removed and then system died.
Looking at the mx53qsb/DA9053 board schematics I cannot see any of these supplies that can be turned-off, and that's why I kept the 'always-on' flag.
Regards,
Fabio Estevam
PATCH 2/3 ARM: dts: imx53-qsb: Make DA9053 regulator functional
Dear Fabio Estevam,
Quoted 17 lines
Hi Marek,
Quoted 11 lines · Marek Vasut
Dear Fabio Estevam,
[...]
Quoted 3 lines
(quoted diff) +2
-0+ interrupt-parent = <&gpio7>; + interrupts = <11 0x8>; /*low-level
active IRQ at
GPIO7_11*/You mean active-low ? :-)
Actually I meant 'active low level-sensitive':
Quoted 7 lines
From
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt:The second cell bits[3:0] is used to specify trigger type and level flags:
1 = low-to-high edge triggered.
2 = high-to-low edge triggered.
4 = active high level-sensitive.
8 = active low level-sensitive
Thank you, I need to update my knowledge on the imx v7 :)
Quoted 10 lines
Quoted 1 line
What was the conclusion on over-using regulator-always-on ?
I will be glad to get some suggestions about this.
With the original code the regulators were getting disabled, which caused some key power supplies to be removed and then system died.
Looking at the mx53qsb/DA9053 board schematics I cannot see any of these supplies that can be turned-off, and that's why I kept the 'always-on' flag.
I agree, let's see what Mark has to say. I believe your approach is valid.
Quoted 3 lines
Regards,
Fabio Estevam
Best regards,
Marek Vasut
PATCH 2/3 ARM: dts: imx53-qsb: Make DA9053 regulator functional
Quoted 7 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 3 lines
Looking at the mx53qsb/DA9053 board schematics I cannot see any of these supplies that can be turned-off, and that's why I kept the 'always-on' flag.
I agree, let's see what Mark has to say. I believe your approach is valid.
Sorry, I'm missing some context on the discussion here so I'm not usre what the question is.
Fabio Estevam
reviewerPATCH 3/3 ARM: imx_v6_v7_defconfig: Add DA9052 regulator support
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Add DA9052 regulator support.
--- arch/arm/configs/imx_v6_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/imx_v6_v7_defconfig +2 -0
@@ -142,10 +142,12 @@ CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_IMX2_WDT=y +CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_MC13XXX_SPI=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_MEDIA_SUPPORT=y
Signature · 1 line
1.7.9.5
PATCH 3/3 ARM: imx_v6_v7_defconfig: Add DA9052 regulator support
Dear Fabio Estevam,
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add DA9052 regulator support.
Signed-off-by Fabio Estevam <[email protected]>
Makes sense
Quoted 11 lines
--- arch/arm/configs/imx_v6_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0b/arch/arm/configs/imx_v6_v7_defconfig index 66aa7a6..67620d6 100644
arch/arm/configs/imx_v6_v7_defconfig +0
-0@@ -142,10 +142,12 @@ CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y
arch/arm/configs/imx_v6_v7_defconfig CONFIG_GPIO_SYSFS=y · line 153
Quoted 10 lines
arch/arm/configs/imx_v6_v7_defconfig +2
-0CONFIG_IMX2_WDT=y +CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_MC13XXX_SPI=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_MEDIA_SUPPORT=y
Best regards,
Marek Vasut
PATCH 3/3 ARM: imx_v6_v7_defconfig: Add DA9052 regulator support
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add DA9052 regulator support.
Signed-off-by Fabio Estevam <[email protected]>
Applied, thanks
Sascha
Quoted 25 lines
--- arch/arm/configs/imx_v6_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm/configs/imx_v6_v7_defconfig +2
-0@@ -142,10 +142,12 @@ CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_IMX2_WDT=y +CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_MC13XXX_SPI=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_MEDIA_SUPPORT=ySignature · 1 line
1.7.9.5
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/3 ARM: dts: imx53-qsb: Use pinctrl for gpio-led
In reply to Fabio EstevamDear Fabio Estevam,
Quoted 9 lines
From: Fabio Estevam <[email protected]>
Since commit
8fe4554f(leds: leds-gpio: adopt pinctrl support) gpio-led driver has pinctrl support, so setup the gpio led pin via pinctrl and avoid the following warning:leds-gpio leds.2: pins are not configured from the driver
Signed-off-by Fabio Estevam <[email protected]>
arch/arm/boot/dts/imx53-qsb.dts line 60
Quoted 10 lines
--- arch/arm/boot/dts/imx53-qsb.dts | 8 ++++++++ 1 file changed, 8 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/imx53-qsb.dtsindex 08948af..5bae4c7 100644arch/arm/boot/dts/imx53-qsb.dts +0
-0@@ -60,10 +60,16 @@ 697 0x80000000 /*
MX53_PAD_EIM_DA12__GPIO3_12 */
arch/arm/boot/dts/imx53-qsb.dts line 61
Quoted 1 line
arch/arm/boot/dts/imx53-qsb.dts +0
-0701 0x80000000 /*
MX53_PAD_EIM_DA13__GPIO3_13 */
arch/arm/boot/dts/imx53-qsb.dts line 62
Quoted 1 line
arch/arm/boot/dts/imx53-qsb.dts +0
-0868 0x80000000 /*
MX53_PAD_PATA_DA_0__GPIO7_6 */
arch/arm/boot/dts/imx53-qsb.dts
Quoted 6 lines
arch/arm/boot/dts/imx53-qsb.dts +5
-0+ >; + }; + + led_pin_gpio7_7: led_gpio7_7 at 0 { + fsl,pins = < 873 0x80000000 /*
MX53_PAD_PATA_DA_1__GPIO7_7 */
Quoted 10 lines
arch/arm/boot/dts/imx53-qsb.dts +1
-0>; }; }; + };arch/arm/boot/dts/imx53-qsb.dts +0
-0uart1: serial at 53fbc000 {
arch/arm/boot/dts/imx53-qsb.dts line 229
Quoted 8 lines
arch/arm/boot/dts/imx53-qsb.dts +2
-0@@ -216,6 +222,8 @@ leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pin_gpio7_7>; user { label = "Heartbeat";
Best regards,
Marek Vasut
Shawn Guo
AppliedPATCH 1/3 ARM: dts: imx53-qsb: Use pinctrl for gpio-led
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Since commit
8fe4554f(leds: leds-gpio: adopt pinctrl support) gpio-led driver has pinctrl support, so setup the gpio led pin via pinctrl and avoid the following warning:leds-gpio leds.2: pins are not configured from the driver
Signed-off-by Fabio Estevam <[email protected]>
Queued first 2 patches for 3.8, and leave patch #3 to Sascha.
Shawn