diff mbox

[3/4] arm64: dts: renesas: r8a7795: Add DU device to DT

Message ID 1461458095-12212-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State Changes Requested
Delegated to: Simon Horman
Headers show

Commit Message

Laurent Pinchart April 24, 2016, 12:34 a.m. UTC
Add the DU device to r8a7795.dtsi in a disabled state.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 46 ++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Geert Uytterhoeven April 25, 2016, 8:34 a.m. UTC | #1
Hi Laurent,

On Sun, Apr 24, 2016 at 2:34 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Add the DU device to r8a7795.dtsi in a disabled state.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 46 ++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index ad25330e7827..b64366c541ed 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -1379,5 +1379,51 @@
>                         clocks = <&cpg CPG_MOD 600>;
>                         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
>                 };
> +
> +               du: display@feb00000 {
> +                       compatible = "renesas,du-r8a7795";
> +                       reg = <0 0xfeb00000 0 0x80000>,
> +                             <0 0xfeb90000 0 0x14>;
> +                       reg-names = "du", "lvds.0";
> +                       interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
> +                                    <0 268 IRQ_TYPE_LEVEL_HIGH>,
> +                                    <0 269 IRQ_TYPE_LEVEL_HIGH>,
> +                                    <0 270 IRQ_TYPE_LEVEL_HIGH>;

GIC_SPI (4x)

> +                       clocks = <&cpg CPG_MOD 724>,
> +                                <&cpg CPG_MOD 723>,
> +                                <&cpg CPG_MOD 722>,
> +                                <&cpg CPG_MOD 721>,
> +                                <&cpg CPG_MOD 727>;
> +                       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0";

BTW, now you have your "always-on" PM Domain, it would be nice to revamp the
DU bindings to have one device node per DU instance, so there can be a
one-to-one mapping of device nodes, DU instances, and DU module clocks...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Laurent Pinchart April 25, 2016, 9:32 p.m. UTC | #2
Hi Geert,

On Monday 25 Apr 2016 10:34:38 Geert Uytterhoeven wrote:
> On Sun, Apr 24, 2016 at 2:34 AM, Laurent Pinchart wrote:
> > Add the DU device to r8a7795.dtsi in a disabled state.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 46 +++++++++++++++++++++++++++
> >  1 file changed, 46 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index
> > ad25330e7827..b64366c541ed 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > @@ -1379,5 +1379,51 @@
> >                         clocks = <&cpg CPG_MOD 600>;
> >                         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
> >                 };
> > +
> > +               du: display@feb00000 {
> > +                       compatible = "renesas,du-r8a7795";
> > +                       reg = <0 0xfeb00000 0 0x80000>,
> > +                             <0 0xfeb90000 0 0x14>;
> > +                       reg-names = "du", "lvds.0";
> > +                       interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
> > +                                    <0 268 IRQ_TYPE_LEVEL_HIGH>,
> > +                                    <0 269 IRQ_TYPE_LEVEL_HIGH>,
> > +                                    <0 270 IRQ_TYPE_LEVEL_HIGH>;
> 
> GIC_SPI (4x)

I'll fix that.

> > +                       clocks = <&cpg CPG_MOD 724>,
> > +                                <&cpg CPG_MOD 723>,
> > +                                <&cpg CPG_MOD 722>,
> > +                                <&cpg CPG_MOD 721>,
> > +                                <&cpg CPG_MOD 727>;
> > +                       clock-names = "du.0", "du.1", "du.2", "du.3",
> > "lvds.0";
>
> BTW, now you have your "always-on" PM Domain, it would be nice to revamp the
> DU bindings to have one device node per DU instance, so there can be a
> one-to-one mapping of device nodes, DU instances, and DU module clocks...

I wish it could be that easy. The DU instances are not independent, they share 
resources that are controlled by one DU in particular. It might be possible to 
split LVDS support out, but for the DU channels it would be way more complex.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index ad25330e7827..b64366c541ed 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -1379,5 +1379,51 @@ 
 			clocks = <&cpg CPG_MOD 600>;
 			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
 		};
+
+		du: display@feb00000 {
+			compatible = "renesas,du-r8a7795";
+			reg = <0 0xfeb00000 0 0x80000>,
+			      <0 0xfeb90000 0 0x14>;
+			reg-names = "du", "lvds.0";
+			interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
+				     <0 268 IRQ_TYPE_LEVEL_HIGH>,
+				     <0 269 IRQ_TYPE_LEVEL_HIGH>,
+				     <0 270 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 724>,
+				 <&cpg CPG_MOD 723>,
+				 <&cpg CPG_MOD 722>,
+				 <&cpg CPG_MOD 721>,
+				 <&cpg CPG_MOD 727>;
+			clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0";
+			status = "disabled";
+
+			vsps = <&vspd0 &vspd1 &vspd2 &vspd3>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					du_out_rgb: endpoint {
+					};
+				};
+				port@1 {
+					reg = <1>;
+					du_out_hdmi0: endpoint {
+					};
+				};
+				port@2 {
+					reg = <2>;
+					du_out_hdmi1: endpoint {
+					};
+				};
+				port@3 {
+					reg = <3>;
+					du_out_lvds0: endpoint {
+					};
+				};
+			};
+		};
 	};
 };