[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-29 Thread Terje Bergström
On 28.08.2013 16:18, Thierry Reding wrote:
> I think that's not all. I have local patches that also introduce a v2 of
> host1x, because the number of syncpoints is different. There may also be
> other differences, but Terje might be more qualified to answer that.

Tegra4 host1x has an extra channel(totals 9), which caused bitfields in
a couple of registers to shift. The registers are mainly used in the
debug code to dump the channel FIFO. Same number of sync points as
Tegra3, but 12 wait bases.

Other changes are minor and driver already deals with them, for example
32-bit versus 16-bit sync point value comparison.

Terje


Re: [PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-29 Thread Terje Bergström
On 28.08.2013 16:18, Thierry Reding wrote:
 I think that's not all. I have local patches that also introduce a v2 of
 host1x, because the number of syncpoints is different. There may also be
 other differences, but Terje might be more qualified to answer that.

Tegra4 host1x has an extra channel(totals 9), which caused bitfields in
a couple of registers to shift. The registers are mainly used in the
debug code to dump the channel FIFO. Same number of sync points as
Tegra3, but 12 wait bases.

Other changes are minor and driver already deals with them, for example
32-bit versus 16-bit sync point value comparison.

Terje
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Mikko Perttunen
On 08/28/2013 03:25 PM, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Wed, Aug 28, 2013 at 01:40:58PM +0300, Mikko Perttunen wrote:
>> Add host1x, dc (display controller) and hdmi devices to Tegra114
>> device tree.
>
> "DC" and "HDMI".

Will fix.

>
>>
>> Signed-off-by: Mikko Perttunen 
>> ---
>>   arch/arm/boot/dts/tegra114.dtsi | 43 
>> +
>>   1 file changed, 43 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/tegra114.dtsi 
>> b/arch/arm/boot/dts/tegra114.dtsi
>> index 2905145..ce5a95c 100644
>> --- a/arch/arm/boot/dts/tegra114.dtsi
>> +++ b/arch/arm/boot/dts/tegra114.dtsi
>> @@ -27,6 +27,49 @@
>>  (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
>>  };
>>
>> +host1x {
>> +compatible = "nvidia,tegra114-host1x", "nvidia,tegra30-host1x",
>
> I don't think that's correct. The Tegra114 host1x is not backwards
> compatible with the Tegra30 host1x.
>
> That said, I have a local patch that is a bit more complete in that it
> adds other host1x devices as listed in the TRM as well. But I'll leave
> it up to Stephen how he prefers to handle that. It should be fine to
> defer adding nodes for additional hardware blocks when the supporting
> drivers are merged. We've done it for other devices as well.

Ok. Will need to add tegra114-host1x to the host1x driver compat 
strings, then, but I guess that's better than having it wrong in the DT.

>
>> +"simple-bus";
>> +reg = <0x5000 0x00028000>;
>> +interrupts = ,
>> +;
>
> I think this should be indented with the previous line. Also other SoC
> .dtsi files use a single entry, as in:
>
>   interrupts =  GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
>

Will fix.

>> +hdmi {
>> +compatible = "nvidia,tegra114-hdmi";
>> +reg = <0x5428 0x0004>;
>> +interrupts = ;
>> +clocks = <_car TEGRA114_CLK_HDMI>,
>> +<_car TEGRA114_CLK_PLL_D_OUT0>;
>
> Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?

I have this set to PLL_D because I don't have panel support so disp1 
will be the HDMI DC. However, it doesn't seem to matter which one is 
specified here. I have also tested HDMI with disp2 and that works too.

>
> Thierry
>
> * Unknown Key
> * 0x7F3EB3A1
>


[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Thierry Reding
On Wed, Aug 28, 2013 at 03:41:35PM +0300, Mikko Perttunen wrote:
> On 08/28/2013 03:25 PM, Thierry Reding wrote:
[...]
> >>Signed-off-by: Mikko Perttunen 
> >>---
> >>  arch/arm/boot/dts/tegra114.dtsi | 43 
> >> +
> >>  1 file changed, 43 insertions(+)
> >>
> >>diff --git a/arch/arm/boot/dts/tegra114.dtsi 
> >>b/arch/arm/boot/dts/tegra114.dtsi
> >>index 2905145..ce5a95c 100644
> >>--- a/arch/arm/boot/dts/tegra114.dtsi
> >>+++ b/arch/arm/boot/dts/tegra114.dtsi
> >>@@ -27,6 +27,49 @@
> >>(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> >>};
> >>
> >>+   host1x {
> >>+   compatible = "nvidia,tegra114-host1x", "nvidia,tegra30-host1x",
> >
> >I don't think that's correct. The Tegra114 host1x is not backwards
> >compatible with the Tegra30 host1x.
> >
> >That said, I have a local patch that is a bit more complete in that it
> >adds other host1x devices as listed in the TRM as well. But I'll leave
> >it up to Stephen how he prefers to handle that. It should be fine to
> >defer adding nodes for additional hardware blocks when the supporting
> >drivers are merged. We've done it for other devices as well.
> 
> Ok. Will need to add tegra114-host1x to the host1x driver compat
> strings, then, but I guess that's better than having it wrong in the
> DT.

I think that's not all. I have local patches that also introduce a v2 of
host1x, because the number of syncpoints is different. There may also be
other differences, but Terje might be more qualified to answer that.

> >>+   hdmi {
> >>+   compatible = "nvidia,tegra114-hdmi";
> >>+   reg = <0x5428 0x0004>;
> >>+   interrupts = ;
> >>+   clocks = <_car TEGRA114_CLK_HDMI>,
> >>+   <_car TEGRA114_CLK_PLL_D_OUT0>;
> >
> >Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?
> 
> I have this set to PLL_D because I don't have panel support so disp1
> will be the HDMI DC. However, it doesn't seem to matter which one is
> specified here. I have also tested HDMI with disp2 and that works
> too.

Well eventually we'll add panel support and I think it'd be good to stay
consistent as to what clocks are used for the internal and external
displays.

Thierry
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 



[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Thierry Reding
On Wed, Aug 28, 2013 at 01:40:58PM +0300, Mikko Perttunen wrote:
> Add host1x, dc (display controller) and hdmi devices to Tegra114
> device tree.

"DC" and "HDMI".

> 
> Signed-off-by: Mikko Perttunen 
> ---
>  arch/arm/boot/dts/tegra114.dtsi | 43 
> +
>  1 file changed, 43 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
> index 2905145..ce5a95c 100644
> --- a/arch/arm/boot/dts/tegra114.dtsi
> +++ b/arch/arm/boot/dts/tegra114.dtsi
> @@ -27,6 +27,49 @@
>   (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
>   };
>  
> + host1x {
> + compatible = "nvidia,tegra114-host1x", "nvidia,tegra30-host1x",

I don't think that's correct. The Tegra114 host1x is not backwards
compatible with the Tegra30 host1x.

That said, I have a local patch that is a bit more complete in that it
adds other host1x devices as listed in the TRM as well. But I'll leave
it up to Stephen how he prefers to handle that. It should be fine to
defer adding nodes for additional hardware blocks when the supporting
drivers are merged. We've done it for other devices as well.

> + "simple-bus";
> + reg = <0x5000 0x00028000>;
> + interrupts = ,
> + ;

I think this should be indented with the previous line. Also other SoC
.dtsi files use a single entry, as in:

interrupts = ;

> + hdmi {
> + compatible = "nvidia,tegra114-hdmi";
> + reg = <0x5428 0x0004>;
> + interrupts = ;
> + clocks = <_car TEGRA114_CLK_HDMI>,
> + <_car TEGRA114_CLK_PLL_D_OUT0>;

Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?

Thierry
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 



[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Mikko Perttunen
Add host1x, dc (display controller) and hdmi devices to Tegra114
device tree.

Signed-off-by: Mikko Perttunen 
---
 arch/arm/boot/dts/tegra114.dtsi | 43 +
 1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 2905145..ce5a95c 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -27,6 +27,49 @@
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};

+   host1x {
+   compatible = "nvidia,tegra114-host1x", "nvidia,tegra30-host1x",
+   "simple-bus";
+   reg = <0x5000 0x00028000>;
+   interrupts = ,
+   ;
+   clocks = <_car TEGRA114_CLK_HOST1X>;
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   ranges = <0x5400 0x5400 0x0400>;
+
+   dc at 5420 {
+   compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";
+   reg = <0x5420 0x0004>;
+   interrupts = ;
+   clocks = <_car TEGRA114_CLK_DISP1>,
+   <_car TEGRA114_CLK_PLL_P>;
+   clock-names = "disp1", "parent";
+   };
+
+   dc at 5424 {
+   compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";
+   reg = <0x5424 0x0004>;
+   interrupts = ;
+   clocks = <_car TEGRA114_CLK_DISP2>,
+   <_car TEGRA114_CLK_PLL_P>;
+   clock-names = "disp2", "parent";
+   };
+
+   hdmi {
+   compatible = "nvidia,tegra114-hdmi";
+   reg = <0x5428 0x0004>;
+   interrupts = ;
+   clocks = <_car TEGRA114_CLK_HDMI>,
+   <_car TEGRA114_CLK_PLL_D_OUT0>;
+   clock-names = "hdmi", "parent";
+
+   status = "disabled";
+   };
+   };
+
timer at 60005000 {
compatible = "nvidia,tegra114-timer", "nvidia,tegra20-timer";
reg = <0x60005000 0x400>;
-- 
1.8.1.5



Re: [PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Thierry Reding
On Wed, Aug 28, 2013 at 01:40:58PM +0300, Mikko Perttunen wrote:
 Add host1x, dc (display controller) and hdmi devices to Tegra114
 device tree.

DC and HDMI.

 
 Signed-off-by: Mikko Perttunen mperttu...@nvidia.com
 ---
  arch/arm/boot/dts/tegra114.dtsi | 43 
 +
  1 file changed, 43 insertions(+)
 
 diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
 index 2905145..ce5a95c 100644
 --- a/arch/arm/boot/dts/tegra114.dtsi
 +++ b/arch/arm/boot/dts/tegra114.dtsi
 @@ -27,6 +27,49 @@
   (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH);
   };
  
 + host1x {
 + compatible = nvidia,tegra114-host1x, nvidia,tegra30-host1x,

I don't think that's correct. The Tegra114 host1x is not backwards
compatible with the Tegra30 host1x.

That said, I have a local patch that is a bit more complete in that it
adds other host1x devices as listed in the TRM as well. But I'll leave
it up to Stephen how he prefers to handle that. It should be fine to
defer adding nodes for additional hardware blocks when the supporting
drivers are merged. We've done it for other devices as well.

 + simple-bus;
 + reg = 0x5000 0x00028000;
 + interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH,
 + GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH;

I think this should be indented with the previous line. Also other SoC
.dtsi files use a single entry, as in:

interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH
  GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH;

 + hdmi {
 + compatible = nvidia,tegra114-hdmi;
 + reg = 0x5428 0x0004;
 + interrupts = GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH;
 + clocks = tegra_car TEGRA114_CLK_HDMI,
 + tegra_car TEGRA114_CLK_PLL_D_OUT0;

Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?

Thierry


pgp9VuwhIImkc.pgp
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Thierry Reding
On Wed, Aug 28, 2013 at 03:41:35PM +0300, Mikko Perttunen wrote:
 On 08/28/2013 03:25 PM, Thierry Reding wrote:
[...]
 Signed-off-by: Mikko Perttunen mperttu...@nvidia.com
 ---
   arch/arm/boot/dts/tegra114.dtsi | 43 
  +
   1 file changed, 43 insertions(+)
 
 diff --git a/arch/arm/boot/dts/tegra114.dtsi 
 b/arch/arm/boot/dts/tegra114.dtsi
 index 2905145..ce5a95c 100644
 --- a/arch/arm/boot/dts/tegra114.dtsi
 +++ b/arch/arm/boot/dts/tegra114.dtsi
 @@ -27,6 +27,49 @@
 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH);
 };
 
 +   host1x {
 +   compatible = nvidia,tegra114-host1x, nvidia,tegra30-host1x,
 
 I don't think that's correct. The Tegra114 host1x is not backwards
 compatible with the Tegra30 host1x.
 
 That said, I have a local patch that is a bit more complete in that it
 adds other host1x devices as listed in the TRM as well. But I'll leave
 it up to Stephen how he prefers to handle that. It should be fine to
 defer adding nodes for additional hardware blocks when the supporting
 drivers are merged. We've done it for other devices as well.
 
 Ok. Will need to add tegra114-host1x to the host1x driver compat
 strings, then, but I guess that's better than having it wrong in the
 DT.

I think that's not all. I have local patches that also introduce a v2 of
host1x, because the number of syncpoints is different. There may also be
other differences, but Terje might be more qualified to answer that.

 +   hdmi {
 +   compatible = nvidia,tegra114-hdmi;
 +   reg = 0x5428 0x0004;
 +   interrupts = GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH;
 +   clocks = tegra_car TEGRA114_CLK_HDMI,
 +   tegra_car TEGRA114_CLK_PLL_D_OUT0;
 
 Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?
 
 I have this set to PLL_D because I don't have panel support so disp1
 will be the HDMI DC. However, it doesn't seem to matter which one is
 specified here. I have also tested HDMI with disp2 and that works
 too.

Well eventually we'll add panel support and I think it'd be good to stay
consistent as to what clocks are used for the internal and external
displays.

Thierry


pgpca10D6qq4G.pgp
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Mikko Perttunen
Add host1x, dc (display controller) and hdmi devices to Tegra114
device tree.

Signed-off-by: Mikko Perttunen mperttu...@nvidia.com
---
 arch/arm/boot/dts/tegra114.dtsi | 43 +
 1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 2905145..ce5a95c 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -27,6 +27,49 @@
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH);
};
 
+   host1x {
+   compatible = nvidia,tegra114-host1x, nvidia,tegra30-host1x,
+   simple-bus;
+   reg = 0x5000 0x00028000;
+   interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH,
+   GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH;
+   clocks = tegra_car TEGRA114_CLK_HOST1X;
+
+   #address-cells = 1;
+   #size-cells = 1;
+
+   ranges = 0x5400 0x5400 0x0400;
+
+   dc@5420 {
+   compatible = nvidia,tegra114-dc, nvidia,tegra30-dc;
+   reg = 0x5420 0x0004;
+   interrupts = GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH;
+   clocks = tegra_car TEGRA114_CLK_DISP1,
+   tegra_car TEGRA114_CLK_PLL_P;
+   clock-names = disp1, parent;
+   };
+
+   dc@5424 {
+   compatible = nvidia,tegra114-dc, nvidia,tegra30-dc;
+   reg = 0x5424 0x0004;
+   interrupts = GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH;
+   clocks = tegra_car TEGRA114_CLK_DISP2,
+   tegra_car TEGRA114_CLK_PLL_P;
+   clock-names = disp2, parent;
+   };
+
+   hdmi {
+   compatible = nvidia,tegra114-hdmi;
+   reg = 0x5428 0x0004;
+   interrupts = GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH;
+   clocks = tegra_car TEGRA114_CLK_HDMI,
+   tegra_car TEGRA114_CLK_PLL_D_OUT0;
+   clock-names = hdmi, parent;
+
+   status = disabled;
+   };
+   };
+
timer@60005000 {
compatible = nvidia,tegra114-timer, nvidia,tegra20-timer;
reg = 0x60005000 0x400;
-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 4/5] ARM: tegra: Add host1x, dc and hdmi to Tegra114 device tree

2013-08-28 Thread Mikko Perttunen

On 08/28/2013 03:25 PM, Thierry Reding wrote:

* PGP Signed by an unknown key

On Wed, Aug 28, 2013 at 01:40:58PM +0300, Mikko Perttunen wrote:

Add host1x, dc (display controller) and hdmi devices to Tegra114
device tree.


DC and HDMI.


Will fix.





Signed-off-by: Mikko Perttunen mperttu...@nvidia.com
---
  arch/arm/boot/dts/tegra114.dtsi | 43 +
  1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 2905145..ce5a95c 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -27,6 +27,49 @@
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH);
};

+   host1x {
+   compatible = nvidia,tegra114-host1x, nvidia,tegra30-host1x,


I don't think that's correct. The Tegra114 host1x is not backwards
compatible with the Tegra30 host1x.

That said, I have a local patch that is a bit more complete in that it
adds other host1x devices as listed in the TRM as well. But I'll leave
it up to Stephen how he prefers to handle that. It should be fine to
defer adding nodes for additional hardware blocks when the supporting
drivers are merged. We've done it for other devices as well.


Ok. Will need to add tegra114-host1x to the host1x driver compat 
strings, then, but I guess that's better than having it wrong in the DT.





+   simple-bus;
+   reg = 0x5000 0x00028000;
+   interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH,
+   GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH;


I think this should be indented with the previous line. Also other SoC
.dtsi files use a single entry, as in:

interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH
  GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH;



Will fix.


+   hdmi {
+   compatible = nvidia,tegra114-hdmi;
+   reg = 0x5428 0x0004;
+   interrupts = GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH;
+   clocks = tegra_car TEGRA114_CLK_HDMI,
+   tegra_car TEGRA114_CLK_PLL_D_OUT0;


Any reason why we can't use pll_d2_out0 here, like we do on Tegra30?


I have this set to PLL_D because I don't have panel support so disp1 
will be the HDMI DC. However, it doesn't seem to matter which one is 
specified here. I have also tested HDMI with disp2 and that works too.




Thierry

* Unknown Key
* 0x7F3EB3A1


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel