mbox series

[0/3] drm/bridge: dw_hdmi: allow to disable CEC from DT

Message ID 20230415104613.61224-1-jernej.skrabec@gmail.com
Headers show
Series drm/bridge: dw_hdmi: allow to disable CEC from DT | expand

Message

Jernej Škrabec April 15, 2023, 10:46 a.m. UTC
Boards can have perfectly working DW HDMI CEC implementation but they
may prefer to use bit banged implementation instead. This is the
situation on Beelink X2.

Add DW HDMI DT property for disabling CEC. This prevents confusion on
userspace side by not exposing unused CEC interface.

Best regards,
Jernej

Jernej Skrabec (3):
  dt-bindings: display: synopsys,dw-hdmi: Add property for disabling CEC
  drm/bridge: dw_hdmi: Handle snps,disable-cec property
  ARM: dts: sun8i: h3: beelink-x2: Disable DW-HDMI CEC

 .../devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml | 5 +++++
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts                    | 1 +
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c                    | 4 +++-
 3 files changed, 9 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart April 16, 2023, 1:25 p.m. UTC | #1
Hi Jernej,

Thank you for the patch.

On Sat, Apr 15, 2023 at 12:46:13PM +0200, Jernej Skrabec wrote:
> Beelink X2 uses software implementation of CEC even though DW-HDMI has
> working hardware implementation.

Why ? The reason should be explained in the commit message.

> Disable unused DW-HDMI CEC.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
>  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> index a6d38ecee141..38f40d69e5c5 100644
> --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> @@ -150,6 +150,7 @@ &emac {
>  };
>  
>  &hdmi {
> +	snps,disable-cec;
>  	status = "okay";
>  };
>
Jernej Škrabec April 16, 2023, 1:31 p.m. UTC | #2
Dne nedelja, 16. april 2023 ob 15:25:31 CEST je Laurent Pinchart napisal(a):
> Hi Jernej,
> 
> Thank you for the patch.
> 
> On Sat, Apr 15, 2023 at 12:46:13PM +0200, Jernej Skrabec wrote:
> > Beelink X2 uses software implementation of CEC even though DW-HDMI has
> > working hardware implementation.
> 
> Why ? The reason should be explained in the commit message.

Maybe I should reword this differently. It uses software implementation through 
GPIO pin. Dedicated DW-HDMI CEC pin is left unconnected.

Best regards,
Jernej 

> 
> > Disable unused DW-HDMI CEC.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> > ---
> > 
> >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts index
> > a6d38ecee141..38f40d69e5c5 100644
> > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > @@ -150,6 +150,7 @@ &emac {
> > 
> >  };
> >  
> >  &hdmi {
> > 
> > +	snps,disable-cec;
> > 
> >  	status = "okay";
> >  
> >  };
Laurent Pinchart April 16, 2023, 1:47 p.m. UTC | #3
On Sun, Apr 16, 2023 at 03:31:56PM +0200, Jernej Škrabec wrote:
> Dne nedelja, 16. april 2023 ob 15:25:31 CEST je Laurent Pinchart napisal(a):
> > Hi Jernej,
> > 
> > Thank you for the patch.
> > 
> > On Sat, Apr 15, 2023 at 12:46:13PM +0200, Jernej Skrabec wrote:
> > > Beelink X2 uses software implementation of CEC even though DW-HDMI has
> > > working hardware implementation.
> > 
> > Why ? The reason should be explained in the commit message.
> 
> Maybe I should reword this differently. It uses software implementation through 
> GPIO pin. Dedicated DW-HDMI CEC pin is left unconnected.

That's a very good reason :-) I'm then fine with this patch, with a
reworded commit message. The DT bindings should be updated accordingly
as well, to explain the use case.

> > > Disable unused DW-HDMI CEC.
> > > 
> > > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> > > ---
> > > 
> > >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts index
> > > a6d38ecee141..38f40d69e5c5 100644
> > > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > @@ -150,6 +150,7 @@ &emac {
> > >  };
> > >  
> > >  &hdmi {
> > > +	snps,disable-cec;
> > >  	status = "okay";
> > >  };