diff mbox series

[RFC,01/10] dt-bindings: soc: imx-blk-ctrl: add 'fsl,power-domains-boot-on' property

Message ID 20241028102559.1451383-2-dario.binacchi@amarulasolutions.com (mailing list archive)
State New
Headers show
Series Support simple-framebuffer on imx8m | expand

Commit Message

Dario Binacchi Oct. 28, 2024, 10:25 a.m. UTC
This property lists the state of the power domains, indicating whether
they have been left on or off by the bootloader/firmware.
This information becomes relevant, for example, in the case of supporting
the simple framebuffer.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 .../bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml       | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Rob Herring (Arm) Nov. 1, 2024, 5:39 p.m. UTC | #1
On Mon, Oct 28, 2024 at 11:25:24AM +0100, Dario Binacchi wrote:
> This property lists the state of the power domains, indicating whether
> they have been left on or off by the bootloader/firmware.
> This information becomes relevant, for example, in the case of supporting
> the simple framebuffer.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> 
>  .../bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml       | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> index eeec9965b091..00aa0b8d8ea9 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> @@ -56,6 +56,15 @@ properties:
>        - const: csi-aclk
>        - const: csi-pclk
>  
> +  fsl,power-domains-boot-on:
> +    description: |
> +      Provide the on/off (1/0) status of the power domains. It allows
> +      specifying whether one or more power domains have already been
> +      initialized and left powered on by the bootloader.

Sounds like a common problem *if* we wanted to fix it in DT.

Why can't you just read the h/w registers to see which domains are 
powered on? Perhaps because some are on, but you want to turn them off.

Also, for simple-framebuffer, I think you can list the power-domains to 
keep on.

Rob
Dario Binacchi Nov. 4, 2024, 4:32 p.m. UTC | #2
Hello Rob,

On Fri, Nov 1, 2024 at 6:39 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Oct 28, 2024 at 11:25:24AM +0100, Dario Binacchi wrote:
> > This property lists the state of the power domains, indicating whether
> > they have been left on or off by the bootloader/firmware.
> > This information becomes relevant, for example, in the case of supporting
> > the simple framebuffer.
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > ---
> >
> >  .../bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml       | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> > index eeec9965b091..00aa0b8d8ea9 100644
> > --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> > +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
> > @@ -56,6 +56,15 @@ properties:
> >        - const: csi-aclk
> >        - const: csi-pclk
> >
> > +  fsl,power-domains-boot-on:
> > +    description: |
> > +      Provide the on/off (1/0) status of the power domains. It allows
> > +      specifying whether one or more power domains have already been
> > +      initialized and left powered on by the bootloader.
>
> Sounds like a common problem *if* we wanted to fix it in DT.
>
> Why can't you just read the h/w registers to see which domains are
> powered on? Perhaps because some are on, but you want to turn them off.

I checked, but there is no register on this platform that indicates
the on/off status
of the power domain. So, I cannot readout the power domain state.

>
> Also, for simple-framebuffer, I think you can list the power-domains to
> keep on.

I did it; I added the power domains in the simple-framebuffer node, but this
doesn’t prevent the genpd.power_on() callback from being called. And when
this callback is called, the power domain is re-initialized, which does not
maintain the persistence of the image on the display. Adding this DTS property
prevents re-initialization that has already been performed by the bootloader.

Thanks and regards,
Dario

>
> Rob
>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
index eeec9965b091..00aa0b8d8ea9 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml
@@ -56,6 +56,15 @@  properties:
       - const: csi-aclk
       - const: csi-pclk
 
+  fsl,power-domains-boot-on:
+    description: |
+      Provide the on/off (1/0) status of the power domains. It allows
+      specifying whether one or more power domains have already been
+      initialized and left powered on by the bootloader.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 5
+    maxItems: 5
+
 required:
   - compatible
   - reg