-
Notifications
You must be signed in to change notification settings - Fork 22
/
ti,ds90ub954.txt
262 lines (203 loc) · 9.68 KB
/
ti,ds90ub954.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
Device tree configuration for the FPD-Link III deserializer DS90UB954 and
serializer DS90UB953 from Texas Instruments
The deserializer DS90UB954 can have up to two serializers (DS90UB953) connected.
In the device tree, the serializer nodes are subnodes of the deserializer.
/*------------------------------------------------------------------------------
* ------------------------------------------------------------------------------
*
* Options for DESERIALIZER (DS90UB954):
*
* ------------------------------------------------------------------------------
*-----------------------------------------------------------------------------*/
Integer values:
- reg: I2C address of deserializer
- csi-lane-count Number of CSI lanes default value: 4
- csi-lane-speed CSI lane speed in Mbps (400, 800 or 1600)
default vaule: 1600
- pdb-gpio Power-down inverted input pin ignored if not set
- pass-gpio Pass output gpio ignored if not set
- lock-gpio Lock output gpio ignored if not set
Boolean
- continuous-clock Enables continuous clock
- test-pattern Enables test pattern
/*------------------------------------------------------------------------------
* ------------------------------------------------------------------------------
*
* Options for SERIALIZER (DS90UB953):
*
* ------------------------------------------------------------------------------
*-----------------------------------------------------------------------------*/
Integer values:
- rx-channel specifies to which rx port of the deserializer the
serializer is connected to default value: 0
- csi-lane-count Number of CSI lanes default value: 4
- i2c-address I2C address of serializer default value: 0x18
(this address can be chosen freely)
Boolean:
- continuous-clock Enables continuous clock
- test-pattern Enables test pattern
- i2c-pass-through-all Enable all i2c messages to be forwarded over FPD-Link III
/*------------------------------------------------------------------------------
* Virtual-channel mapping
*-----------------------------------------------------------------------------*/
CSI-2 Virtual Channel Mapping Register: This register provides a method for
replacing the Virtual Channel Identifier (VC-ID) of incoming CSI packets. VC-IDs
0-3 are allowed IDs.
- virtual-channel-map [7:6] : Map value for VC-ID of 3 default value: 0xE4
[5:4] : Map value for VC-ID of 2
[3:2] : Map value for VC-ID of 1
[1:0] : Map value for VC-ID of 0
The default value 0xE4 (= 0b 11 10 01 00) maps VC-ID 0 to ID 0, VC-ID 1 to 1,
VC-ID 2 to 2 and VC-ID 3 to 3.
/*------------------------------------------------------------------------------
* Serializer GPIOs
*-----------------------------------------------------------------------------*/
The seralizer has 4 GPIOs. Each can be defined as input or output with the
following device tree parameters:
- gpio0-output-enable 0: Input, 1: Output default value: 0
- gpio1-output-enable 0: Input, 1: Output default value: 0
- gpio2-output-enable 0: Input, 1: Output default value: 0
- gpio3-output-enable 0: Input, 1: Output default value: 0
The following device tree parameters can be used to set the GPIO control:
- gpio0-control gpio control value (0-10) default value: 8
- gpio1-control gpio control value (0-10) default value: 8
- gpio2-control gpio control value (0-10) default value: 8
- gpio3-control gpio control value (0-10) default value: 8
Possible GPIO control values are:
0 connects the GPIO to GPIO0 (input) of deserializer
1 connects the GPIO to GPIO1 (input) of deserializer
2 connects the GPIO to GPIO2 (input) of deserializer
3 NOT SUPPORTED - connects the GPIO to GPIO3 of deserializer
4 connects the GPIO to GPIO4 (input) of deserializer
5 connects the GPIO to GPIO5 (input) of deserializer
6 connects the GPIO to GPIO6 (input) of deserializer
8 output constant value of 0
9 output constant value of 1
10 frameSync signal
(Deserializer GPIO's set as output is not supported as device tree option. Driver
must be edited if the deserializer GPIO's are needed as output.)
/*------------------------------------------------------------------------------
* Serializer CLK_OUT (in synchronized mode)
*-----------------------------------------------------------------------------*/
CLK_OUT of deserializer can be set. The formula for CLK_OUT is:
REFCLK (deserializer input clk) * 160 div-m-val
CLK_OUT = --------------------------------------- * -----------
hs-clk-div div-n-val
Check that: CLK_OUT < 100 MHz and (REFCLK/hs-clk-div) < 6.56 MHz
The parameters can be set in the device tree:
- hs-clk-div possible values 1,2,4,8 or 16 default value: 4
- div-m-val default value: 1
- div-n-val default value: 0x28
/*------------------------------------------------------------------------------
* I2C Alias/Slave pairs:
*-----------------------------------------------------------------------------*/
Before sending the i2c message over the FPD-Link III connection to each
serializer, the deserializer checks if the address is in the list of aliases for
the serializer. If so, it replaces the alias address by the corresponding slave
address in the pair and forwards it over FPD-Link III. If i2c-pass-through-all
is disabled, only messages addressed to an alias address will be passed through.
It is possible to define up to 8 slave address/alias address pairs for each
serializer.
1) Set list-cells to the number of address pairs for each serializer:
(this has to be set in the deserializer node)
serializer0:
- i2c_address_s0: num-alias-pairs0 {list-cells = <X>;}
serializer1:
- i2c_address_s1: num-alias-pairs1 {list-cells = <Y>;}
2) Define the slave addresses and alias addresses for each serializer:
serializer0:
- i2c-slave = <&i2c_address_s0 0x10 0x11 ...>;
- slave-alias = <&i2c_address_s0 0x20 0x21 ...>;
serializer1:
- i2c-slave = <&i2c_address_s1 0x10 0x11 ...>;
- slave-alias = <&i2c_address_s1 0x22 0x23 ...>;
Example:
i2c_address_s0: num-alias-pairs0 {list-cells = <1>;}
i2c_address_s1: num-alias-pairs1 {list-cells = <2>;}
i2c-slave = <&i2c_address_s0 0x10>;
slave-alias = <&i2c_address_s0 0x20>;
i2c-slave = <&i2c_address_s1 0x10 0x11>;
slave-alias = <&i2c_address_s1 0x21 0x22>;
If the host sends an i2c message to the address 0x20, the message is sent over
the fpd-link connection to serializer0 to the address 0x10.
If the host sends an i2c message to the address 0x21, the message is sent over
the fpd-link connection to serializer1 to the address 0x10.
If the host sends an i2c message to the address 0x22, the message is sent over
the fpd-link connection to serializer1 to the address 0x11.
/*------------------------------------------------------------------------------
* ------------------------------------------------------------------------------
*
* Device Tree Examples
*
* ------------------------------------------------------------------------------
*-----------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
* Example 1 (SIMPLE)
*-----------------------------------------------------------------------------*/
fpdlink: ds90ub954@30 {
compatible = "ti,ds90ub954";
reg = <0x30>;
status = "okay";
csi-lane-count = <4>;
csi-lane-speed = <800>;
serializers {
status = "okay";
num-channels = <2>;
#address-cells = <1>;
#size-cells = <0>;
serializer@0 {
status = "okay";
rx-channel=<0>;
i2c-address=<0x18>;
csi-lane-count = <2>;
};
};
};
/*------------------------------------------------------------------------------
* Example 2
*-----------------------------------------------------------------------------*/
fpdlink: ds90ub954@30 {
compatible = "ti,ds90ub954";
reg = <0x30>;
status = "okay";
csi-lane-count = <4>;
csi-lane-speed = <1600>;
continuous-clock;
pdb-gpio = <&gpio TEGRA_GPIO(S, 7) 0>;
pass-gpio = <&gpio TEGRA_GPIO(S, 0) 0>;
lock-gpio = <&gpio TEGRA_GPIO(T, 0) 0>;
i2c_address_s0: num-alias-pairs0 {list-cells = <2>;};
i2c_address_s1: num-alias-pairs1 {list-cells = <1>;};
serializers {
status = "okay";
num-channels = <2>;
#address-cells = <1>;
#size-cells = <0>;
serializer@0 {
status = "okay";
rx-channel=<0>;
i2c-address=<0x18>;
csi-lane-count = <2>;
continuous-clock;
virtual-channel-map = <0x0>;
gpio0-output-enable = <1>;
gpio0-control = <0x9>;
i2c-slave = <&i2c_address_s0 0x10 0x11>;
slave-alias = <&i2c_address_s0 0x20 0x21>;
};
serializer@1 {
status = "okay";
rx-channel=<1>;
i2c-address=<0x19>;
csi-lane-count = <2>;
continuous-clock;
i2c-pass-through-all;
test-pattern;
virtual-channel-map = <0x55>;
gpio0-output-enable = <1>;
gpio0-control = <0x9>;
i2c-slave = <&i2c_address_s1 0x10>;
slave-alias = <&i2c_address_s1 0x22>;
};
};
};