mbox series

[v3,0/5] make hdmi work on bananapi-r2

Message ID 20200804105849.70876-1-linux@fw-web.de (mailing list archive)
Headers show
Series make hdmi work on bananapi-r2 | expand

Message

Frank Wunderlich Aug. 4, 2020, 10:58 a.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

This Patch-Series adds missing Patches/Bugfixes to get hdmi working
on BPI-R2

v2->v3:
 - use own mmsys-routing for mt7623 instead of code getting different
   routing from dts
 - remove ddp routing bls -> dpi from bpir2/rfb dts
 - updated some commit-Messages as suggested by CK Hu
v1->v2:
 - using get_possible_crtc API instead of hardcoded
 - drop unused dts-nodes
 - refine commit-messages as far as i can :)
   "config component output by device node port" is needed to fix a WARN_ON()
   "fix boot up for 720 and 480 but 1080" fixes flickering, 
     which may cause also some resolutions not working on some TFT (had some problems on my smaller TFT)

Frank Wunderlich (1):
  drm: mediatek: add ddp routing for mt7623

Jitao Shi (1):
  drm/mediatek: dpi/dsi: change the getting possible_crtc way

Ryder Lee (1):
  arm: dts: mt7623: add display subsystem related device nodes

Stu Hsieh (1):
  drm: Add get_possible_crtc API for dpi, dsi

chunhui dai (1):
  drm/mediatek: disable tmds on mt2701

 arch/arm/boot/dts/mt7623.dtsi                 | 177 ++++++++++++++++++
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  72 +++++++
 arch/arm/boot/dts/mt7623n-rfb-emmc.dts        |  72 +++++++
 drivers/gpu/drm/mediatek/mtk_dpi.c            |   3 +-
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c   |  42 +++++
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h   |   2 +
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |  25 ++-
 drivers/gpu/drm/mediatek/mtk_dsi.c            |   3 +-
 drivers/gpu/drm/mediatek/mtk_hdmi_phy.c       |   3 +
 drivers/gpu/drm/mediatek/mtk_hdmi_phy.h       |   1 +
 .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c    |   1 +
 11 files changed, 398 insertions(+), 3 deletions(-)

Comments

Frank Wunderlich Aug. 4, 2020, 3:22 p.m. UTC | #1
Hi

Except mmsys (i added in Patch #1) all mt7623-compatibles are not defined in code and fallback (mt2701-x/mt8173-x) is used. If i add it in dt-binding, it should be added in code too, right? or should i remove mt7623 compatibles and only add documentation for new mmsys?

regards Frank


> Gesendet: Dienstag, 04. August 2020 um 17:00 Uhr
> Von: "Chun-Kuang Hu" <chunkuang.hu@kernel.org>
> An: "Frank Wunderlich" <linux@fw-web.de>
> > +       mipi_tx0: mipi-dphy@10010000 {
> > +               compatible = "mediatek,mt7623-mipi-tx",
>
> In mediatek,dsi.txt [1], "mediatek,mt7623-mipi-tx" is undefined.
>
> [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/mediatek/mediatek%2Cdsi.txt

in drivers/gpu/drm/mediatek/mtk_mipi_tx.c only the compatible for mt2701 is defined (which is fallback in dts). So should i remove mt7623 compatible here and in the other occurences?

>
> > +                            "mediatek,mt2701-mipi-tx";

> > +
> > +       cec: cec@10012000 {
> > +               compatible = "mediatek,mt7623-cec",
>
> Please explicitly define "mediatek,mt7623-cec" in mediatek,hdmi.txt [2].
>
> [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/mediatek/mediatek%2Chdmi.txt
>
> > +                            "mediatek,mt8173-cec";

same here...only mt8173-cec is defined in drivers/gpu/drm/mediatek/mtk_cec.c

> >         cir: cir@10013000 {
> >                 compatible = "mediatek,mt7623-cir";
> >                 reg = <0 0x10013000 0 0x1000>;
> > @@ -369,6 +393,18 @@ apmixedsys: syscon@10209000 {
> >                 #clock-cells = <1>;
> >         };
> >
> > +       hdmi_phy: phy@10209100 {
> > +               compatible = "mediatek,mt7623-hdmi-phy",
>
> Ditto.
>
> > +                            "mediatek,mt2701-hdmi-phy";
same as above (./drivers/gpu/drm/mediatek/mtk_hdmi_phy.c)

> > +       hdmiddc0: i2c@11013000 {
> > +               compatible = "mediatek,mt7623-hdmi-ddc",
>
> Ditto.
>
> > +                            "mediatek,mt8173-hdmi-ddc";
> > +               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
> > +               reg = <0 0x11013000 0 0x1C>;
> > +               clocks = <&pericfg CLK_PERI_I2C3>;
> > +               clock-names = "ddc-i2c";
> > +               status = "disabled";
> > +       };
> > +
> >         nor_flash: spi@11014000 {
> >                 compatible = "mediatek,mt7623-nor",
> >                              "mediatek,mt8173-nor";
> > @@ -766,6 +812,84 @@ mmsys: syscon@14000000 {
> >                 #clock-cells = <1>;
> >         };
> >
> > +       display_components: dispsys@14000000 {
> > +               compatible = "mediatek,mt7623-mmsys",
> > +                            "mediatek,mt2701-mmsys";
>
> In mediatek,mmsys.txt [3], this should be:
>
> mmsys: syscon@14000000 {
>         compatible = "mediatek,mt7623-mmsys", "mediatek,mt2701-mmsys", "syscon"
>
> [3] https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/mediatek/mediatek%2Cmmsys.txt

as i added this in driver, i add this to documentation (and maybe remove the fallback because it results in wrong routing?)

>
> > +               reg = <0 0x14000000 0 0x1000>;
> > +               power-domains = <&scpsys MT2701_POWER_DOMAIN_DISP>;
> > +       };
> > +
> > +       ovl@14007000 {
> > +               compatible = "mediatek,mt7623-disp-ovl",
>
> This is not defined in mediatek,disp.txt [4].
>
> [4] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/mediatek/mediatek%2Cdisp.txt
also not defined in drivers/gpu/drm/mediatek/mtk_drm_drv.c so again fallback used

>
> > +                            "mediatek,mt2701-disp-ovl";

> > +               reg = <0 0x14007000 0 0x1000>;
> > +               interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_LOW>;
> > +               clocks = <&mmsys CLK_MM_DISP_OVL>;
> > +               iommus = <&iommu MT2701_M4U_PORT_DISP_OVL_0>;
> > +               mediatek,larb = <&larb0>;
> > +       };
> > +
> > +       rdma0: rdma@14008000 {
> > +               compatible = "mediatek,mt7623-disp-rdma",
> > +                            "mediatek,mt2701-disp-rdma";
> > +               reg = <0 0x14008000 0 0x1000>;
> > +               interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>;
> > +               clocks = <&mmsys CLK_MM_DISP_RDMA>;
> > +               iommus = <&iommu MT2701_M4U_PORT_DISP_RDMA>;
> > +               mediatek,larb = <&larb0>;
> > +       };
> > +
> > +       wdma@14009000 {
> > +               compatible = "mediatek,mt7623-disp-wdma",
> > +                            "mediatek,mt2701-disp-wdma";
> > +               reg = <0 0x14009000 0 0x1000>;
> > +               interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_LOW>;
> > +               clocks = <&mmsys CLK_MM_DISP_WDMA>;
> > +               iommus = <&iommu MT2701_M4U_PORT_DISP_WDMA>;
> > +               mediatek,larb = <&larb0>;
> > +       };
> > +
> > +       bls: pwm@1400a000 {
> > +               compatible = "mediatek,mt7623-disp-pwm",
> > +                            "mediatek,mt2701-disp-pwm";
> > +               reg = <0 0x1400a000 0 0x1000>;
> > +               #pwm-cells = <2>;
> > +               clocks = <&mmsys CLK_MM_MDP_BLS_26M>,
> > +                        <&mmsys CLK_MM_DISP_BLS>;
> > +               clock-names = "main", "mm";
> > +               status = "disabled";
> > +       };
> > +
> > +       color@1400b000 {
> > +               compatible = "mediatek,mt7623-disp-color",
> > +                            "mediatek,mt2701-disp-color";
> > +               reg = <0 0x1400b000 0 0x1000>;
> > +               interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_LOW>;
> > +               clocks = <&mmsys CLK_MM_DISP_COLOR>;
> > +       };
> > +
> > +       dsi: dsi@1400c000 {
> > +               compatible = "mediatek,mt7623-dsi",
>
> This is not defined in mediatek,dsi.txt [1].
>
> > +                            "mediatek,mt2701-dsi";
also fallback used (drivers/gpu/drm/mediatek/mtk_drm_drv.c)


> > +       dpi0: dpi@14014000 {
> > +               compatible = "mediatek,mt7623-dpi",
>
> This is not defined in mediatek,dpi.txt [5].
>
> [5] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/mediatek/mediatek%2Cdpi.txt
>
> > +                            "mediatek,mt2701-dpi";