18c2ecf20Sopenharmony_ciQualcomm Technologies Inc. adreno/snapdragon DSI output
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciDSI Controller:
48c2ecf20Sopenharmony_ciRequired properties:
58c2ecf20Sopenharmony_ci- compatible:
68c2ecf20Sopenharmony_ci  * "qcom,mdss-dsi-ctrl"
78c2ecf20Sopenharmony_ci- reg: Physical base address and length of the registers of controller
88c2ecf20Sopenharmony_ci- reg-names: The names of register regions. The following regions are required:
98c2ecf20Sopenharmony_ci  * "dsi_ctrl"
108c2ecf20Sopenharmony_ci- interrupts: The interrupt signal from the DSI block.
118c2ecf20Sopenharmony_ci- power-domains: Should be <&mmcc MDSS_GDSC>.
128c2ecf20Sopenharmony_ci- clocks: Phandles to device clocks.
138c2ecf20Sopenharmony_ci- clock-names: the following clocks are required:
148c2ecf20Sopenharmony_ci  * "mdp_core"
158c2ecf20Sopenharmony_ci  * "iface"
168c2ecf20Sopenharmony_ci  * "bus"
178c2ecf20Sopenharmony_ci  * "core_mmss"
188c2ecf20Sopenharmony_ci  * "byte"
198c2ecf20Sopenharmony_ci  * "pixel"
208c2ecf20Sopenharmony_ci  * "core"
218c2ecf20Sopenharmony_ci  For DSIv2, we need an additional clock:
228c2ecf20Sopenharmony_ci   * "src"
238c2ecf20Sopenharmony_ci  For DSI6G v2.0 onwards, we need also need the clock:
248c2ecf20Sopenharmony_ci   * "byte_intf"
258c2ecf20Sopenharmony_ci- assigned-clocks: Parents of "byte" and "pixel" for the given platform.
268c2ecf20Sopenharmony_ci- assigned-clock-parents: The Byte clock and Pixel clock PLL outputs provided
278c2ecf20Sopenharmony_ci  by a DSI PHY block. See [1] for details on clock bindings.
288c2ecf20Sopenharmony_ci- vdd-supply: phandle to vdd regulator device node
298c2ecf20Sopenharmony_ci- vddio-supply: phandle to vdd-io regulator device node
308c2ecf20Sopenharmony_ci- vdda-supply: phandle to vdda regulator device node
318c2ecf20Sopenharmony_ci- phys: phandle to DSI PHY device node
328c2ecf20Sopenharmony_ci- phy-names: the name of the corresponding PHY device
338c2ecf20Sopenharmony_ci- syscon-sfpb: A phandle to mmss_sfpb syscon node (only for DSIv2)
348c2ecf20Sopenharmony_ci- ports: Contains 2 DSI controller ports as child nodes. Each port contains
358c2ecf20Sopenharmony_ci  an endpoint subnode as defined in [2] and [3].
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciOptional properties:
388c2ecf20Sopenharmony_ci- panel@0: Node of panel connected to this DSI controller.
398c2ecf20Sopenharmony_ci  See files in [4] for each supported panel.
408c2ecf20Sopenharmony_ci- qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is
418c2ecf20Sopenharmony_ci  driving a panel which needs 2 DSI links.
428c2ecf20Sopenharmony_ci- qcom,master-dsi: Boolean value indicating if the DSI controller is driving
438c2ecf20Sopenharmony_ci  the master link of the 2-DSI panel.
448c2ecf20Sopenharmony_ci- qcom,sync-dual-dsi: Boolean value indicating if the DSI controller is
458c2ecf20Sopenharmony_ci  driving a 2-DSI panel whose 2 links need receive command simultaneously.
468c2ecf20Sopenharmony_ci- pinctrl-names: the pin control state names; should contain "default"
478c2ecf20Sopenharmony_ci- pinctrl-0: the default pinctrl state (active)
488c2ecf20Sopenharmony_ci- pinctrl-n: the "sleep" pinctrl state
498c2ecf20Sopenharmony_ci- ports: contains DSI controller input and output ports as children, each
508c2ecf20Sopenharmony_ci  containing one endpoint subnode.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci  DSI Endpoint properties:
538c2ecf20Sopenharmony_ci  - remote-endpoint: For port@0, set to phandle of the connected panel/bridge's
548c2ecf20Sopenharmony_ci    input endpoint. For port@1, set to the MDP interface output. See [2] for
558c2ecf20Sopenharmony_ci    device graph info.
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci  - data-lanes: this describes how the physical DSI data lanes are mapped
588c2ecf20Sopenharmony_ci    to the logical lanes on the given platform. The value contained in
598c2ecf20Sopenharmony_ci    index n describes what physical lane is mapped to the logical lane n
608c2ecf20Sopenharmony_ci    (DATAn, where n lies between 0 and 3). The clock lane position is fixed
618c2ecf20Sopenharmony_ci    and can't be changed. Hence, they aren't a part of the DT bindings. See
628c2ecf20Sopenharmony_ci    [3] for more info on the data-lanes property.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci    For example:
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci    data-lanes = <3 0 1 2>;
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci    The above mapping describes that the logical data lane DATA0 is mapped to
698c2ecf20Sopenharmony_ci    the physical data lane DATA3, logical DATA1 to physical DATA0, logic DATA2
708c2ecf20Sopenharmony_ci    to phys DATA1 and logic DATA3 to phys DATA2.
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci    There are only a limited number of physical to logical mappings possible:
738c2ecf20Sopenharmony_ci    <0 1 2 3>
748c2ecf20Sopenharmony_ci    <1 2 3 0>
758c2ecf20Sopenharmony_ci    <2 3 0 1>
768c2ecf20Sopenharmony_ci    <3 0 1 2>
778c2ecf20Sopenharmony_ci    <0 3 2 1>
788c2ecf20Sopenharmony_ci    <1 0 3 2>
798c2ecf20Sopenharmony_ci    <2 1 0 3>
808c2ecf20Sopenharmony_ci    <3 2 1 0>
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciDSI PHY:
838c2ecf20Sopenharmony_ciRequired properties:
848c2ecf20Sopenharmony_ci- compatible: Could be the following
858c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-28nm-hpm"
868c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-28nm-lp"
878c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-20nm"
888c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-28nm-8960"
898c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-14nm"
908c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-14nm-660"
918c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-10nm"
928c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-10nm-8998"
938c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-7nm"
948c2ecf20Sopenharmony_ci  * "qcom,dsi-phy-7nm-8150"
958c2ecf20Sopenharmony_ci- reg: Physical base address and length of the registers of PLL, PHY. Some
968c2ecf20Sopenharmony_ci  revisions require the PHY regulator base address, whereas others require the
978c2ecf20Sopenharmony_ci  PHY lane base address. See below for each PHY revision.
988c2ecf20Sopenharmony_ci- reg-names: The names of register regions. The following regions are required:
998c2ecf20Sopenharmony_ci  For DSI 28nm HPM/LP/8960 PHYs and 20nm PHY:
1008c2ecf20Sopenharmony_ci  * "dsi_pll"
1018c2ecf20Sopenharmony_ci  * "dsi_phy"
1028c2ecf20Sopenharmony_ci  * "dsi_phy_regulator"
1038c2ecf20Sopenharmony_ci  For DSI 14nm, 10nm and 7nm PHYs:
1048c2ecf20Sopenharmony_ci  * "dsi_pll"
1058c2ecf20Sopenharmony_ci  * "dsi_phy"
1068c2ecf20Sopenharmony_ci  * "dsi_phy_lane"
1078c2ecf20Sopenharmony_ci- clock-cells: Must be 1. The DSI PHY block acts as a clock provider, creating
1088c2ecf20Sopenharmony_ci  2 clocks: A byte clock (index 0), and a pixel clock (index 1).
1098c2ecf20Sopenharmony_ci- power-domains: Should be <&mmcc MDSS_GDSC>.
1108c2ecf20Sopenharmony_ci- clocks: Phandles to device clocks. See [1] for details on clock bindings.
1118c2ecf20Sopenharmony_ci- clock-names: the following clocks are required:
1128c2ecf20Sopenharmony_ci  * "iface"
1138c2ecf20Sopenharmony_ci  * "ref" (only required for new DTS files/entries)
1148c2ecf20Sopenharmony_ci  For 28nm HPM/LP, 28nm 8960 PHYs:
1158c2ecf20Sopenharmony_ci- vddio-supply: phandle to vdd-io regulator device node
1168c2ecf20Sopenharmony_ci  For 20nm PHY:
1178c2ecf20Sopenharmony_ci- vddio-supply: phandle to vdd-io regulator device node
1188c2ecf20Sopenharmony_ci- vcca-supply: phandle to vcca regulator device node
1198c2ecf20Sopenharmony_ci  For 14nm PHY:
1208c2ecf20Sopenharmony_ci- vcca-supply: phandle to vcca regulator device node
1218c2ecf20Sopenharmony_ci  For 10nm and 7nm PHY:
1228c2ecf20Sopenharmony_ci- vdds-supply: phandle to vdds regulator device node
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ciOptional properties:
1258c2ecf20Sopenharmony_ci- qcom,dsi-phy-regulator-ldo-mode: Boolean value indicating if the LDO mode PHY
1268c2ecf20Sopenharmony_ci  regulator is wanted.
1278c2ecf20Sopenharmony_ci- qcom,mdss-mdp-transfer-time-us:	Specifies the dsi transfer time for command mode
1288c2ecf20Sopenharmony_ci					panels in microseconds. Driver uses this number to adjust
1298c2ecf20Sopenharmony_ci					the clock rate according to the expected transfer time.
1308c2ecf20Sopenharmony_ci					Increasing this value would slow down the mdp processing
1318c2ecf20Sopenharmony_ci					and can result in slower performance.
1328c2ecf20Sopenharmony_ci					Decreasing this value can speed up the mdp processing,
1338c2ecf20Sopenharmony_ci					but this can also impact power consumption.
1348c2ecf20Sopenharmony_ci					As a rule this time should not be higher than the time
1358c2ecf20Sopenharmony_ci					that would be expected with the processing at the
1368c2ecf20Sopenharmony_ci					dsi link rate since anyways this would be the maximum
1378c2ecf20Sopenharmony_ci					transfer time that could be achieved.
1388c2ecf20Sopenharmony_ci					If ping pong split is enabled, this time should not be higher
1398c2ecf20Sopenharmony_ci					than two times the dsi link rate time.
1408c2ecf20Sopenharmony_ci					If the property is not specified, then the default value is 14000 us.
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
1438c2ecf20Sopenharmony_ci[2] Documentation/devicetree/bindings/graph.txt
1448c2ecf20Sopenharmony_ci[3] Documentation/devicetree/bindings/media/video-interfaces.txt
1458c2ecf20Sopenharmony_ci[4] Documentation/devicetree/bindings/display/panel/
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ciExample:
1488c2ecf20Sopenharmony_ci	dsi0: dsi@fd922800 {
1498c2ecf20Sopenharmony_ci		compatible = "qcom,mdss-dsi-ctrl";
1508c2ecf20Sopenharmony_ci		qcom,dsi-host-index = <0>;
1518c2ecf20Sopenharmony_ci		interrupt-parent = <&mdp>;
1528c2ecf20Sopenharmony_ci		interrupts = <4 0>;
1538c2ecf20Sopenharmony_ci		reg-names = "dsi_ctrl";
1548c2ecf20Sopenharmony_ci		reg = <0xfd922800 0x200>;
1558c2ecf20Sopenharmony_ci		power-domains = <&mmcc MDSS_GDSC>;
1568c2ecf20Sopenharmony_ci		clock-names =
1578c2ecf20Sopenharmony_ci			"bus",
1588c2ecf20Sopenharmony_ci			"byte",
1598c2ecf20Sopenharmony_ci			"core",
1608c2ecf20Sopenharmony_ci			"core_mmss",
1618c2ecf20Sopenharmony_ci			"iface",
1628c2ecf20Sopenharmony_ci			"mdp_core",
1638c2ecf20Sopenharmony_ci			"pixel";
1648c2ecf20Sopenharmony_ci		clocks =
1658c2ecf20Sopenharmony_ci			<&mmcc MDSS_AXI_CLK>,
1668c2ecf20Sopenharmony_ci			<&mmcc MDSS_BYTE0_CLK>,
1678c2ecf20Sopenharmony_ci			<&mmcc MDSS_ESC0_CLK>,
1688c2ecf20Sopenharmony_ci			<&mmcc MMSS_MISC_AHB_CLK>,
1698c2ecf20Sopenharmony_ci			<&mmcc MDSS_AHB_CLK>,
1708c2ecf20Sopenharmony_ci			<&mmcc MDSS_MDP_CLK>,
1718c2ecf20Sopenharmony_ci			<&mmcc MDSS_PCLK0_CLK>;
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci		assigned-clocks =
1748c2ecf20Sopenharmony_ci				 <&mmcc BYTE0_CLK_SRC>,
1758c2ecf20Sopenharmony_ci				 <&mmcc PCLK0_CLK_SRC>;
1768c2ecf20Sopenharmony_ci		assigned-clock-parents =
1778c2ecf20Sopenharmony_ci				 <&dsi_phy0 0>,
1788c2ecf20Sopenharmony_ci				 <&dsi_phy0 1>;
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ci		vdda-supply = <&pma8084_l2>;
1818c2ecf20Sopenharmony_ci		vdd-supply = <&pma8084_l22>;
1828c2ecf20Sopenharmony_ci		vddio-supply = <&pma8084_l12>;
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci		phys = <&dsi_phy0>;
1858c2ecf20Sopenharmony_ci		phy-names ="dsi-phy";
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci		qcom,dual-dsi-mode;
1888c2ecf20Sopenharmony_ci		qcom,master-dsi;
1898c2ecf20Sopenharmony_ci		qcom,sync-dual-dsi;
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ci		qcom,mdss-mdp-transfer-time-us = <12000>;
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci		pinctrl-names = "default", "sleep";
1948c2ecf20Sopenharmony_ci		pinctrl-0 = <&dsi_active>;
1958c2ecf20Sopenharmony_ci		pinctrl-1 = <&dsi_suspend>;
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci		ports {
1988c2ecf20Sopenharmony_ci			#address-cells = <1>;
1998c2ecf20Sopenharmony_ci			#size-cells = <0>;
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci			port@0 {
2028c2ecf20Sopenharmony_ci				reg = <0>;
2038c2ecf20Sopenharmony_ci				dsi0_in: endpoint {
2048c2ecf20Sopenharmony_ci					remote-endpoint = <&mdp_intf1_out>;
2058c2ecf20Sopenharmony_ci				};
2068c2ecf20Sopenharmony_ci			};
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_ci			port@1 {
2098c2ecf20Sopenharmony_ci				reg = <1>;
2108c2ecf20Sopenharmony_ci				dsi0_out: endpoint {
2118c2ecf20Sopenharmony_ci					remote-endpoint = <&panel_in>;
2128c2ecf20Sopenharmony_ci					data-lanes = <0 1 2 3>;
2138c2ecf20Sopenharmony_ci				};
2148c2ecf20Sopenharmony_ci			};
2158c2ecf20Sopenharmony_ci		};
2168c2ecf20Sopenharmony_ci
2178c2ecf20Sopenharmony_ci		panel: panel@0 {
2188c2ecf20Sopenharmony_ci			compatible = "sharp,lq101r1sx01";
2198c2ecf20Sopenharmony_ci			reg = <0>;
2208c2ecf20Sopenharmony_ci			link2 = <&secondary>;
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_ci			power-supply = <...>;
2238c2ecf20Sopenharmony_ci			backlight = <...>;
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci			port {
2268c2ecf20Sopenharmony_ci				panel_in: endpoint {
2278c2ecf20Sopenharmony_ci					remote-endpoint = <&dsi0_out>;
2288c2ecf20Sopenharmony_ci				};
2298c2ecf20Sopenharmony_ci			};
2308c2ecf20Sopenharmony_ci		};
2318c2ecf20Sopenharmony_ci	};
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_ci	dsi_phy0: dsi-phy@fd922a00 {
2348c2ecf20Sopenharmony_ci		compatible = "qcom,dsi-phy-28nm-hpm";
2358c2ecf20Sopenharmony_ci		qcom,dsi-phy-index = <0>;
2368c2ecf20Sopenharmony_ci		reg-names =
2378c2ecf20Sopenharmony_ci			"dsi_pll",
2388c2ecf20Sopenharmony_ci			"dsi_phy",
2398c2ecf20Sopenharmony_ci			"dsi_phy_regulator";
2408c2ecf20Sopenharmony_ci		reg =   <0xfd922a00 0xd4>,
2418c2ecf20Sopenharmony_ci			<0xfd922b00 0x2b0>,
2428c2ecf20Sopenharmony_ci			<0xfd922d80 0x7b>;
2438c2ecf20Sopenharmony_ci		clock-names = "iface";
2448c2ecf20Sopenharmony_ci		clocks = <&mmcc MDSS_AHB_CLK>;
2458c2ecf20Sopenharmony_ci		#clock-cells = <1>;
2468c2ecf20Sopenharmony_ci		vddio-supply = <&pma8084_l12>;
2478c2ecf20Sopenharmony_ci
2488c2ecf20Sopenharmony_ci		qcom,dsi-phy-regulator-ldo-mode;
2498c2ecf20Sopenharmony_ci	};
250