devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display
@ 2020-10-03  2:21 Anitha Chrisanthus
  2020-10-06 21:08 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Anitha Chrisanthus @ 2020-10-03  2:21 UTC (permalink / raw)
  To: devicetree, anitha.chrisanthus, bob.j.paauwe, edmund.j.dea
  Cc: sam, narmstrong

This patch adds bindings for Intel KeemBay Display

Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
---
 .../bindings/display/intel,kmb_display.yaml        | 106 +++++++++++++++++++++
 1 file changed, 106 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/intel,kmb_display.yaml

diff --git a/Documentation/devicetree/bindings/display/intel,kmb_display.yaml b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
new file mode 100644
index 0000000..65835cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/intel,kmb_display.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Devicetree bindings for Intel Keem Bay display controller
+
+maintainers:
+  - Anitha Chrisanthus <anitha.chrisanthus@intel.com>
+  - Edmond J Dea <edmund.j.dea@intel.com>
+
+properties:
+  compatible:
+    const: intel,kmb_display
+
+  reg:
+    maxItems: 3
+    items:
+      - description: Lcd registers range
+      - description: Mipi registers range
+      - description: Msscam registers range
+
+  reg-names:
+    items:
+      - const: lcd_regs
+      - const: mipi_regs
+      - const: msscam_regs
+
+  clocks:
+    items:
+      - description: LCD controller clock
+      - description: Mipi DSI clock
+      - description: Mipi DSI econfig clock
+      - description: Mipi DSI config clock
+      - description: System clock or pll0 clock
+
+  clock-names:
+    items:
+      - const: clk_lcd
+      - const: clk_mipi
+      - const: clk_mipi_ecfg
+      - const: clk_mipi_cfg
+      - const: clk_pll0
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    items:
+      - const: irq_lcd
+
+  encoder-slave:
+    description: bridge node entry for mipi to hdmi converter
+
+  port:
+    type: object
+    description: >
+          Port node with one endpoint connected to mipi to hdmi converter node.
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - interrupts
+  - interrupt-names
+  - encoder-slave
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #define GIC_SPI
+    #define MOVISOC_KMB_MSS_AUX_LCD
+    #define MOVISOC_KMB_MSS_AUX_MIPI_TX0
+    #define MOVISOC_KMB_MSS_AUX_MIPI_ECFG
+    #define MOVISOC_KMB_MSS_AUX_MIPI_CFG
+    #define MOVISOC_KMB_A53_PLL_0_OUT_0
+    display: display@20900000 {
+      compatible = "intel,kmb_display";
+      reg = <0x20930000 0x3000>,
+            <0x20900000 0x4000>,
+            <0x20910000 0x30>;
+      reg-names = "lcd_regs", "mipi_regs", "msscam_regs";
+      interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+      interrupt-names = "irq_lcd";
+      clocks = <&scmi_clk MOVISOC_KMB_MSS_AUX_LCD>,
+               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_TX0>,
+               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_ECFG>,
+               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_CFG>,
+               <&scmi_clk MOVISOC_KMB_A53_PLL_0_OUT_0>;
+      clock-names = "clk_lcd", "clk_mipi", "clk_mipi_ecfg",
+                    "clk_mipi_cfg", "clk_pll0";
+
+      encoder-slave = <&adv7535>;
+
+      port {
+            dsi_output: endpoint {
+                remote-endpoint = <&adv7535_input>;
+            };
+      };
+    };
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display
  2020-10-03  2:21 [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display Anitha Chrisanthus
@ 2020-10-06 21:08 ` Rob Herring
  2020-10-07  1:00   ` Chrisanthus, Anitha
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2020-10-06 21:08 UTC (permalink / raw)
  To: Anitha Chrisanthus
  Cc: devicetree, bob.j.paauwe, edmund.j.dea, sam, narmstrong

On Fri, Oct 02, 2020 at 07:21:02PM -0700, Anitha Chrisanthus wrote:
> This patch adds bindings for Intel KeemBay Display
> 
> Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> ---
>  .../bindings/display/intel,kmb_display.yaml        | 106 +++++++++++++++++++++
>  1 file changed, 106 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/intel,kmb_display.yaml b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> new file mode 100644
> index 0000000..65835cb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> @@ -0,0 +1,106 @@
> +# SPDX-License-Identifier: GPL-2.0-only

check checkpatch.pl

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/intel,kmb_display.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Devicetree bindings for Intel Keem Bay display controller
> +
> +maintainers:
> +  - Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> +  - Edmond J Dea <edmund.j.dea@intel.com>
> +
> +properties:
> +  compatible:
> +    const: intel,kmb_display

'keembay' was used elsewhere. Please be consistent.

Don't use '_' either.

> +
> +  reg:
> +    maxItems: 3

Can drop, implied.

> +    items:
> +      - description: Lcd registers range
> +      - description: Mipi registers range
> +      - description: Msscam registers range

Is this really 1 h/w block? Don't really seem like it given addresses 
aren't adjacent, separate clocks, and MIPI blocks are often licensed IP.

> +
> +  reg-names:
> +    items:
> +      - const: lcd_regs
> +      - const: mipi_regs
> +      - const: msscam_regs

'_regs' is redundant.

> +
> +  clocks:
> +    items:
> +      - description: LCD controller clock
> +      - description: Mipi DSI clock
> +      - description: Mipi DSI econfig clock
> +      - description: Mipi DSI config clock
> +      - description: System clock or pll0 clock
> +
> +  clock-names:
> +    items:
> +      - const: clk_lcd
> +      - const: clk_mipi
> +      - const: clk_mipi_ecfg
> +      - const: clk_mipi_cfg
> +      - const: clk_pll0
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-names:
> +    items:
> +      - const: irq_lcd

You don't really need *-names when there's only 1 entry.

> +
> +  encoder-slave:
> +    description: bridge node entry for mipi to hdmi converter

No, this is what 'port' is for.

> +
> +  port:
> +    type: object
> +    description: >
> +          Port node with one endpoint connected to mipi to hdmi converter node.
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - interrupts
> +  - interrupt-names
> +  - encoder-slave
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #define GIC_SPI

There's a header for this.

> +    #define MOVISOC_KMB_MSS_AUX_LCD
> +    #define MOVISOC_KMB_MSS_AUX_MIPI_TX0
> +    #define MOVISOC_KMB_MSS_AUX_MIPI_ECFG
> +    #define MOVISOC_KMB_MSS_AUX_MIPI_CFG
> +    #define MOVISOC_KMB_A53_PLL_0_OUT_0
> +    display: display@20900000 {

Drop unused labels.

> +      compatible = "intel,kmb_display";
> +      reg = <0x20930000 0x3000>,
> +            <0x20900000 0x4000>,
> +            <0x20910000 0x30>;
> +      reg-names = "lcd_regs", "mipi_regs", "msscam_regs";
> +      interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> +      interrupt-names = "irq_lcd";
> +      clocks = <&scmi_clk MOVISOC_KMB_MSS_AUX_LCD>,
> +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_TX0>,
> +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_ECFG>,
> +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_CFG>,
> +               <&scmi_clk MOVISOC_KMB_A53_PLL_0_OUT_0>;
> +      clock-names = "clk_lcd", "clk_mipi", "clk_mipi_ecfg",
> +                    "clk_mipi_cfg", "clk_pll0";
> +
> +      encoder-slave = <&adv7535>;
> +
> +      port {
> +            dsi_output: endpoint {
> +                remote-endpoint = <&adv7535_input>;
> +            };
> +      };
> +    };
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display
  2020-10-06 21:08 ` Rob Herring
@ 2020-10-07  1:00   ` Chrisanthus, Anitha
  2020-10-07 13:34     ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Chrisanthus, Anitha @ 2020-10-07  1:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Paauwe, Bob J, Dea, Edmund J, sam, narmstrong, dri-devel

Hi Rob,
Thanks for the your prompt review. Please see my comments/questions inline.
For everything else, I can incorporate the changes in v2.
Anitha

> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Tuesday, October 6, 2020 2:08 PM
> To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>
> Cc: devicetree@vger.kernel.org; Paauwe, Bob J <bob.j.paauwe@intel.com>;
> Dea, Edmund J <edmund.j.dea@intel.com>; sam@ravnborg.org;
> narmstrong@baylibre.com
> Subject: Re: [PATCH v1] dt-bindings: display: Add support for Intel KeemBay
> Display
> 
> On Fri, Oct 02, 2020 at 07:21:02PM -0700, Anitha Chrisanthus wrote:
> > This patch adds bindings for Intel KeemBay Display
> >
> > Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> > ---
> >  .../bindings/display/intel,kmb_display.yaml        | 106
> +++++++++++++++++++++
> >  1 file changed, 106 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> >
> > diff --git
> a/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > new file mode 100644
> > index 0000000..65835cb
> > --- /dev/null
> > +++
> b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > @@ -0,0 +1,106 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> 
> check checkpatch.pl
> 
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/intel,kmb_display.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Devicetree bindings for Intel Keem Bay display controller
> > +
> > +maintainers:
> > +  - Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> > +  - Edmond J Dea <edmund.j.dea@intel.com>
> > +
> > +properties:
> > +  compatible:
> > +    const: intel,kmb_display
> 
> 'keembay' was used elsewhere. Please be consistent.
> 
> Don't use '_' either.
Please note that I cannot change the name at this point as there is a dependency on the u-boot firmware which loads the device tree. I can change the name to kmb-drm or keembay-display when updated firmware becomes available.
> 
> > +
> > +  reg:
> > +    maxItems: 3
> 
> Can drop, implied.
> 
> > +    items:
> > +      - description: Lcd registers range
> > +      - description: Mipi registers range
> > +      - description: Msscam registers range
> 
> Is this really 1 h/w block? Don't really seem like it given addresses
> aren't adjacent, separate clocks, and MIPI blocks are often licensed IP.
Yes, these are part of the camera subsystem block of Intel Movidius Keembay SOC.
Please see  https://lwn.net/Articles/833540/

> 
> > +
> > +  reg-names:
> > +    items:
> > +      - const: lcd_regs
> > +      - const: mipi_regs
> > +      - const: msscam_regs
> 
> '_regs' is redundant.
> 
> > +
> > +  clocks:
> > +    items:
> > +      - description: LCD controller clock
> > +      - description: Mipi DSI clock
> > +      - description: Mipi DSI econfig clock
> > +      - description: Mipi DSI config clock
> > +      - description: System clock or pll0 clock
> > +
> > +  clock-names:
> > +    items:
> > +      - const: clk_lcd
> > +      - const: clk_mipi
> > +      - const: clk_mipi_ecfg
> > +      - const: clk_mipi_cfg
> > +      - const: clk_pll0
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  interrupt-names:
> > +    items:
> > +      - const: irq_lcd
> 
> You don't really need *-names when there's only 1 entry.
> 
> > +
> > +  encoder-slave:
> > +    description: bridge node entry for mipi to hdmi converter
> 
> No, this is what 'port' is for.
Driver calls this
encoder_node = of_parse_phandle(dev->of_node, "encoder-slave", 0)
And  bridge = of_drm_find_bridge(encoder_node); to locate the bridge driver.
How do I do this without this entry? Please advise.
This was tested and it works.
> 
> > +
> > +  port:
> > +    type: object
> > +    description: >
> > +          Port node with one endpoint connected to mipi to hdmi converter
> node.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - reg-names
> > +  - clocks
> > +  - clock-names
> > +  - interrupts
> > +  - interrupt-names
> > +  - encoder-slave
> > +  - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    #define GIC_SPI
> 
> There's a header for this.
> 
> > +    #define MOVISOC_KMB_MSS_AUX_LCD
> > +    #define MOVISOC_KMB_MSS_AUX_MIPI_TX0
> > +    #define MOVISOC_KMB_MSS_AUX_MIPI_ECFG
> > +    #define MOVISOC_KMB_MSS_AUX_MIPI_CFG
> > +    #define MOVISOC_KMB_A53_PLL_0_OUT_0
> > +    display: display@20900000 {
> 
> Drop unused labels.
> 
> > +      compatible = "intel,kmb_display";
> > +      reg = <0x20930000 0x3000>,
> > +            <0x20900000 0x4000>,
> > +            <0x20910000 0x30>;
> > +      reg-names = "lcd_regs", "mipi_regs", "msscam_regs";
> > +      interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > +      interrupt-names = "irq_lcd";
> > +      clocks = <&scmi_clk MOVISOC_KMB_MSS_AUX_LCD>,
> > +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_TX0>,
> > +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_ECFG>,
> > +               <&scmi_clk MOVISOC_KMB_MSS_AUX_MIPI_CFG>,
> > +               <&scmi_clk MOVISOC_KMB_A53_PLL_0_OUT_0>;
> > +      clock-names = "clk_lcd", "clk_mipi", "clk_mipi_ecfg",
> > +                    "clk_mipi_cfg", "clk_pll0";
> > +
> > +      encoder-slave = <&adv7535>;
> > +
> > +      port {
> > +            dsi_output: endpoint {
> > +                remote-endpoint = <&adv7535_input>;
> > +            };
> > +      };
> > +    };
> > --
> > 2.7.4
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display
  2020-10-07  1:00   ` Chrisanthus, Anitha
@ 2020-10-07 13:34     ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-10-07 13:34 UTC (permalink / raw)
  To: Chrisanthus, Anitha
  Cc: devicetree, Paauwe, Bob J, Dea, Edmund J, sam, narmstrong, dri-devel

On Tue, Oct 6, 2020 at 8:00 PM Chrisanthus, Anitha
<anitha.chrisanthus@intel.com> wrote:
>
> Hi Rob,
> Thanks for the your prompt review. Please see my comments/questions inline.
> For everything else, I can incorporate the changes in v2.
> Anitha
>
> > -----Original Message-----
> > From: Rob Herring <robh@kernel.org>
> > Sent: Tuesday, October 6, 2020 2:08 PM
> > To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>
> > Cc: devicetree@vger.kernel.org; Paauwe, Bob J <bob.j.paauwe@intel.com>;
> > Dea, Edmund J <edmund.j.dea@intel.com>; sam@ravnborg.org;
> > narmstrong@baylibre.com
> > Subject: Re: [PATCH v1] dt-bindings: display: Add support for Intel KeemBay
> > Display
> >
> > On Fri, Oct 02, 2020 at 07:21:02PM -0700, Anitha Chrisanthus wrote:
> > > This patch adds bindings for Intel KeemBay Display
> > >
> > > Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> > > ---
> > >  .../bindings/display/intel,kmb_display.yaml        | 106
> > +++++++++++++++++++++
> > >  1 file changed, 106 insertions(+)
> > >  create mode 100644
> > Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > >
> > > diff --git
> > a/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > > new file mode 100644
> > > index 0000000..65835cb
> > > --- /dev/null
> > > +++
> > b/Documentation/devicetree/bindings/display/intel,kmb_display.yaml
> > > @@ -0,0 +1,106 @@
> > > +# SPDX-License-Identifier: GPL-2.0-only
> >
> > check checkpatch.pl
> >
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/display/intel,kmb_display.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Devicetree bindings for Intel Keem Bay display controller
> > > +
> > > +maintainers:
> > > +  - Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> > > +  - Edmond J Dea <edmund.j.dea@intel.com>
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: intel,kmb_display
> >
> > 'keembay' was used elsewhere. Please be consistent.
> >
> > Don't use '_' either.
> Please note that I cannot change the name at this point as there is a dependency on the u-boot firmware which loads the device tree. I can change the name to kmb-drm or keembay-display when updated firmware becomes available.

That's unfortunate that you used bindings without a definition, but it
doesn't matter. If that was fine, then we should just stop documenting
bindings.

> > > +  reg:
> > > +    maxItems: 3
> >
> > Can drop, implied.
> >
> > > +    items:
> > > +      - description: Lcd registers range
> > > +      - description: Mipi registers range
> > > +      - description: Msscam registers range
> >
> > Is this really 1 h/w block? Don't really seem like it given addresses
> > aren't adjacent, separate clocks, and MIPI blocks are often licensed IP.
> Yes, these are part of the camera subsystem block of Intel Movidius Keembay SOC.

Then where's the camera parts? The DT should reflect the h/w, not
what's a convenient split for your drivers.

> Please see  https://lwn.net/Articles/833540/

This should be part of that series.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-07 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03  2:21 [PATCH v1] dt-bindings: display: Add support for Intel KeemBay Display Anitha Chrisanthus
2020-10-06 21:08 ` Rob Herring
2020-10-07  1:00   ` Chrisanthus, Anitha
2020-10-07 13:34     ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).