xref: /freebsd/sys/contrib/device-tree/Bindings/media/qcom,camss.txt (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1c66ec88fSEmmanuel VadotQualcomm Camera Subsystem
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel Vadot* Properties
4c66ec88fSEmmanuel Vadot
5c66ec88fSEmmanuel Vadot- compatible:
6c66ec88fSEmmanuel Vadot	Usage: required
7c66ec88fSEmmanuel Vadot	Value type: <stringlist>
8c66ec88fSEmmanuel Vadot	Definition: Should contain one of:
9c66ec88fSEmmanuel Vadot		- "qcom,msm8916-camss"
10c66ec88fSEmmanuel Vadot		- "qcom,msm8996-camss"
11*5def4c47SEmmanuel Vadot		- "qcom,sdm660-camss"
12c66ec88fSEmmanuel Vadot- reg:
13c66ec88fSEmmanuel Vadot	Usage: required
14c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
15c66ec88fSEmmanuel Vadot	Definition: Register ranges as listed in the reg-names property.
16c66ec88fSEmmanuel Vadot- reg-names:
17c66ec88fSEmmanuel Vadot	Usage: required
18c66ec88fSEmmanuel Vadot	Value type: <stringlist>
19c66ec88fSEmmanuel Vadot	Definition: Should contain the following entries:
20c66ec88fSEmmanuel Vadot		- "csiphy0"
21c66ec88fSEmmanuel Vadot		- "csiphy0_clk_mux"
22c66ec88fSEmmanuel Vadot		- "csiphy1"
23c66ec88fSEmmanuel Vadot		- "csiphy1_clk_mux"
24c66ec88fSEmmanuel Vadot		- "csiphy2"		(8996 only)
25c66ec88fSEmmanuel Vadot		- "csiphy2_clk_mux"	(8996 only)
26c66ec88fSEmmanuel Vadot		- "csid0"
27c66ec88fSEmmanuel Vadot		- "csid1"
28c66ec88fSEmmanuel Vadot		- "csid2"		(8996 only)
29c66ec88fSEmmanuel Vadot		- "csid3"		(8996 only)
30c66ec88fSEmmanuel Vadot		- "ispif"
31c66ec88fSEmmanuel Vadot		- "csi_clk_mux"
32c66ec88fSEmmanuel Vadot		- "vfe0"
33c66ec88fSEmmanuel Vadot		- "vfe1"		(8996 only)
34c66ec88fSEmmanuel Vadot- interrupts:
35c66ec88fSEmmanuel Vadot	Usage: required
36c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
37c66ec88fSEmmanuel Vadot	Definition: Interrupts as listed in the interrupt-names property.
38c66ec88fSEmmanuel Vadot- interrupt-names:
39c66ec88fSEmmanuel Vadot	Usage: required
40c66ec88fSEmmanuel Vadot	Value type: <stringlist>
41c66ec88fSEmmanuel Vadot	Definition: Should contain the following entries:
42c66ec88fSEmmanuel Vadot		- "csiphy0"
43c66ec88fSEmmanuel Vadot		- "csiphy1"
44c66ec88fSEmmanuel Vadot		- "csiphy2"		(8996 only)
45c66ec88fSEmmanuel Vadot		- "csid0"
46c66ec88fSEmmanuel Vadot		- "csid1"
47c66ec88fSEmmanuel Vadot		- "csid2"		(8996 only)
48c66ec88fSEmmanuel Vadot		- "csid3"		(8996 only)
49c66ec88fSEmmanuel Vadot		- "ispif"
50c66ec88fSEmmanuel Vadot		- "vfe0"
51c66ec88fSEmmanuel Vadot		- "vfe1"		(8996 only)
52c66ec88fSEmmanuel Vadot- power-domains:
53c66ec88fSEmmanuel Vadot	Usage: required
54c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
55c66ec88fSEmmanuel Vadot	Definition: A phandle and power domain specifier pairs to the
56c66ec88fSEmmanuel Vadot		    power domain which is responsible for collapsing
57c66ec88fSEmmanuel Vadot		    and restoring power to the peripheral.
58c66ec88fSEmmanuel Vadot- clocks:
59c66ec88fSEmmanuel Vadot	Usage: required
60c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
61c66ec88fSEmmanuel Vadot	Definition: A list of phandle and clock specifier pairs as listed
62c66ec88fSEmmanuel Vadot		    in clock-names property.
63c66ec88fSEmmanuel Vadot- clock-names:
64c66ec88fSEmmanuel Vadot	Usage: required
65c66ec88fSEmmanuel Vadot	Value type: <stringlist>
66c66ec88fSEmmanuel Vadot	Definition: Should contain the following entries:
67c66ec88fSEmmanuel Vadot		- "top_ahb"
68*5def4c47SEmmanuel Vadot		- "throttle_axi"	(660 only)
69c66ec88fSEmmanuel Vadot		- "ispif_ahb"
70c66ec88fSEmmanuel Vadot		- "csiphy0_timer"
71c66ec88fSEmmanuel Vadot		- "csiphy1_timer"
72c66ec88fSEmmanuel Vadot		- "csiphy2_timer"	(8996 only)
73*5def4c47SEmmanuel Vadot		- "csiphy_ahb2crif"	(660 only)
74c66ec88fSEmmanuel Vadot		- "csi0_ahb"
75c66ec88fSEmmanuel Vadot		- "csi0"
76c66ec88fSEmmanuel Vadot		- "csi0_phy"
77c66ec88fSEmmanuel Vadot		- "csi0_pix"
78c66ec88fSEmmanuel Vadot		- "csi0_rdi"
79*5def4c47SEmmanuel Vadot		- "cphy_csid0"		(660 only)
80c66ec88fSEmmanuel Vadot		- "csi1_ahb"
81c66ec88fSEmmanuel Vadot		- "csi1"
82c66ec88fSEmmanuel Vadot		- "csi1_phy"
83c66ec88fSEmmanuel Vadot		- "csi1_pix"
84c66ec88fSEmmanuel Vadot		- "csi1_rdi"
85*5def4c47SEmmanuel Vadot		- "cphy_csid1"		(660 only)
86c66ec88fSEmmanuel Vadot		- "csi2_ahb"		(8996 only)
87c66ec88fSEmmanuel Vadot		- "csi2"		(8996 only)
88c66ec88fSEmmanuel Vadot		- "csi2_phy"		(8996 only)
89c66ec88fSEmmanuel Vadot		- "csi2_pix"		(8996 only)
90c66ec88fSEmmanuel Vadot		- "csi2_rdi"		(8996 only)
91*5def4c47SEmmanuel Vadot		- "cphy_csid2"		(660 only)
92c66ec88fSEmmanuel Vadot		- "csi3_ahb"		(8996 only)
93c66ec88fSEmmanuel Vadot		- "csi3"		(8996 only)
94c66ec88fSEmmanuel Vadot		- "csi3_phy"		(8996 only)
95c66ec88fSEmmanuel Vadot		- "csi3_pix"		(8996 only)
96c66ec88fSEmmanuel Vadot		- "csi3_rdi"		(8996 only)
97*5def4c47SEmmanuel Vadot		- "cphy_csid3"		(660 only)
98c66ec88fSEmmanuel Vadot		- "ahb"
99c66ec88fSEmmanuel Vadot		- "vfe0"
100c66ec88fSEmmanuel Vadot		- "csi_vfe0"
101c66ec88fSEmmanuel Vadot		- "vfe0_ahb",		(8996 only)
102c66ec88fSEmmanuel Vadot		- "vfe0_stream",	(8996 only)
103c66ec88fSEmmanuel Vadot		- "vfe1",		(8996 only)
104c66ec88fSEmmanuel Vadot		- "csi_vfe1",		(8996 only)
105c66ec88fSEmmanuel Vadot		- "vfe1_ahb",		(8996 only)
106c66ec88fSEmmanuel Vadot		- "vfe1_stream",	(8996 only)
107c66ec88fSEmmanuel Vadot		- "vfe_ahb"
108c66ec88fSEmmanuel Vadot		- "vfe_axi"
109c66ec88fSEmmanuel Vadot- vdda-supply:
110c66ec88fSEmmanuel Vadot	Usage: required
111c66ec88fSEmmanuel Vadot	Value type: <phandle>
112c66ec88fSEmmanuel Vadot	Definition: A phandle to voltage supply for CSI2.
113c66ec88fSEmmanuel Vadot- iommus:
114c66ec88fSEmmanuel Vadot	Usage: required
115c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
116c66ec88fSEmmanuel Vadot	Definition: A list of phandle and IOMMU specifier pairs.
117c66ec88fSEmmanuel Vadot
118c66ec88fSEmmanuel Vadot* Nodes
119c66ec88fSEmmanuel Vadot
120c66ec88fSEmmanuel Vadot- ports:
121c66ec88fSEmmanuel Vadot	Usage: required
122c66ec88fSEmmanuel Vadot	Definition: As described in video-interfaces.txt in same directory.
123c66ec88fSEmmanuel Vadot	Properties:
124c66ec88fSEmmanuel Vadot		- reg:
125c66ec88fSEmmanuel Vadot			Usage: required
126c66ec88fSEmmanuel Vadot			Value type: <u32>
127c66ec88fSEmmanuel Vadot			Definition: Selects CSI2 PHY interface - PHY0, PHY1
128c66ec88fSEmmanuel Vadot				    or PHY2 (8996 only)
129c66ec88fSEmmanuel Vadot	Endpoint node properties:
130c66ec88fSEmmanuel Vadot		- clock-lanes:
131c66ec88fSEmmanuel Vadot			Usage: required
132c66ec88fSEmmanuel Vadot			Value type: <u32>
133c66ec88fSEmmanuel Vadot			Definition: The physical clock lane index. On 8916
134c66ec88fSEmmanuel Vadot				    the value must always be <1> as the physical
135c66ec88fSEmmanuel Vadot				    clock lane is lane 1. On 8996 the value must
136c66ec88fSEmmanuel Vadot				    always be <7> as the hardware supports D-PHY
137c66ec88fSEmmanuel Vadot				    and C-PHY, indexes are in a common set and
138c66ec88fSEmmanuel Vadot				    D-PHY physical clock lane is labeled as 7.
139c66ec88fSEmmanuel Vadot		- data-lanes:
140c66ec88fSEmmanuel Vadot			Usage: required
141c66ec88fSEmmanuel Vadot			Value type: <prop-encoded-array>
142c66ec88fSEmmanuel Vadot			Definition: An array of physical data lanes indexes.
143c66ec88fSEmmanuel Vadot				    Position of an entry determines the logical
144c66ec88fSEmmanuel Vadot				    lane number, while the value of an entry
145c66ec88fSEmmanuel Vadot				    indicates physical lane index. Lane swapping
146c66ec88fSEmmanuel Vadot				    is supported. Physical lane indexes for
147c66ec88fSEmmanuel Vadot				    8916: 0, 2, 3, 4; for 8996: 0, 1, 2, 3.
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot* An Example
150c66ec88fSEmmanuel Vadot
151c66ec88fSEmmanuel Vadot	camss: camss@1b00000 {
152c66ec88fSEmmanuel Vadot		compatible = "qcom,msm8916-camss";
153c66ec88fSEmmanuel Vadot		reg = <0x1b0ac00 0x200>,
154c66ec88fSEmmanuel Vadot			<0x1b00030 0x4>,
155c66ec88fSEmmanuel Vadot			<0x1b0b000 0x200>,
156c66ec88fSEmmanuel Vadot			<0x1b00038 0x4>,
157c66ec88fSEmmanuel Vadot			<0x1b08000 0x100>,
158c66ec88fSEmmanuel Vadot			<0x1b08400 0x100>,
159c66ec88fSEmmanuel Vadot			<0x1b0a000 0x500>,
160c66ec88fSEmmanuel Vadot			<0x1b00020 0x10>,
161c66ec88fSEmmanuel Vadot			<0x1b10000 0x1000>;
162c66ec88fSEmmanuel Vadot		reg-names = "csiphy0",
163c66ec88fSEmmanuel Vadot			"csiphy0_clk_mux",
164c66ec88fSEmmanuel Vadot			"csiphy1",
165c66ec88fSEmmanuel Vadot			"csiphy1_clk_mux",
166c66ec88fSEmmanuel Vadot			"csid0",
167c66ec88fSEmmanuel Vadot			"csid1",
168c66ec88fSEmmanuel Vadot			"ispif",
169c66ec88fSEmmanuel Vadot			"csi_clk_mux",
170c66ec88fSEmmanuel Vadot			"vfe0";
171c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 78 0>,
172c66ec88fSEmmanuel Vadot			<GIC_SPI 79 0>,
173c66ec88fSEmmanuel Vadot			<GIC_SPI 51 0>,
174c66ec88fSEmmanuel Vadot			<GIC_SPI 52 0>,
175c66ec88fSEmmanuel Vadot			<GIC_SPI 55 0>,
176c66ec88fSEmmanuel Vadot			<GIC_SPI 57 0>;
177c66ec88fSEmmanuel Vadot		interrupt-names = "csiphy0",
178c66ec88fSEmmanuel Vadot			"csiphy1",
179c66ec88fSEmmanuel Vadot			"csid0",
180c66ec88fSEmmanuel Vadot			"csid1",
181c66ec88fSEmmanuel Vadot			"ispif",
182c66ec88fSEmmanuel Vadot			"vfe0";
183c66ec88fSEmmanuel Vadot		power-domains = <&gcc VFE_GDSC>;
184c66ec88fSEmmanuel Vadot		clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>,
185c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_ISPIF_AHB_CLK>,
186c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0PHYTIMER_CLK>,
187c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1PHYTIMER_CLK>,
188c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0_AHB_CLK>,
189c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0_CLK>,
190c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0PHY_CLK>,
191c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0PIX_CLK>,
192c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI0RDI_CLK>,
193c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1_AHB_CLK>,
194c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1_CLK>,
195c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1PHY_CLK>,
196c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1PIX_CLK>,
197c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI1RDI_CLK>,
198c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_AHB_CLK>,
199c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_VFE0_CLK>,
200c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_CSI_VFE0_CLK>,
201c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_VFE_AHB_CLK>,
202c66ec88fSEmmanuel Vadot			<&gcc GCC_CAMSS_VFE_AXI_CLK>;
203c66ec88fSEmmanuel Vadot		clock-names = "top_ahb",
204c66ec88fSEmmanuel Vadot			"ispif_ahb",
205c66ec88fSEmmanuel Vadot			"csiphy0_timer",
206c66ec88fSEmmanuel Vadot			"csiphy1_timer",
207c66ec88fSEmmanuel Vadot			"csi0_ahb",
208c66ec88fSEmmanuel Vadot			"csi0",
209c66ec88fSEmmanuel Vadot			"csi0_phy",
210c66ec88fSEmmanuel Vadot			"csi0_pix",
211c66ec88fSEmmanuel Vadot			"csi0_rdi",
212c66ec88fSEmmanuel Vadot			"csi1_ahb",
213c66ec88fSEmmanuel Vadot			"csi1",
214c66ec88fSEmmanuel Vadot			"csi1_phy",
215c66ec88fSEmmanuel Vadot			"csi1_pix",
216c66ec88fSEmmanuel Vadot			"csi1_rdi",
217c66ec88fSEmmanuel Vadot			"ahb",
218c66ec88fSEmmanuel Vadot			"vfe0",
219c66ec88fSEmmanuel Vadot			"csi_vfe0",
220c66ec88fSEmmanuel Vadot			"vfe_ahb",
221c66ec88fSEmmanuel Vadot			"vfe_axi";
222c66ec88fSEmmanuel Vadot		vdda-supply = <&pm8916_l2>;
223c66ec88fSEmmanuel Vadot		iommus = <&apps_iommu 3>;
224c66ec88fSEmmanuel Vadot		ports {
225c66ec88fSEmmanuel Vadot			#address-cells = <1>;
226c66ec88fSEmmanuel Vadot			#size-cells = <0>;
227c66ec88fSEmmanuel Vadot			port@0 {
228c66ec88fSEmmanuel Vadot				reg = <0>;
229c66ec88fSEmmanuel Vadot				csiphy0_ep: endpoint {
230c66ec88fSEmmanuel Vadot					clock-lanes = <1>;
231c66ec88fSEmmanuel Vadot					data-lanes = <0 2>;
232c66ec88fSEmmanuel Vadot					remote-endpoint = <&ov5645_ep>;
233c66ec88fSEmmanuel Vadot				};
234c66ec88fSEmmanuel Vadot			};
235c66ec88fSEmmanuel Vadot		};
236c66ec88fSEmmanuel Vadot	};
237