Re: [PATCH v1] arm64: dts: qcom: msm8998: add HDMI GPIOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 May 2024 at 19:45, Marc Gonzalez <mgonzalez@xxxxxxxxxx> wrote:
>
> On 30/05/2024 15:06, Dmitry Baryshkov wrote:
>
> > This device was neither validated nor described properly in the DT
> > schema. There are several other issues here.
>
> Do you mean dtbs_check or dt_binding_check or something else?

dtbs_check

>
> I think I changed everything you pointed out.
> (I tried to remain as close as possible to msm8996.)

Yes, this is better now.

>
> diff --git a/Documentation/devicetree/bindings/display/msm/hdmi.yaml b/Documentation/devicetree/bindings/display/msm/hdmi.yaml
> index 47e97669821c3..9fc49ae9ee387 100644
> --- a/Documentation/devicetree/bindings/display/msm/hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/hdmi.yaml
> @@ -19,6 +19,7 @@ properties:
>        - qcom,hdmi-tx-8974
>        - qcom,hdmi-tx-8994
>        - qcom,hdmi-tx-8996
> +      - qcom,hdmi-tx-8998

If you scroll the file down, you'll see that this is not enough.

>
>    clocks:
>      minItems: 1
> diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml
> index 83fe4b39b56f4..78607ee3e2e84 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml
> @@ -14,6 +14,7 @@ properties:
>    compatible:
>      enum:
>        - qcom,hdmi-phy-8996
> +      - qcom,hdmi-phy-8998
>
>    reg:
>      maxItems: 6
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index e5f051f5a92de..268bb83efccce 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -1434,6 +1434,34 @@ blsp2_spi6_default: blsp2-spi6-default-state {
>                                 drive-strength = <6>;
>                                 bias-disable;
>                         };
> +
> +                       hdmi_cec_default: hdmi-cec-default-state {
> +                               pins = "gpio31";
> +                               function = "hdmi_cec";
> +                               drive-strength = <2>;
> +                               bias-pull-up;
> +                       };
> +
> +                       hdmi_ddc_default: hdmi-ddc-default-state {
> +                               pins = "gpio32", "gpio33";
> +                               function = "hdmi_ddc";
> +                               drive-strength = <2>;
> +                               bias-pull-up;
> +                       };
> +
> +                       hdmi_hpd_default: hdmi-hpd-default-state {
> +                               pins = "gpio34";
> +                               function = "hdmi_hot";
> +                               drive-strength = <16>;
> +                               bias-pull-down;
> +                       };
> +
> +                       hdmi_hpd_sleep: hdmi-hpd-sleep-state {
> +                               pins = "gpio34";
> +                               function = "hdmi_hot";
> +                               drive-strength = <2>;
> +                               bias-pull-down;
> +                       };
>                 };
>
>                 remoteproc_mss: remoteproc@4080000 {
> @@ -2757,7 +2785,7 @@ mmcc: clock-controller@c8c0000 {
>                                  <&mdss_dsi0_phy 0>,
>                                  <&mdss_dsi1_phy 1>,
>                                  <&mdss_dsi1_phy 0>,
> -                                <0>,
> +                                <&hdmi_phy 0>,
>                                  <0>,
>                                  <0>,
>                                  <&gcc GCC_MMSS_GPLL0_DIV_CLK>;
> @@ -2862,6 +2890,14 @@ dpu_intf2_out: endpoint {
>                                                         remote-endpoint = <&mdss_dsi1_in>;
>                                                 };
>                                         };
> +
> +                                       port@2 {
> +                                               reg = <2>;
> +
> +                                               dpu_intf3_out: endpoint {
> +                                                       remote-endpoint = <&hdmi_in>;
> +                                               };
> +                                       };
>                                 };
>                         };
>
> @@ -3017,6 +3053,90 @@ mdss_dsi1_phy: phy@c996400 {
>
>                                 status = "disabled";
>                         };
> +
> +                       hdmi: hdmi-tx@c9a0000 {
> +                               compatible = "qcom,hdmi-tx-8998";
> +                               reg =   <0x0c9a0000 0x50c>,
> +                                       <0x00780000 0x6220>,
> +                                       <0x0c9e0000 0x2c>;
> +                               reg-names = "core_physical",
> +                                           "qfprom_physical",
> +                                           "hdcp_physical";
> +
> +                               interrupt-parent = <&mdss>;
> +                               interrupts = <8>;
> +
> +                               clocks = <&mmcc MDSS_MDP_CLK>,
> +                                        <&mmcc MDSS_AHB_CLK>,
> +                                        <&mmcc MDSS_HDMI_CLK>,
> +                                        <&mmcc MDSS_HDMI_DP_AHB_CLK>,
> +                                        <&mmcc MDSS_EXTPCLK_CLK>;
> +                               clock-names =
> +                                       "mdp_core",
> +                                       "iface",
> +                                       "core",
> +                                       "alt_iface",
> +                                       "extp";

Ok, you have dropped several clocks, which I think might be required
for the device to function. For example, msm8996 doesn't have
MNOC_AHB_CLK, while msm8998 has it. It might be that we should be
enabling the clock via the interconnect driver instead (or maybe it is
handled by RPM?).

Let's hope that we can sort the clocks. I have no other issues remaining.

> +
> +                               phys = <&hdmi_phy>;
> +                               #sound-dai-cells = <1>;
> +
> +                               pinctrl-names = "default", "sleep";
> +                               pinctrl-0 = <&hdmi_hpd_default
> +                                            &hdmi_ddc_default
> +                                            &hdmi_cec_default>;
> +                               pinctrl-1 = <&hdmi_hpd_sleep
> +                                            &hdmi_ddc_default
> +                                            &hdmi_cec_default>;
> +
> +                               status = "disabled";
> +
> +                               ports {
> +                                       #address-cells = <1>;
> +                                       #size-cells = <0>;
> +
> +                                       port@0 {
> +                                               reg = <0>;
> +                                               hdmi_in: endpoint {
> +                                                       remote-endpoint = <&dpu_intf3_out>;
> +                                               };
> +                                       };
> +
> +                                       port@1 {
> +                                               reg = <1>;
> +                                               hdmi_out: endpoint {
> +                                               };
> +                                       };
> +                               };
> +                       };
> +
> +                       hdmi_phy: hdmi-phy@c9a0600 {
> +                               compatible = "qcom,hdmi-phy-8998";
> +                               reg = <0x0c9a0600 0x18b>,
> +                                     <0x0c9a0a00 0x38>,
> +                                     <0x0c9a0c00 0x38>,
> +                                     <0x0c9a0e00 0x38>,
> +                                     <0x0c9a1000 0x38>,
> +                                     <0x0c9a1200 0x0e8>;
> +                               reg-names = "hdmi_pll",
> +                                           "hdmi_tx_l0",
> +                                           "hdmi_tx_l1",
> +                                           "hdmi_tx_l2",
> +                                           "hdmi_tx_l3",
> +                                           "hdmi_phy";
> +
> +                               #clock-cells = <0>;
> +                               #phy-cells = <0>;
> +
> +                               clocks = <&mmcc MDSS_AHB_CLK>,
> +                                        <&gcc GCC_HDMI_CLKREF_CLK>,
> +                                        <&rpmcc RPM_SMD_XO_CLK_SRC>;
> +                               clock-names = "iface",
> +                                             "ref",
> +                                             "xo";
> +
> +                               status = "disabled";
> +                       };
>                 };
>
>                 venus: video-codec@cc00000 {
>
>
> I get /dev/tty1 on the TV.
>
> And the following command displays test patterns as expected:
> # modetest -Mmsm -a -s 33:#0 -P 34@82:1920x1080+0+0@XR24 -P 40@82:200x200+35+300@AR24 -P 46@82:200x200+310+300@AR24
> setting mode 1920x1080-60.00Hz on connectors 33, crtc 82
> testing 1920x1080@XR24 on plane 34, crtc 82
> testing 200x200@AR24 on plane 40, crtc 82
> testing 200x200@AR24 on plane 46, crtc 82
>
>
> Regards
>


-- 
With best wishes
Dmitry




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux