Re: [PATCH 3/5] arm64: dts: renesas: r8a77995: Add LVDS support

2018-05-22 Thread Geert Uytterhoeven
Hi Laurent,

On Sun, May 20, 2018 at 10:50 AM, Laurent Pinchart
 wrote:
> On Tuesday, 15 May 2018 15:20:38 EEST Ulrich Hecht wrote:
>> From: Kieran Bingham 
>>
>> The r8a77995 D3 platform has 2 LVDS channels connected to the DU.
>>
>> Signed-off-by: Kieran Bingham 
>> [uli: moved lvds* into the soc node, added PM domains, resets]
>> Signed-off-by: Ulrich Hecht 
>> ---
>>  arch/arm64/boot/dts/renesas/r8a77995.dtsi | 56 
>>  1 file changed, 56 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
>> b/arch/arm64/boot/dts/renesas/r8a77995.dtsi index ba98865..8e78110d 100644
>> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
>> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
>> @@ -757,12 +757,68 @@
>>   port@1 {
>>   reg = <1>;
>>   du_out_lvds0: endpoint {
>> + remote-endpoint = <_in>;
>>   };
>>   };
>>
>>   port@2 {
>>   reg = <2>;
>>   du_out_lvds1: endpoint {
>> + remote-endpoint = <_in>;
>> + };
>> + };
>> + };
>> + };
>> +
>> + lvds0: lvds-encoder@feb9 {
>> + compatible = "renesas,r8a77995-lvds";
>> + reg = <0 0xfeb9 0 0x20>;
>> + clocks = < CPG_MOD 727>;
>> + power-domains = < R8A77995_PD_ALWAYS_ON>;
>> + resets = < 727>;
>> + status = "disabled";
>> +
>> + ports {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + port@0 {
>> + reg = <0>;
>> + lvds0_in: endpoint {
>> + remote-endpoint = 
>> <_out_lvds0>;
>> + };
>> + };
>> +
>> + port@1 {
>> + reg = <1>;
>> + lvds0_out: endpoint {
>> + };
>> + };
>> + };
>> + };
>> +
>> + lvds1: lvds-encoder@feb90100 {
>> + compatible = "renesas,r8a77995-lvds";
>> + reg = <0 0xfeb90100 0 0x20>;
>> + clocks = < CPG_MOD 727>;
>> + power-domains = < R8A77995_PD_ALWAYS_ON>;
>> + resets = < 727>;
>
> While there seems to be a single clock for both LVDS encoders, it appears that
> two separate reset lines are used.

Nice catch!

So you can reset the individual LVDS instances, but not the individual DU
instances. Doh...

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


Re: [PATCH 3/5] arm64: dts: renesas: r8a77995: Add LVDS support

2018-05-20 Thread Laurent Pinchart
Hi Ulrich,

Thank you for the patch.

On Tuesday, 15 May 2018 15:20:38 EEST Ulrich Hecht wrote:
> From: Kieran Bingham 
> 
> The r8a77995 D3 platform has 2 LVDS channels connected to the DU.
> 
> Signed-off-by: Kieran Bingham 
> [uli: moved lvds* into the soc node, added PM domains, resets]
> Signed-off-by: Ulrich Hecht 
> ---
>  arch/arm64/boot/dts/renesas/r8a77995.dtsi | 56 
>  1 file changed, 56 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> b/arch/arm64/boot/dts/renesas/r8a77995.dtsi index ba98865..8e78110d 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> @@ -757,12 +757,68 @@
>   port@1 {
>   reg = <1>;
>   du_out_lvds0: endpoint {
> + remote-endpoint = <_in>;
>   };
>   };
> 
>   port@2 {
>   reg = <2>;
>   du_out_lvds1: endpoint {
> + remote-endpoint = <_in>;
> + };
> + };
> + };
> + };
> +
> + lvds0: lvds-encoder@feb9 {
> + compatible = "renesas,r8a77995-lvds";
> + reg = <0 0xfeb9 0 0x20>;
> + clocks = < CPG_MOD 727>;
> + power-domains = < R8A77995_PD_ALWAYS_ON>;
> + resets = < 727>;
> + status = "disabled";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + lvds0_in: endpoint {
> + remote-endpoint = 
> <_out_lvds0>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + lvds0_out: endpoint {
> + };
> + };
> + };
> + };
> +
> + lvds1: lvds-encoder@feb90100 {
> + compatible = "renesas,r8a77995-lvds";
> + reg = <0 0xfeb90100 0 0x20>;
> + clocks = < CPG_MOD 727>;
> + power-domains = < R8A77995_PD_ALWAYS_ON>;
> + resets = < 727>;

While there seems to be a single clock for both LVDS encoders, it appears that 
two separate reset lines are used.

Apart from that,

Reviewed-by: Laurent Pinchart 

Given that the LVDS encoder driver isn't functional yet I wouldn't rule out a 
need to update the LVDS DT bindings in order to properly support D3. I don't 
mind if this patch gets merged already (provided the reset problem gets fixed 
of course), as long as it won't be considered a blocker for DT bindings 
rework. Otherwise I'd prefer delaying upstreaming until the whole series can 
be tested.

> + status = "disabled";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + lvds1_in: endpoint {
> + remote-endpoint = 
> <_out_lvds1>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + lvds1_out: endpoint {
>   };
>   };
>   };

-- 
Regards,

Laurent Pinchart





Re: [PATCH 3/5] arm64: dts: renesas: r8a77995: Add LVDS support

2018-05-16 Thread Simon Horman
On Tue, May 15, 2018 at 02:20:38PM +0200, Ulrich Hecht wrote:
> From: Kieran Bingham 
> 
> The r8a77995 D3 platform has 2 LVDS channels connected to the DU.
> 
> Signed-off-by: Kieran Bingham 
> [uli: moved lvds* into the soc node, added PM domains, resets]
> Signed-off-by: Ulrich Hecht 

This looks fine but I will wait to see if there are other reviews before
applying.

Reviewed-by: Simon Horman 


[PATCH 3/5] arm64: dts: renesas: r8a77995: Add LVDS support

2018-05-15 Thread Ulrich Hecht
From: Kieran Bingham 

The r8a77995 D3 platform has 2 LVDS channels connected to the DU.

Signed-off-by: Kieran Bingham 
[uli: moved lvds* into the soc node, added PM domains, resets]
Signed-off-by: Ulrich Hecht 
---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 56 +++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi 
b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index ba98865..8e78110d 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -757,12 +757,68 @@
port@1 {
reg = <1>;
du_out_lvds0: endpoint {
+   remote-endpoint = <_in>;
};
};
 
port@2 {
reg = <2>;
du_out_lvds1: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+   };
+
+   lvds0: lvds-encoder@feb9 {
+   compatible = "renesas,r8a77995-lvds";
+   reg = <0 0xfeb9 0 0x20>;
+   clocks = < CPG_MOD 727>;
+   power-domains = < R8A77995_PD_ALWAYS_ON>;
+   resets = < 727>;
+   status = "disabled";
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   lvds0_in: endpoint {
+   remote-endpoint = 
<_out_lvds0>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+   lvds0_out: endpoint {
+   };
+   };
+   };
+   };
+
+   lvds1: lvds-encoder@feb90100 {
+   compatible = "renesas,r8a77995-lvds";
+   reg = <0 0xfeb90100 0 0x20>;
+   clocks = < CPG_MOD 727>;
+   power-domains = < R8A77995_PD_ALWAYS_ON>;
+   resets = < 727>;
+   status = "disabled";
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   lvds1_in: endpoint {
+   remote-endpoint = 
<_out_lvds1>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+   lvds1_out: endpoint {
};
};
};
-- 
2.7.4