18c2ecf20Sopenharmony_ciQualcomm Technologies, Inc. DPU KMS
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciDescription:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciDevice tree bindings for MSM Mobile Display Subsytem(MDSS) that encapsulates
68c2ecf20Sopenharmony_cisub-blocks like DPU display controller, DSI and DP interfaces etc.
78c2ecf20Sopenharmony_ciThe DPU display controller is found in SDM845 SoC.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciMDSS:
108c2ecf20Sopenharmony_ciRequired properties:
118c2ecf20Sopenharmony_ci- compatible:  "qcom,sdm845-mdss", "qcom,sc7180-mdss"
128c2ecf20Sopenharmony_ci- reg: physical base address and length of contoller's registers.
138c2ecf20Sopenharmony_ci- reg-names: register region names. The following region is required:
148c2ecf20Sopenharmony_ci  * "mdss"
158c2ecf20Sopenharmony_ci- power-domains: a power domain consumer specifier according to
168c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/power/power_domain.txt
178c2ecf20Sopenharmony_ci- clocks: list of clock specifiers for clocks needed by the device.
188c2ecf20Sopenharmony_ci- clock-names: device clock names, must be in same order as clocks property.
198c2ecf20Sopenharmony_ci  The following clocks are required:
208c2ecf20Sopenharmony_ci  * "iface"
218c2ecf20Sopenharmony_ci  * "bus"
228c2ecf20Sopenharmony_ci  * "core"
238c2ecf20Sopenharmony_ci- interrupts: interrupt signal from MDSS.
248c2ecf20Sopenharmony_ci- interrupt-controller: identifies the node as an interrupt controller.
258c2ecf20Sopenharmony_ci- #interrupt-cells: specifies the number of cells needed to encode an interrupt
268c2ecf20Sopenharmony_ci  source, should be 1.
278c2ecf20Sopenharmony_ci- iommus: phandle of iommu device node.
288c2ecf20Sopenharmony_ci- #address-cells: number of address cells for the MDSS children. Should be 1.
298c2ecf20Sopenharmony_ci- #size-cells: Should be 1.
308c2ecf20Sopenharmony_ci- ranges: parent bus address space is the same as the child bus address space.
318c2ecf20Sopenharmony_ci- interconnects : interconnect path specifier for MDSS according to
328c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/interconnect/interconnect.txt. Should be
338c2ecf20Sopenharmony_ci  2 paths corresponding to 2 AXI ports.
348c2ecf20Sopenharmony_ci- interconnect-names : MDSS will have 2 port names to differentiate between the
358c2ecf20Sopenharmony_ci  2 interconnect paths defined with interconnect specifier.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciOptional properties:
388c2ecf20Sopenharmony_ci- assigned-clocks: list of clock specifiers for clocks needing rate assignment
398c2ecf20Sopenharmony_ci- assigned-clock-rates: list of clock frequencies sorted in the same order as
408c2ecf20Sopenharmony_ci  the assigned-clocks property.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciMDP:
438c2ecf20Sopenharmony_ciRequired properties:
448c2ecf20Sopenharmony_ci- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu"
458c2ecf20Sopenharmony_ci- reg: physical base address and length of controller's registers.
468c2ecf20Sopenharmony_ci- reg-names : register region names. The following region is required:
478c2ecf20Sopenharmony_ci  * "mdp"
488c2ecf20Sopenharmony_ci  * "vbif"
498c2ecf20Sopenharmony_ci- clocks: list of clock specifiers for clocks needed by the device.
508c2ecf20Sopenharmony_ci- clock-names: device clock names, must be in same order as clocks property.
518c2ecf20Sopenharmony_ci  The following clocks are required.
528c2ecf20Sopenharmony_ci  * "bus"
538c2ecf20Sopenharmony_ci  * "iface"
548c2ecf20Sopenharmony_ci  * "core"
558c2ecf20Sopenharmony_ci  * "vsync"
568c2ecf20Sopenharmony_ci- interrupts: interrupt line from DPU to MDSS.
578c2ecf20Sopenharmony_ci- ports: contains the list of output ports from DPU device. These ports connect
588c2ecf20Sopenharmony_ci  to interfaces that are external to the DPU hardware, such as DSI, DP etc.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci  Each output port contains an endpoint that describes how it is connected to an
618c2ecf20Sopenharmony_ci  external interface. These are described by the standard properties documented
628c2ecf20Sopenharmony_ci  here:
638c2ecf20Sopenharmony_ci	Documentation/devicetree/bindings/graph.txt
648c2ecf20Sopenharmony_ci	Documentation/devicetree/bindings/media/video-interfaces.txt
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci	Port 0 -> DPU_INTF1 (DSI1)
678c2ecf20Sopenharmony_ci	Port 1 -> DPU_INTF2 (DSI2)
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciOptional properties:
708c2ecf20Sopenharmony_ci- assigned-clocks: list of clock specifiers for clocks needing rate assignment
718c2ecf20Sopenharmony_ci- assigned-clock-rates: list of clock frequencies sorted in the same order as
728c2ecf20Sopenharmony_ci  the assigned-clocks property.
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciExample:
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci	mdss: mdss@ae00000 {
778c2ecf20Sopenharmony_ci		compatible = "qcom,sdm845-mdss";
788c2ecf20Sopenharmony_ci		reg = <0xae00000 0x1000>;
798c2ecf20Sopenharmony_ci		reg-names = "mdss";
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci		power-domains = <&clock_dispcc 0>;
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci		clocks = <&gcc GCC_DISP_AHB_CLK>, <&gcc GCC_DISP_AXI_CLK>,
848c2ecf20Sopenharmony_ci			 <&clock_dispcc DISP_CC_MDSS_MDP_CLK>;
858c2ecf20Sopenharmony_ci		clock-names = "iface", "bus", "core";
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci		assigned-clocks = <&clock_dispcc DISP_CC_MDSS_MDP_CLK>;
888c2ecf20Sopenharmony_ci		assigned-clock-rates = <300000000>;
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
918c2ecf20Sopenharmony_ci		interrupt-controller;
928c2ecf20Sopenharmony_ci		#interrupt-cells = <1>;
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci		interconnects = <&rsc_hlos MASTER_MDP0 &rsc_hlos SLAVE_EBI1>,
958c2ecf20Sopenharmony_ci				<&rsc_hlos MASTER_MDP1 &rsc_hlos SLAVE_EBI1>;
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci		interconnect-names = "mdp0-mem", "mdp1-mem";
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci		iommus = <&apps_iommu 0>;
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci		#address-cells = <2>;
1028c2ecf20Sopenharmony_ci		#size-cells = <1>;
1038c2ecf20Sopenharmony_ci		ranges = <0 0 0xae00000 0xb2008>;
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci		mdss_mdp: mdp@ae01000 {
1068c2ecf20Sopenharmony_ci			compatible = "qcom,sdm845-dpu";
1078c2ecf20Sopenharmony_ci			reg = <0 0x1000 0x8f000>, <0 0xb0000 0x2008>;
1088c2ecf20Sopenharmony_ci			reg-names = "mdp", "vbif";
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci			clocks = <&clock_dispcc DISP_CC_MDSS_AHB_CLK>,
1118c2ecf20Sopenharmony_ci				 <&clock_dispcc DISP_CC_MDSS_AXI_CLK>,
1128c2ecf20Sopenharmony_ci				 <&clock_dispcc DISP_CC_MDSS_MDP_CLK>,
1138c2ecf20Sopenharmony_ci				 <&clock_dispcc DISP_CC_MDSS_VSYNC_CLK>;
1148c2ecf20Sopenharmony_ci			clock-names = "iface", "bus", "core", "vsync";
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci			assigned-clocks = <&clock_dispcc DISP_CC_MDSS_MDP_CLK>,
1178c2ecf20Sopenharmony_ci					  <&clock_dispcc DISP_CC_MDSS_VSYNC_CLK>;
1188c2ecf20Sopenharmony_ci			assigned-clock-rates = <0 0 300000000 19200000>;
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci			interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci			ports {
1238c2ecf20Sopenharmony_ci				#address-cells = <1>;
1248c2ecf20Sopenharmony_ci				#size-cells = <0>;
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci				port@0 {
1278c2ecf20Sopenharmony_ci					reg = <0>;
1288c2ecf20Sopenharmony_ci					dpu_intf1_out: endpoint {
1298c2ecf20Sopenharmony_ci						remote-endpoint = <&dsi0_in>;
1308c2ecf20Sopenharmony_ci					};
1318c2ecf20Sopenharmony_ci				};
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci				port@1 {
1348c2ecf20Sopenharmony_ci					reg = <1>;
1358c2ecf20Sopenharmony_ci					dpu_intf2_out: endpoint {
1368c2ecf20Sopenharmony_ci						remote-endpoint = <&dsi1_in>;
1378c2ecf20Sopenharmony_ci					};
1388c2ecf20Sopenharmony_ci				};
1398c2ecf20Sopenharmony_ci			};
1408c2ecf20Sopenharmony_ci		};
1418c2ecf20Sopenharmony_ci	};
142