Add a binding for the Qualcomm DCP VirtIO display function. Document the framebuffer IOMMU context, DCP INTF output graph, DSI host indices, and connections to the external display chain. Firmware-owned display resources and internal paths are discovered at runtime.
Assisted-by: LLM Signed-off-by: Jayant Shekhar <[email protected]> --- .../devicetree/bindings/display/msm/qcom,dcp.yaml | 159 +++++++++++++++++++++ 1 file changed, 159 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/qcom,dcp.yaml b/Documentation/devicetree/bindings/display/msm/qcom,dcp.yaml new file mode 100644 index 000000000000..ff7dc4e5c5ee --- /dev/null +++ b/Documentation/devicetree/bindings/display/msm/qcom,dcp.yaml @@ -0,0 +1,159 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/msm/qcom,dcp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Display Co-Processor (DCP) + +maintainers: + - Jayant Shekhar <[email protected]> + +description: | + The Display Co-Processor (DCP) is a firmware-owned display subsystem. + Linux communicates with DCP over HFI through VirtIO and does not access + display hardware registers directly. + + This node describes the externally connected display graph between DCP + INTF outputs and attached DSI panels. It is assigned to the VirtIO device + by the Qualcomm transport driver and is not independently enumerated. + Firmware capabilities and internal resources, including pipes, mixers, + CRTCs, and clocks, are discovered at runtime. + +allOf: + - $ref: /schemas/virtio/virtio-device.yaml# + +properties: + compatible: + const: virtio,device34 + + iommus: + maxItems: 1 + description: + SMMU context used by DCP firmware to access GEM framebuffers. This + is separate from the HFI transport context specified by the + iommus property on the parent DCP transport node. + The child context is used for framebuffer DMA performed by DCP + firmware, while the parent context is used for VirtIO transport and HFI + queue buffers. These contexts represent distinct firmware-visible DMA + address spaces and must not be used interchangeably. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: | + DPU INTF output-only ports. The port number matches the firmware INTF + index. The corresponding interface@N child has a reg value matching + the port number; its protocol-specific child describes the display + interface. The graph endpoint itself connects directly to the attached + panel. Each INTF index is represented by one interface node, avoiding + duplicate reg values when different interface protocols are used. + Unused INTF ports are omitted. + unevaluatedProperties: false + patternProperties: + "^port@[0-9a-f]+$": + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + properties: + endpoint: + $ref: /schemas/graph.yaml#/$defs/endpoint-base + unevaluatedProperties: false + required: + - remote-endpoint + +patternProperties: + "^interface@[0-9a-f]+$": + type: object + properties: + "#address-cells": + const: 1 + "#size-cells": + const: 0 + reg: + maxItems: 1 + description: DCP INTF index matching the output port. + patternProperties: + "^dsi@[0-9a-f]+$": + type: object + allOf: + - $ref: /schemas/display/dsi-controller.yaml# + properties: + reg: + maxItems: 1 + description: DSI host index. + required: + - reg + - "#address-cells" + - "#size-cells" + unevaluatedProperties: false + required: + - reg + - "#address-cells" + - "#size-cells" + unevaluatedProperties: false + +required: + - compatible + - iommus + - "#address-cells" + - "#size-cells" + - ports + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + 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 { + remote-endpoint = <&panel_dcp_in>; + }; + }; + }; + + interface@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + dsi@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "novatek,nt37801"; + reg = <0>; + + vddio-supply = <&vreg_l12b_1p8>; + vci-supply = <&vreg_l13b_3p0>; + vdd-supply = <&display_panel_vdd>; + reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>; + + port { + panel_dcp_in: endpoint { + remote-endpoint = <&dcp_intf1_out>; + }; + }; + }; + }; + }; + }; -- 2.43.0
