Message ID | 1410511739-31122-2-git-send-email-b38343@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > All chips of i.mx6 can be powered off by programming SNVS. > For example : > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > pmic ON/OFF pin, that will cause the whole PMIC powered off > except VSNVS. And system can restart once PMIC_ON_REQ goes > high by push POWRER key. > > Signed-off-by: Robin Gong <b38343@freescale.com> > --- > .../bindings/power_supply/imx-snvs-poweroff.txt | 21 +++++++++++++++++++++ Binding docs should be generally a separate patch or in the driver patch, which uses the bindings. Shawn > arch/arm/boot/dts/imx6qdl.dtsi | 5 +++++ > arch/arm/boot/dts/imx6sl.dtsi | 5 +++++ > arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ > 4 files changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > new file mode 100644 > index 0000000..1a3ab9a > --- /dev/null > +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > @@ -0,0 +1,21 @@ > +i.mx6 Poweroff Driver > + > +SNVS_LPCR in SNVS module can power off the whole system by pull > +PMIC_ON_REQ low. > + > +Required Properties: > +-compatible: "fsl,sec-v4.0-poweroff" > +-reg: Specifies the physical address of the SNVS_LPCR register > + > +Example: > + snvs@020cc000 { > + compatible = "fsl,sec-v4.0-mon", "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x020cc000 0x4000>; > + ..... > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > + } > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > index 70d7207..d2d7563 100644 > --- a/arch/arm/boot/dts/imx6qdl.dtsi > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > @@ -650,6 +650,11 @@ > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > <0 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { /* EPIT1 */ > diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi > index ba67714..6e1d8f6 100644 > --- a/arch/arm/boot/dts/imx6sl.dtsi > +++ b/arch/arm/boot/dts/imx6sl.dtsi > @@ -568,6 +568,11 @@ > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > <0 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { > diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi > index d137caca..c1f937e 100644 > --- a/arch/arm/boot/dts/imx6sx.dtsi > +++ b/arch/arm/boot/dts/imx6sx.dtsi > @@ -671,6 +671,11 @@ > reg = <0x34 0x58>; > interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { > -- > 1.9.1 >
On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > All chips of i.mx6 can be powered off by programming SNVS. > For example : > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > pmic ON/OFF pin, that will cause the whole PMIC powered off > except VSNVS. And system can restart once PMIC_ON_REQ goes > high by push POWRER key. What's the behavior for those boards on which PMIC_ON_REQ isn't connected to anywhere? BTW, the commit log of the driver patch [[PATCH v2 2/3] ] should be improved. Shawn > > Signed-off-by: Robin Gong <b38343@freescale.com> > --- > .../bindings/power_supply/imx-snvs-poweroff.txt | 21 +++++++++++++++++++++ > arch/arm/boot/dts/imx6qdl.dtsi | 5 +++++ > arch/arm/boot/dts/imx6sl.dtsi | 5 +++++ > arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ > 4 files changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > new file mode 100644 > index 0000000..1a3ab9a > --- /dev/null > +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > @@ -0,0 +1,21 @@ > +i.mx6 Poweroff Driver > + > +SNVS_LPCR in SNVS module can power off the whole system by pull > +PMIC_ON_REQ low. > + > +Required Properties: > +-compatible: "fsl,sec-v4.0-poweroff" > +-reg: Specifies the physical address of the SNVS_LPCR register > + > +Example: > + snvs@020cc000 { > + compatible = "fsl,sec-v4.0-mon", "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x020cc000 0x4000>; > + ..... > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > + } > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > index 70d7207..d2d7563 100644 > --- a/arch/arm/boot/dts/imx6qdl.dtsi > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > @@ -650,6 +650,11 @@ > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > <0 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { /* EPIT1 */ > diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi > index ba67714..6e1d8f6 100644 > --- a/arch/arm/boot/dts/imx6sl.dtsi > +++ b/arch/arm/boot/dts/imx6sl.dtsi > @@ -568,6 +568,11 @@ > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > <0 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { > diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi > index d137caca..c1f937e 100644 > --- a/arch/arm/boot/dts/imx6sx.dtsi > +++ b/arch/arm/boot/dts/imx6sx.dtsi > @@ -671,6 +671,11 @@ > reg = <0x34 0x58>; > interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; > }; > + > + snvs-poweroff@38 { > + compatible = "fsl,sec-v4.0-poweroff"; > + reg = <0x38 0x4>; > + }; > }; > > epit1: epit@020d0000 { > -- > 1.9.1 >
On Wed, Sep 17, 2014 at 09:47:24AM +0800, Shawn Guo wrote: > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > All chips of i.mx6 can be powered off by programming SNVS. > > For example : > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > high by push POWRER key. > > > > Signed-off-by: Robin Gong <b38343@freescale.com> > > --- > > .../bindings/power_supply/imx-snvs-poweroff.txt | 21 +++++++++++++++++++++ > > Binding docs should be generally a separate patch or in the driver > patch, which uses the bindings. > > Shawn > Ok, I'll split it. > > arch/arm/boot/dts/imx6qdl.dtsi | 5 +++++ > > arch/arm/boot/dts/imx6sl.dtsi | 5 +++++ > > arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ > > 4 files changed, 36 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > > > diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > new file mode 100644 > > index 0000000..1a3ab9a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > @@ -0,0 +1,21 @@ > > +i.mx6 Poweroff Driver > > + > > +SNVS_LPCR in SNVS module can power off the whole system by pull > > +PMIC_ON_REQ low. > > + > > +Required Properties: > > +-compatible: "fsl,sec-v4.0-poweroff" > > +-reg: Specifies the physical address of the SNVS_LPCR register > > + > > +Example: > > + snvs@020cc000 { > > + compatible = "fsl,sec-v4.0-mon", "simple-bus"; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges = <0 0x020cc000 0x4000>; > > + ..... > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > + } > > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > > index 70d7207..d2d7563 100644 > > --- a/arch/arm/boot/dts/imx6qdl.dtsi > > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > > @@ -650,6 +650,11 @@ > > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > > <0 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { /* EPIT1 */ > > diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi > > index ba67714..6e1d8f6 100644 > > --- a/arch/arm/boot/dts/imx6sl.dtsi > > +++ b/arch/arm/boot/dts/imx6sl.dtsi > > @@ -568,6 +568,11 @@ > > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > > <0 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { > > diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi > > index d137caca..c1f937e 100644 > > --- a/arch/arm/boot/dts/imx6sx.dtsi > > +++ b/arch/arm/boot/dts/imx6sx.dtsi > > @@ -671,6 +671,11 @@ > > reg = <0x34 0x58>; > > interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { > > -- > > 1.9.1 > >
On Wed, Sep 17, 2014 at 10:10:45AM +0800, Shawn Guo wrote: > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > All chips of i.mx6 can be powered off by programming SNVS. > > For example : > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > high by push POWRER key. > > What's the behavior for those boards on which PMIC_ON_REQ isn't > connected to anywhere? > System can't be powered off if not connect PMIC_ON_REQ. Although all of our reference design for i.mx6 chips are connecting PMIC_ON_REQ with external PMIC, we need consider others may not use external PMIC. I'll add the info into commit log or Kconfig. > BTW, the commit log of the driver patch [[PATCH v2 2/3] ] should be > improved. > > Shawn > You mean the above info need added into commit log ,right? > > > > Signed-off-by: Robin Gong <b38343@freescale.com> > > --- > > .../bindings/power_supply/imx-snvs-poweroff.txt | 21 +++++++++++++++++++++ > > arch/arm/boot/dts/imx6qdl.dtsi | 5 +++++ > > arch/arm/boot/dts/imx6sl.dtsi | 5 +++++ > > arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ > > 4 files changed, 36 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > > > diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > new file mode 100644 > > index 0000000..1a3ab9a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt > > @@ -0,0 +1,21 @@ > > +i.mx6 Poweroff Driver > > + > > +SNVS_LPCR in SNVS module can power off the whole system by pull > > +PMIC_ON_REQ low. > > + > > +Required Properties: > > +-compatible: "fsl,sec-v4.0-poweroff" > > +-reg: Specifies the physical address of the SNVS_LPCR register > > + > > +Example: > > + snvs@020cc000 { > > + compatible = "fsl,sec-v4.0-mon", "simple-bus"; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges = <0 0x020cc000 0x4000>; > > + ..... > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > + } > > diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi > > index 70d7207..d2d7563 100644 > > --- a/arch/arm/boot/dts/imx6qdl.dtsi > > +++ b/arch/arm/boot/dts/imx6qdl.dtsi > > @@ -650,6 +650,11 @@ > > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > > <0 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { /* EPIT1 */ > > diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi > > index ba67714..6e1d8f6 100644 > > --- a/arch/arm/boot/dts/imx6sl.dtsi > > +++ b/arch/arm/boot/dts/imx6sl.dtsi > > @@ -568,6 +568,11 @@ > > interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, > > <0 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { > > diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi > > index d137caca..c1f937e 100644 > > --- a/arch/arm/boot/dts/imx6sx.dtsi > > +++ b/arch/arm/boot/dts/imx6sx.dtsi > > @@ -671,6 +671,11 @@ > > reg = <0x34 0x58>; > > interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; > > }; > > + > > + snvs-poweroff@38 { > > + compatible = "fsl,sec-v4.0-poweroff"; > > + reg = <0x38 0x4>; > > + }; > > }; > > > > epit1: epit@020d0000 { > > -- > > 1.9.1 > >
On Wed, Sep 17, 2014 at 11:45:15AM +0800, Robin Gong wrote: > > BTW, the commit log of the driver patch [[PATCH v2 2/3] ] should be > > improved. > > > > Shawn > > > You mean the above info need added into commit log ,right? Yes, that's what I mean. Shawn
On Wed, Sep 17, 2014 at 11:45:15AM +0800, Robin Gong wrote: > On Wed, Sep 17, 2014 at 10:10:45AM +0800, Shawn Guo wrote: > > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > > All chips of i.mx6 can be powered off by programming SNVS. > > > For example : > > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > > high by push POWRER key. > > > > What's the behavior for those boards on which PMIC_ON_REQ isn't > > connected to anywhere? > > > System can't be powered off if not connect PMIC_ON_REQ. Although all of our > reference design for i.mx6 chips are connecting PMIC_ON_REQ with external > PMIC, we need consider others may not use external PMIC. I'll add the info > into commit log or Kconfig. You should add the information to the dtsi file in form of a status = "disabled" property so that boards that actually have the feature can enable it. Sascha
On Wed, Sep 17, 2014 at 08:06:49AM +0200, Sascha Hauer wrote: > On Wed, Sep 17, 2014 at 11:45:15AM +0800, Robin Gong wrote: > > On Wed, Sep 17, 2014 at 10:10:45AM +0800, Shawn Guo wrote: > > > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > > > All chips of i.mx6 can be powered off by programming SNVS. > > > > For example : > > > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > > > high by push POWRER key. > > > > > > What's the behavior for those boards on which PMIC_ON_REQ isn't > > > connected to anywhere? > > > > > System can't be powered off if not connect PMIC_ON_REQ. Although all of our > > reference design for i.mx6 chips are connecting PMIC_ON_REQ with external > > PMIC, we need consider others may not use external PMIC. I'll add the info > > into commit log or Kconfig. > > You should add the information to the dtsi file in form of a > status = "disabled" property so that boards that actually have the > feature can enable it. > > Sascha Hi Sacha, but that's SOC level feature and it's harmless even if others don't want to use this pin to control external PMIC. > > -- > 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 |
On Wed, Sep 17, 2014 at 03:17:38PM +0800, Robin Gong wrote: > On Wed, Sep 17, 2014 at 08:06:49AM +0200, Sascha Hauer wrote: > > On Wed, Sep 17, 2014 at 11:45:15AM +0800, Robin Gong wrote: > > > On Wed, Sep 17, 2014 at 10:10:45AM +0800, Shawn Guo wrote: > > > > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > > > > All chips of i.mx6 can be powered off by programming SNVS. > > > > > For example : > > > > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > > > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > > > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > > > > high by push POWRER key. > > > > > > > > What's the behavior for those boards on which PMIC_ON_REQ isn't > > > > connected to anywhere? > > > > > > > System can't be powered off if not connect PMIC_ON_REQ. Although all of our > > > reference design for i.mx6 chips are connecting PMIC_ON_REQ with external > > > PMIC, we need consider others may not use external PMIC. I'll add the info > > > into commit log or Kconfig. > > > > You should add the information to the dtsi file in form of a > > status = "disabled" property so that boards that actually have the > > feature can enable it. > > > > Sascha > Hi Sacha, but that's SOC level feature and it's harmless even if others don't > want to use this pin to control external PMIC. Harmless? If a pm_power_off hook is registered I expect it to work, but it doesn't work when my board does not have the connection between the PMIC and the SoC. Even worse, if my board has some custom power of method you overwrite my method in the snvs poweroff driver with a method that does not work on my board. Sascha
On Wed, Sep 17, 2014 at 09:24:37AM +0200, Sascha Hauer wrote: > On Wed, Sep 17, 2014 at 03:17:38PM +0800, Robin Gong wrote: > > On Wed, Sep 17, 2014 at 08:06:49AM +0200, Sascha Hauer wrote: > > > On Wed, Sep 17, 2014 at 11:45:15AM +0800, Robin Gong wrote: > > > > On Wed, Sep 17, 2014 at 10:10:45AM +0800, Shawn Guo wrote: > > > > > On Fri, Sep 12, 2014 at 04:48:57PM +0800, Robin Gong wrote: > > > > > > All chips of i.mx6 can be powered off by programming SNVS. > > > > > > For example : > > > > > > On i.mx6q-sabresd board, PMIC_ON_REQ connect with external > > > > > > pmic ON/OFF pin, that will cause the whole PMIC powered off > > > > > > except VSNVS. And system can restart once PMIC_ON_REQ goes > > > > > > high by push POWRER key. > > > > > > > > > > What's the behavior for those boards on which PMIC_ON_REQ isn't > > > > > connected to anywhere? > > > > > > > > > System can't be powered off if not connect PMIC_ON_REQ. Although all of our > > > > reference design for i.mx6 chips are connecting PMIC_ON_REQ with external > > > > PMIC, we need consider others may not use external PMIC. I'll add the info > > > > into commit log or Kconfig. > > > > > > You should add the information to the dtsi file in form of a > > > status = "disabled" property so that boards that actually have the > > > feature can enable it. > > > > > > Sascha > > Hi Sacha, but that's SOC level feature and it's harmless even if others don't > > want to use this pin to control external PMIC. > > Harmless? If a pm_power_off hook is registered I expect it to work, but > it doesn't work when my board does not have the connection between the > PMIC and the SoC. Even worse, if my board has some custom power of > method you overwrite my method in the snvs poweroff driver with a method > that does not work on my board. > > Sascha Sorry, I suppose PMIC_ON_REQ is the only way to control external power ON/OFF. If they don't use PMIC_ON_REQ, I assume they drop poweroff feature. Yes, I agree with you that set status as 'disable' in DTS make things clear if they want to use other pins to control external power. But I'm not sure whether we need consider this special case to 'disable' the soc level feature and re-enable on many boards level DTS? Also, I don't understand why they give up PMIC_ON_REQ and consume another pin to do the same thing....But I'm ok if both you and Shawn agree with it. > > -- > 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 |
diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt new file mode 100644 index 0000000..1a3ab9a --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt @@ -0,0 +1,21 @@ +i.mx6 Poweroff Driver + +SNVS_LPCR in SNVS module can power off the whole system by pull +PMIC_ON_REQ low. + +Required Properties: +-compatible: "fsl,sec-v4.0-poweroff" +-reg: Specifies the physical address of the SNVS_LPCR register + +Example: + snvs@020cc000 { + compatible = "fsl,sec-v4.0-mon", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x020cc000 0x4000>; + ..... + snvs-poweroff@38 { + compatible = "fsl,sec-v4.0-poweroff"; + reg = <0x38 0x4>; + }; + } diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 70d7207..d2d7563 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -650,6 +650,11 @@ interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, <0 20 IRQ_TYPE_LEVEL_HIGH>; }; + + snvs-poweroff@38 { + compatible = "fsl,sec-v4.0-poweroff"; + reg = <0x38 0x4>; + }; }; epit1: epit@020d0000 { /* EPIT1 */ diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi index ba67714..6e1d8f6 100644 --- a/arch/arm/boot/dts/imx6sl.dtsi +++ b/arch/arm/boot/dts/imx6sl.dtsi @@ -568,6 +568,11 @@ interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, <0 20 IRQ_TYPE_LEVEL_HIGH>; }; + + snvs-poweroff@38 { + compatible = "fsl,sec-v4.0-poweroff"; + reg = <0x38 0x4>; + }; }; epit1: epit@020d0000 { diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index d137caca..c1f937e 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -671,6 +671,11 @@ reg = <0x34 0x58>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; }; + + snvs-poweroff@38 { + compatible = "fsl,sec-v4.0-poweroff"; + reg = <0x38 0x4>; + }; }; epit1: epit@020d0000 {
All chips of i.mx6 can be powered off by programming SNVS. For example : On i.mx6q-sabresd board, PMIC_ON_REQ connect with external pmic ON/OFF pin, that will cause the whole PMIC powered off except VSNVS. And system can restart once PMIC_ON_REQ goes high by push POWRER key. Signed-off-by: Robin Gong <b38343@freescale.com> --- .../bindings/power_supply/imx-snvs-poweroff.txt | 21 +++++++++++++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 5 +++++ arch/arm/boot/dts/imx6sl.dtsi | 5 +++++ arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ 4 files changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt