From: Hans Verkuil hans.verkuil@cisco.com
Some boards (amlogic) have two CEC controllers: the DesignWare controller and their own CEC controller (meson ao-cec).
Since the CEC line is not hooked up to the DW controller we need a way to disable that controller. This patch series adds the cec-disable property for that purpose.
Neil, I have added cec-disable to meson-gxl-s905x-libretech-cc.dts only, but I suspect it is probably valid for all meson-glx devices? Should I move it to meson-gxl.dtsi?
Regards,
Hans
Hans Verkuil (3): dt-bindings: display: dw_hdmi.txt drm: bridge: dw-hdmi: check the cec-disable property arm64: dts: meson-gxl-s905x-libretech-cc: add cec-disable
Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt | 3 +++ arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-)
From: Hans Verkuil hans.verkuil@cisco.com
Some boards have both a DesignWare and their own CEC controller. The CEC pin is only hooked up to their own CEC controller and not to the DW controller.
Add the cec-disable property to disable the DW CEC controller.
This particular situation happens on Amlogic boards that have their own meson CEC controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com --- Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt index 33bf981fbe33..4a13f4858bc0 100644 --- a/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt +++ b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt @@ -27,6 +27,9 @@ responsible for defining whether each property is required or optional. - "isfr" is the internal register configuration clock (mandatory). - "cec" is the HDMI CEC controller main clock (optional).
+- cec-disable: Do not use the DWC CEC controller since the CEC line is not + hooked up even though the CEC DWC IP is present. + - ports: The connectivity of the DWC HDMI TX with the rest of the system is expressed in using ports as specified in the device graph bindings defined in Documentation/devicetree/bindings/graph.txt. The numbering of the ports
Hi Hans,
On Mon, Mar 19, 2018 at 8:43 AM, Hans Verkuil hverkuil@xs4all.nl wrote:
From: Hans Verkuil hans.verkuil@cisco.com
It seems the Subject line is missing some content?
On 03/19/2018 12:46 PM, Fabio Estevam wrote:
Hi Hans,
On Mon, Mar 19, 2018 at 8:43 AM, Hans Verkuil hverkuil@xs4all.nl wrote:
From: Hans Verkuil hans.verkuil@cisco.com
It seems the Subject line is missing some content?
Oops. That should have been:
dt-bindings: display: dw_hdmi.txt: add cec-disable property
Thanks for pointing this out.
Regards,
Hans
On 19/03/2018 12:43, Hans Verkuil wrote:
From: Hans Verkuil hans.verkuil@cisco.com
Some boards have both a DesignWare and their own CEC controller. The CEC pin is only hooked up to their own CEC controller and not to the DW controller.
Add the cec-disable property to disable the DW CEC controller.
This particular situation happens on Amlogic boards that have their own meson CEC controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com
Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt index 33bf981fbe33..4a13f4858bc0 100644 --- a/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt +++ b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt @@ -27,6 +27,9 @@ responsible for defining whether each property is required or optional.
- "isfr" is the internal register configuration clock (mandatory).
- "cec" is the HDMI CEC controller main clock (optional).
+- cec-disable: Do not use the DWC CEC controller since the CEC line is not
- hooked up even though the CEC DWC IP is present.
- ports: The connectivity of the DWC HDMI TX with the rest of the system is expressed in using ports as specified in the device graph bindings defined in Documentation/devicetree/bindings/graph.txt. The numbering of the ports
Acked-by: Neil Armstrong narmstrong@baylibre.com
From: Hans Verkuil hans.verkuil@cisco.com
If the cec-disable property was set, then disable the DW CEC controller. This is needed for boards that have their own CEC controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index a38db40ce990..597220e40541 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2508,7 +2508,8 @@ __dw_hdmi_probe(struct platform_device *pdev, hdmi->audio = platform_device_register_full(&pdevinfo); }
- if (config0 & HDMI_CONFIG0_CEC) { + if ((config0 & HDMI_CONFIG0_CEC) && + !of_property_read_bool(np, "cec-disable")) { cec.hdmi = hdmi; cec.ops = &dw_hdmi_cec_ops; cec.irq = irq;
On 19/03/2018 12:43, Hans Verkuil wrote:
From: Hans Verkuil hans.verkuil@cisco.com
If the cec-disable property was set, then disable the DW CEC controller. This is needed for boards that have their own CEC controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index a38db40ce990..597220e40541 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2508,7 +2508,8 @@ __dw_hdmi_probe(struct platform_device *pdev, hdmi->audio = platform_device_register_full(&pdevinfo); }
- if (config0 & HDMI_CONFIG0_CEC) {
- if ((config0 & HDMI_CONFIG0_CEC) &&
cec.hdmi = hdmi; cec.ops = &dw_hdmi_cec_ops; cec.irq = irq;!of_property_read_bool(np, "cec-disable")) {
I suspected the bit was off for the Amlogic GX SoCs, I was wrong...
Reviewed-by: Neil Armstrong narmstrong@baylibre.com
From: Hans Verkuil hans.verkuil@cisco.com
This board has two CEC controllers: the DesignWare controller and a meson-specific controller. Disable the DW controller since the CEC line is hooked up to the meson controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com --- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts index 9671f1e3c74a..271bd486fd65 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts @@ -155,6 +155,7 @@ status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default"; + cec-disable; };
&hdmi_tx_tmds_port {
On 19/03/2018 12:43, Hans Verkuil wrote:
From: Hans Verkuil hans.verkuil@cisco.com
This board has two CEC controllers: the DesignWare controller and a meson-specific controller. Disable the DW controller since the CEC line is hooked up to the meson controller.
Signed-off-by: Hans Verkuil hans.verkuil@cisco.com
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts index 9671f1e3c74a..271bd486fd65 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts @@ -155,6 +155,7 @@ status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default";
- cec-disable;
};
&hdmi_tx_tmds_port {
Acked-by: Neil Armstrong narmstrong@baylibre.com
Hi Hans,
On 19/03/2018 12:43, Hans Verkuil wrote:
From: Hans Verkuil hans.verkuil@cisco.com
Some boards (amlogic) have two CEC controllers: the DesignWare controller and their own CEC controller (meson ao-cec).
Since the CEC line is not hooked up to the DW controller we need a way to disable that controller. This patch series adds the cec-disable property for that purpose.
Neil, I have added cec-disable to meson-gxl-s905x-libretech-cc.dts only, but I suspect it is probably valid for all meson-glx devices? Should I move it to meson-gxl.dtsi?
It's valid on all GX devices, so you can add to meson-gx.dtsi
Neil
Regards,
Hans
Hans Verkuil (3): dt-bindings: display: dw_hdmi.txt drm: bridge: dw-hdmi: check the cec-disable property arm64: dts: meson-gxl-s905x-libretech-cc: add cec-disable
Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt | 3 +++ arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-)
dri-devel@lists.freedesktop.org