Thank you for your contribution! Sashiko AI review found 5 potential
issues to consider:
- [High] arm64: dts: qcom: hawi: dcp virtio node placed under root
  instead of soc@0
- [Medium] arm64: dts: qcom: hawi: dcp left enabled in dtsi with
  unconnected endpoint
- [Low] arm64: dts: qcom: hawi: sde_disp0_vdd_active violates
  qcom,pmic-gpio schema
- [Low] arm64: dts: qcom: hawi: duplicate tlmm block and unsorted nodes
  in hawi-mtp
- [Low] arm64: dts: qcom: hawi: raw integer 13 used instead of
  IPCC_MPROC_DCP macro
--

commit 93016695cd15832073fccedfcdc7a71d20169a8f
Author: Jayant Shekhar <[email protected]>

arm64: dts: qcom: hawi: Add DCP support

This commit describes the Qualcomm DCP VirtIO transport, display
subsystem, IPCC channel, IOMMU configuration, and DSI display graph in
hawi.dtsi, and wires up the DSI0 display panel and pin configuration on
Hawi MTP.

> diff --git a/arch/arm64/boot/dts/qcom/hawi-mtp.dts 
> b/arch/arm64/boot/dts/qcom/hawi-mtp.dts
> index c38e5fab7a2cb..50484d006db6b 100644
> --- a/arch/arm64/boot/dts/qcom/hawi-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/hawi-mtp.dts
[ ... ]
> @@ -995,3 +1007,99 @@ &usb_dp_qmpphy {
>  &usb_dp_qmpphy_out {
>       remote-endpoint = <&pmic_glink_ss_in>;
>  };
> +
> +&dcp_dsi0 {
[ ... ]
> +&pmd8028_e1_gpios {
> +     sde_disp0_vdd_active: sde_disp0_vdd_active {
> +             pins = "gpio2";
> +             function = "normal";
> +             input-disable;
> +             output-enable;
> +             bias-disable;
> +             power-source = <2>;
> +             qcom,drive-strength = <2>;
> +     };
> +};

[Severity: Low]
Should this child node be named sde-disp0-vdd-active-state?
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml requires
pin configuration child node names to end with "-state" and sets
additionalProperties: false, so sde_disp0_vdd_active fails dtbs_check.

> +
> +&pmh0110_d_e0_gpios {
[ ... ]
> +};
> +
> +&tlmm {
> +     sde_te_active: sde-te-active-state {
> +             pins = "gpio86";
> +             function = "mdp_vsync";
> +             drive-strength = <2>;
> +             bias-pull-down;
> +     };
> +
> +     sde_esync0_suspend: sde-esync0-suspend-state {
> +             pins = "gpio88";
> +             function = "mdp_esync0";
> +             drive-strength = <2>;
> +             bias-pull-down;
> +     };
> +
> +};

[Severity: Low]
This isn't a bug, but hawi-mtp.dts already defines a &tlmm block earlier
in the file and keeps &label overrides sorted alphabetically.  Should
these pin states be merged into the existing &tlmm node and the new
&dcp_dsi0, &dcp_intf1_out, &pmd8028_e1_gpios, &pmh0110_d_e0_gpios, and
&pmh0110_f_e0_gpios blocks (as well as regulator-display-panel-vdd under
/) be placed in alphabetical order?

> diff --git a/arch/arm64/boot/dts/qcom/hawi.dtsi 
> b/arch/arm64/boot/dts/qcom/hawi.dtsi
> index 77d704fa6cf74..9d22243b97d77 100644
> --- a/arch/arm64/boot/dts/qcom/hawi.dtsi
> +++ b/arch/arm64/boot/dts/qcom/hawi.dtsi
> @@ -6854,4 +6854,49 @@ timer {
>                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
>                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
>       };
> +
> +     dcp: virtio@9be8000 {
> +             compatible = "qcom,dcp-virtio";
> +             reg = <0x0 0x09be8000 0x0 0x1000>;

[Severity: High]
Should virtio@9be8000 be placed inside /soc@0 (sorted by unit address)
rather than directly under the root node after timer?

All MMIO peripherals in hawi.dtsi live under /soc@0, which defines the
SoC ranges and 36-bit dma-ranges = <0x0 0x0 0x0 0x0 0x10 0x0>.  Because
the root node has no ranges or dma-ranges, placing virtio@9be8000 under /
fails root-node dtbs_check validation and causes of_dma_configure_id()
(including the call in dcp_subsystem_dev_init() for display-subsystem) to
fail to inherit the SoC 36-bit DMA range, leaving dev->dma_range_map
unset and clamping display-subsystem to a 32-bit coherent DMA mask.

> +             interrupts-extended = <&intc GIC_ESPI 956 IRQ_TYPE_LEVEL_HIGH>,
> +                                   <&ipcc 13 5 IRQ_TYPE_EDGE_RISING>;
> +             iommus = <&apps_smmu 0x15a3 0x0>;
> +             iommu-ranges = <0x0 0x84000000 0x0 0x04000000>;
> +             dma-coherent;
> +             mboxes = <&ipcc 13 5>;

[Severity: Low]
This isn't a bug, but hawi.dtsi includes hawi-ipcc.h, which defines
IPCC_MPROC_DCP for client 13.  Could interrupts-extended and mboxes use
IPCC_MPROC_DCP instead of the raw literal 13 to match the other IPCC
consumers in this file?

> +             mbox-names = "dcp-power-tx";
> +
> +             display-subsystem {
> +                     compatible = "virtio,device34";
> +
> +                     iommus = <&apps_smmu 0x400 0x2>;
> +
> +                     #address-cells = <1>;
> +                     #size-cells = <0>;
> +
> +                     ports {
> +                             #address-cells = <1>;
> +                             #size-cells = <0>;
> +
> +                             port@1 {
> +                                     reg = <1>;
> +                                     dcp_intf1_out: endpoint {
> +                                     };
> +                             };
> +
> +                     };

[Severity: Medium]
Should dcp have status = "disabled"; in hawi.dtsi and be enabled via &dcp
in hawi-mtp.dts, as described in the commit message?

Leaving dcp enabled in hawi.dtsi with an empty dcp_intf1_out endpoint
violates Documentation/devicetree/bindings/display/msm/qcom,dcp.yaml
(which requires remote-endpoint on every port endpoint) on any Hawi board
that does not connect a DSI0 panel.  At runtime on such boards,
dcp_virtio_transport_probe() still wakes DCP firmware and
dcp_dpu_kms_init_dsi_bridges() sees the empty port@1 endpoint and adds
dsi@0 to the DRM component match list, which can never bind without an
attached panel calling dcp_dsi_host_attach().

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=21

Reply via email to