diff options
Diffstat (limited to 'Documentation')
376 files changed, 12213 insertions, 2868 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 07de7e19b4ce..27e67a98b7be 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -413,8 +413,6 @@ serial-console.txt | |||
413 | - how to set up Linux with a serial line console as the default. | 413 | - how to set up Linux with a serial line console as the default. |
414 | sgi-ioc4.txt | 414 | sgi-ioc4.txt |
415 | - description of the SGI IOC4 PCI (multi function) device. | 415 | - description of the SGI IOC4 PCI (multi function) device. |
416 | sgi-visws.txt | ||
417 | - short blurb on the SGI Visual Workstations. | ||
418 | sh/ | 416 | sh/ |
419 | - directory with info on porting Linux to a new architecture. | 417 | - directory with info on porting Linux to a new architecture. |
420 | smsc_ece1099.txt | 418 | smsc_ece1099.txt |
diff --git a/Documentation/ABI/stable/sysfs-firmware-opal-dump b/Documentation/ABI/stable/sysfs-firmware-opal-dump new file mode 100644 index 000000000000..32fe7f5c4880 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-firmware-opal-dump | |||
@@ -0,0 +1,41 @@ | |||
1 | What: /sys/firmware/opal/dump | ||
2 | Date: Feb 2014 | ||
3 | Contact: Stewart Smith <stewart@linux.vnet.ibm.com> | ||
4 | Description: | ||
5 | This directory exposes interfaces for interacting with | ||
6 | the FSP and platform dumps through OPAL firmware interface. | ||
7 | |||
8 | This is only for the powerpc/powernv platform. | ||
9 | |||
10 | initiate_dump: When '1' is written to it, | ||
11 | we will initiate a dump. | ||
12 | Read this file for supported commands. | ||
13 | |||
14 | 0xXX-0xYYYY: A directory for dump of type 0xXX and | ||
15 | id 0xYYYY (in hex). The name of this | ||
16 | directory should not be relied upon to | ||
17 | be in this format, only that it's unique | ||
18 | among all dumps. For determining the type | ||
19 | and ID of the dump, use the id and type files. | ||
20 | Do not rely on any particular size of dump | ||
21 | type or dump id. | ||
22 | |||
23 | Each dump has the following files: | ||
24 | id: An ASCII representation of the dump ID | ||
25 | in hex (e.g. '0x01') | ||
26 | type: An ASCII representation of the type of | ||
27 | dump in the format "0x%x %s" with the ID | ||
28 | in hex and a description of the dump type | ||
29 | (or 'unknown'). | ||
30 | Type '0xffffffff unknown' is used when | ||
31 | we could not get the type from firmware. | ||
32 | e.g. '0x02 System/Platform Dump' | ||
33 | dump: A binary file containing the dump. | ||
34 | The size of the dump is the size of this file. | ||
35 | acknowledge: When 'ack' is written to this, we will | ||
36 | acknowledge that we've retrieved the | ||
37 | dump to the service processor. It will | ||
38 | then remove it, making the dump | ||
39 | inaccessible. | ||
40 | Reading this file will get a list of | ||
41 | supported actions. | ||
diff --git a/Documentation/ABI/stable/sysfs-firmware-opal-elog b/Documentation/ABI/stable/sysfs-firmware-opal-elog new file mode 100644 index 000000000000..e1f3058f5954 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-firmware-opal-elog | |||
@@ -0,0 +1,60 @@ | |||
1 | What: /sys/firmware/opal/elog | ||
2 | Date: Feb 2014 | ||
3 | Contact: Stewart Smith <stewart@linux.vnet.ibm.com> | ||
4 | Description: | ||
5 | This directory exposes error log entries retrieved | ||
6 | through the OPAL firmware interface. | ||
7 | |||
8 | Each error log is identified by a unique ID and will | ||
9 | exist until explicitly acknowledged to firmware. | ||
10 | |||
11 | Each log entry has a directory in /sys/firmware/opal/elog. | ||
12 | |||
13 | Log entries may be purged by the service processor | ||
14 | before retrieved by firmware or retrieved/acknowledged by | ||
15 | Linux if there is no room for more log entries. | ||
16 | |||
17 | In the event that Linux has retrieved the log entries | ||
18 | but not explicitly acknowledged them to firmware and | ||
19 | the service processor needs more room for log entries, | ||
20 | the only remaining copy of a log message may be in | ||
21 | Linux. | ||
22 | |||
23 | Typically, a user space daemon will monitor for new | ||
24 | entries, read them out and acknowledge them. | ||
25 | |||
26 | The service processor may be able to store more log | ||
27 | entries than firmware can, so after you acknowledge | ||
28 | an event from Linux you may instantly get another one | ||
29 | from the queue that was generated some time in the past. | ||
30 | |||
31 | The raw log format is a binary format. We currently | ||
32 | do not parse this at all in kernel, leaving it up to | ||
33 | user space to solve the problem. In future, we may | ||
34 | do more parsing in kernel and add more files to make | ||
35 | it easier for simple user space processes to extract | ||
36 | more information. | ||
37 | |||
38 | For each log entry (directory), there are the following | ||
39 | files: | ||
40 | |||
41 | id: An ASCII representation of the ID of the | ||
42 | error log, in hex - e.g. "0x01". | ||
43 | |||
44 | type: An ASCII representation of the type id and | ||
45 | description of the type of error log. | ||
46 | Currently just "0x00 PEL" - platform error log. | ||
47 | In the future there may be additional types. | ||
48 | |||
49 | raw: A read-only binary file that can be read | ||
50 | to get the raw log entry. These are | ||
51 | <16kb, often just hundreds of bytes and | ||
52 | "average" 2kb. | ||
53 | |||
54 | acknowledge: Writing 'ack' to this file will acknowledge | ||
55 | the error log to firmware (and in turn | ||
56 | the service processor, if applicable). | ||
57 | Shortly after acknowledging it, the log | ||
58 | entry will be removed from sysfs. | ||
59 | Reading this file will list the supported | ||
60 | operations (curently just acknowledge). \ No newline at end of file | ||
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram index 3f0b9ae61d8c..70ec992514d0 100644 --- a/Documentation/ABI/testing/sysfs-block-zram +++ b/Documentation/ABI/testing/sysfs-block-zram | |||
@@ -43,6 +43,36 @@ Description: | |||
43 | The invalid_io file is read-only and specifies the number of | 43 | The invalid_io file is read-only and specifies the number of |
44 | non-page-size-aligned I/O requests issued to this device. | 44 | non-page-size-aligned I/O requests issued to this device. |
45 | 45 | ||
46 | What: /sys/block/zram<id>/failed_reads | ||
47 | Date: February 2014 | ||
48 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
49 | Description: | ||
50 | The failed_reads file is read-only and specifies the number of | ||
51 | failed reads happened on this device. | ||
52 | |||
53 | What: /sys/block/zram<id>/failed_writes | ||
54 | Date: February 2014 | ||
55 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
56 | Description: | ||
57 | The failed_writes file is read-only and specifies the number of | ||
58 | failed writes happened on this device. | ||
59 | |||
60 | What: /sys/block/zram<id>/max_comp_streams | ||
61 | Date: February 2014 | ||
62 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
63 | Description: | ||
64 | The max_comp_streams file is read-write and specifies the | ||
65 | number of backend's zcomp_strm compression streams (number of | ||
66 | concurrent compress operations). | ||
67 | |||
68 | What: /sys/block/zram<id>/comp_algorithm | ||
69 | Date: February 2014 | ||
70 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
71 | Description: | ||
72 | The comp_algorithm file is read-write and lets to show | ||
73 | available and selected compression algorithms, change | ||
74 | compression algorithm selection. | ||
75 | |||
46 | What: /sys/block/zram<id>/notify_free | 76 | What: /sys/block/zram<id>/notify_free |
47 | Date: August 2010 | 77 | Date: August 2010 |
48 | Contact: Nitin Gupta <ngupta@vflare.org> | 78 | Contact: Nitin Gupta <ngupta@vflare.org> |
@@ -53,15 +83,6 @@ Description: | |||
53 | is freed. This statistic is applicable only when this disk is | 83 | is freed. This statistic is applicable only when this disk is |
54 | being used as a swap disk. | 84 | being used as a swap disk. |
55 | 85 | ||
56 | What: /sys/block/zram<id>/discard | ||
57 | Date: August 2010 | ||
58 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
59 | Description: | ||
60 | The discard file is read-only and specifies the number of | ||
61 | discard requests received by this device. These requests | ||
62 | provide information to block device regarding blocks which are | ||
63 | no longer used by filesystem. | ||
64 | |||
65 | What: /sys/block/zram<id>/zero_pages | 86 | What: /sys/block/zram<id>/zero_pages |
66 | Date: August 2010 | 87 | Date: August 2010 |
67 | Contact: Nitin Gupta <ngupta@vflare.org> | 88 | Contact: Nitin Gupta <ngupta@vflare.org> |
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events index 3c1cc24361bd..7b40a3cbc26a 100644 --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events | |||
@@ -57,6 +57,523 @@ What: /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL | |||
57 | /sys/devices/cpu/events/PM_LD_REF_L1 | 57 | /sys/devices/cpu/events/PM_LD_REF_L1 |
58 | /sys/devices/cpu/events/PM_RUN_CYC | 58 | /sys/devices/cpu/events/PM_RUN_CYC |
59 | /sys/devices/cpu/events/PM_RUN_INST_CMPL | 59 | /sys/devices/cpu/events/PM_RUN_INST_CMPL |
60 | /sys/devices/cpu/events/PM_IC_DEMAND_L2_BR_ALL | ||
61 | /sys/devices/cpu/events/PM_GCT_UTIL_7_TO_10_SLOTS | ||
62 | /sys/devices/cpu/events/PM_PMC2_SAVED | ||
63 | /sys/devices/cpu/events/PM_VSU0_16FLOP | ||
64 | /sys/devices/cpu/events/PM_MRK_LSU_DERAT_MISS | ||
65 | /sys/devices/cpu/events/PM_MRK_ST_CMPL | ||
66 | /sys/devices/cpu/events/PM_NEST_PAIR3_ADD | ||
67 | /sys/devices/cpu/events/PM_L2_ST_DISP | ||
68 | /sys/devices/cpu/events/PM_L2_CASTOUT_MOD | ||
69 | /sys/devices/cpu/events/PM_ISEG | ||
70 | /sys/devices/cpu/events/PM_MRK_INST_TIMEO | ||
71 | /sys/devices/cpu/events/PM_L2_RCST_DISP_FAIL_ADDR | ||
72 | /sys/devices/cpu/events/PM_LSU1_DC_PREF_STREAM_CONFIRM | ||
73 | /sys/devices/cpu/events/PM_IERAT_WR_64K | ||
74 | /sys/devices/cpu/events/PM_MRK_DTLB_MISS_16M | ||
75 | /sys/devices/cpu/events/PM_IERAT_MISS | ||
76 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_LMEM | ||
77 | /sys/devices/cpu/events/PM_FLOP | ||
78 | /sys/devices/cpu/events/PM_THRD_PRIO_4_5_CYC | ||
79 | /sys/devices/cpu/events/PM_BR_PRED_TA | ||
80 | /sys/devices/cpu/events/PM_EXT_INT | ||
81 | /sys/devices/cpu/events/PM_VSU_FSQRT_FDIV | ||
82 | /sys/devices/cpu/events/PM_MRK_LD_MISS_EXPOSED_CYC | ||
83 | /sys/devices/cpu/events/PM_LSU1_LDF | ||
84 | /sys/devices/cpu/events/PM_IC_WRITE_ALL | ||
85 | /sys/devices/cpu/events/PM_LSU0_SRQ_STFWD | ||
86 | /sys/devices/cpu/events/PM_PTEG_FROM_RL2L3_MOD | ||
87 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L31_SHR | ||
88 | /sys/devices/cpu/events/PM_DATA_FROM_L21_MOD | ||
89 | /sys/devices/cpu/events/PM_VSU1_SCAL_DOUBLE_ISSUED | ||
90 | /sys/devices/cpu/events/PM_VSU0_8FLOP | ||
91 | /sys/devices/cpu/events/PM_POWER_EVENT1 | ||
92 | /sys/devices/cpu/events/PM_DISP_CLB_HELD_BAL | ||
93 | /sys/devices/cpu/events/PM_VSU1_2FLOP | ||
94 | /sys/devices/cpu/events/PM_LWSYNC_HELD | ||
95 | /sys/devices/cpu/events/PM_PTEG_FROM_DL2L3_SHR | ||
96 | /sys/devices/cpu/events/PM_INST_FROM_L21_MOD | ||
97 | /sys/devices/cpu/events/PM_IERAT_XLATE_WR_16MPLUS | ||
98 | /sys/devices/cpu/events/PM_IC_REQ_ALL | ||
99 | /sys/devices/cpu/events/PM_DSLB_MISS | ||
100 | /sys/devices/cpu/events/PM_L3_MISS | ||
101 | /sys/devices/cpu/events/PM_LSU0_L1_PREF | ||
102 | /sys/devices/cpu/events/PM_VSU_SCALAR_SINGLE_ISSUED | ||
103 | /sys/devices/cpu/events/PM_LSU1_DC_PREF_STREAM_CONFIRM_STRIDE | ||
104 | /sys/devices/cpu/events/PM_L2_INST | ||
105 | /sys/devices/cpu/events/PM_VSU0_FRSP | ||
106 | /sys/devices/cpu/events/PM_FLUSH_DISP | ||
107 | /sys/devices/cpu/events/PM_PTEG_FROM_L2MISS | ||
108 | /sys/devices/cpu/events/PM_VSU1_DQ_ISSUED | ||
109 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DMEM | ||
110 | /sys/devices/cpu/events/PM_LSU_FLUSH_ULD | ||
111 | /sys/devices/cpu/events/PM_PTEG_FROM_LMEM | ||
112 | /sys/devices/cpu/events/PM_MRK_DERAT_MISS_16M | ||
113 | /sys/devices/cpu/events/PM_THRD_ALL_RUN_CYC | ||
114 | /sys/devices/cpu/events/PM_MEM0_PREFETCH_DISP | ||
115 | /sys/devices/cpu/events/PM_MRK_STALL_CMPLU_CYC_COUNT | ||
116 | /sys/devices/cpu/events/PM_DATA_FROM_DL2L3_MOD | ||
117 | /sys/devices/cpu/events/PM_VSU_FRSP | ||
118 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L21_MOD | ||
119 | /sys/devices/cpu/events/PM_PMC1_OVERFLOW | ||
120 | /sys/devices/cpu/events/PM_VSU0_SINGLE | ||
121 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L3MISS | ||
122 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L31_SHR | ||
123 | /sys/devices/cpu/events/PM_VSU0_VECTOR_SP_ISSUED | ||
124 | /sys/devices/cpu/events/PM_VSU1_FEST | ||
125 | /sys/devices/cpu/events/PM_MRK_INST_DISP | ||
126 | /sys/devices/cpu/events/PM_VSU0_COMPLEX_ISSUED | ||
127 | /sys/devices/cpu/events/PM_LSU1_FLUSH_UST | ||
128 | /sys/devices/cpu/events/PM_FXU_IDLE | ||
129 | /sys/devices/cpu/events/PM_LSU0_FLUSH_ULD | ||
130 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DL2L3_MOD | ||
131 | /sys/devices/cpu/events/PM_LSU_LMQ_SRQ_EMPTY_ALL_CYC | ||
132 | /sys/devices/cpu/events/PM_LSU1_REJECT_LMQ_FULL | ||
133 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L21_MOD | ||
134 | /sys/devices/cpu/events/PM_INST_FROM_RL2L3_MOD | ||
135 | /sys/devices/cpu/events/PM_SHL_CREATED | ||
136 | /sys/devices/cpu/events/PM_L2_ST_HIT | ||
137 | /sys/devices/cpu/events/PM_DATA_FROM_DMEM | ||
138 | /sys/devices/cpu/events/PM_L3_LD_MISS | ||
139 | /sys/devices/cpu/events/PM_FXU1_BUSY_FXU0_IDLE | ||
140 | /sys/devices/cpu/events/PM_DISP_CLB_HELD_RES | ||
141 | /sys/devices/cpu/events/PM_L2_SN_SX_I_DONE | ||
142 | /sys/devices/cpu/events/PM_STCX_CMPL | ||
143 | /sys/devices/cpu/events/PM_VSU0_2FLOP | ||
144 | /sys/devices/cpu/events/PM_L3_PREF_MISS | ||
145 | /sys/devices/cpu/events/PM_LSU_SRQ_SYNC_CYC | ||
146 | /sys/devices/cpu/events/PM_LSU_REJECT_ERAT_MISS | ||
147 | /sys/devices/cpu/events/PM_L1_ICACHE_MISS | ||
148 | /sys/devices/cpu/events/PM_LSU1_FLUSH_SRQ | ||
149 | /sys/devices/cpu/events/PM_LD_REF_L1_LSU0 | ||
150 | /sys/devices/cpu/events/PM_VSU0_FEST | ||
151 | /sys/devices/cpu/events/PM_VSU_VECTOR_SINGLE_ISSUED | ||
152 | /sys/devices/cpu/events/PM_FREQ_UP | ||
153 | /sys/devices/cpu/events/PM_DATA_FROM_LMEM | ||
154 | /sys/devices/cpu/events/PM_LSU1_LDX | ||
155 | /sys/devices/cpu/events/PM_PMC3_OVERFLOW | ||
156 | /sys/devices/cpu/events/PM_MRK_BR_MPRED | ||
157 | /sys/devices/cpu/events/PM_SHL_MATCH | ||
158 | /sys/devices/cpu/events/PM_MRK_BR_TAKEN | ||
159 | /sys/devices/cpu/events/PM_ISLB_MISS | ||
160 | /sys/devices/cpu/events/PM_DISP_HELD_THERMAL | ||
161 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_RL2L3_SHR | ||
162 | /sys/devices/cpu/events/PM_LSU1_SRQ_STFWD | ||
163 | /sys/devices/cpu/events/PM_PTEG_FROM_DMEM | ||
164 | /sys/devices/cpu/events/PM_VSU_2FLOP | ||
165 | /sys/devices/cpu/events/PM_GCT_FULL_CYC | ||
166 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L3_CYC | ||
167 | /sys/devices/cpu/events/PM_LSU_SRQ_S0_ALLOC | ||
168 | /sys/devices/cpu/events/PM_MRK_DERAT_MISS_4K | ||
169 | /sys/devices/cpu/events/PM_BR_MPRED_TA | ||
170 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L2MISS | ||
171 | /sys/devices/cpu/events/PM_DPU_HELD_POWER | ||
172 | /sys/devices/cpu/events/PM_MRK_VSU_FIN | ||
173 | /sys/devices/cpu/events/PM_LSU_SRQ_S0_VALID | ||
174 | /sys/devices/cpu/events/PM_GCT_EMPTY_CYC | ||
175 | /sys/devices/cpu/events/PM_IOPS_DISP | ||
176 | /sys/devices/cpu/events/PM_RUN_SPURR | ||
177 | /sys/devices/cpu/events/PM_PTEG_FROM_L21_MOD | ||
178 | /sys/devices/cpu/events/PM_VSU0_1FLOP | ||
179 | /sys/devices/cpu/events/PM_SNOOP_TLBIE | ||
180 | /sys/devices/cpu/events/PM_DATA_FROM_L3MISS | ||
181 | /sys/devices/cpu/events/PM_VSU_SINGLE | ||
182 | /sys/devices/cpu/events/PM_DTLB_MISS_16G | ||
183 | /sys/devices/cpu/events/PM_FLUSH | ||
184 | /sys/devices/cpu/events/PM_L2_LD_HIT | ||
185 | /sys/devices/cpu/events/PM_NEST_PAIR2_AND | ||
186 | /sys/devices/cpu/events/PM_VSU1_1FLOP | ||
187 | /sys/devices/cpu/events/PM_IC_PREF_REQ | ||
188 | /sys/devices/cpu/events/PM_L3_LD_HIT | ||
189 | /sys/devices/cpu/events/PM_DISP_HELD | ||
190 | /sys/devices/cpu/events/PM_L2_LD | ||
191 | /sys/devices/cpu/events/PM_LSU_FLUSH_SRQ | ||
192 | /sys/devices/cpu/events/PM_BC_PLUS_8_CONV | ||
193 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L31_MOD_CYC | ||
194 | /sys/devices/cpu/events/PM_L2_RCST_BUSY_RC_FULL | ||
195 | /sys/devices/cpu/events/PM_TB_BIT_TRANS | ||
196 | /sys/devices/cpu/events/PM_THERMAL_MAX | ||
197 | /sys/devices/cpu/events/PM_LSU1_FLUSH_ULD | ||
198 | /sys/devices/cpu/events/PM_LSU1_REJECT_LHS | ||
199 | /sys/devices/cpu/events/PM_LSU_LRQ_S0_ALLOC | ||
200 | /sys/devices/cpu/events/PM_L3_CO_L31 | ||
201 | /sys/devices/cpu/events/PM_POWER_EVENT4 | ||
202 | /sys/devices/cpu/events/PM_DATA_FROM_L31_SHR | ||
203 | /sys/devices/cpu/events/PM_BR_UNCOND | ||
204 | /sys/devices/cpu/events/PM_LSU1_DC_PREF_STREAM_ALLOC | ||
205 | /sys/devices/cpu/events/PM_PMC4_REWIND | ||
206 | /sys/devices/cpu/events/PM_L2_RCLD_DISP | ||
207 | /sys/devices/cpu/events/PM_THRD_PRIO_2_3_CYC | ||
208 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L2MISS | ||
209 | /sys/devices/cpu/events/PM_IC_DEMAND_L2_BHT_REDIRECT | ||
210 | /sys/devices/cpu/events/PM_DATA_FROM_L31_SHR | ||
211 | /sys/devices/cpu/events/PM_IC_PREF_CANCEL_L2 | ||
212 | /sys/devices/cpu/events/PM_MRK_FIN_STALL_CYC_COUNT | ||
213 | /sys/devices/cpu/events/PM_BR_PRED_CCACHE | ||
214 | /sys/devices/cpu/events/PM_GCT_UTIL_1_TO_2_SLOTS | ||
215 | /sys/devices/cpu/events/PM_MRK_ST_CMPL_INT | ||
216 | /sys/devices/cpu/events/PM_LSU_TWO_TABLEWALK_CYC | ||
217 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L3MISS | ||
218 | /sys/devices/cpu/events/PM_LSU_SET_MPRED | ||
219 | /sys/devices/cpu/events/PM_FLUSH_DISP_TLBIE | ||
220 | /sys/devices/cpu/events/PM_VSU1_FCONV | ||
221 | /sys/devices/cpu/events/PM_DERAT_MISS_16G | ||
222 | /sys/devices/cpu/events/PM_INST_FROM_LMEM | ||
223 | /sys/devices/cpu/events/PM_IC_DEMAND_L2_BR_REDIRECT | ||
224 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L2 | ||
225 | /sys/devices/cpu/events/PM_PTEG_FROM_L2 | ||
226 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L21_SHR_CYC | ||
227 | /sys/devices/cpu/events/PM_MRK_DTLB_MISS_4K | ||
228 | /sys/devices/cpu/events/PM_VSU0_FPSCR | ||
229 | /sys/devices/cpu/events/PM_VSU1_VECT_DOUBLE_ISSUED | ||
230 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_RL2L3_MOD | ||
231 | /sys/devices/cpu/events/PM_MEM0_RQ_DISP | ||
232 | /sys/devices/cpu/events/PM_L2_LD_MISS | ||
233 | /sys/devices/cpu/events/PM_VMX_RESULT_SAT_1 | ||
234 | /sys/devices/cpu/events/PM_L1_PREF | ||
235 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_LMEM_CYC | ||
236 | /sys/devices/cpu/events/PM_GRP_IC_MISS_NONSPEC | ||
237 | /sys/devices/cpu/events/PM_PB_NODE_PUMP | ||
238 | /sys/devices/cpu/events/PM_SHL_MERGED | ||
239 | /sys/devices/cpu/events/PM_NEST_PAIR1_ADD | ||
240 | /sys/devices/cpu/events/PM_DATA_FROM_L3 | ||
241 | /sys/devices/cpu/events/PM_LSU_FLUSH | ||
242 | /sys/devices/cpu/events/PM_LSU_SRQ_SYNC_COUNT | ||
243 | /sys/devices/cpu/events/PM_PMC2_OVERFLOW | ||
244 | /sys/devices/cpu/events/PM_LSU_LDF | ||
245 | /sys/devices/cpu/events/PM_POWER_EVENT3 | ||
246 | /sys/devices/cpu/events/PM_DISP_WT | ||
247 | /sys/devices/cpu/events/PM_IC_BANK_CONFLICT | ||
248 | /sys/devices/cpu/events/PM_BR_MPRED_CR_TA | ||
249 | /sys/devices/cpu/events/PM_L2_INST_MISS | ||
250 | /sys/devices/cpu/events/PM_NEST_PAIR2_ADD | ||
251 | /sys/devices/cpu/events/PM_MRK_LSU_FLUSH | ||
252 | /sys/devices/cpu/events/PM_L2_LDST | ||
253 | /sys/devices/cpu/events/PM_INST_FROM_L31_SHR | ||
254 | /sys/devices/cpu/events/PM_VSU0_FIN | ||
255 | /sys/devices/cpu/events/PM_VSU1_FCONV | ||
256 | /sys/devices/cpu/events/PM_INST_FROM_RMEM | ||
257 | /sys/devices/cpu/events/PM_DISP_CLB_HELD_TLBIE | ||
258 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DMEM_CYC | ||
259 | /sys/devices/cpu/events/PM_BR_PRED_CR | ||
260 | /sys/devices/cpu/events/PM_LSU_REJECT | ||
261 | /sys/devices/cpu/events/PM_GCT_UTIL_3_TO_6_SLOTS | ||
262 | /sys/devices/cpu/events/PM_CMPLU_STALL_END_GCT_NOSLOT | ||
263 | /sys/devices/cpu/events/PM_LSU0_REJECT_LMQ_FULL | ||
264 | /sys/devices/cpu/events/PM_VSU_FEST | ||
265 | /sys/devices/cpu/events/PM_NEST_PAIR0_AND | ||
266 | /sys/devices/cpu/events/PM_PTEG_FROM_L3 | ||
267 | /sys/devices/cpu/events/PM_POWER_EVENT2 | ||
268 | /sys/devices/cpu/events/PM_IC_PREF_CANCEL_PAGE | ||
269 | /sys/devices/cpu/events/PM_VSU0_FSQRT_FDIV | ||
270 | /sys/devices/cpu/events/PM_MRK_GRP_CMPL | ||
271 | /sys/devices/cpu/events/PM_VSU0_SCAL_DOUBLE_ISSUED | ||
272 | /sys/devices/cpu/events/PM_GRP_DISP | ||
273 | /sys/devices/cpu/events/PM_LSU0_LDX | ||
274 | /sys/devices/cpu/events/PM_DATA_FROM_L2 | ||
275 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RL2L3_MOD | ||
276 | /sys/devices/cpu/events/PM_VSU0_VECT_DOUBLE_ISSUED | ||
277 | /sys/devices/cpu/events/PM_VSU1_2FLOP_DOUBLE | ||
278 | /sys/devices/cpu/events/PM_THRD_PRIO_6_7_CYC | ||
279 | /sys/devices/cpu/events/PM_BC_PLUS_8_RSLV_TAKEN | ||
280 | /sys/devices/cpu/events/PM_BR_MPRED_CR | ||
281 | /sys/devices/cpu/events/PM_L3_CO_MEM | ||
282 | /sys/devices/cpu/events/PM_DATA_FROM_RL2L3_MOD | ||
283 | /sys/devices/cpu/events/PM_LSU_SRQ_FULL_CYC | ||
284 | /sys/devices/cpu/events/PM_TABLEWALK_CYC | ||
285 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_RMEM | ||
286 | /sys/devices/cpu/events/PM_LSU_SRQ_STFWD | ||
287 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_RMEM | ||
288 | /sys/devices/cpu/events/PM_FXU0_FIN | ||
289 | /sys/devices/cpu/events/PM_LSU1_L1_SW_PREF | ||
290 | /sys/devices/cpu/events/PM_PTEG_FROM_L31_MOD | ||
291 | /sys/devices/cpu/events/PM_PMC5_OVERFLOW | ||
292 | /sys/devices/cpu/events/PM_LD_REF_L1_LSU1 | ||
293 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L21_SHR | ||
294 | /sys/devices/cpu/events/PM_DATA_FROM_RMEM | ||
295 | /sys/devices/cpu/events/PM_VSU0_SCAL_SINGLE_ISSUED | ||
296 | /sys/devices/cpu/events/PM_BR_MPRED_LSTACK | ||
297 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RL2L3_MOD_CYC | ||
298 | /sys/devices/cpu/events/PM_LSU0_FLUSH_UST | ||
299 | /sys/devices/cpu/events/PM_LSU_NCST | ||
300 | /sys/devices/cpu/events/PM_BR_TAKEN | ||
301 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_LMEM | ||
302 | /sys/devices/cpu/events/PM_DTLB_MISS_4K | ||
303 | /sys/devices/cpu/events/PM_PMC4_SAVED | ||
304 | /sys/devices/cpu/events/PM_VSU1_PERMUTE_ISSUED | ||
305 | /sys/devices/cpu/events/PM_SLB_MISS | ||
306 | /sys/devices/cpu/events/PM_LSU1_FLUSH_LRQ | ||
307 | /sys/devices/cpu/events/PM_DTLB_MISS | ||
308 | /sys/devices/cpu/events/PM_VSU1_FRSP | ||
309 | /sys/devices/cpu/events/PM_VSU_VECTOR_DOUBLE_ISSUED | ||
310 | /sys/devices/cpu/events/PM_L2_CASTOUT_SHR | ||
311 | /sys/devices/cpu/events/PM_DATA_FROM_DL2L3_SHR | ||
312 | /sys/devices/cpu/events/PM_VSU1_STF | ||
313 | /sys/devices/cpu/events/PM_ST_FIN | ||
314 | /sys/devices/cpu/events/PM_PTEG_FROM_L21_SHR | ||
315 | /sys/devices/cpu/events/PM_L2_LOC_GUESS_WRONG | ||
316 | /sys/devices/cpu/events/PM_MRK_STCX_FAIL | ||
317 | /sys/devices/cpu/events/PM_LSU0_REJECT_LHS | ||
318 | /sys/devices/cpu/events/PM_IC_PREF_CANCEL_HIT | ||
319 | /sys/devices/cpu/events/PM_L3_PREF_BUSY | ||
320 | /sys/devices/cpu/events/PM_MRK_BRU_FIN | ||
321 | /sys/devices/cpu/events/PM_LSU1_NCLD | ||
322 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L31_MOD | ||
323 | /sys/devices/cpu/events/PM_LSU_NCLD | ||
324 | /sys/devices/cpu/events/PM_LSU_LDX | ||
325 | /sys/devices/cpu/events/PM_L2_LOC_GUESS_CORRECT | ||
326 | /sys/devices/cpu/events/PM_THRESH_TIMEO | ||
327 | /sys/devices/cpu/events/PM_L3_PREF_ST | ||
328 | /sys/devices/cpu/events/PM_DISP_CLB_HELD_SYNC | ||
329 | /sys/devices/cpu/events/PM_VSU_SIMPLE_ISSUED | ||
330 | /sys/devices/cpu/events/PM_VSU1_SINGLE | ||
331 | /sys/devices/cpu/events/PM_DATA_TABLEWALK_CYC | ||
332 | /sys/devices/cpu/events/PM_L2_RC_ST_DONE | ||
333 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L21_MOD | ||
334 | /sys/devices/cpu/events/PM_LARX_LSU1 | ||
335 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RMEM | ||
336 | /sys/devices/cpu/events/PM_DISP_CLB_HELD | ||
337 | /sys/devices/cpu/events/PM_DERAT_MISS_4K | ||
338 | /sys/devices/cpu/events/PM_L2_RCLD_DISP_FAIL_ADDR | ||
339 | /sys/devices/cpu/events/PM_SEG_EXCEPTION | ||
340 | /sys/devices/cpu/events/PM_FLUSH_DISP_SB | ||
341 | /sys/devices/cpu/events/PM_L2_DC_INV | ||
342 | /sys/devices/cpu/events/PM_PTEG_FROM_DL2L3_MOD | ||
343 | /sys/devices/cpu/events/PM_DSEG | ||
344 | /sys/devices/cpu/events/PM_BR_PRED_LSTACK | ||
345 | /sys/devices/cpu/events/PM_VSU0_STF | ||
346 | /sys/devices/cpu/events/PM_LSU_FX_FIN | ||
347 | /sys/devices/cpu/events/PM_DERAT_MISS_16M | ||
348 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_DL2L3_MOD | ||
349 | /sys/devices/cpu/events/PM_GCT_UTIL_11_PLUS_SLOTS | ||
350 | /sys/devices/cpu/events/PM_INST_FROM_L3 | ||
351 | /sys/devices/cpu/events/PM_MRK_IFU_FIN | ||
352 | /sys/devices/cpu/events/PM_ITLB_MISS | ||
353 | /sys/devices/cpu/events/PM_VSU_STF | ||
354 | /sys/devices/cpu/events/PM_LSU_FLUSH_UST | ||
355 | /sys/devices/cpu/events/PM_L2_LDST_MISS | ||
356 | /sys/devices/cpu/events/PM_FXU1_FIN | ||
357 | /sys/devices/cpu/events/PM_SHL_DEALLOCATED | ||
358 | /sys/devices/cpu/events/PM_L2_SN_M_WR_DONE | ||
359 | /sys/devices/cpu/events/PM_LSU_REJECT_SET_MPRED | ||
360 | /sys/devices/cpu/events/PM_L3_PREF_LD | ||
361 | /sys/devices/cpu/events/PM_L2_SN_M_RD_DONE | ||
362 | /sys/devices/cpu/events/PM_MRK_DERAT_MISS_16G | ||
363 | /sys/devices/cpu/events/PM_VSU_FCONV | ||
364 | /sys/devices/cpu/events/PM_ANY_THRD_RUN_CYC | ||
365 | /sys/devices/cpu/events/PM_LSU_LMQ_FULL_CYC | ||
366 | /sys/devices/cpu/events/PM_MRK_LSU_REJECT_LHS | ||
367 | /sys/devices/cpu/events/PM_MRK_LD_MISS_L1_CYC | ||
368 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L2_CYC | ||
369 | /sys/devices/cpu/events/PM_INST_IMC_MATCH_DISP | ||
370 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RMEM_CYC | ||
371 | /sys/devices/cpu/events/PM_VSU0_SIMPLE_ISSUED | ||
372 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_RL2L3_SHR | ||
373 | /sys/devices/cpu/events/PM_VSU_FMA_DOUBLE | ||
374 | /sys/devices/cpu/events/PM_VSU_4FLOP | ||
375 | /sys/devices/cpu/events/PM_VSU1_FIN | ||
376 | /sys/devices/cpu/events/PM_NEST_PAIR1_AND | ||
377 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_RL2L3_MOD | ||
378 | /sys/devices/cpu/events/PM_PTEG_FROM_RMEM | ||
379 | /sys/devices/cpu/events/PM_LSU_LRQ_S0_VALID | ||
380 | /sys/devices/cpu/events/PM_LSU0_LDF | ||
381 | /sys/devices/cpu/events/PM_FLUSH_COMPLETION | ||
382 | /sys/devices/cpu/events/PM_ST_MISS_L1 | ||
383 | /sys/devices/cpu/events/PM_L2_NODE_PUMP | ||
384 | /sys/devices/cpu/events/PM_INST_FROM_DL2L3_SHR | ||
385 | /sys/devices/cpu/events/PM_MRK_STALL_CMPLU_CYC | ||
386 | /sys/devices/cpu/events/PM_VSU1_DENORM | ||
387 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L31_SHR_CYC | ||
388 | /sys/devices/cpu/events/PM_NEST_PAIR0_ADD | ||
389 | /sys/devices/cpu/events/PM_INST_FROM_L3MISS | ||
390 | /sys/devices/cpu/events/PM_EE_OFF_EXT_INT | ||
391 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_DMEM | ||
392 | /sys/devices/cpu/events/PM_INST_FROM_DL2L3_MOD | ||
393 | /sys/devices/cpu/events/PM_PMC6_OVERFLOW | ||
394 | /sys/devices/cpu/events/PM_VSU_2FLOP_DOUBLE | ||
395 | /sys/devices/cpu/events/PM_TLB_MISS | ||
396 | /sys/devices/cpu/events/PM_FXU_BUSY | ||
397 | /sys/devices/cpu/events/PM_L2_RCLD_DISP_FAIL_OTHER | ||
398 | /sys/devices/cpu/events/PM_LSU_REJECT_LMQ_FULL | ||
399 | /sys/devices/cpu/events/PM_IC_RELOAD_SHR | ||
400 | /sys/devices/cpu/events/PM_GRP_MRK | ||
401 | /sys/devices/cpu/events/PM_MRK_ST_NEST | ||
402 | /sys/devices/cpu/events/PM_VSU1_FSQRT_FDIV | ||
403 | /sys/devices/cpu/events/PM_LSU0_FLUSH_LRQ | ||
404 | /sys/devices/cpu/events/PM_LARX_LSU0 | ||
405 | /sys/devices/cpu/events/PM_IBUF_FULL_CYC | ||
406 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DL2L3_SHR_CYC | ||
407 | /sys/devices/cpu/events/PM_LSU_DC_PREF_STREAM_ALLOC | ||
408 | /sys/devices/cpu/events/PM_GRP_MRK_CYC | ||
409 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RL2L3_SHR_CYC | ||
410 | /sys/devices/cpu/events/PM_L2_GLOB_GUESS_CORRECT | ||
411 | /sys/devices/cpu/events/PM_LSU_REJECT_LHS | ||
412 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_LMEM | ||
413 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L3 | ||
414 | /sys/devices/cpu/events/PM_FREQ_DOWN | ||
415 | /sys/devices/cpu/events/PM_PB_RETRY_NODE_PUMP | ||
416 | /sys/devices/cpu/events/PM_INST_FROM_RL2L3_SHR | ||
417 | /sys/devices/cpu/events/PM_MRK_INST_ISSUED | ||
418 | /sys/devices/cpu/events/PM_PTEG_FROM_L3MISS | ||
419 | /sys/devices/cpu/events/PM_RUN_PURR | ||
420 | /sys/devices/cpu/events/PM_MRK_GRP_IC_MISS | ||
421 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L3 | ||
422 | /sys/devices/cpu/events/PM_PTEG_FROM_RL2L3_SHR | ||
423 | /sys/devices/cpu/events/PM_LSU_FLUSH_LRQ | ||
424 | /sys/devices/cpu/events/PM_MRK_DERAT_MISS_64K | ||
425 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_DL2L3_MOD | ||
426 | /sys/devices/cpu/events/PM_L2_ST_MISS | ||
427 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L21_SHR | ||
428 | /sys/devices/cpu/events/PM_LWSYNC | ||
429 | /sys/devices/cpu/events/PM_LSU0_DC_PREF_STREAM_CONFIRM_STRIDE | ||
430 | /sys/devices/cpu/events/PM_MRK_LSU_FLUSH_LRQ | ||
431 | /sys/devices/cpu/events/PM_INST_IMC_MATCH_CMPL | ||
432 | /sys/devices/cpu/events/PM_NEST_PAIR3_AND | ||
433 | /sys/devices/cpu/events/PM_PB_RETRY_SYS_PUMP | ||
434 | /sys/devices/cpu/events/PM_MRK_INST_FIN | ||
435 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_DL2L3_SHR | ||
436 | /sys/devices/cpu/events/PM_INST_FROM_L31_MOD | ||
437 | /sys/devices/cpu/events/PM_MRK_DTLB_MISS_64K | ||
438 | /sys/devices/cpu/events/PM_LSU_FIN | ||
439 | /sys/devices/cpu/events/PM_MRK_LSU_REJECT | ||
440 | /sys/devices/cpu/events/PM_L2_CO_FAIL_BUSY | ||
441 | /sys/devices/cpu/events/PM_MEM0_WQ_DISP | ||
442 | /sys/devices/cpu/events/PM_DATA_FROM_L31_MOD | ||
443 | /sys/devices/cpu/events/PM_THERMAL_WARN | ||
444 | /sys/devices/cpu/events/PM_VSU0_4FLOP | ||
445 | /sys/devices/cpu/events/PM_BR_MPRED_CCACHE | ||
446 | /sys/devices/cpu/events/PM_L1_DEMAND_WRITE | ||
447 | /sys/devices/cpu/events/PM_FLUSH_BR_MPRED | ||
448 | /sys/devices/cpu/events/PM_MRK_DTLB_MISS_16G | ||
449 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_DMEM | ||
450 | /sys/devices/cpu/events/PM_L2_RCST_DISP | ||
451 | /sys/devices/cpu/events/PM_LSU_PARTIAL_CDF | ||
452 | /sys/devices/cpu/events/PM_DISP_CLB_HELD_SB | ||
453 | /sys/devices/cpu/events/PM_VSU0_FMA_DOUBLE | ||
454 | /sys/devices/cpu/events/PM_FXU0_BUSY_FXU1_IDLE | ||
455 | /sys/devices/cpu/events/PM_IC_DEMAND_CYC | ||
456 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L21_SHR | ||
457 | /sys/devices/cpu/events/PM_MRK_LSU_FLUSH_UST | ||
458 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L3MISS | ||
459 | /sys/devices/cpu/events/PM_VSU_DENORM | ||
460 | /sys/devices/cpu/events/PM_MRK_LSU_PARTIAL_CDF | ||
461 | /sys/devices/cpu/events/PM_INST_FROM_L21_SHR | ||
462 | /sys/devices/cpu/events/PM_IC_PREF_WRITE | ||
463 | /sys/devices/cpu/events/PM_BR_PRED | ||
464 | /sys/devices/cpu/events/PM_INST_FROM_DMEM | ||
465 | /sys/devices/cpu/events/PM_IC_PREF_CANCEL_ALL | ||
466 | /sys/devices/cpu/events/PM_LSU_DC_PREF_STREAM_CONFIRM | ||
467 | /sys/devices/cpu/events/PM_MRK_LSU_FLUSH_SRQ | ||
468 | /sys/devices/cpu/events/PM_MRK_FIN_STALL_CYC | ||
469 | /sys/devices/cpu/events/PM_L2_RCST_DISP_FAIL_OTHER | ||
470 | /sys/devices/cpu/events/PM_VSU1_DD_ISSUED | ||
471 | /sys/devices/cpu/events/PM_PTEG_FROM_L31_SHR | ||
472 | /sys/devices/cpu/events/PM_DATA_FROM_L21_SHR | ||
473 | /sys/devices/cpu/events/PM_LSU0_NCLD | ||
474 | /sys/devices/cpu/events/PM_VSU1_4FLOP | ||
475 | /sys/devices/cpu/events/PM_VSU1_8FLOP | ||
476 | /sys/devices/cpu/events/PM_VSU_8FLOP | ||
477 | /sys/devices/cpu/events/PM_LSU_LMQ_SRQ_EMPTY_CYC | ||
478 | /sys/devices/cpu/events/PM_DTLB_MISS_64K | ||
479 | /sys/devices/cpu/events/PM_THRD_CONC_RUN_INST | ||
480 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L2 | ||
481 | /sys/devices/cpu/events/PM_PB_SYS_PUMP | ||
482 | /sys/devices/cpu/events/PM_VSU_FIN | ||
483 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L31_MOD | ||
484 | /sys/devices/cpu/events/PM_THRD_PRIO_0_1_CYC | ||
485 | /sys/devices/cpu/events/PM_DERAT_MISS_64K | ||
486 | /sys/devices/cpu/events/PM_PMC2_REWIND | ||
487 | /sys/devices/cpu/events/PM_INST_FROM_L2 | ||
488 | /sys/devices/cpu/events/PM_GRP_BR_MPRED_NONSPEC | ||
489 | /sys/devices/cpu/events/PM_INST_DISP | ||
490 | /sys/devices/cpu/events/PM_MEM0_RD_CANCEL_TOTAL | ||
491 | /sys/devices/cpu/events/PM_LSU0_DC_PREF_STREAM_CONFIRM | ||
492 | /sys/devices/cpu/events/PM_L1_DCACHE_RELOAD_VALID | ||
493 | /sys/devices/cpu/events/PM_VSU_SCALAR_DOUBLE_ISSUED | ||
494 | /sys/devices/cpu/events/PM_L3_PREF_HIT | ||
495 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L31_MOD | ||
496 | /sys/devices/cpu/events/PM_MRK_FXU_FIN | ||
497 | /sys/devices/cpu/events/PM_PMC4_OVERFLOW | ||
498 | /sys/devices/cpu/events/PM_MRK_PTEG_FROM_L3 | ||
499 | /sys/devices/cpu/events/PM_LSU0_LMQ_LHR_MERGE | ||
500 | /sys/devices/cpu/events/PM_BTAC_HIT | ||
501 | /sys/devices/cpu/events/PM_L3_RD_BUSY | ||
502 | /sys/devices/cpu/events/PM_LSU0_L1_SW_PREF | ||
503 | /sys/devices/cpu/events/PM_INST_FROM_L2MISS | ||
504 | /sys/devices/cpu/events/PM_LSU0_DC_PREF_STREAM_ALLOC | ||
505 | /sys/devices/cpu/events/PM_L2_ST | ||
506 | /sys/devices/cpu/events/PM_VSU0_DENORM | ||
507 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DL2L3_SHR | ||
508 | /sys/devices/cpu/events/PM_BR_PRED_CR_TA | ||
509 | /sys/devices/cpu/events/PM_VSU0_FCONV | ||
510 | /sys/devices/cpu/events/PM_MRK_LSU_FLUSH_ULD | ||
511 | /sys/devices/cpu/events/PM_BTAC_MISS | ||
512 | /sys/devices/cpu/events/PM_MRK_LD_MISS_EXPOSED_CYC_COUNT | ||
513 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L2 | ||
514 | /sys/devices/cpu/events/PM_LSU_DCACHE_RELOAD_VALID | ||
515 | /sys/devices/cpu/events/PM_VSU_FMA | ||
516 | /sys/devices/cpu/events/PM_LSU0_FLUSH_SRQ | ||
517 | /sys/devices/cpu/events/PM_LSU1_L1_PREF | ||
518 | /sys/devices/cpu/events/PM_IOPS_CMPL | ||
519 | /sys/devices/cpu/events/PM_L2_SYS_PUMP | ||
520 | /sys/devices/cpu/events/PM_L2_RCLD_BUSY_RC_FULL | ||
521 | /sys/devices/cpu/events/PM_LSU_LMQ_S0_ALLOC | ||
522 | /sys/devices/cpu/events/PM_FLUSH_DISP_SYNC | ||
523 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_DL2L3_MOD_CYC | ||
524 | /sys/devices/cpu/events/PM_L2_IC_INV | ||
525 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L21_MOD_CYC | ||
526 | /sys/devices/cpu/events/PM_L3_PREF_LDST | ||
527 | /sys/devices/cpu/events/PM_LSU_SRQ_EMPTY_CYC | ||
528 | /sys/devices/cpu/events/PM_LSU_LMQ_S0_VALID | ||
529 | /sys/devices/cpu/events/PM_FLUSH_PARTIAL | ||
530 | /sys/devices/cpu/events/PM_VSU1_FMA_DOUBLE | ||
531 | /sys/devices/cpu/events/PM_1PLUS_PPC_DISP | ||
532 | /sys/devices/cpu/events/PM_DATA_FROM_L2MISS | ||
533 | /sys/devices/cpu/events/PM_SUSPENDED | ||
534 | /sys/devices/cpu/events/PM_VSU0_FMA | ||
535 | /sys/devices/cpu/events/PM_STCX_FAIL | ||
536 | /sys/devices/cpu/events/PM_VSU0_FSQRT_FDIV_DOUBLE | ||
537 | /sys/devices/cpu/events/PM_DC_PREF_DST | ||
538 | /sys/devices/cpu/events/PM_VSU1_SCAL_SINGLE_ISSUED | ||
539 | /sys/devices/cpu/events/PM_L3_HIT | ||
540 | /sys/devices/cpu/events/PM_L2_GLOB_GUESS_WRONG | ||
541 | /sys/devices/cpu/events/PM_MRK_DFU_FIN | ||
542 | /sys/devices/cpu/events/PM_INST_FROM_L1 | ||
543 | /sys/devices/cpu/events/PM_IC_DEMAND_REQ | ||
544 | /sys/devices/cpu/events/PM_VSU1_FSQRT_FDIV_DOUBLE | ||
545 | /sys/devices/cpu/events/PM_VSU1_FMA | ||
546 | /sys/devices/cpu/events/PM_MRK_LD_MISS_L1 | ||
547 | /sys/devices/cpu/events/PM_VSU0_2FLOP_DOUBLE | ||
548 | /sys/devices/cpu/events/PM_LSU_DC_PREF_STRIDED_STREAM_CONFIRM | ||
549 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_L31_SHR | ||
550 | /sys/devices/cpu/events/PM_MRK_LSU_REJECT_ERAT_MISS | ||
551 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_L2MISS | ||
552 | /sys/devices/cpu/events/PM_DATA_FROM_RL2L3_SHR | ||
553 | /sys/devices/cpu/events/PM_INST_FROM_PREF | ||
554 | /sys/devices/cpu/events/PM_VSU1_SQ | ||
555 | /sys/devices/cpu/events/PM_L2_LD_DISP | ||
556 | /sys/devices/cpu/events/PM_L2_DISP_ALL | ||
557 | /sys/devices/cpu/events/PM_THRD_GRP_CMPL_BOTH_CYC | ||
558 | /sys/devices/cpu/events/PM_VSU_FSQRT_FDIV_DOUBLE | ||
559 | /sys/devices/cpu/events/PM_INST_PTEG_FROM_DL2L3_SHR | ||
560 | /sys/devices/cpu/events/PM_VSU_1FLOP | ||
561 | /sys/devices/cpu/events/PM_HV_CYC | ||
562 | /sys/devices/cpu/events/PM_MRK_LSU_FIN | ||
563 | /sys/devices/cpu/events/PM_MRK_DATA_FROM_RL2L3_SHR | ||
564 | /sys/devices/cpu/events/PM_DTLB_MISS_16M | ||
565 | /sys/devices/cpu/events/PM_LSU1_LMQ_LHR_MERGE | ||
566 | /sys/devices/cpu/events/PM_IFU_FIN | ||
567 | /sys/devices/cpu/events/PM_1THRD_CON_RUN_INSTR | ||
568 | /sys/devices/cpu/events/PM_CMPLU_STALL_COUNT | ||
569 | /sys/devices/cpu/events/PM_MEM0_PB_RD_CL | ||
570 | /sys/devices/cpu/events/PM_THRD_1_RUN_CYC | ||
571 | /sys/devices/cpu/events/PM_THRD_2_CONC_RUN_INSTR | ||
572 | /sys/devices/cpu/events/PM_THRD_2_RUN_CYC | ||
573 | /sys/devices/cpu/events/PM_THRD_3_CONC_RUN_INST | ||
574 | /sys/devices/cpu/events/PM_THRD_3_RUN_CYC | ||
575 | /sys/devices/cpu/events/PM_THRD_4_CONC_RUN_INST | ||
576 | /sys/devices/cpu/events/PM_THRD_4_RUN_CYC | ||
60 | 577 | ||
61 | Date: 2013/01/08 | 578 | Date: 2013/01/08 |
62 | 579 | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7 b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7 new file mode 100644 index 000000000000..e78ee798d7bd --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7 | |||
@@ -0,0 +1,23 @@ | |||
1 | What: /sys/bus/event_source/devices/hv_24x7/interface/catalog | ||
2 | Date: February 2014 | ||
3 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
4 | Description: | ||
5 | Provides access to the binary "24x7 catalog" provided by the | ||
6 | hypervisor on POWER7 and 8 systems. This catalog lists events | ||
7 | avaliable from the powerpc "hv_24x7" pmu. Its format is | ||
8 | documented here: | ||
9 | https://raw.githubusercontent.com/jmesmon/catalog-24x7/master/hv-24x7-catalog.h | ||
10 | |||
11 | What: /sys/bus/event_source/devices/hv_24x7/interface/catalog_length | ||
12 | Date: February 2014 | ||
13 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
14 | Description: | ||
15 | A number equal to the length in bytes of the catalog. This is | ||
16 | also extractable from the provided binary "catalog" sysfs entry. | ||
17 | |||
18 | What: /sys/bus/event_source/devices/hv_24x7/interface/catalog_version | ||
19 | Date: February 2014 | ||
20 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
21 | Description: | ||
22 | Exposes the "version" field of the 24x7 catalog. This is also | ||
23 | extractable from the provided binary "catalog" sysfs entry. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci new file mode 100644 index 000000000000..3fa58c23f13b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci | |||
@@ -0,0 +1,43 @@ | |||
1 | What: /sys/bus/event_source/devices/hv_gpci/interface/collect_privileged | ||
2 | Date: February 2014 | ||
3 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
4 | Description: | ||
5 | '0' if the hypervisor is configured to forbid access to event | ||
6 | counters being accumulated by other guests and to physical | ||
7 | domain event counters. | ||
8 | '1' if that access is allowed. | ||
9 | |||
10 | What: /sys/bus/event_source/devices/hv_gpci/interface/ga | ||
11 | Date: February 2014 | ||
12 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
13 | Description: | ||
14 | 0 or 1. Indicates whether we have access to "GA" events (listed | ||
15 | in arch/powerpc/perf/hv-gpci.h). | ||
16 | |||
17 | What: /sys/bus/event_source/devices/hv_gpci/interface/expanded | ||
18 | Date: February 2014 | ||
19 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
20 | Description: | ||
21 | 0 or 1. Indicates whether we have access to "EXPANDED" events (listed | ||
22 | in arch/powerpc/perf/hv-gpci.h). | ||
23 | |||
24 | What: /sys/bus/event_source/devices/hv_gpci/interface/lab | ||
25 | Date: February 2014 | ||
26 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
27 | Description: | ||
28 | 0 or 1. Indicates whether we have access to "LAB" events (listed | ||
29 | in arch/powerpc/perf/hv-gpci.h). | ||
30 | |||
31 | What: /sys/bus/event_source/devices/hv_gpci/interface/version | ||
32 | Date: February 2014 | ||
33 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
34 | Description: | ||
35 | A number indicating the version of the gpci interface that the | ||
36 | hypervisor reports supporting. | ||
37 | |||
38 | What: /sys/bus/event_source/devices/hv_gpci/interface/kernel_version | ||
39 | Date: February 2014 | ||
40 | Contact: Cody P Schafer <cody@linux.vnet.ibm.com> | ||
41 | Description: | ||
42 | A number indicating the latest version of the gpci interface | ||
43 | that the kernel is aware of. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-mdio b/Documentation/ABI/testing/sysfs-bus-mdio index 6349749ebc29..491baaf4285f 100644 --- a/Documentation/ABI/testing/sysfs-bus-mdio +++ b/Documentation/ABI/testing/sysfs-bus-mdio | |||
@@ -7,3 +7,23 @@ Description: | |||
7 | by the device during bus enumeration, encoded in hexadecimal. | 7 | by the device during bus enumeration, encoded in hexadecimal. |
8 | This ID is used to match the device with the appropriate | 8 | This ID is used to match the device with the appropriate |
9 | driver. | 9 | driver. |
10 | |||
11 | What: /sys/bus/mdio_bus/devices/.../phy_interface | ||
12 | Date: February 2014 | ||
13 | KernelVersion: 3.15 | ||
14 | Contact: netdev@vger.kernel.org | ||
15 | Description: | ||
16 | This attribute contains the PHY interface as configured by the | ||
17 | Ethernet driver during bus enumeration, encoded in string. | ||
18 | This interface mode is used to configure the Ethernet MAC with the | ||
19 | appropriate mode for its data lines to the PHY hardware. | ||
20 | |||
21 | What: /sys/bus/mdio_bus/devices/.../phy_has_fixups | ||
22 | Date: February 2014 | ||
23 | KernelVersion: 3.15 | ||
24 | Contact: netdev@vger.kernel.org | ||
25 | Description: | ||
26 | This attribute contains the boolean value whether a given PHY | ||
27 | device has had any "fixup" workaround running on it, encoded as | ||
28 | a boolean. This information is provided to help troubleshooting | ||
29 | PHY configurations. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net new file mode 100644 index 000000000000..d922060e455d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net | |||
@@ -0,0 +1,199 @@ | |||
1 | What: /sys/class/net/<iface>/addr_assign_type | ||
2 | Date: July 2010 | ||
3 | KernelVersion: 3.2 | ||
4 | Contact: netdev@vger.kernel.org | ||
5 | Description: | ||
6 | Indicates the address assignment type. Possible values are: | ||
7 | 0: permanent address | ||
8 | 1: randomly generated | ||
9 | 2: stolen from another device | ||
10 | 3: set using dev_set_mac_address | ||
11 | |||
12 | What: /sys/class/net/<iface>/addr_len | ||
13 | Date: April 2005 | ||
14 | KernelVersion: 2.6.12 | ||
15 | Contact: netdev@vger.kernel.org | ||
16 | Description: | ||
17 | Indicates the hardware address size in bytes. | ||
18 | Values vary based on the lower-level protocol used by the | ||
19 | interface (Ethernet, FDDI, ATM, IEEE 802.15.4...). See | ||
20 | include/uapi/linux/if_*.h for actual values. | ||
21 | |||
22 | What: /sys/class/net/<iface>/address | ||
23 | Date: April 2005 | ||
24 | KernelVersion: 2.6.12 | ||
25 | Contact: netdev@vger.kernel.org | ||
26 | Description: | ||
27 | Hardware address currently assigned to this interface. | ||
28 | Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC | ||
29 | address. | ||
30 | |||
31 | What: /sys/class/net/<iface>/broadcast | ||
32 | Date: April 2005 | ||
33 | KernelVersion: 2.6.12 | ||
34 | Contact: netdev@vger.kernel.org | ||
35 | Description: | ||
36 | Hardware broadcast address for this interface. Format is a | ||
37 | string, e.g: ff:ff:ff:ff:ff:ff for an Ethernet broadcast MAC | ||
38 | address. | ||
39 | |||
40 | What: /sys/class/net/<iface>/carrier | ||
41 | Date: April 2005 | ||
42 | KernelVersion: 2.6.12 | ||
43 | Contact: netdev@vger.kernel.org | ||
44 | Description: | ||
45 | Indicates the current physical link state of the interface. | ||
46 | Posssible values are: | ||
47 | 0: physical link is down | ||
48 | 1: physical link is up | ||
49 | |||
50 | Note: some special devices, e.g: bonding and team drivers will | ||
51 | allow this attribute to be written to force a link state for | ||
52 | operating correctly and designating another fallback interface. | ||
53 | |||
54 | What: /sys/class/net/<iface>/dev_id | ||
55 | Date: April 2008 | ||
56 | KernelVersion: 2.6.26 | ||
57 | Contact: netdev@vger.kernel.org | ||
58 | Description: | ||
59 | Indicates the device unique identifier. Format is an hexadecimal | ||
60 | value. This is used to disambiguate interfaces which might be | ||
61 | stacked (e.g: VLAN interfaces) but still have the same MAC | ||
62 | address as their parent device. | ||
63 | |||
64 | What: /sys/class/net/<iface>/dormant | ||
65 | Date: March 2006 | ||
66 | KernelVersion: 2.6.17 | ||
67 | Contact: netdev@vger.kernel.org | ||
68 | Description: | ||
69 | Indicates whether the interface is in dormant state. Possible | ||
70 | values are: | ||
71 | 0: interface is not dormant | ||
72 | 1: interface is dormant | ||
73 | |||
74 | This attribute can be used by supplicant software to signal that | ||
75 | the device is not usable unless some supplicant-based | ||
76 | authentication is performed (e.g: 802.1x). 'link_mode' attribute | ||
77 | will also reflect the dormant state. | ||
78 | |||
79 | What: /sys/clas/net/<iface>/duplex | ||
80 | Date: October 2009 | ||
81 | KernelVersion: 2.6.33 | ||
82 | Contact: netdev@vger.kernel.org | ||
83 | Description: | ||
84 | Indicates the interface latest or current duplex value. Possible | ||
85 | values are: | ||
86 | half: half duplex | ||
87 | full: full duplex | ||
88 | |||
89 | Note: This attribute is only valid for interfaces that implement | ||
90 | the ethtool get_settings method (mostly Ethernet). | ||
91 | |||
92 | What: /sys/class/net/<iface>/flags | ||
93 | Date: April 2005 | ||
94 | KernelVersion: 2.6.12 | ||
95 | Contact: netdev@vger.kernel.org | ||
96 | Description: | ||
97 | Indicates the interface flags as a bitmask in hexadecimal. See | ||
98 | include/uapi/linux/if.h for a list of all possible values and | ||
99 | the flags semantics. | ||
100 | |||
101 | What: /sys/class/net/<iface>/ifalias | ||
102 | Date: September 2008 | ||
103 | KernelVersion: 2.6.28 | ||
104 | Contact: netdev@vger.kernel.org | ||
105 | Description: | ||
106 | Indicates/stores an interface alias name as a string. This can | ||
107 | be used for system management purposes. | ||
108 | |||
109 | What: /sys/class/net/<iface>/ifindex | ||
110 | Date: April 2005 | ||
111 | KernelVersion: 2.6.12 | ||
112 | Contact: netdev@vger.kernel.org | ||
113 | Description: | ||
114 | Indicates the system-wide interface unique index identifier as a | ||
115 | decimal number. This attribute is used for mapping an interface | ||
116 | identifier to an interface name. It is used throughout the | ||
117 | networking stack for specifying the interface specific | ||
118 | requests/events. | ||
119 | |||
120 | What: /sys/class/net/<iface>/iflink | ||
121 | Date: April 2005 | ||
122 | KernelVersion: 2.6.12 | ||
123 | Contact: netdev@vger.kernel.org | ||
124 | Description: | ||
125 | Indicates the system-wide interface unique index identifier a | ||
126 | the interface is linked to. Format is decimal. This attribute is | ||
127 | used to resolve interfaces chaining, linking and stacking. | ||
128 | Physical interfaces have the same 'ifindex' and 'iflink' values. | ||
129 | |||
130 | What: /sys/class/net/<iface>/link_mode | ||
131 | Date: March 2006 | ||
132 | KernelVersion: 2.6.17 | ||
133 | Contact: netdev@vger.kernel.org | ||
134 | Description: | ||
135 | Indicates the interface link mode, as a decimal number. This | ||
136 | attribute should be used in conjunction with 'dormant' attribute | ||
137 | to determine the interface usability. Possible values: | ||
138 | 0: default link mode | ||
139 | 1: dormant link mode | ||
140 | |||
141 | What: /sys/class/net/<iface>/mtu | ||
142 | Date: April 2005 | ||
143 | KernelVersion: 2.6.12 | ||
144 | Contact: netdev@vger.kernel.org | ||
145 | Description: | ||
146 | Indicates the interface currently configured MTU value, in | ||
147 | bytes, and in decimal format. Specific values depends on the | ||
148 | lower-level interface protocol used. Ethernet devices will show | ||
149 | a 'mtu' attribute value of 1500 unless changed. | ||
150 | |||
151 | What: /sys/calss/net/<iface>/netdev_group | ||
152 | Date: January 2011 | ||
153 | KernelVersion: 2.6.39 | ||
154 | Contact: netdev@vger.kernel.org | ||
155 | Description: | ||
156 | Indicates the interface network device group, as a decimal | ||
157 | integer. Default value is 0 which corresponds to the initial | ||
158 | network devices group. The group can be changed to affect | ||
159 | routing decisions (see: net/ipv4/fib_rules and | ||
160 | net/ipv6/fib6_rules.c). | ||
161 | |||
162 | What: /sys/class/net/<iface>/operstate | ||
163 | Date: March 2006 | ||
164 | KernelVersion: 2.6.17 | ||
165 | Contact: netdev@vger.kernel.org | ||
166 | Description: | ||
167 | Indicates the interface RFC2863 operational state as a string. | ||
168 | Possible values are: | ||
169 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", | ||
170 | "dormant", "up". | ||
171 | |||
172 | What: /sys/class/net/<iface>/speed | ||
173 | Date: October 2009 | ||
174 | KernelVersion: 2.6.33 | ||
175 | Contact: netdev@vger.kernel.org | ||
176 | Description: | ||
177 | Indicates the interface latest or current speed value. Value is | ||
178 | an integer representing the link speed in Mbits/sec. | ||
179 | |||
180 | Note: this attribute is only valid for interfaces that implement | ||
181 | the ethtool get_settings method (mostly Ethernet ). | ||
182 | |||
183 | What: /sys/class/net/<iface>/tx_queue_len | ||
184 | Date: April 2005 | ||
185 | KernelVersion: 2.6.12 | ||
186 | Contact: netdev@vger.kernel.org | ||
187 | Description: | ||
188 | Indicates the interface transmit queue len in number of packets, | ||
189 | as an integer value. Value depend on the type of interface, | ||
190 | Ethernet network adapters have a default value of 1000 unless | ||
191 | configured otherwise | ||
192 | |||
193 | What: /sys/class/net/<iface>/type | ||
194 | Date: April 2005 | ||
195 | KernelVersion: 2.6.12 | ||
196 | Contact: netdev@vger.kernel.org | ||
197 | Description: | ||
198 | Indicates the interface protocol type as a decimal value. See | ||
199 | include/uapi/linux/if_arp.h for all possible values. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh index 4793d3dff6af..c46406296631 100644 --- a/Documentation/ABI/testing/sysfs-class-net-mesh +++ b/Documentation/ABI/testing/sysfs-class-net-mesh | |||
@@ -76,6 +76,15 @@ Description: | |||
76 | is used to classify clients as "isolated" by the | 76 | is used to classify clients as "isolated" by the |
77 | Extended Isolation feature. | 77 | Extended Isolation feature. |
78 | 78 | ||
79 | What: /sys/class/net/<mesh_iface>/mesh/multicast_mode | ||
80 | Date: Feb 2014 | ||
81 | Contact: Linus Lüssing <linus.luessing@web.de> | ||
82 | Description: | ||
83 | Indicates whether multicast optimizations are enabled | ||
84 | or disabled. If set to zero then all nodes in the | ||
85 | mesh are going to use classic flooding for any | ||
86 | multicast packet with no optimizations. | ||
87 | |||
79 | What: /sys/class/net/<mesh_iface>/mesh/network_coding | 88 | What: /sys/class/net/<mesh_iface>/mesh/network_coding |
80 | Date: Nov 2012 | 89 | Date: Nov 2012 |
81 | Contact: Martin Hundeboll <martin@hundeboll.net> | 90 | Contact: Martin Hundeboll <martin@hundeboll.net> |
diff --git a/Documentation/ABI/testing/sysfs-class-rc b/Documentation/ABI/testing/sysfs-class-rc new file mode 100644 index 000000000000..b65674da43bb --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-rc | |||
@@ -0,0 +1,111 @@ | |||
1 | What: /sys/class/rc/ | ||
2 | Date: Apr 2010 | ||
3 | KernelVersion: 2.6.35 | ||
4 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
5 | Description: | ||
6 | The rc/ class sub-directory belongs to the Remote Controller | ||
7 | core and provides a sysfs interface for configuring infrared | ||
8 | remote controller receivers. | ||
9 | |||
10 | What: /sys/class/rc/rcN/ | ||
11 | Date: Apr 2010 | ||
12 | KernelVersion: 2.6.35 | ||
13 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
14 | Description: | ||
15 | A /sys/class/rc/rcN directory is created for each remote | ||
16 | control receiver device where N is the number of the receiver. | ||
17 | |||
18 | What: /sys/class/rc/rcN/protocols | ||
19 | Date: Jun 2010 | ||
20 | KernelVersion: 2.6.36 | ||
21 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
22 | Description: | ||
23 | Reading this file returns a list of available protocols, | ||
24 | something like: | ||
25 | "rc5 [rc6] nec jvc [sony]" | ||
26 | Enabled protocols are shown in [] brackets. | ||
27 | Writing "+proto" will add a protocol to the list of enabled | ||
28 | protocols. | ||
29 | Writing "-proto" will remove a protocol from the list of enabled | ||
30 | protocols. | ||
31 | Writing "proto" will enable only "proto". | ||
32 | Writing "none" will disable all protocols. | ||
33 | Write fails with EINVAL if an invalid protocol combination or | ||
34 | unknown protocol name is used. | ||
35 | |||
36 | What: /sys/class/rc/rcN/filter | ||
37 | Date: Jan 2014 | ||
38 | KernelVersion: 3.15 | ||
39 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
40 | Description: | ||
41 | Sets the scancode filter expected value. | ||
42 | Use in combination with /sys/class/rc/rcN/filter_mask to set the | ||
43 | expected value of the bits set in the filter mask. | ||
44 | If the hardware supports it then scancodes which do not match | ||
45 | the filter will be ignored. Otherwise the write will fail with | ||
46 | an error. | ||
47 | This value may be reset to 0 if the current protocol is altered. | ||
48 | |||
49 | What: /sys/class/rc/rcN/filter_mask | ||
50 | Date: Jan 2014 | ||
51 | KernelVersion: 3.15 | ||
52 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
53 | Description: | ||
54 | Sets the scancode filter mask of bits to compare. | ||
55 | Use in combination with /sys/class/rc/rcN/filter to set the bits | ||
56 | of the scancode which should be compared against the expected | ||
57 | value. A value of 0 disables the filter to allow all valid | ||
58 | scancodes to be processed. | ||
59 | If the hardware supports it then scancodes which do not match | ||
60 | the filter will be ignored. Otherwise the write will fail with | ||
61 | an error. | ||
62 | This value may be reset to 0 if the current protocol is altered. | ||
63 | |||
64 | What: /sys/class/rc/rcN/wakeup_protocols | ||
65 | Date: Feb 2014 | ||
66 | KernelVersion: 3.15 | ||
67 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
68 | Description: | ||
69 | Reading this file returns a list of available protocols to use | ||
70 | for the wakeup filter, something like: | ||
71 | "rc5 rc6 nec jvc [sony]" | ||
72 | The enabled wakeup protocol is shown in [] brackets. | ||
73 | Writing "+proto" will add a protocol to the list of enabled | ||
74 | wakeup protocols. | ||
75 | Writing "-proto" will remove a protocol from the list of enabled | ||
76 | wakeup protocols. | ||
77 | Writing "proto" will use "proto" for wakeup events. | ||
78 | Writing "none" will disable wakeup. | ||
79 | Write fails with EINVAL if an invalid protocol combination or | ||
80 | unknown protocol name is used, or if wakeup is not supported by | ||
81 | the hardware. | ||
82 | |||
83 | What: /sys/class/rc/rcN/wakeup_filter | ||
84 | Date: Jan 2014 | ||
85 | KernelVersion: 3.15 | ||
86 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
87 | Description: | ||
88 | Sets the scancode wakeup filter expected value. | ||
89 | Use in combination with /sys/class/rc/rcN/wakeup_filter_mask to | ||
90 | set the expected value of the bits set in the wakeup filter mask | ||
91 | to trigger a system wake event. | ||
92 | If the hardware supports it and wakeup_filter_mask is not 0 then | ||
93 | scancodes which match the filter will wake the system from e.g. | ||
94 | suspend to RAM or power off. | ||
95 | Otherwise the write will fail with an error. | ||
96 | This value may be reset to 0 if the wakeup protocol is altered. | ||
97 | |||
98 | What: /sys/class/rc/rcN/wakeup_filter_mask | ||
99 | Date: Jan 2014 | ||
100 | KernelVersion: 3.15 | ||
101 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> | ||
102 | Description: | ||
103 | Sets the scancode wakeup filter mask of bits to compare. | ||
104 | Use in combination with /sys/class/rc/rcN/wakeup_filter to set | ||
105 | the bits of the scancode which should be compared against the | ||
106 | expected value to trigger a system wake event. | ||
107 | If the hardware supports it and wakeup_filter_mask is not 0 then | ||
108 | scancodes which match the filter will wake the system from e.g. | ||
109 | suspend to RAM or power off. | ||
110 | Otherwise the write will fail with an error. | ||
111 | This value may be reset to 0 if the wakeup protocol is altered. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-scsi_host b/Documentation/ABI/testing/sysfs-class-scsi_host index 29a4f892e433..0eb255e7db12 100644 --- a/Documentation/ABI/testing/sysfs-class-scsi_host +++ b/Documentation/ABI/testing/sysfs-class-scsi_host | |||
@@ -11,3 +11,19 @@ Description: | |||
11 | guaranteed. The 'isci_id' attribute unambiguously identifies | 11 | guaranteed. The 'isci_id' attribute unambiguously identifies |
12 | the controller index: '0' for the first controller, | 12 | the controller index: '0' for the first controller, |
13 | '1' for the second. | 13 | '1' for the second. |
14 | |||
15 | What: /sys/class/scsi_host/hostX/acciopath_status | ||
16 | Date: November 2013 | ||
17 | Contact: Stephen M. Cameron <scameron@beardog.cce.hp.com> | ||
18 | Description: This file contains the current status of the "SSD Smart Path" | ||
19 | feature of HP Smart Array RAID controllers using the hpsa | ||
20 | driver. SSD Smart Path, when enabled permits the driver to | ||
21 | send i/o requests directly to physical devices that are part | ||
22 | of a logical drive, bypassing the controllers firmware RAID | ||
23 | stack for a performance advantage when possible. A value of | ||
24 | '1' indicates the feature is enabled, and the controller may | ||
25 | use the direct i/o path to physical devices. A value of zero | ||
26 | means the feature is disabled and the controller may not use | ||
27 | the direct i/o path to physical devices. This setting is | ||
28 | controller wide, affecting all configured logical drives on the | ||
29 | controller. This file is readable and writable. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power index efe449bdf811..7dbf96b724ed 100644 --- a/Documentation/ABI/testing/sysfs-devices-power +++ b/Documentation/ABI/testing/sysfs-devices-power | |||
@@ -187,7 +187,7 @@ Description: | |||
187 | Not all drivers support this attribute. If it isn't supported, | 187 | Not all drivers support this attribute. If it isn't supported, |
188 | attempts to read or write it will yield I/O errors. | 188 | attempts to read or write it will yield I/O errors. |
189 | 189 | ||
190 | What: /sys/devices/.../power/pm_qos_latency_us | 190 | What: /sys/devices/.../power/pm_qos_resume_latency_us |
191 | Date: March 2012 | 191 | Date: March 2012 |
192 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | 192 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> |
193 | Description: | 193 | Description: |
@@ -205,6 +205,31 @@ Description: | |||
205 | This attribute has no effect on system-wide suspend/resume and | 205 | This attribute has no effect on system-wide suspend/resume and |
206 | hibernation. | 206 | hibernation. |
207 | 207 | ||
208 | What: /sys/devices/.../power/pm_qos_latency_tolerance_us | ||
209 | Date: January 2014 | ||
210 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
211 | Description: | ||
212 | The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute | ||
213 | contains the PM QoS active state latency tolerance limit for the | ||
214 | given device in microseconds. That is the maximum memory access | ||
215 | latency the device can suffer without any visible adverse | ||
216 | effects on user space functionality. If that value is the | ||
217 | string "any", the latency does not matter to user space at all, | ||
218 | but hardware should not be allowed to set the latency tolerance | ||
219 | for the device automatically. | ||
220 | |||
221 | Reading "auto" from this file means that the maximum memory | ||
222 | access latency for the device may be determined automatically | ||
223 | by the hardware as needed. Writing "auto" to it allows the | ||
224 | hardware to be switched to this mode if there are no other | ||
225 | latency tolerance requirements from the kernel side. | ||
226 | |||
227 | This attribute is only present if the feature controlled by it | ||
228 | is supported by the hardware. | ||
229 | |||
230 | This attribute has no effect on runtime suspend and resume of | ||
231 | devices and on system-wide suspend/resume and hibernation. | ||
232 | |||
208 | What: /sys/devices/.../power/pm_qos_no_power_off | 233 | What: /sys/devices/.../power/pm_qos_no_power_off |
209 | Date: September 2012 | 234 | Date: September 2012 |
210 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | 235 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> |
diff --git a/Documentation/ABI/testing/sysfs-firmware-ofw b/Documentation/ABI/testing/sysfs-firmware-ofw new file mode 100644 index 000000000000..f562b188e71d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-firmware-ofw | |||
@@ -0,0 +1,28 @@ | |||
1 | What: /sys/firmware/devicetree/* | ||
2 | Date: November 2013 | ||
3 | Contact: Grant Likely <grant.likely@linaro.org> | ||
4 | Description: | ||
5 | When using OpenFirmware or a Flattened Device Tree to enumerate | ||
6 | hardware, the device tree structure will be exposed in this | ||
7 | directory. | ||
8 | |||
9 | It is possible for multiple device-tree directories to exist. | ||
10 | Some device drivers use a separate detached device tree which | ||
11 | have no attachment to the system tree and will appear in a | ||
12 | different subdirectory under /sys/firmware/devicetree. | ||
13 | |||
14 | Userspace must not use the /sys/firmware/devicetree/base | ||
15 | path directly, but instead should follow /proc/device-tree | ||
16 | symlink. It is possible that the absolute path will change | ||
17 | in the future, but the symlink is the stable ABI. | ||
18 | |||
19 | The /proc/device-tree symlink replaces the devicetree /proc | ||
20 | filesystem support, and has largely the same semantics and | ||
21 | should be compatible with existing userspace. | ||
22 | |||
23 | The contents of /sys/firmware/devicetree/ is a | ||
24 | hierarchy of directories, one per device tree node. The | ||
25 | directory name is the resolved path component name (node | ||
26 | name plus address). Properties are represented as files | ||
27 | in the directory. The contents of each file is the exact | ||
28 | binary data from the device tree. | ||
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index 32b0809203dd..62dd72522d6e 100644 --- a/Documentation/ABI/testing/sysfs-fs-f2fs +++ b/Documentation/ABI/testing/sysfs-fs-f2fs | |||
@@ -55,3 +55,15 @@ Date: January 2014 | |||
55 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> | 55 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> |
56 | Description: | 56 | Description: |
57 | Controls the number of trials to find a victim segment. | 57 | Controls the number of trials to find a victim segment. |
58 | |||
59 | What: /sys/fs/f2fs/<disk>/dir_level | ||
60 | Date: March 2014 | ||
61 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> | ||
62 | Description: | ||
63 | Controls the directory level for large directory. | ||
64 | |||
65 | What: /sys/fs/f2fs/<disk>/ram_thresh | ||
66 | Date: March 2014 | ||
67 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> | ||
68 | Description: | ||
69 | Controls the memory footprint used by f2fs. | ||
diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module index 47064c2b1f79..0aac02e7fb0e 100644 --- a/Documentation/ABI/testing/sysfs-module +++ b/Documentation/ABI/testing/sysfs-module | |||
@@ -49,3 +49,4 @@ Description: Module taint flags: | |||
49 | O - out-of-tree module | 49 | O - out-of-tree module |
50 | F - force-loaded module | 50 | F - force-loaded module |
51 | C - staging driver module | 51 | C - staging driver module |
52 | E - unsigned module | ||
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index 205a73878441..64c9276e9421 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power | |||
@@ -12,8 +12,9 @@ Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | |||
12 | Description: | 12 | Description: |
13 | The /sys/power/state file controls the system power state. | 13 | The /sys/power/state file controls the system power state. |
14 | Reading from this file returns what states are supported, | 14 | Reading from this file returns what states are supported, |
15 | which is hard-coded to 'standby' (Power-On Suspend), 'mem' | 15 | which is hard-coded to 'freeze' (Low-Power Idle), 'standby' |
16 | (Suspend-to-RAM), and 'disk' (Suspend-to-Disk). | 16 | (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' |
17 | (Suspend-to-Disk). | ||
17 | 18 | ||
18 | Writing to this file one of these strings causes the system to | 19 | Writing to this file one of these strings causes the system to |
19 | transition into that state. Please see the file | 20 | transition into that state. Please see the file |
diff --git a/Documentation/ABI/testing/sysfs-ptp b/Documentation/ABI/testing/sysfs-ptp index 05aeedf17794..44806a678f12 100644 --- a/Documentation/ABI/testing/sysfs-ptp +++ b/Documentation/ABI/testing/sysfs-ptp | |||
@@ -54,6 +54,26 @@ Description: | |||
54 | This file contains the number of programmable periodic | 54 | This file contains the number of programmable periodic |
55 | output channels offered by the PTP hardware clock. | 55 | output channels offered by the PTP hardware clock. |
56 | 56 | ||
57 | What: /sys/class/ptp/ptpN/n_pins | ||
58 | Date: March 2014 | ||
59 | Contact: Richard Cochran <richardcochran@gmail.com> | ||
60 | Description: | ||
61 | This file contains the number of programmable pins | ||
62 | offered by the PTP hardware clock. | ||
63 | |||
64 | What: /sys/class/ptp/ptpN/pins | ||
65 | Date: March 2014 | ||
66 | Contact: Richard Cochran <richardcochran@gmail.com> | ||
67 | Description: | ||
68 | This directory contains one file for each programmable | ||
69 | pin offered by the PTP hardware clock. The file name | ||
70 | is the hardware dependent pin name. Reading from this | ||
71 | file produces two numbers, the assigned function (see | ||
72 | the PTP_PF_ enumeration values in linux/ptp_clock.h) | ||
73 | and the channel number. The function and channel | ||
74 | assignment may be changed by two writing numbers into | ||
75 | the file. | ||
76 | |||
57 | What: /sys/class/ptp/ptpN/pps_avaiable | 77 | What: /sys/class/ptp/ptpN/pps_avaiable |
58 | Date: September 2010 | 78 | Date: September 2010 |
59 | Contact: Richard Cochran <richardcochran@gmail.com> | 79 | Contact: Richard Cochran <richardcochran@gmail.com> |
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 46ad6faee9ab..044b76436e83 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -98,6 +98,8 @@ | |||
98 | !Finclude/net/cfg80211.h priv_to_wiphy | 98 | !Finclude/net/cfg80211.h priv_to_wiphy |
99 | !Finclude/net/cfg80211.h set_wiphy_dev | 99 | !Finclude/net/cfg80211.h set_wiphy_dev |
100 | !Finclude/net/cfg80211.h wdev_priv | 100 | !Finclude/net/cfg80211.h wdev_priv |
101 | !Finclude/net/cfg80211.h ieee80211_iface_limit | ||
102 | !Finclude/net/cfg80211.h ieee80211_iface_combination | ||
101 | </chapter> | 103 | </chapter> |
102 | <chapter> | 104 | <chapter> |
103 | <title>Actions and configuration</title> | 105 | <title>Actions and configuration</title> |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 0f9c6ff41aac..b444f2e8fe32 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -14,9 +14,9 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ | |||
14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ | 15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ |
16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ | 16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ |
17 | tracepoint.xml drm.xml media_api.xml | 17 | tracepoint.xml drm.xml media_api.xml w1.xml |
18 | 18 | ||
19 | include $(srctree)/Documentation/DocBook/media/Makefile | 19 | include Documentation/DocBook/media/Makefile |
20 | 20 | ||
21 | ### | 21 | ### |
22 | # The build process is as follows (targets): | 22 | # The build process is as follows (targets): |
@@ -36,6 +36,7 @@ PS_METHOD = $(prefer-db2x) | |||
36 | # The targets that may be used. | 36 | # The targets that may be used. |
37 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs | 37 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs |
38 | 38 | ||
39 | targets += $(DOCBOOKS) | ||
39 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 40 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
40 | xmldocs: $(BOOKS) | 41 | xmldocs: $(BOOKS) |
41 | sgmldocs: xmldocs | 42 | sgmldocs: xmldocs |
@@ -58,14 +59,14 @@ mandocs: $(MAN) | |||
58 | 59 | ||
59 | installmandocs: mandocs | 60 | installmandocs: mandocs |
60 | mkdir -p /usr/local/man/man9/ | 61 | mkdir -p /usr/local/man/man9/ |
61 | install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/ | 62 | install $(obj)/man/*.9.gz /usr/local/man/man9/ |
62 | 63 | ||
63 | ### | 64 | ### |
64 | #External programs used | 65 | #External programs used |
65 | KERNELDOC = $(srctree)/scripts/kernel-doc | 66 | KERNELDOC = $(srctree)/scripts/kernel-doc |
66 | DOCPROC = $(objtree)/scripts/docproc | 67 | DOCPROC = $(objtree)/scripts/docproc |
67 | 68 | ||
68 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl | 69 | XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl |
69 | XMLTOFLAGS += --skip-validation | 70 | XMLTOFLAGS += --skip-validation |
70 | 71 | ||
71 | ### | 72 | ### |
@@ -87,21 +88,9 @@ define rule_docproc | |||
87 | ) > $(dir $@).$(notdir $@).cmd | 88 | ) > $(dir $@).$(notdir $@).cmd |
88 | endef | 89 | endef |
89 | 90 | ||
90 | %.xml: %.tmpl FORCE | 91 | %.xml: %.tmpl $(KERNELDOC) $(DOCPROC) FORCE |
91 | $(call if_changed_rule,docproc) | 92 | $(call if_changed_rule,docproc) |
92 | 93 | ||
93 | ### | ||
94 | #Read in all saved dependency files | ||
95 | cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) | ||
96 | |||
97 | ifneq ($(cmd_files),) | ||
98 | include $(cmd_files) | ||
99 | endif | ||
100 | |||
101 | ### | ||
102 | # Changes in kernel-doc force a rebuild of all documentation | ||
103 | $(BOOKS): $(KERNELDOC) | ||
104 | |||
105 | # Tell kbuild to always build the programs | 94 | # Tell kbuild to always build the programs |
106 | always := $(hostprogs-y) | 95 | always := $(hostprogs-y) |
107 | 96 | ||
@@ -139,7 +128,7 @@ quiet_cmd_db2pdf = PDF $@ | |||
139 | 128 | ||
140 | 129 | ||
141 | index = index.html | 130 | index = index.html |
142 | main_idx = Documentation/DocBook/$(index) | 131 | main_idx = $(obj)/$(index) |
143 | build_main_index = rm -rf $(main_idx); \ | 132 | build_main_index = rm -rf $(main_idx); \ |
144 | echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ | 133 | echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ |
145 | echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ | 134 | echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ |
@@ -148,7 +137,7 @@ build_main_index = rm -rf $(main_idx); \ | |||
148 | quiet_cmd_db2html = HTML $@ | 137 | quiet_cmd_db2html = HTML $@ |
149 | cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ | 138 | cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ |
150 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ | 139 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ |
151 | $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ | 140 | $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ |
152 | 141 | ||
153 | %.html: %.xml | 142 | %.html: %.xml |
154 | @(which xmlto > /dev/null 2>&1) || \ | 143 | @(which xmlto > /dev/null 2>&1) || \ |
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index d0758b241b23..e84f09467cd7 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl | |||
@@ -671,7 +671,7 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress); | |||
671 | 671 | ||
672 | <sect1 id="routines-local-irqs"> | 672 | <sect1 id="routines-local-irqs"> |
673 | <title><function>local_irq_save()</function>/<function>local_irq_restore()</function> | 673 | <title><function>local_irq_save()</function>/<function>local_irq_restore()</function> |
674 | <filename class="headerfile">include/asm/system.h</filename> | 674 | <filename class="headerfile">include/linux/irqflags.h</filename> |
675 | </title> | 675 | </title> |
676 | 676 | ||
677 | <para> | 677 | <para> |
@@ -850,16 +850,6 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress); | |||
850 | <returnvalue>-ERESTARTSYS</returnvalue> if a signal is received. | 850 | <returnvalue>-ERESTARTSYS</returnvalue> if a signal is received. |
851 | The <function>wait_event()</function> version ignores signals. | 851 | The <function>wait_event()</function> version ignores signals. |
852 | </para> | 852 | </para> |
853 | <para> | ||
854 | Do not use the <function>sleep_on()</function> function family - | ||
855 | it is very easy to accidentally introduce races; almost certainly | ||
856 | one of the <function>wait_event()</function> family will do, or a | ||
857 | loop around <function>schedule_timeout()</function>. If you choose | ||
858 | to loop around <function>schedule_timeout()</function> remember | ||
859 | you must set the task state (with | ||
860 | <function>set_current_state()</function>) on each iteration to avoid | ||
861 | busy-looping. | ||
862 | </para> | ||
863 | 853 | ||
864 | </sect1> | 854 | </sect1> |
865 | 855 | ||
diff --git a/Documentation/DocBook/media/dvb/demux.xml b/Documentation/DocBook/media/dvb/demux.xml index 86de89cfbd67..c8683d66f059 100644 --- a/Documentation/DocBook/media/dvb/demux.xml +++ b/Documentation/DocBook/media/dvb/demux.xml | |||
@@ -1042,7 +1042,14 @@ role="subsection"><title>DMX_ADD_PID</title> | |||
1042 | </para> | 1042 | </para> |
1043 | <informaltable><tgroup cols="1"><tbody><row><entry | 1043 | <informaltable><tgroup cols="1"><tbody><row><entry |
1044 | align="char"> | 1044 | align="char"> |
1045 | <para>This ioctl is undocumented. Documentation is welcome.</para> | 1045 | <para>This ioctl call allows to add multiple PIDs to a transport stream filter |
1046 | previously set up with DMX_SET_PES_FILTER and output equal to DMX_OUT_TSDEMUX_TAP. | ||
1047 | </para></entry></row><row><entry align="char"><para> | ||
1048 | It is used by readers of /dev/dvb/adapterX/demuxY. | ||
1049 | </para></entry></row><row><entry align="char"><para> | ||
1050 | It may be called at any time, i.e. before or after the first filter on the | ||
1051 | shared file descriptor was started. It makes it possible to record multiple | ||
1052 | services without the need to de-multiplex or re-multiplex TS packets.</para> | ||
1046 | </entry> | 1053 | </entry> |
1047 | </row></tbody></tgroup></informaltable> | 1054 | </row></tbody></tgroup></informaltable> |
1048 | <para>SYNOPSIS | 1055 | <para>SYNOPSIS |
@@ -1075,7 +1082,7 @@ role="subsection"><title>DMX_ADD_PID</title> | |||
1075 | </para> | 1082 | </para> |
1076 | </entry><entry | 1083 | </entry><entry |
1077 | align="char"> | 1084 | align="char"> |
1078 | <para>Undocumented.</para> | 1085 | <para>PID number to be filtered.</para> |
1079 | </entry> | 1086 | </entry> |
1080 | </row></tbody></tgroup></informaltable> | 1087 | </row></tbody></tgroup></informaltable> |
1081 | &return-value-dvb; | 1088 | &return-value-dvb; |
@@ -1087,7 +1094,15 @@ role="subsection"><title>DMX_REMOVE_PID</title> | |||
1087 | </para> | 1094 | </para> |
1088 | <informaltable><tgroup cols="1"><tbody><row><entry | 1095 | <informaltable><tgroup cols="1"><tbody><row><entry |
1089 | align="char"> | 1096 | align="char"> |
1090 | <para>This ioctl is undocumented. Documentation is welcome.</para> | 1097 | <para>This ioctl call allows to remove a PID when multiple PIDs are set on a |
1098 | transport stream filter, e. g. a filter previously set up with output equal to | ||
1099 | DMX_OUT_TSDEMUX_TAP, created via either DMX_SET_PES_FILTER or DMX_ADD_PID. | ||
1100 | </para></entry></row><row><entry align="char"><para> | ||
1101 | It is used by readers of /dev/dvb/adapterX/demuxY. | ||
1102 | </para></entry></row><row><entry align="char"><para> | ||
1103 | It may be called at any time, i.e. before or after the first filter on the | ||
1104 | shared file descriptor was started. It makes it possible to record multiple | ||
1105 | services without the need to de-multiplex or re-multiplex TS packets.</para> | ||
1091 | </entry> | 1106 | </entry> |
1092 | </row></tbody></tgroup></informaltable> | 1107 | </row></tbody></tgroup></informaltable> |
1093 | <para>SYNOPSIS | 1108 | <para>SYNOPSIS |
@@ -1120,7 +1135,7 @@ role="subsection"><title>DMX_REMOVE_PID</title> | |||
1120 | </para> | 1135 | </para> |
1121 | </entry><entry | 1136 | </entry><entry |
1122 | align="char"> | 1137 | align="char"> |
1123 | <para>Undocumented.</para> | 1138 | <para>PID of the PES filter to be removed.</para> |
1124 | </entry> | 1139 | </entry> |
1125 | </row></tbody></tgroup></informaltable> | 1140 | </row></tbody></tgroup></informaltable> |
1126 | &return-value-dvb; | 1141 | &return-value-dvb; |
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml index 0197bcc7842d..4c15396c67e5 100644 --- a/Documentation/DocBook/media/dvb/dvbapi.xml +++ b/Documentation/DocBook/media/dvb/dvbapi.xml | |||
@@ -18,7 +18,7 @@ | |||
18 | <firstname>Mauro</firstname> | 18 | <firstname>Mauro</firstname> |
19 | <othername role="mi">Carvalho</othername> | 19 | <othername role="mi">Carvalho</othername> |
20 | <surname>Chehab</surname> | 20 | <surname>Chehab</surname> |
21 | <affiliation><address><email>mchehab@redhat.com</email></address></affiliation> | 21 | <affiliation><address><email>m.chehab@samsung.com</email></address></affiliation> |
22 | <contrib>Ported document to Docbook XML.</contrib> | 22 | <contrib>Ported document to Docbook XML.</contrib> |
23 | </author> | 23 | </author> |
24 | </authorgroup> | 24 | </authorgroup> |
@@ -28,7 +28,7 @@ | |||
28 | <holder>Convergence GmbH</holder> | 28 | <holder>Convergence GmbH</holder> |
29 | </copyright> | 29 | </copyright> |
30 | <copyright> | 30 | <copyright> |
31 | <year>2009-2012</year> | 31 | <year>2009-2014</year> |
32 | <holder>Mauro Carvalho Chehab</holder> | 32 | <holder>Mauro Carvalho Chehab</holder> |
33 | </copyright> | 33 | </copyright> |
34 | 34 | ||
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml index a9b15e34c5b2..24c22cabc668 100644 --- a/Documentation/DocBook/media/dvb/dvbproperty.xml +++ b/Documentation/DocBook/media/dvb/dvbproperty.xml | |||
@@ -196,7 +196,7 @@ get/set up to 64 properties. The actual meaning of each property is described on | |||
196 | <para>1)For satellital delivery systems, it is measured in kHz. | 196 | <para>1)For satellital delivery systems, it is measured in kHz. |
197 | For the other ones, it is measured in Hz.</para> | 197 | For the other ones, it is measured in Hz.</para> |
198 | <para>2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz. | 198 | <para>2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz. |
199 | E.g. a valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of | 199 | E.g. a valid frequency could be 474143 kHz. The stepping is bound to the bandwidth of |
200 | the channel which is 6MHz.</para> | 200 | the channel which is 6MHz.</para> |
201 | 201 | ||
202 | <para>3)As in ISDB-Tsb the channel consists of only one or three segments the | 202 | <para>3)As in ISDB-Tsb the channel consists of only one or three segments the |
diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml index 0d6e81bd9ed2..8a6a6ff27af5 100644 --- a/Documentation/DocBook/media/dvb/frontend.xml +++ b/Documentation/DocBook/media/dvb/frontend.xml | |||
@@ -744,7 +744,7 @@ typedef enum fe_hierarchy { | |||
744 | </para> | 744 | </para> |
745 | <informaltable><tgroup cols="1"><tbody><row><entry | 745 | <informaltable><tgroup cols="1"><tbody><row><entry |
746 | align="char"> | 746 | align="char"> |
747 | <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t | 747 | <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t |
748 | ⋆snr);</para> | 748 | ⋆snr);</para> |
749 | </entry> | 749 | </entry> |
750 | </row></tbody></tgroup></informaltable> | 750 | </row></tbody></tgroup></informaltable> |
@@ -766,7 +766,7 @@ typedef enum fe_hierarchy { | |||
766 | </entry> | 766 | </entry> |
767 | </row><row><entry | 767 | </row><row><entry |
768 | align="char"> | 768 | align="char"> |
769 | <para>int16_t *snr</para> | 769 | <para>uint16_t *snr</para> |
770 | </entry><entry | 770 | </entry><entry |
771 | align="char"> | 771 | align="char"> |
772 | <para>The signal-to-noise ratio is stored into *snr.</para> | 772 | <para>The signal-to-noise ratio is stored into *snr.</para> |
@@ -791,7 +791,7 @@ typedef enum fe_hierarchy { | |||
791 | <informaltable><tgroup cols="1"><tbody><row><entry | 791 | <informaltable><tgroup cols="1"><tbody><row><entry |
792 | align="char"> | 792 | align="char"> |
793 | <para>int ioctl( int fd, int request = | 793 | <para>int ioctl( int fd, int request = |
794 | <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para> | 794 | <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t ⋆strength);</para> |
795 | </entry> | 795 | </entry> |
796 | </row></tbody></tgroup></informaltable> | 796 | </row></tbody></tgroup></informaltable> |
797 | 797 | ||
@@ -814,7 +814,7 @@ typedef enum fe_hierarchy { | |||
814 | </entry> | 814 | </entry> |
815 | </row><row><entry | 815 | </row><row><entry |
816 | align="char"> | 816 | align="char"> |
817 | <para>int16_t *strength</para> | 817 | <para>uint16_t *strength</para> |
818 | </entry><entry | 818 | </entry><entry |
819 | align="char"> | 819 | align="char"> |
820 | <para>The signal strength value is stored into *strength.</para> | 820 | <para>The signal strength value is stored into *strength.</para> |
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 1ddf354aa997..71f6bf9e735e 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml | |||
@@ -38,70 +38,41 @@ the basic concepts applicable to all devices.</para> | |||
38 | 38 | ||
39 | <para>V4L2 drivers are implemented as kernel modules, loaded | 39 | <para>V4L2 drivers are implemented as kernel modules, loaded |
40 | manually by the system administrator or automatically when a device is | 40 | manually by the system administrator or automatically when a device is |
41 | first opened. The driver modules plug into the "videodev" kernel | 41 | first discovered. The driver modules plug into the "videodev" kernel |
42 | module. It provides helper functions and a common application | 42 | module. It provides helper functions and a common application |
43 | interface specified in this document.</para> | 43 | interface specified in this document.</para> |
44 | 44 | ||
45 | <para>Each driver thus loaded registers one or more device nodes | 45 | <para>Each driver thus loaded registers one or more device nodes |
46 | with major number 81 and a minor number between 0 and 255. Assigning | 46 | with major number 81 and a minor number between 0 and 255. Minor numbers |
47 | minor numbers to V4L2 devices is entirely up to the system administrator, | 47 | are allocated dynamically unless the kernel is compiled with the kernel |
48 | this is primarily intended to solve conflicts between devices.<footnote> | 48 | option CONFIG_VIDEO_FIXED_MINOR_RANGES. In that case minor numbers are |
49 | <para>Access permissions are associated with character | 49 | allocated in ranges depending on the device node type (video, radio, etc.).</para> |
50 | device special files, hence we must ensure device numbers cannot | 50 | |
51 | change with the module load order. To this end minor numbers are no | 51 | <para>Many drivers support "video_nr", "radio_nr" or "vbi_nr" |
52 | longer automatically assigned by the "videodev" module as in V4L but | 52 | module options to select specific video/radio/vbi node numbers. This allows |
53 | requested by the driver. The defaults will suffice for most people | 53 | the user to request that the device node is named e.g. /dev/video5 instead |
54 | unless two drivers compete for the same minor numbers.</para> | 54 | of leaving it to chance. When the driver supports multiple devices of the same |
55 | </footnote> The module options to select minor numbers are named | 55 | type more than one device node number can be assigned, separated by commas: |
56 | after the device special file with a "_nr" suffix. For example "video_nr" | 56 | <informalexample> |
57 | for <filename>/dev/video</filename> video capture devices. The number is | ||
58 | an offset to the base minor number associated with the device type. | ||
59 | <footnote> | ||
60 | <para>In earlier versions of the V4L2 API the module options | ||
61 | where named after the device special file with a "unit_" prefix, expressing | ||
62 | the minor number itself, not an offset. Rationale for this change is unknown. | ||
63 | Lastly the naming and semantics are just a convention among driver writers, | ||
64 | the point to note is that minor numbers are not supposed to be hardcoded | ||
65 | into drivers.</para> | ||
66 | </footnote> When the driver supports multiple devices of the same | ||
67 | type more than one minor number can be assigned, separated by commas: | ||
68 | <informalexample> | ||
69 | <screen> | 57 | <screen> |
70 | > insmod mydriver.o video_nr=0,1 radio_nr=0,1</screen> | 58 | > modprobe mydriver video_nr=0,1 radio_nr=0,1</screen> |
71 | </informalexample></para> | 59 | </informalexample></para> |
72 | 60 | ||
73 | <para>In <filename>/etc/modules.conf</filename> this may be | 61 | <para>In <filename>/etc/modules.conf</filename> this may be |
74 | written as: <informalexample> | 62 | written as: <informalexample> |
75 | <screen> | 63 | <screen> |
76 | alias char-major-81-0 mydriver | 64 | options mydriver video_nr=0,1 radio_nr=0,1 |
77 | alias char-major-81-1 mydriver | ||
78 | alias char-major-81-64 mydriver <co id="alias" /> | ||
79 | options mydriver video_nr=0,1 radio_nr=0,1 <co id="options" /> | ||
80 | </screen> | 65 | </screen> |
81 | <calloutlist> | 66 | </informalexample> When no device node number is given as module |
82 | <callout arearefs="alias"> | 67 | option the driver supplies a default.</para> |
83 | <para>When an application attempts to open a device | 68 | |
84 | special file with major number 81 and minor number 0, 1, or 64, load | 69 | <para>Normally udev will create the device nodes in /dev automatically |
85 | "mydriver" (and the "videodev" module it depends upon).</para> | 70 | for you. If udev is not installed, then you need to enable the |
86 | </callout> | 71 | CONFIG_VIDEO_FIXED_MINOR_RANGES kernel option in order to be able to correctly |
87 | <callout arearefs="options"> | 72 | relate a minor number to a device node number. I.e., you need to be certain |
88 | <para>Register the first two video capture devices with | 73 | that minor number 5 maps to device node name video5. With this kernel option |
89 | minor number 0 and 1 (base number is 0), the first two radio device | 74 | different device types have different minor number ranges. These ranges are |
90 | with minor number 64 and 65 (base 64).</para> | 75 | listed in <xref linkend="devices" />. |
91 | </callout> | ||
92 | </calloutlist> | ||
93 | </informalexample> When no minor number is given as module | ||
94 | option the driver supplies a default. <xref linkend="devices" /> | ||
95 | recommends the base minor numbers to be used for the various device | ||
96 | types. Obviously minor numbers must be unique. When the number is | ||
97 | already in use the <emphasis>offending device</emphasis> will not be | ||
98 | registered. <!-- Blessed by Linus Torvalds on | ||
99 | linux-kernel@vger.kernel.org, 2002-11-20. --></para> | ||
100 | |||
101 | <para>By convention system administrators create various | ||
102 | character device special files with these major and minor numbers in | ||
103 | the <filename>/dev</filename> directory. The names recommended for the | ||
104 | different V4L2 device types are listed in <xref linkend="devices" />. | ||
105 | </para> | 76 | </para> |
106 | 77 | ||
107 | <para>The creation of character special files (with | 78 | <para>The creation of character special files (with |
@@ -110,85 +81,66 @@ devices cannot be opened by major and minor number. That means | |||
110 | applications cannot <emphasis>reliable</emphasis> scan for loaded or | 81 | applications cannot <emphasis>reliable</emphasis> scan for loaded or |
111 | installed drivers. The user must enter a device name, or the | 82 | installed drivers. The user must enter a device name, or the |
112 | application can try the conventional device names.</para> | 83 | application can try the conventional device names.</para> |
113 | |||
114 | <para>Under the device filesystem (devfs) the minor number | ||
115 | options are ignored. V4L2 drivers (or by proxy the "videodev" module) | ||
116 | automatically create the required device files in the | ||
117 | <filename>/dev/v4l</filename> directory using the conventional device | ||
118 | names above.</para> | ||
119 | </section> | 84 | </section> |
120 | 85 | ||
121 | <section id="related"> | 86 | <section id="related"> |
122 | <title>Related Devices</title> | 87 | <title>Related Devices</title> |
123 | 88 | ||
124 | <para>Devices can support several related functions. For example | 89 | <para>Devices can support several functions. For example |
125 | video capturing, video overlay and VBI capturing are related because | 90 | video capturing, VBI capturing and radio support.</para> |
126 | these functions share, amongst other, the same video input and tuner | 91 | |
127 | frequency. V4L and earlier versions of V4L2 used the same device name | 92 | <para>The V4L2 API creates different nodes for each of these functions.</para> |
128 | and minor number for video capturing and overlay, but different ones | 93 | |
129 | for VBI. Experience showed this approach has several problems<footnote> | 94 | <para>The V4L2 API was designed with the idea that one device node could support |
130 | <para>Given a device file name one cannot reliable find | 95 | all functions. However, in practice this never worked: this 'feature' |
131 | related devices. For once names are arbitrary and in a system with | 96 | was never used by applications and many drivers did not support it and if |
132 | multiple devices, where only some support VBI capturing, a | 97 | they did it was certainly never tested. In addition, switching a device |
133 | <filename>/dev/video2</filename> is not necessarily related to | 98 | node between different functions only works when using the streaming I/O |
134 | <filename>/dev/vbi2</filename>. The V4L | 99 | API, not with the read()/write() API.</para> |
135 | <constant>VIDIOCGUNIT</constant> ioctl would require a search for a | 100 | |
136 | device file with a particular major and minor number.</para> | 101 | <para>Today each device node supports just one function.</para> |
137 | </footnote>, and to make things worse the V4L videodev module | ||
138 | used to prohibit multiple opens of a device.</para> | ||
139 | |||
140 | <para>As a remedy the present version of the V4L2 API relaxed the | ||
141 | concept of device types with specific names and minor numbers. For | ||
142 | compatibility with old applications drivers must still register different | ||
143 | minor numbers to assign a default function to the device. But if related | ||
144 | functions are supported by the driver they must be available under all | ||
145 | registered minor numbers. The desired function can be selected after | ||
146 | opening the device as described in <xref linkend="devices" />.</para> | ||
147 | |||
148 | <para>Imagine a driver supporting video capturing, video | ||
149 | overlay, raw VBI capturing, and FM radio reception. It registers three | ||
150 | devices with minor number 0, 64 and 224 (this numbering scheme is | ||
151 | inherited from the V4L API). Regardless if | ||
152 | <filename>/dev/video</filename> (81, 0) or | ||
153 | <filename>/dev/vbi</filename> (81, 224) is opened the application can | ||
154 | select any one of the video capturing, overlay or VBI capturing | ||
155 | functions. Without programming (e. g. reading from the device | ||
156 | with <application>dd</application> or <application>cat</application>) | ||
157 | <filename>/dev/video</filename> captures video images, while | ||
158 | <filename>/dev/vbi</filename> captures raw VBI data. | ||
159 | <filename>/dev/radio</filename> (81, 64) is invariable a radio device, | ||
160 | unrelated to the video functions. Being unrelated does not imply the | ||
161 | devices can be used at the same time, however. The &func-open; | ||
162 | function may very well return an &EBUSY;.</para> | ||
163 | 102 | ||
164 | <para>Besides video input or output the hardware may also | 103 | <para>Besides video input or output the hardware may also |
165 | support audio sampling or playback. If so, these functions are | 104 | support audio sampling or playback. If so, these functions are |
166 | implemented as OSS or ALSA PCM devices and eventually OSS or ALSA | 105 | implemented as ALSA PCM devices with optional ALSA audio mixer |
167 | audio mixer. The V4L2 API makes no provisions yet to find these | 106 | devices.</para> |
168 | related devices. If you have an idea please write to the linux-media | 107 | |
169 | mailing list: &v4l-ml;.</para> | 108 | <para>One problem with all these devices is that the V4L2 API |
109 | makes no provisions to find these related devices. Some really | ||
110 | complex devices use the Media Controller (see <xref linkend="media_controller" />) | ||
111 | which can be used for this purpose. But most drivers do not use it, | ||
112 | and while some code exists that uses sysfs to discover related devices | ||
113 | (see libmedia_dev in the <ulink url="http://git.linuxtv.org/v4l-utils/">v4l-utils</ulink> | ||
114 | git repository), there is no library yet that can provide a single API towards | ||
115 | both Media Controller-based devices and devices that do not use the Media Controller. | ||
116 | If you want to work on this please write to the linux-media mailing list: &v4l-ml;.</para> | ||
170 | </section> | 117 | </section> |
171 | 118 | ||
172 | <section> | 119 | <section> |
173 | <title>Multiple Opens</title> | 120 | <title>Multiple Opens</title> |
174 | 121 | ||
175 | <para>In general, V4L2 devices can be opened more than once. | 122 | <para>V4L2 devices can be opened more than once.<footnote><para> |
123 | There are still some old and obscure drivers that have not been updated to | ||
124 | allow for multiple opens. This implies that for such drivers &func-open; can | ||
125 | return an &EBUSY; when the device is already in use.</para></footnote> | ||
176 | When this is supported by the driver, users can for example start a | 126 | When this is supported by the driver, users can for example start a |
177 | "panel" application to change controls like brightness or audio | 127 | "panel" application to change controls like brightness or audio |
178 | volume, while another application captures video and audio. In other words, panel | 128 | volume, while another application captures video and audio. In other words, panel |
179 | applications are comparable to an OSS or ALSA audio mixer application. | 129 | applications are comparable to an ALSA audio mixer application. |
180 | When a device supports multiple functions like capturing and overlay | 130 | Just opening a V4L2 device should not change the state of the device.<footnote> |
181 | <emphasis>simultaneously</emphasis>, multiple opens allow concurrent | 131 | <para>Unfortunately, opening a radio device often switches the state of the |
182 | use of the device by forked processes or specialized applications.</para> | 132 | device to radio mode in many drivers. This behavior should be fixed eventually |
183 | 133 | as it violates the V4L2 specification.</para></footnote></para> | |
184 | <para>Multiple opens are optional, although drivers should | 134 | |
185 | permit at least concurrent accesses without data exchange, &ie; panel | 135 | <para>Once an application has allocated the memory buffers needed for |
186 | applications. This implies &func-open; can return an &EBUSY; when the | 136 | streaming data (by calling the &VIDIOC-REQBUFS; or &VIDIOC-CREATE-BUFS; ioctls, |
187 | device is already in use, as well as &func-ioctl; functions initiating | 137 | or implicitly by calling the &func-read; or &func-write; functions) that |
188 | data exchange (namely the &VIDIOC-S-FMT; ioctl), and the &func-read; | 138 | application (filehandle) becomes the owner of the device. It is no longer |
189 | and &func-write; functions.</para> | 139 | allowed to make changes that would affect the buffer sizes (e.g. by calling |
190 | 140 | the &VIDIOC-S-FMT; ioctl) and other applications are no longer allowed to allocate | |
191 | <para>Mere opening a V4L2 device does not grant exclusive | 141 | buffers or start or stop streaming. The &EBUSY; will be returned instead.</para> |
142 | |||
143 | <para>Merely opening a V4L2 device does not grant exclusive | ||
192 | access.<footnote> | 144 | access.<footnote> |
193 | <para>Drivers could recognize the | 145 | <para>Drivers could recognize the |
194 | <constant>O_EXCL</constant> open flag. Presently this is not required, | 146 | <constant>O_EXCL</constant> open flag. Presently this is not required, |
@@ -206,12 +158,7 @@ additional access privileges using the priority mechanism described in | |||
206 | <para>V4L2 drivers should not support multiple applications | 158 | <para>V4L2 drivers should not support multiple applications |
207 | reading or writing the same data stream on a device by copying | 159 | reading or writing the same data stream on a device by copying |
208 | buffers, time multiplexing or similar means. This is better handled by | 160 | buffers, time multiplexing or similar means. This is better handled by |
209 | a proxy application in user space. When the driver supports stream | 161 | a proxy application in user space.</para> |
210 | sharing anyway it must be implemented transparently. The V4L2 API does | ||
211 | not specify how conflicts are solved. <!-- For example O_EXCL when the | ||
212 | application does not want to be preempted, PROT_READ mmapped buffers | ||
213 | which can be mapped twice, what happens when image formats do not | ||
214 | match etc.--></para> | ||
215 | </section> | 162 | </section> |
216 | 163 | ||
217 | <section> | 164 | <section> |
@@ -240,15 +187,15 @@ methods</link> supported by the device.</para> | |||
240 | 187 | ||
241 | <para>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the | 188 | <para>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the |
242 | V4L2 API version used by the driver, with generally matches the Kernel version. | 189 | V4L2 API version used by the driver, with generally matches the Kernel version. |
243 | There's no need of using &VIDIOC-QUERYCAP; to check if an specific ioctl is | 190 | There's no need of using &VIDIOC-QUERYCAP; to check if a specific ioctl is |
244 | supported, the V4L2 core now returns ENOIOCTLCMD if a driver doesn't provide | 191 | supported, the V4L2 core now returns ENOTTY if a driver doesn't provide |
245 | support for an ioctl.</para> | 192 | support for an ioctl.</para> |
246 | 193 | ||
247 | <para>Other features can be queried | 194 | <para>Other features can be queried |
248 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; | 195 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; |
249 | to learn about the number, types and names of video connectors on the | 196 | to learn about the number, types and names of video connectors on the |
250 | device. Although abstraction is a major objective of this API, the | 197 | device. Although abstraction is a major objective of this API, the |
251 | ioctl also allows driver specific applications to reliable identify | 198 | &VIDIOC-QUERYCAP; ioctl also allows driver specific applications to reliably identify |
252 | the driver.</para> | 199 | the driver.</para> |
253 | 200 | ||
254 | <para>All V4L2 drivers must support | 201 | <para>All V4L2 drivers must support |
@@ -278,9 +225,7 @@ Applications requiring a different priority will usually call | |||
278 | the &VIDIOC-QUERYCAP; ioctl.</para> | 225 | the &VIDIOC-QUERYCAP; ioctl.</para> |
279 | 226 | ||
280 | <para>Ioctls changing driver properties, such as &VIDIOC-S-INPUT;, | 227 | <para>Ioctls changing driver properties, such as &VIDIOC-S-INPUT;, |
281 | return an &EBUSY; after another application obtained higher priority. | 228 | return an &EBUSY; after another application obtained higher priority.</para> |
282 | An event mechanism to notify applications about asynchronous property | ||
283 | changes has been proposed but not added yet.</para> | ||
284 | </section> | 229 | </section> |
285 | 230 | ||
286 | <section id="video"> | 231 | <section id="video"> |
@@ -288,9 +233,9 @@ changes has been proposed but not added yet.</para> | |||
288 | 233 | ||
289 | <para>Video inputs and outputs are physical connectors of a | 234 | <para>Video inputs and outputs are physical connectors of a |
290 | device. These can be for example RF connectors (antenna/cable), CVBS | 235 | device. These can be for example RF connectors (antenna/cable), CVBS |
291 | a.k.a. Composite Video, S-Video or RGB connectors. Only video and VBI | 236 | a.k.a. Composite Video, S-Video or RGB connectors. Video and VBI |
292 | capture devices have inputs, output devices have outputs, at least one | 237 | capture devices have inputs. Video and VBI output devices have outputs, |
293 | each. Radio devices have no video inputs or outputs.</para> | 238 | at least one each. Radio devices have no video inputs or outputs.</para> |
294 | 239 | ||
295 | <para>To learn about the number and attributes of the | 240 | <para>To learn about the number and attributes of the |
296 | available inputs and outputs applications can enumerate them with the | 241 | available inputs and outputs applications can enumerate them with the |
@@ -299,30 +244,13 @@ available inputs and outputs applications can enumerate them with the | |||
299 | ioctl also contains signal status information applicable when the | 244 | ioctl also contains signal status information applicable when the |
300 | current video input is queried.</para> | 245 | current video input is queried.</para> |
301 | 246 | ||
302 | <para>The &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; ioctl return the | 247 | <para>The &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; ioctls return the |
303 | index of the current video input or output. To select a different | 248 | index of the current video input or output. To select a different |
304 | input or output applications call the &VIDIOC-S-INPUT; and | 249 | input or output applications call the &VIDIOC-S-INPUT; and |
305 | &VIDIOC-S-OUTPUT; ioctl. Drivers must implement all the input ioctls | 250 | &VIDIOC-S-OUTPUT; ioctls. Drivers must implement all the input ioctls |
306 | when the device has one or more inputs, all the output ioctls when the | 251 | when the device has one or more inputs, all the output ioctls when the |
307 | device has one or more outputs.</para> | 252 | device has one or more outputs.</para> |
308 | 253 | ||
309 | <!-- | ||
310 | <figure id=io-tree> | ||
311 | <title>Input and output enumeration is the root of most device properties.</title> | ||
312 | <mediaobject> | ||
313 | <imageobject> | ||
314 | <imagedata fileref="links.pdf" format="ps" /> | ||
315 | </imageobject> | ||
316 | <imageobject> | ||
317 | <imagedata fileref="links.gif" format="gif" /> | ||
318 | </imageobject> | ||
319 | <textobject> | ||
320 | <phrase>Links between various device property structures.</phrase> | ||
321 | </textobject> | ||
322 | </mediaobject> | ||
323 | </figure> | ||
324 | --> | ||
325 | |||
326 | <example> | 254 | <example> |
327 | <title>Information about the current video input</title> | 255 | <title>Information about the current video input</title> |
328 | 256 | ||
@@ -330,20 +258,20 @@ device has one or more outputs.</para> | |||
330 | &v4l2-input; input; | 258 | &v4l2-input; input; |
331 | int index; | 259 | int index; |
332 | 260 | ||
333 | if (-1 == ioctl (fd, &VIDIOC-G-INPUT;, &index)) { | 261 | if (-1 == ioctl(fd, &VIDIOC-G-INPUT;, &index)) { |
334 | perror ("VIDIOC_G_INPUT"); | 262 | perror("VIDIOC_G_INPUT"); |
335 | exit (EXIT_FAILURE); | 263 | exit(EXIT_FAILURE); |
336 | } | 264 | } |
337 | 265 | ||
338 | memset (&input, 0, sizeof (input)); | 266 | memset(&input, 0, sizeof(input)); |
339 | input.index = index; | 267 | input.index = index; |
340 | 268 | ||
341 | if (-1 == ioctl (fd, &VIDIOC-ENUMINPUT;, &input)) { | 269 | if (-1 == ioctl(fd, &VIDIOC-ENUMINPUT;, &input)) { |
342 | perror ("VIDIOC_ENUMINPUT"); | 270 | perror("VIDIOC_ENUMINPUT"); |
343 | exit (EXIT_FAILURE); | 271 | exit(EXIT_FAILURE); |
344 | } | 272 | } |
345 | 273 | ||
346 | printf ("Current input: %s\n", input.name); | 274 | printf("Current input: %s\n", input.name); |
347 | </programlisting> | 275 | </programlisting> |
348 | </example> | 276 | </example> |
349 | 277 | ||
@@ -355,9 +283,9 @@ int index; | |||
355 | 283 | ||
356 | index = 0; | 284 | index = 0; |
357 | 285 | ||
358 | if (-1 == ioctl (fd, &VIDIOC-S-INPUT;, &index)) { | 286 | if (-1 == ioctl(fd, &VIDIOC-S-INPUT;, &index)) { |
359 | perror ("VIDIOC_S_INPUT"); | 287 | perror("VIDIOC_S_INPUT"); |
360 | exit (EXIT_FAILURE); | 288 | exit(EXIT_FAILURE); |
361 | } | 289 | } |
362 | </programlisting> | 290 | </programlisting> |
363 | </example> | 291 | </example> |
@@ -397,7 +325,7 @@ available inputs and outputs applications can enumerate them with the | |||
397 | also contains signal status information applicable when the current | 325 | also contains signal status information applicable when the current |
398 | audio input is queried.</para> | 326 | audio input is queried.</para> |
399 | 327 | ||
400 | <para>The &VIDIOC-G-AUDIO; and &VIDIOC-G-AUDOUT; ioctl report | 328 | <para>The &VIDIOC-G-AUDIO; and &VIDIOC-G-AUDOUT; ioctls report |
401 | the current audio input and output, respectively. Note that, unlike | 329 | the current audio input and output, respectively. Note that, unlike |
402 | &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; these ioctls return a structure | 330 | &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; these ioctls return a structure |
403 | as <constant>VIDIOC_ENUMAUDIO</constant> and | 331 | as <constant>VIDIOC_ENUMAUDIO</constant> and |
@@ -408,11 +336,11 @@ applications call the &VIDIOC-S-AUDIO; ioctl. To select an audio | |||
408 | output (which presently has no changeable properties) applications | 336 | output (which presently has no changeable properties) applications |
409 | call the &VIDIOC-S-AUDOUT; ioctl.</para> | 337 | call the &VIDIOC-S-AUDOUT; ioctl.</para> |
410 | 338 | ||
411 | <para>Drivers must implement all input ioctls when the device | 339 | <para>Drivers must implement all audio input ioctls when the device |
412 | has one or more inputs, all output ioctls when the device has one | 340 | has multiple selectable audio inputs, all audio output ioctls when the |
413 | or more outputs. When the device has any audio inputs or outputs the | 341 | device has multiple selectable audio outputs. When the device has any |
414 | driver must set the <constant>V4L2_CAP_AUDIO</constant> flag in the | 342 | audio inputs or outputs the driver must set the <constant>V4L2_CAP_AUDIO</constant> |
415 | &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl.</para> | 343 | flag in the &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl.</para> |
416 | 344 | ||
417 | <example> | 345 | <example> |
418 | <title>Information about the current audio input</title> | 346 | <title>Information about the current audio input</title> |
@@ -420,14 +348,14 @@ driver must set the <constant>V4L2_CAP_AUDIO</constant> flag in the | |||
420 | <programlisting> | 348 | <programlisting> |
421 | &v4l2-audio; audio; | 349 | &v4l2-audio; audio; |
422 | 350 | ||
423 | memset (&audio, 0, sizeof (audio)); | 351 | memset(&audio, 0, sizeof(audio)); |
424 | 352 | ||
425 | if (-1 == ioctl (fd, &VIDIOC-G-AUDIO;, &audio)) { | 353 | if (-1 == ioctl(fd, &VIDIOC-G-AUDIO;, &audio)) { |
426 | perror ("VIDIOC_G_AUDIO"); | 354 | perror("VIDIOC_G_AUDIO"); |
427 | exit (EXIT_FAILURE); | 355 | exit(EXIT_FAILURE); |
428 | } | 356 | } |
429 | 357 | ||
430 | printf ("Current input: %s\n", audio.name); | 358 | printf("Current input: %s\n", audio.name); |
431 | </programlisting> | 359 | </programlisting> |
432 | </example> | 360 | </example> |
433 | 361 | ||
@@ -437,13 +365,13 @@ printf ("Current input: %s\n", audio.name); | |||
437 | <programlisting> | 365 | <programlisting> |
438 | &v4l2-audio; audio; | 366 | &v4l2-audio; audio; |
439 | 367 | ||
440 | memset (&audio, 0, sizeof (audio)); /* clear audio.mode, audio.reserved */ | 368 | memset(&audio, 0, sizeof(audio)); /* clear audio.mode, audio.reserved */ |
441 | 369 | ||
442 | audio.index = 0; | 370 | audio.index = 0; |
443 | 371 | ||
444 | if (-1 == ioctl (fd, &VIDIOC-S-AUDIO;, &audio)) { | 372 | if (-1 == ioctl(fd, &VIDIOC-S-AUDIO;, &audio)) { |
445 | perror ("VIDIOC_S_AUDIO"); | 373 | perror("VIDIOC_S_AUDIO"); |
446 | exit (EXIT_FAILURE); | 374 | exit(EXIT_FAILURE); |
447 | } | 375 | } |
448 | </programlisting> | 376 | </programlisting> |
449 | </example> | 377 | </example> |
@@ -468,7 +396,7 @@ the tuner.</para> | |||
468 | video inputs.</para> | 396 | video inputs.</para> |
469 | 397 | ||
470 | <para>To query and change tuner properties applications use the | 398 | <para>To query and change tuner properties applications use the |
471 | &VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; ioctl, respectively. The | 399 | &VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; ioctls, respectively. The |
472 | &v4l2-tuner; returned by <constant>VIDIOC_G_TUNER</constant> also | 400 | &v4l2-tuner; returned by <constant>VIDIOC_G_TUNER</constant> also |
473 | contains signal status information applicable when the tuner of the | 401 | contains signal status information applicable when the tuner of the |
474 | current video or radio input is queried. Note that | 402 | current video or radio input is queried. Note that |
@@ -533,7 +461,7 @@ standards or variations of standards. Each video input and output may | |||
533 | support another set of standards. This set is reported by the | 461 | support another set of standards. This set is reported by the |
534 | <structfield>std</structfield> field of &v4l2-input; and | 462 | <structfield>std</structfield> field of &v4l2-input; and |
535 | &v4l2-output; returned by the &VIDIOC-ENUMINPUT; and | 463 | &v4l2-output; returned by the &VIDIOC-ENUMINPUT; and |
536 | &VIDIOC-ENUMOUTPUT; ioctl, respectively.</para> | 464 | &VIDIOC-ENUMOUTPUT; ioctls, respectively.</para> |
537 | 465 | ||
538 | <para>V4L2 defines one bit for each analog video standard | 466 | <para>V4L2 defines one bit for each analog video standard |
539 | currently in use worldwide, and sets aside bits for driver defined | 467 | currently in use worldwide, and sets aside bits for driver defined |
@@ -564,28 +492,10 @@ automatically.</para> | |||
564 | <para>To query and select the standard used by the current video | 492 | <para>To query and select the standard used by the current video |
565 | input or output applications call the &VIDIOC-G-STD; and | 493 | input or output applications call the &VIDIOC-G-STD; and |
566 | &VIDIOC-S-STD; ioctl, respectively. The <emphasis>received</emphasis> | 494 | &VIDIOC-S-STD; ioctl, respectively. The <emphasis>received</emphasis> |
567 | standard can be sensed with the &VIDIOC-QUERYSTD; ioctl. Note that the parameter of all these ioctls is a pointer to a &v4l2-std-id; type (a standard set), <emphasis>not</emphasis> an index into the standard enumeration.<footnote> | 495 | standard can be sensed with the &VIDIOC-QUERYSTD; ioctl. Note that the |
568 | <para>An alternative to the current scheme is to use pointers | 496 | parameter of all these ioctls is a pointer to a &v4l2-std-id; type |
569 | to indices as arguments of <constant>VIDIOC_G_STD</constant> and | 497 | (a standard set), <emphasis>not</emphasis> an index into the standard |
570 | <constant>VIDIOC_S_STD</constant>, the &v4l2-input; and | 498 | enumeration. Drivers must implement all video standard ioctls |
571 | &v4l2-output; <structfield>std</structfield> field would be a set of | ||
572 | indices like <structfield>audioset</structfield>.</para> | ||
573 | <para>Indices are consistent with the rest of the API | ||
574 | and identify the standard unambiguously. In the present scheme of | ||
575 | things an enumerated standard is looked up by &v4l2-std-id;. Now the | ||
576 | standards supported by the inputs of a device can overlap. Just | ||
577 | assume the tuner and composite input in the example above both | ||
578 | exist on a device. An enumeration of "PAL-B/G", "PAL-H/I" suggests | ||
579 | a choice which does not exist. We cannot merge or omit sets, because | ||
580 | applications would be unable to find the standards reported by | ||
581 | <constant>VIDIOC_G_STD</constant>. That leaves separate enumerations | ||
582 | for each input. Also selecting a standard by &v4l2-std-id; can be | ||
583 | ambiguous. Advantage of this method is that applications need not | ||
584 | identify the standard indirectly, after enumerating.</para><para>So in | ||
585 | summary, the lookup itself is unavoidable. The difference is only | ||
586 | whether the lookup is necessary to find an enumerated standard or to | ||
587 | switch to a standard by &v4l2-std-id;.</para> | ||
588 | </footnote> Drivers must implement all video standard ioctls | ||
589 | when the device has one or more video inputs or outputs.</para> | 499 | when the device has one or more video inputs or outputs.</para> |
590 | 500 | ||
591 | <para>Special rules apply to devices such as USB cameras where the notion of video | 501 | <para>Special rules apply to devices such as USB cameras where the notion of video |
@@ -604,17 +514,10 @@ to zero and the <constant>VIDIOC_G_STD</constant>, | |||
604 | <constant>VIDIOC_S_STD</constant>, | 514 | <constant>VIDIOC_S_STD</constant>, |
605 | <constant>VIDIOC_QUERYSTD</constant> and | 515 | <constant>VIDIOC_QUERYSTD</constant> and |
606 | <constant>VIDIOC_ENUMSTD</constant> ioctls shall return the | 516 | <constant>VIDIOC_ENUMSTD</constant> ioctls shall return the |
607 | &ENOTTY;.<footnote> | 517 | &ENOTTY; or the &EINVAL;.</para> |
608 | <para>See <xref linkend="buffer" /> for a rationale.</para> | ||
609 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and | 518 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and |
610 | <xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls | 519 | <xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls |
611 | are available for the device.</para> | 520 | can be used with the given input or output.</para> |
612 | |||
613 | <para>See <xref linkend="buffer" /> for a rationale. Probably | ||
614 | even USB cameras follow some well known video standard. It might have | ||
615 | been better to explicitly indicate elsewhere if a device cannot live | ||
616 | up to normal expectations, instead of this exception.</para> | ||
617 | </footnote></para> | ||
618 | 521 | ||
619 | <example> | 522 | <example> |
620 | <title>Information about the current video standard</title> | 523 | <title>Information about the current video standard</title> |
@@ -623,22 +526,22 @@ up to normal expectations, instead of this exception.</para> | |||
623 | &v4l2-std-id; std_id; | 526 | &v4l2-std-id; std_id; |
624 | &v4l2-standard; standard; | 527 | &v4l2-standard; standard; |
625 | 528 | ||
626 | if (-1 == ioctl (fd, &VIDIOC-G-STD;, &std_id)) { | 529 | if (-1 == ioctl(fd, &VIDIOC-G-STD;, &std_id)) { |
627 | /* Note when VIDIOC_ENUMSTD always returns ENOTTY this | 530 | /* Note when VIDIOC_ENUMSTD always returns ENOTTY this |
628 | is no video device or it falls under the USB exception, | 531 | is no video device or it falls under the USB exception, |
629 | and VIDIOC_G_STD returning ENOTTY is no error. */ | 532 | and VIDIOC_G_STD returning ENOTTY is no error. */ |
630 | 533 | ||
631 | perror ("VIDIOC_G_STD"); | 534 | perror("VIDIOC_G_STD"); |
632 | exit (EXIT_FAILURE); | 535 | exit(EXIT_FAILURE); |
633 | } | 536 | } |
634 | 537 | ||
635 | memset (&standard, 0, sizeof (standard)); | 538 | memset(&standard, 0, sizeof(standard)); |
636 | standard.index = 0; | 539 | standard.index = 0; |
637 | 540 | ||
638 | while (0 == ioctl (fd, &VIDIOC-ENUMSTD;, &standard)) { | 541 | while (0 == ioctl(fd, &VIDIOC-ENUMSTD;, &standard)) { |
639 | if (standard.id & std_id) { | 542 | if (standard.id & std_id) { |
640 | printf ("Current video standard: %s\n", standard.name); | 543 | printf("Current video standard: %s\n", standard.name); |
641 | exit (EXIT_SUCCESS); | 544 | exit(EXIT_SUCCESS); |
642 | } | 545 | } |
643 | 546 | ||
644 | standard.index++; | 547 | standard.index++; |
@@ -648,8 +551,8 @@ while (0 == ioctl (fd, &VIDIOC-ENUMSTD;, &standard)) { | |||
648 | empty unless this device falls under the USB exception. */ | 551 | empty unless this device falls under the USB exception. */ |
649 | 552 | ||
650 | if (errno == EINVAL || standard.index == 0) { | 553 | if (errno == EINVAL || standard.index == 0) { |
651 | perror ("VIDIOC_ENUMSTD"); | 554 | perror("VIDIOC_ENUMSTD"); |
652 | exit (EXIT_FAILURE); | 555 | exit(EXIT_FAILURE); |
653 | } | 556 | } |
654 | </programlisting> | 557 | </programlisting> |
655 | </example> | 558 | </example> |
@@ -662,26 +565,26 @@ input</title> | |||
662 | &v4l2-input; input; | 565 | &v4l2-input; input; |
663 | &v4l2-standard; standard; | 566 | &v4l2-standard; standard; |
664 | 567 | ||
665 | memset (&input, 0, sizeof (input)); | 568 | memset(&input, 0, sizeof(input)); |
666 | 569 | ||
667 | if (-1 == ioctl (fd, &VIDIOC-G-INPUT;, &input.index)) { | 570 | if (-1 == ioctl(fd, &VIDIOC-G-INPUT;, &input.index)) { |
668 | perror ("VIDIOC_G_INPUT"); | 571 | perror("VIDIOC_G_INPUT"); |
669 | exit (EXIT_FAILURE); | 572 | exit(EXIT_FAILURE); |
670 | } | 573 | } |
671 | 574 | ||
672 | if (-1 == ioctl (fd, &VIDIOC-ENUMINPUT;, &input)) { | 575 | if (-1 == ioctl(fd, &VIDIOC-ENUMINPUT;, &input)) { |
673 | perror ("VIDIOC_ENUM_INPUT"); | 576 | perror("VIDIOC_ENUM_INPUT"); |
674 | exit (EXIT_FAILURE); | 577 | exit(EXIT_FAILURE); |
675 | } | 578 | } |
676 | 579 | ||
677 | printf ("Current input %s supports:\n", input.name); | 580 | printf("Current input %s supports:\n", input.name); |
678 | 581 | ||
679 | memset (&standard, 0, sizeof (standard)); | 582 | memset(&standard, 0, sizeof(standard)); |
680 | standard.index = 0; | 583 | standard.index = 0; |
681 | 584 | ||
682 | while (0 == ioctl (fd, &VIDIOC-ENUMSTD;, &standard)) { | 585 | while (0 == ioctl(fd, &VIDIOC-ENUMSTD;, &standard)) { |
683 | if (standard.id & input.std) | 586 | if (standard.id & input.std) |
684 | printf ("%s\n", standard.name); | 587 | printf("%s\n", standard.name); |
685 | 588 | ||
686 | standard.index++; | 589 | standard.index++; |
687 | } | 590 | } |
@@ -690,8 +593,8 @@ while (0 == ioctl (fd, &VIDIOC-ENUMSTD;, &standard)) { | |||
690 | empty unless this device falls under the USB exception. */ | 593 | empty unless this device falls under the USB exception. */ |
691 | 594 | ||
692 | if (errno != EINVAL || standard.index == 0) { | 595 | if (errno != EINVAL || standard.index == 0) { |
693 | perror ("VIDIOC_ENUMSTD"); | 596 | perror("VIDIOC_ENUMSTD"); |
694 | exit (EXIT_FAILURE); | 597 | exit(EXIT_FAILURE); |
695 | } | 598 | } |
696 | </programlisting> | 599 | </programlisting> |
697 | </example> | 600 | </example> |
@@ -703,21 +606,21 @@ if (errno != EINVAL || standard.index == 0) { | |||
703 | &v4l2-input; input; | 606 | &v4l2-input; input; |
704 | &v4l2-std-id; std_id; | 607 | &v4l2-std-id; std_id; |
705 | 608 | ||
706 | memset (&input, 0, sizeof (input)); | 609 | memset(&input, 0, sizeof(input)); |
707 | 610 | ||
708 | if (-1 == ioctl (fd, &VIDIOC-G-INPUT;, &input.index)) { | 611 | if (-1 == ioctl(fd, &VIDIOC-G-INPUT;, &input.index)) { |
709 | perror ("VIDIOC_G_INPUT"); | 612 | perror("VIDIOC_G_INPUT"); |
710 | exit (EXIT_FAILURE); | 613 | exit(EXIT_FAILURE); |
711 | } | 614 | } |
712 | 615 | ||
713 | if (-1 == ioctl (fd, &VIDIOC-ENUMINPUT;, &input)) { | 616 | if (-1 == ioctl(fd, &VIDIOC-ENUMINPUT;, &input)) { |
714 | perror ("VIDIOC_ENUM_INPUT"); | 617 | perror("VIDIOC_ENUM_INPUT"); |
715 | exit (EXIT_FAILURE); | 618 | exit(EXIT_FAILURE); |
716 | } | 619 | } |
717 | 620 | ||
718 | if (0 == (input.std & V4L2_STD_PAL_BG)) { | 621 | if (0 == (input.std & V4L2_STD_PAL_BG)) { |
719 | fprintf (stderr, "Oops. B/G PAL is not supported.\n"); | 622 | fprintf(stderr, "Oops. B/G PAL is not supported.\n"); |
720 | exit (EXIT_FAILURE); | 623 | exit(EXIT_FAILURE); |
721 | } | 624 | } |
722 | 625 | ||
723 | /* Note this is also supposed to work when only B | 626 | /* Note this is also supposed to work when only B |
@@ -725,9 +628,9 @@ if (0 == (input.std & V4L2_STD_PAL_BG)) { | |||
725 | 628 | ||
726 | std_id = V4L2_STD_PAL_BG; | 629 | std_id = V4L2_STD_PAL_BG; |
727 | 630 | ||
728 | if (-1 == ioctl (fd, &VIDIOC-S-STD;, &std_id)) { | 631 | if (-1 == ioctl(fd, &VIDIOC-S-STD;, &std_id)) { |
729 | perror ("VIDIOC_S_STD"); | 632 | perror("VIDIOC_S_STD"); |
730 | exit (EXIT_FAILURE); | 633 | exit(EXIT_FAILURE); |
731 | } | 634 | } |
732 | </programlisting> | 635 | </programlisting> |
733 | </example> | 636 | </example> |
@@ -740,26 +643,25 @@ corresponding video timings. Today there are many more different hardware interf | |||
740 | such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry | 643 | such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry |
741 | video signals and there is a need to extend the API to select the video timings | 644 | video signals and there is a need to extend the API to select the video timings |
742 | for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to | 645 | for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to |
743 | the limited bits available, a new set of IOCTLs was added to set/get video timings at | 646 | the limited bits available, a new set of ioctls was added to set/get video timings at |
744 | the input and output: </para><itemizedlist> | 647 | the input and output.</para> |
745 | <listitem> | 648 | |
746 | <para>DV Timings: This will allow applications to define detailed | 649 | <para>These ioctls deal with the detailed digital video timings that define |
747 | video timings for the interface. This includes parameters such as width, height, | 650 | each video format. This includes parameters such as the active video width and height, |
748 | polarities, frontporch, backporch etc. The <filename>linux/v4l2-dv-timings.h</filename> | 651 | signal polarities, frontporches, backporches, sync widths etc. The <filename>linux/v4l2-dv-timings.h</filename> |
749 | header can be used to get the timings of the formats in the <xref linkend="cea861" /> and | 652 | header can be used to get the timings of the formats in the <xref linkend="cea861" /> and |
750 | <xref linkend="vesadmt" /> standards. | 653 | <xref linkend="vesadmt" /> standards. |
751 | </para> | 654 | </para> |
752 | </listitem> | 655 | |
753 | </itemizedlist> | 656 | <para>To enumerate and query the attributes of the DV timings supported by a device |
754 | <para>To enumerate and query the attributes of the DV timings supported by a device, | ||
755 | applications use the &VIDIOC-ENUM-DV-TIMINGS; and &VIDIOC-DV-TIMINGS-CAP; ioctls. | 657 | applications use the &VIDIOC-ENUM-DV-TIMINGS; and &VIDIOC-DV-TIMINGS-CAP; ioctls. |
756 | To set DV timings for the device, applications use the | 658 | To set DV timings for the device applications use the |
757 | &VIDIOC-S-DV-TIMINGS; ioctl and to get current DV timings they use the | 659 | &VIDIOC-S-DV-TIMINGS; ioctl and to get current DV timings they use the |
758 | &VIDIOC-G-DV-TIMINGS; ioctl. To detect the DV timings as seen by the video receiver applications | 660 | &VIDIOC-G-DV-TIMINGS; ioctl. To detect the DV timings as seen by the video receiver applications |
759 | use the &VIDIOC-QUERY-DV-TIMINGS; ioctl.</para> | 661 | use the &VIDIOC-QUERY-DV-TIMINGS; ioctl.</para> |
760 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and | 662 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and |
761 | <xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the | 663 | <xref linkend="output-capabilities"/> flags to determine whether the digital video ioctls |
762 | video timings for the device.</para> | 664 | can be used with the given input or output.</para> |
763 | </section> | 665 | </section> |
764 | 666 | ||
765 | &sub-controls; | 667 | &sub-controls; |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index c4cac6dbf9af..eee6f0f4aa43 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -397,7 +397,7 @@ linkend="control" />.</para> | |||
397 | 397 | ||
398 | <para>The <structfield>depth</structfield> (average number of | 398 | <para>The <structfield>depth</structfield> (average number of |
399 | bits per pixel) of a video image is implied by the selected image | 399 | bits per pixel) of a video image is implied by the selected image |
400 | format. V4L2 does not explicitely provide such information assuming | 400 | format. V4L2 does not explicitly provide such information assuming |
401 | applications recognizing the format are aware of the image depth and | 401 | applications recognizing the format are aware of the image depth and |
402 | others need not know. The <structfield>palette</structfield> field | 402 | others need not know. The <structfield>palette</structfield> field |
403 | moved into the &v4l2-pix-format;:<informaltable> | 403 | moved into the &v4l2-pix-format;:<informaltable> |
@@ -2535,6 +2535,16 @@ fields changed from _s32 to _u32. | |||
2535 | </orderedlist> | 2535 | </orderedlist> |
2536 | </section> | 2536 | </section> |
2537 | 2537 | ||
2538 | <section> | ||
2539 | <title>V4L2 in Linux 3.15</title> | ||
2540 | <orderedlist> | ||
2541 | <listitem> | ||
2542 | <para>Added Software Defined Radio (SDR) Interface. | ||
2543 | </para> | ||
2544 | </listitem> | ||
2545 | </orderedlist> | ||
2546 | </section> | ||
2547 | |||
2538 | <section id="other"> | 2548 | <section id="other"> |
2539 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2549 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2540 | 2550 | ||
@@ -2651,6 +2661,9 @@ ioctls.</para> | |||
2651 | <listitem> | 2661 | <listitem> |
2652 | <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para> | 2662 | <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para> |
2653 | </listitem> | 2663 | </listitem> |
2664 | <listitem> | ||
2665 | <para>Software Defined Radio (SDR) Interface, <xref linkend="sdr" />.</para> | ||
2666 | </listitem> | ||
2654 | </itemizedlist> | 2667 | </itemizedlist> |
2655 | </section> | 2668 | </section> |
2656 | 2669 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index a5a3188e5af7..47198eef75a4 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -2258,6 +2258,26 @@ Applicable to the MPEG1, MPEG2, MPEG4 encoders.</entry> | |||
2258 | VBV buffer control.</entry> | 2258 | VBV buffer control.</entry> |
2259 | </row> | 2259 | </row> |
2260 | 2260 | ||
2261 | <row><entry></entry></row> | ||
2262 | <row id="v4l2-mpeg-video-hor-search-range"> | ||
2263 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE</constant> </entry> | ||
2264 | <entry>integer</entry> | ||
2265 | </row> | ||
2266 | <row><entry spanname="descr">Horizontal search range defines maximum horizontal search area in pixels | ||
2267 | to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set | ||
2268 | horizontal search range for motion estimation module in video encoder.</entry> | ||
2269 | </row> | ||
2270 | |||
2271 | <row><entry></entry></row> | ||
2272 | <row id="v4l2-mpeg-video-vert-search-range"> | ||
2273 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE</constant> </entry> | ||
2274 | <entry>integer</entry> | ||
2275 | </row> | ||
2276 | <row><entry spanname="descr">Vertical search range defines maximum vertical search area in pixels | ||
2277 | to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set | ||
2278 | vertical search range for motion estimation module in video encoder.</entry> | ||
2279 | </row> | ||
2280 | |||
2261 | <row><entry></entry></row> | 2281 | <row><entry></entry></row> |
2262 | <row> | 2282 | <row> |
2263 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant> </entry> | 2283 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant> </entry> |
@@ -4370,6 +4390,24 @@ interface and may change in the future.</para> | |||
4370 | <entry>The flash controller has detected a short or open | 4390 | <entry>The flash controller has detected a short or open |
4371 | circuit condition on the indicator LED.</entry> | 4391 | circuit condition on the indicator LED.</entry> |
4372 | </row> | 4392 | </row> |
4393 | <row> | ||
4394 | <entry><constant>V4L2_FLASH_FAULT_UNDER_VOLTAGE</constant></entry> | ||
4395 | <entry>Flash controller voltage to the flash LED | ||
4396 | has been below the minimum limit specific to the flash | ||
4397 | controller.</entry> | ||
4398 | </row> | ||
4399 | <row> | ||
4400 | <entry><constant>V4L2_FLASH_FAULT_INPUT_VOLTAGE</constant></entry> | ||
4401 | <entry>The input voltage of the flash controller is below | ||
4402 | the limit under which strobing the flash at full current | ||
4403 | will not be possible.The condition persists until this flag | ||
4404 | is no longer set.</entry> | ||
4405 | </row> | ||
4406 | <row> | ||
4407 | <entry><constant>V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE</constant></entry> | ||
4408 | <entry>The temperature of the LED has exceeded its | ||
4409 | allowed upper limit.</entry> | ||
4410 | </row> | ||
4373 | </tbody> | 4411 | </tbody> |
4374 | </entrytbl> | 4412 | </entrytbl> |
4375 | </row> | 4413 | </row> |
@@ -4971,4 +5009,142 @@ defines possible values for de-emphasis. Here they are:</entry> | |||
4971 | </table> | 5009 | </table> |
4972 | 5010 | ||
4973 | </section> | 5011 | </section> |
5012 | |||
5013 | <section id="rf-tuner-controls"> | ||
5014 | <title>RF Tuner Control Reference</title> | ||
5015 | |||
5016 | <para> | ||
5017 | The RF Tuner (RF_TUNER) class includes controls for common features of devices | ||
5018 | having RF tuner. | ||
5019 | </para> | ||
5020 | <para> | ||
5021 | In this context, RF tuner is radio receiver circuit between antenna and | ||
5022 | demodulator. It receives radio frequency (RF) from the antenna and converts that | ||
5023 | received signal to lower intermediate frequency (IF) or baseband frequency (BB). | ||
5024 | Tuners that could do baseband output are often called Zero-IF tuners. Older | ||
5025 | tuners were typically simple PLL tuners inside a metal box, whilst newer ones | ||
5026 | are highly integrated chips without a metal box "silicon tuners". These controls | ||
5027 | are mostly applicable for new feature rich silicon tuners, just because older | ||
5028 | tuners does not have much adjustable features. | ||
5029 | </para> | ||
5030 | <para> | ||
5031 | For more information about RF tuners see | ||
5032 | <ulink url="http://en.wikipedia.org/wiki/Tuner_%28radio%29">Tuner (radio)</ulink> | ||
5033 | and | ||
5034 | <ulink url="http://en.wikipedia.org/wiki/RF_front_end">RF front end</ulink> | ||
5035 | from Wikipedia. | ||
5036 | </para> | ||
5037 | |||
5038 | <table pgwide="1" frame="none" id="rf-tuner-control-id"> | ||
5039 | <title>RF_TUNER Control IDs</title> | ||
5040 | |||
5041 | <tgroup cols="4"> | ||
5042 | <colspec colname="c1" colwidth="1*" /> | ||
5043 | <colspec colname="c2" colwidth="6*" /> | ||
5044 | <colspec colname="c3" colwidth="2*" /> | ||
5045 | <colspec colname="c4" colwidth="6*" /> | ||
5046 | <spanspec namest="c1" nameend="c2" spanname="id" /> | ||
5047 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | ||
5048 | <thead> | ||
5049 | <row> | ||
5050 | <entry spanname="id" align="left">ID</entry> | ||
5051 | <entry align="left">Type</entry> | ||
5052 | </row> | ||
5053 | <row rowsep="1"> | ||
5054 | <entry spanname="descr" align="left">Description</entry> | ||
5055 | </row> | ||
5056 | </thead> | ||
5057 | <tbody valign="top"> | ||
5058 | <row><entry></entry></row> | ||
5059 | <row> | ||
5060 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_CLASS</constant> </entry> | ||
5061 | <entry>class</entry> | ||
5062 | </row><row><entry spanname="descr">The RF_TUNER class | ||
5063 | descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a | ||
5064 | description of this control class.</entry> | ||
5065 | </row> | ||
5066 | <row> | ||
5067 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_BANDWIDTH_AUTO</constant> </entry> | ||
5068 | <entry>boolean</entry> | ||
5069 | </row> | ||
5070 | <row> | ||
5071 | <entry spanname="descr">Enables/disables tuner radio channel | ||
5072 | bandwidth configuration. In automatic mode bandwidth configuration is performed | ||
5073 | by the driver.</entry> | ||
5074 | </row> | ||
5075 | <row> | ||
5076 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_BANDWIDTH</constant> </entry> | ||
5077 | <entry>integer</entry> | ||
5078 | </row> | ||
5079 | <row> | ||
5080 | <entry spanname="descr">Filter(s) on tuner signal path are used to | ||
5081 | filter signal according to receiving party needs. Driver configures filters to | ||
5082 | fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not | ||
5083 | set. Unit is in Hz. The range and step are driver-specific.</entry> | ||
5084 | </row> | ||
5085 | <row> | ||
5086 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> </entry> | ||
5087 | <entry>boolean</entry> | ||
5088 | </row> | ||
5089 | <row> | ||
5090 | <entry spanname="descr">Enables/disables LNA automatic gain control (AGC)</entry> | ||
5091 | </row> | ||
5092 | <row> | ||
5093 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO</constant> </entry> | ||
5094 | <entry>boolean</entry> | ||
5095 | </row> | ||
5096 | <row> | ||
5097 | <entry spanname="descr">Enables/disables mixer automatic gain control (AGC)</entry> | ||
5098 | </row> | ||
5099 | <row> | ||
5100 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_IF_GAIN_AUTO</constant> </entry> | ||
5101 | <entry>boolean</entry> | ||
5102 | </row> | ||
5103 | <row> | ||
5104 | <entry spanname="descr">Enables/disables IF automatic gain control (AGC)</entry> | ||
5105 | </row> | ||
5106 | <row> | ||
5107 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN</constant> </entry> | ||
5108 | <entry>integer</entry> | ||
5109 | </row> | ||
5110 | <row> | ||
5111 | <entry spanname="descr">LNA (low noise amplifier) gain is first | ||
5112 | gain stage on the RF tuner signal path. It is located very close to tuner | ||
5113 | antenna input. Used when <constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> is not set. | ||
5114 | The range and step are driver-specific.</entry> | ||
5115 | </row> | ||
5116 | <row> | ||
5117 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_MIXER_GAIN</constant> </entry> | ||
5118 | <entry>integer</entry> | ||
5119 | </row> | ||
5120 | <row> | ||
5121 | <entry spanname="descr">Mixer gain is second gain stage on the RF | ||
5122 | tuner signal path. It is located inside mixer block, where RF signal is | ||
5123 | down-converted by the mixer. Used when <constant>V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO</constant> | ||
5124 | is not set. The range and step are driver-specific.</entry> | ||
5125 | </row> | ||
5126 | <row> | ||
5127 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_IF_GAIN</constant> </entry> | ||
5128 | <entry>integer</entry> | ||
5129 | </row> | ||
5130 | <row> | ||
5131 | <entry spanname="descr">IF gain is last gain stage on the RF tuner | ||
5132 | signal path. It is located on output of RF tuner. It controls signal level of | ||
5133 | intermediate frequency output or baseband output. Used when | ||
5134 | <constant>V4L2_CID_RF_TUNER_IF_GAIN_AUTO</constant> is not set. The range and step are | ||
5135 | driver-specific.</entry> | ||
5136 | </row> | ||
5137 | <row> | ||
5138 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_PLL_LOCK</constant> </entry> | ||
5139 | <entry>boolean</entry> | ||
5140 | </row> | ||
5141 | <row> | ||
5142 | <entry spanname="descr">Is synthesizer PLL locked? RF tuner is | ||
5143 | receiving given frequency when that control is set. This is a read-only control. | ||
5144 | </entry> | ||
5145 | </row> | ||
5146 | </tbody> | ||
5147 | </tgroup> | ||
5148 | </table> | ||
5149 | </section> | ||
4974 | </section> | 5150 | </section> |
diff --git a/Documentation/DocBook/media/v4l/dev-osd.xml b/Documentation/DocBook/media/v4l/dev-osd.xml index dd91d6134e8c..54853329140b 100644 --- a/Documentation/DocBook/media/v4l/dev-osd.xml +++ b/Documentation/DocBook/media/v4l/dev-osd.xml | |||
@@ -56,18 +56,18 @@ framebuffer device.</para> | |||
56 | unsigned int i; | 56 | unsigned int i; |
57 | int fb_fd; | 57 | int fb_fd; |
58 | 58 | ||
59 | if (-1 == ioctl (fd, VIDIOC_G_FBUF, &fbuf)) { | 59 | if (-1 == ioctl(fd, VIDIOC_G_FBUF, &fbuf)) { |
60 | perror ("VIDIOC_G_FBUF"); | 60 | perror("VIDIOC_G_FBUF"); |
61 | exit (EXIT_FAILURE); | 61 | exit(EXIT_FAILURE); |
62 | } | 62 | } |
63 | 63 | ||
64 | for (i = 0; i > 30; ++i) { | 64 | for (i = 0; i < 30; i++) { |
65 | char dev_name[16]; | 65 | char dev_name[16]; |
66 | struct fb_fix_screeninfo si; | 66 | struct fb_fix_screeninfo si; |
67 | 67 | ||
68 | snprintf (dev_name, sizeof (dev_name), "/dev/fb%u", i); | 68 | snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i); |
69 | 69 | ||
70 | fb_fd = open (dev_name, O_RDWR); | 70 | fb_fd = open(dev_name, O_RDWR); |
71 | if (-1 == fb_fd) { | 71 | if (-1 == fb_fd) { |
72 | switch (errno) { | 72 | switch (errno) { |
73 | case ENOENT: /* no such file */ | 73 | case ENOENT: /* no such file */ |
@@ -75,19 +75,19 @@ for (i = 0; i > 30; ++i) { | |||
75 | continue; | 75 | continue; |
76 | 76 | ||
77 | default: | 77 | default: |
78 | perror ("open"); | 78 | perror("open"); |
79 | exit (EXIT_FAILURE); | 79 | exit(EXIT_FAILURE); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | if (0 == ioctl (fb_fd, FBIOGET_FSCREENINFO, &si)) { | 83 | if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) { |
84 | if (si.smem_start == (unsigned long) fbuf.base) | 84 | if (si.smem_start == (unsigned long)fbuf.base) |
85 | break; | 85 | break; |
86 | } else { | 86 | } else { |
87 | /* Apparently not a framebuffer device. */ | 87 | /* Apparently not a framebuffer device. */ |
88 | } | 88 | } |
89 | 89 | ||
90 | close (fb_fd); | 90 | close(fb_fd); |
91 | fb_fd = -1; | 91 | fb_fd = -1; |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/Documentation/DocBook/media/v4l/dev-sdr.xml b/Documentation/DocBook/media/v4l/dev-sdr.xml new file mode 100644 index 000000000000..dc14804f5436 --- /dev/null +++ b/Documentation/DocBook/media/v4l/dev-sdr.xml | |||
@@ -0,0 +1,110 @@ | |||
1 | <title>Software Defined Radio Interface (SDR)</title> | ||
2 | |||
3 | <note> | ||
4 | <title>Experimental</title> | ||
5 | <para>This is an <link linkend="experimental"> experimental </link> | ||
6 | interface and may change in the future.</para> | ||
7 | </note> | ||
8 | |||
9 | <para> | ||
10 | SDR is an abbreviation of Software Defined Radio, the radio device | ||
11 | which uses application software for modulation or demodulation. This interface | ||
12 | is intended for controlling and data streaming of such devices. | ||
13 | </para> | ||
14 | |||
15 | <para> | ||
16 | SDR devices are accessed through character device special files named | ||
17 | <filename>/dev/swradio0</filename> to <filename>/dev/swradio255</filename> | ||
18 | with major number 81 and dynamically allocated minor numbers 0 to 255. | ||
19 | </para> | ||
20 | |||
21 | <section> | ||
22 | <title>Querying Capabilities</title> | ||
23 | |||
24 | <para> | ||
25 | Devices supporting the SDR receiver interface set the | ||
26 | <constant>V4L2_CAP_SDR_CAPTURE</constant> and | ||
27 | <constant>V4L2_CAP_TUNER</constant> flag in the | ||
28 | <structfield>capabilities</structfield> field of &v4l2-capability; | ||
29 | returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an | ||
30 | Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver. | ||
31 | At least one of the read/write, streaming or asynchronous I/O methods must | ||
32 | be supported. | ||
33 | </para> | ||
34 | </section> | ||
35 | |||
36 | <section> | ||
37 | <title>Supplemental Functions</title> | ||
38 | |||
39 | <para> | ||
40 | SDR devices can support <link linkend="control">controls</link>, and must | ||
41 | support the <link linkend="tuner">tuner</link> ioctls. Tuner ioctls are used | ||
42 | for setting the ADC sampling rate (sampling frequency) and the possible RF tuner | ||
43 | frequency. | ||
44 | </para> | ||
45 | |||
46 | <para> | ||
47 | The <constant>V4L2_TUNER_ADC</constant> tuner type is used for ADC tuners, and | ||
48 | the <constant>V4L2_TUNER_RF</constant> tuner type is used for RF tuners. The | ||
49 | tuner index of the RF tuner (if any) must always follow the ADC tuner index. | ||
50 | Normally the ADC tuner is #0 and the RF tuner is #1. | ||
51 | </para> | ||
52 | |||
53 | <para> | ||
54 | The &VIDIOC-S-HW-FREQ-SEEK; ioctl is not supported. | ||
55 | </para> | ||
56 | </section> | ||
57 | |||
58 | <section> | ||
59 | <title>Data Format Negotiation</title> | ||
60 | |||
61 | <para> | ||
62 | The SDR capture device uses the <link linkend="format">format</link> ioctls to | ||
63 | select the capture format. Both the sampling resolution and the data streaming | ||
64 | format are bound to that selectable format. In addition to the basic | ||
65 | <link linkend="format">format</link> ioctls, the &VIDIOC-ENUM-FMT; ioctl | ||
66 | must be supported as well. | ||
67 | </para> | ||
68 | |||
69 | <para> | ||
70 | To use the <link linkend="format">format</link> ioctls applications set the | ||
71 | <structfield>type</structfield> field of a &v4l2-format; to | ||
72 | <constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> and use the &v4l2-sdr-format; | ||
73 | <structfield>sdr</structfield> member of the <structfield>fmt</structfield> | ||
74 | union as needed per the desired operation. | ||
75 | Currently only the <structfield>pixelformat</structfield> field of | ||
76 | &v4l2-sdr-format; is used. The content of that field is the V4L2 fourcc code | ||
77 | of the data format. | ||
78 | </para> | ||
79 | |||
80 | <table pgwide="1" frame="none" id="v4l2-sdr-format"> | ||
81 | <title>struct <structname>v4l2_sdr_format</structname></title> | ||
82 | <tgroup cols="3"> | ||
83 | &cs-str; | ||
84 | <tbody valign="top"> | ||
85 | <row> | ||
86 | <entry>__u32</entry> | ||
87 | <entry><structfield>pixelformat</structfield></entry> | ||
88 | <entry> | ||
89 | The data format or type of compression, set by the application. This is a | ||
90 | little endian <link linkend="v4l2-fourcc">four character code</link>. | ||
91 | V4L2 defines SDR formats in <xref linkend="sdr-formats" />. | ||
92 | </entry> | ||
93 | </row> | ||
94 | <row> | ||
95 | <entry>__u8</entry> | ||
96 | <entry><structfield>reserved[28]</structfield></entry> | ||
97 | <entry>This array is reserved for future extensions. | ||
98 | Drivers and applications must set it to zero.</entry> | ||
99 | </row> | ||
100 | </tbody> | ||
101 | </tgroup> | ||
102 | </table> | ||
103 | |||
104 | <para> | ||
105 | An SDR device may support <link linkend="rw">read/write</link> | ||
106 | and/or streaming (<link linkend="mmap">memory mapping</link> | ||
107 | or <link linkend="userp">user pointer</link>) I/O. | ||
108 | </para> | ||
109 | |||
110 | </section> | ||
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index 2c4c068dde83..97a69bf6f3eb 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -339,8 +339,8 @@ returns immediately with an &EAGAIN; when no buffer is available. The | |||
339 | queues as a side effect. Since there is no notion of doing anything | 339 | queues as a side effect. Since there is no notion of doing anything |
340 | "now" on a multitasking system, if an application needs to synchronize | 340 | "now" on a multitasking system, if an application needs to synchronize |
341 | with another event it should examine the &v4l2-buffer; | 341 | with another event it should examine the &v4l2-buffer; |
342 | <structfield>timestamp</structfield> of captured buffers, or set the | 342 | <structfield>timestamp</structfield> of captured or outputted buffers. |
343 | field before enqueuing buffers for output.</para> | 343 | </para> |
344 | 344 | ||
345 | <para>Drivers implementing memory mapping I/O must | 345 | <para>Drivers implementing memory mapping I/O must |
346 | support the <constant>VIDIOC_REQBUFS</constant>, | 346 | support the <constant>VIDIOC_REQBUFS</constant>, |
@@ -457,7 +457,7 @@ queues and unlocks all buffers as a side effect. Since there is no | |||
457 | notion of doing anything "now" on a multitasking system, if an | 457 | notion of doing anything "now" on a multitasking system, if an |
458 | application needs to synchronize with another event it should examine | 458 | application needs to synchronize with another event it should examine |
459 | the &v4l2-buffer; <structfield>timestamp</structfield> of captured | 459 | the &v4l2-buffer; <structfield>timestamp</structfield> of captured |
460 | buffers, or set the field before enqueuing buffers for output.</para> | 460 | or outputted buffers.</para> |
461 | 461 | ||
462 | <para>Drivers implementing user pointer I/O must | 462 | <para>Drivers implementing user pointer I/O must |
463 | support the <constant>VIDIOC_REQBUFS</constant>, | 463 | support the <constant>VIDIOC_REQBUFS</constant>, |
@@ -620,8 +620,7 @@ returns immediately with an &EAGAIN; when no buffer is available. The | |||
620 | unlocks all buffers as a side effect. Since there is no notion of doing | 620 | unlocks all buffers as a side effect. Since there is no notion of doing |
621 | anything "now" on a multitasking system, if an application needs to synchronize | 621 | anything "now" on a multitasking system, if an application needs to synchronize |
622 | with another event it should examine the &v4l2-buffer; | 622 | with another event it should examine the &v4l2-buffer; |
623 | <structfield>timestamp</structfield> of captured buffers, or set the field | 623 | <structfield>timestamp</structfield> of captured or outputted buffers.</para> |
624 | before enqueuing buffers for output.</para> | ||
625 | 624 | ||
626 | <para>Drivers implementing DMABUF importing I/O must support the | 625 | <para>Drivers implementing DMABUF importing I/O must support the |
627 | <constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>, | 626 | <constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>, |
@@ -654,38 +653,19 @@ plane, are stored in struct <structname>v4l2_plane</structname> instead. | |||
654 | In that case, struct <structname>v4l2_buffer</structname> contains an array of | 653 | In that case, struct <structname>v4l2_buffer</structname> contains an array of |
655 | plane structures.</para> | 654 | plane structures.</para> |
656 | 655 | ||
657 | <para>Nominally timestamps refer to the first data byte transmitted. | 656 | <para>Dequeued video buffers come with timestamps. The driver |
658 | In practice however the wide range of hardware covered by the V4L2 API | 657 | decides at which part of the frame and with which clock the |
659 | limits timestamp accuracy. Often an interrupt routine will | 658 | timestamp is taken. Please see flags in the masks |
660 | sample the system clock shortly after the field or frame was stored | 659 | <constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant> and |
661 | completely in memory. So applications must expect a constant | 660 | <constant>V4L2_BUF_FLAG_TSTAMP_SRC_MASK</constant> in <xref |
662 | difference up to one field or frame period plus a small (few scan | 661 | linkend="buffer-flags" />. These flags are always valid and constant |
663 | lines) random error. The delay and error can be much | 662 | across all buffers during the whole video stream. Changes in these |
664 | larger due to compression or transmission over an external bus when | 663 | flags may take place as a side effect of &VIDIOC-S-INPUT; or |
665 | the frames are not properly stamped by the sender. This is frequently | 664 | &VIDIOC-S-OUTPUT; however. The |
666 | the case with USB cameras. Here timestamps refer to the instant the | 665 | <constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant> timestamp type |
667 | field or frame was received by the driver, not the capture time. These | 666 | which is used by e.g. on mem-to-mem devices is an exception to the |
668 | devices identify by not enumerating any video standards, see <xref | 667 | rule: the timestamp source flags are copied from the OUTPUT video |
669 | linkend="standard" />.</para> | 668 | buffer to the CAPTURE video buffer.</para> |
670 | |||
671 | <para>Similar limitations apply to output timestamps. Typically | ||
672 | the video hardware locks to a clock controlling the video timing, the | ||
673 | horizontal and vertical synchronization pulses. At some point in the | ||
674 | line sequence, possibly the vertical blanking, an interrupt routine | ||
675 | samples the system clock, compares against the timestamp and programs | ||
676 | the hardware to repeat the previous field or frame, or to display the | ||
677 | buffer contents.</para> | ||
678 | |||
679 | <para>Apart of limitations of the video device and natural | ||
680 | inaccuracies of all clocks, it should be noted system time itself is | ||
681 | not perfectly stable. It can be affected by power saving cycles, | ||
682 | warped to insert leap seconds, or even turned back or forth by the | ||
683 | system administrator affecting long term measurements. <footnote> | ||
684 | <para>Since no other Linux multimedia | ||
685 | API supports unadjusted time it would be foolish to introduce here. We | ||
686 | must use a universally supported clock to synchronize different media, | ||
687 | hence time of day.</para> | ||
688 | </footnote></para> | ||
689 | 669 | ||
690 | <table frame="none" pgwide="1" id="v4l2-buffer"> | 670 | <table frame="none" pgwide="1" id="v4l2-buffer"> |
691 | <title>struct <structname>v4l2_buffer</structname></title> | 671 | <title>struct <structname>v4l2_buffer</structname></title> |
@@ -696,10 +676,11 @@ hence time of day.</para> | |||
696 | <entry>__u32</entry> | 676 | <entry>__u32</entry> |
697 | <entry><structfield>index</structfield></entry> | 677 | <entry><structfield>index</structfield></entry> |
698 | <entry></entry> | 678 | <entry></entry> |
699 | <entry>Number of the buffer, set by the application. This | 679 | <entry>Number of the buffer, set by the application except |
700 | field is only used for <link linkend="mmap">memory mapping</link> I/O | 680 | when calling &VIDIOC-DQBUF;, then it is set by the driver. |
701 | and can range from zero to the number of buffers allocated | 681 | This field can range from zero to the number of buffers allocated |
702 | with the &VIDIOC-REQBUFS; ioctl (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.</entry> | 682 | with the &VIDIOC-REQBUFS; ioctl (&v4l2-requestbuffers; <structfield>count</structfield>), |
683 | plus any buffers allocated with &VIDIOC-CREATE-BUFS; minus one.</entry> | ||
703 | </row> | 684 | </row> |
704 | <row> | 685 | <row> |
705 | <entry>__u32</entry> | 686 | <entry>__u32</entry> |
@@ -718,7 +699,7 @@ linkend="v4l2-buf-type" /></entry> | |||
718 | buffer. It depends on the negotiated data format and may change with | 699 | buffer. It depends on the negotiated data format and may change with |
719 | each buffer for compressed variable size data like JPEG images. | 700 | each buffer for compressed variable size data like JPEG images. |
720 | Drivers must set this field when <structfield>type</structfield> | 701 | Drivers must set this field when <structfield>type</structfield> |
721 | refers to an input stream, applications when an output stream.</entry> | 702 | refers to an input stream, applications when it refers to an output stream.</entry> |
722 | </row> | 703 | </row> |
723 | <row> | 704 | <row> |
724 | <entry>__u32</entry> | 705 | <entry>__u32</entry> |
@@ -735,7 +716,7 @@ linkend="buffer-flags" />.</entry> | |||
735 | buffer, see <xref linkend="v4l2-field" />. This field is not used when | 716 | buffer, see <xref linkend="v4l2-field" />. This field is not used when |
736 | the buffer contains VBI data. Drivers must set it when | 717 | the buffer contains VBI data. Drivers must set it when |
737 | <structfield>type</structfield> refers to an input stream, | 718 | <structfield>type</structfield> refers to an input stream, |
738 | applications when an output stream.</entry> | 719 | applications when it refers to an output stream.</entry> |
739 | </row> | 720 | </row> |
740 | <row> | 721 | <row> |
741 | <entry>struct timeval</entry> | 722 | <entry>struct timeval</entry> |
@@ -745,15 +726,13 @@ applications when an output stream.</entry> | |||
745 | byte was captured, as returned by the | 726 | byte was captured, as returned by the |
746 | <function>clock_gettime()</function> function for the relevant | 727 | <function>clock_gettime()</function> function for the relevant |
747 | clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in | 728 | clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in |
748 | <xref linkend="buffer-flags" />. For output streams the data | 729 | <xref linkend="buffer-flags" />. For output streams the driver |
749 | will not be displayed before this time, secondary to the nominal | 730 | stores the time at which the last data byte was actually sent out |
750 | frame rate determined by the current video standard in enqueued | 731 | in the <structfield>timestamp</structfield> field. This permits |
751 | order. Applications can for example zero this field to display | ||
752 | frames as soon as possible. The driver stores the time at which | ||
753 | the first data byte was actually sent out in the | ||
754 | <structfield>timestamp</structfield> field. This permits | ||
755 | applications to monitor the drift between the video and system | 732 | applications to monitor the drift between the video and system |
756 | clock.</para></entry> | 733 | clock. For output streams that use <constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant> |
734 | the application has to fill in the timestamp which will be copied | ||
735 | by the driver to the capture stream.</para></entry> | ||
757 | </row> | 736 | </row> |
758 | <row> | 737 | <row> |
759 | <entry>&v4l2-timecode;</entry> | 738 | <entry>&v4l2-timecode;</entry> |
@@ -846,7 +825,8 @@ is the file descriptor associated with a DMABUF buffer.</entry> | |||
846 | <entry><structfield>length</structfield></entry> | 825 | <entry><structfield>length</structfield></entry> |
847 | <entry></entry> | 826 | <entry></entry> |
848 | <entry>Size of the buffer (not the payload) in bytes for the | 827 | <entry>Size of the buffer (not the payload) in bytes for the |
849 | single-planar API. For the multi-planar API the application sets | 828 | single-planar API. This is set by the driver based on the calls to |
829 | &VIDIOC-REQBUFS; and/or &VIDIOC-CREATE-BUFS;. For the multi-planar API the application sets | ||
850 | this to the number of elements in the <structfield>planes</structfield> | 830 | this to the number of elements in the <structfield>planes</structfield> |
851 | array. The driver will fill in the actual number of valid elements in | 831 | array. The driver will fill in the actual number of valid elements in |
852 | that array. | 832 | that array. |
@@ -880,13 +860,15 @@ should set this to 0.</entry> | |||
880 | <entry><structfield>bytesused</structfield></entry> | 860 | <entry><structfield>bytesused</structfield></entry> |
881 | <entry></entry> | 861 | <entry></entry> |
882 | <entry>The number of bytes occupied by data in the plane | 862 | <entry>The number of bytes occupied by data in the plane |
883 | (its payload).</entry> | 863 | (its payload). Drivers must set this field when <structfield>type</structfield> |
864 | refers to an input stream, applications when it refers to an output stream.</entry> | ||
884 | </row> | 865 | </row> |
885 | <row> | 866 | <row> |
886 | <entry>__u32</entry> | 867 | <entry>__u32</entry> |
887 | <entry><structfield>length</structfield></entry> | 868 | <entry><structfield>length</structfield></entry> |
888 | <entry></entry> | 869 | <entry></entry> |
889 | <entry>Size in bytes of the plane (not its payload).</entry> | 870 | <entry>Size in bytes of the plane (not its payload). This is set by the driver |
871 | based on the calls to &VIDIOC-REQBUFS; and/or &VIDIOC-CREATE-BUFS;.</entry> | ||
890 | </row> | 872 | </row> |
891 | <row> | 873 | <row> |
892 | <entry>union</entry> | 874 | <entry>union</entry> |
@@ -925,7 +907,9 @@ should set this to 0.</entry> | |||
925 | <entry>__u32</entry> | 907 | <entry>__u32</entry> |
926 | <entry><structfield>data_offset</structfield></entry> | 908 | <entry><structfield>data_offset</structfield></entry> |
927 | <entry></entry> | 909 | <entry></entry> |
928 | <entry>Offset in bytes to video data in the plane, if applicable. | 910 | <entry>Offset in bytes to video data in the plane. |
911 | Drivers must set this field when <structfield>type</structfield> | ||
912 | refers to an input stream, applications when it refers to an output stream. | ||
929 | </entry> | 913 | </entry> |
930 | </row> | 914 | </row> |
931 | <row> | 915 | <row> |
@@ -1005,6 +989,12 @@ should set this to 0.</entry> | |||
1005 | <entry>Buffer for video output overlay (OSD), see <xref | 989 | <entry>Buffer for video output overlay (OSD), see <xref |
1006 | linkend="osd" />.</entry> | 990 | linkend="osd" />.</entry> |
1007 | </row> | 991 | </row> |
992 | <row> | ||
993 | <entry><constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant></entry> | ||
994 | <entry>11</entry> | ||
995 | <entry>Buffer for Software Defined Radio (SDR), see <xref | ||
996 | linkend="sdr" />.</entry> | ||
997 | </row> | ||
1008 | </tbody> | 998 | </tbody> |
1009 | </tgroup> | 999 | </tgroup> |
1010 | </table> | 1000 | </table> |
@@ -1016,7 +1006,7 @@ should set this to 0.</entry> | |||
1016 | <tbody valign="top"> | 1006 | <tbody valign="top"> |
1017 | <row> | 1007 | <row> |
1018 | <entry><constant>V4L2_BUF_FLAG_MAPPED</constant></entry> | 1008 | <entry><constant>V4L2_BUF_FLAG_MAPPED</constant></entry> |
1019 | <entry>0x0001</entry> | 1009 | <entry>0x00000001</entry> |
1020 | <entry>The buffer resides in device memory and has been mapped | 1010 | <entry>The buffer resides in device memory and has been mapped |
1021 | into the application's address space, see <xref linkend="mmap" /> for details. | 1011 | into the application's address space, see <xref linkend="mmap" /> for details. |
1022 | Drivers set or clear this flag when the | 1012 | Drivers set or clear this flag when the |
@@ -1026,7 +1016,7 @@ Drivers set or clear this flag when the | |||
1026 | </row> | 1016 | </row> |
1027 | <row> | 1017 | <row> |
1028 | <entry><constant>V4L2_BUF_FLAG_QUEUED</constant></entry> | 1018 | <entry><constant>V4L2_BUF_FLAG_QUEUED</constant></entry> |
1029 | <entry>0x0002</entry> | 1019 | <entry>0x00000002</entry> |
1030 | <entry>Internally drivers maintain two buffer queues, an | 1020 | <entry>Internally drivers maintain two buffer queues, an |
1031 | incoming and outgoing queue. When this flag is set, the buffer is | 1021 | incoming and outgoing queue. When this flag is set, the buffer is |
1032 | currently on the incoming queue. It automatically moves to the | 1022 | currently on the incoming queue. It automatically moves to the |
@@ -1039,7 +1029,7 @@ cleared.</entry> | |||
1039 | </row> | 1029 | </row> |
1040 | <row> | 1030 | <row> |
1041 | <entry><constant>V4L2_BUF_FLAG_DONE</constant></entry> | 1031 | <entry><constant>V4L2_BUF_FLAG_DONE</constant></entry> |
1042 | <entry>0x0004</entry> | 1032 | <entry>0x00000004</entry> |
1043 | <entry>When this flag is set, the buffer is currently on | 1033 | <entry>When this flag is set, the buffer is currently on |
1044 | the outgoing queue, ready to be dequeued from the driver. Drivers set | 1034 | the outgoing queue, ready to be dequeued from the driver. Drivers set |
1045 | or clear this flag when the <constant>VIDIOC_QUERYBUF</constant> ioctl | 1035 | or clear this flag when the <constant>VIDIOC_QUERYBUF</constant> ioctl |
@@ -1049,11 +1039,11 @@ buffer cannot be on both queues at the same time, the | |||
1049 | <constant>V4L2_BUF_FLAG_QUEUED</constant> and | 1039 | <constant>V4L2_BUF_FLAG_QUEUED</constant> and |
1050 | <constant>V4L2_BUF_FLAG_DONE</constant> flag are mutually exclusive. | 1040 | <constant>V4L2_BUF_FLAG_DONE</constant> flag are mutually exclusive. |
1051 | They can be both cleared however, then the buffer is in "dequeued" | 1041 | They can be both cleared however, then the buffer is in "dequeued" |
1052 | state, in the application domain to say so.</entry> | 1042 | state, in the application domain so to say.</entry> |
1053 | </row> | 1043 | </row> |
1054 | <row> | 1044 | <row> |
1055 | <entry><constant>V4L2_BUF_FLAG_ERROR</constant></entry> | 1045 | <entry><constant>V4L2_BUF_FLAG_ERROR</constant></entry> |
1056 | <entry>0x0040</entry> | 1046 | <entry>0x00000040</entry> |
1057 | <entry>When this flag is set, the buffer has been dequeued | 1047 | <entry>When this flag is set, the buffer has been dequeued |
1058 | successfully, although the data might have been corrupted. | 1048 | successfully, although the data might have been corrupted. |
1059 | This is recoverable, streaming may continue as normal and | 1049 | This is recoverable, streaming may continue as normal and |
@@ -1063,35 +1053,43 @@ state, in the application domain to say so.</entry> | |||
1063 | </row> | 1053 | </row> |
1064 | <row> | 1054 | <row> |
1065 | <entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry> | 1055 | <entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry> |
1066 | <entry>0x0008</entry> | 1056 | <entry>0x00000008</entry> |
1067 | <entry>Drivers set or clear this flag when calling the | 1057 | <entry>Drivers set or clear this flag when calling the |
1068 | <constant>VIDIOC_DQBUF</constant> ioctl. It may be set by video | 1058 | <constant>VIDIOC_DQBUF</constant> ioctl. It may be set by video |
1069 | capture devices when the buffer contains a compressed image which is a | 1059 | capture devices when the buffer contains a compressed image which is a |
1070 | key frame (or field), &ie; can be decompressed on its own.</entry> | 1060 | key frame (or field), &ie; can be decompressed on its own. Also know as |
1061 | an I-frame. Applications can set this bit when <structfield>type</structfield> | ||
1062 | refers to an output stream.</entry> | ||
1071 | </row> | 1063 | </row> |
1072 | <row> | 1064 | <row> |
1073 | <entry><constant>V4L2_BUF_FLAG_PFRAME</constant></entry> | 1065 | <entry><constant>V4L2_BUF_FLAG_PFRAME</constant></entry> |
1074 | <entry>0x0010</entry> | 1066 | <entry>0x00000010</entry> |
1075 | <entry>Similar to <constant>V4L2_BUF_FLAG_KEYFRAME</constant> | 1067 | <entry>Similar to <constant>V4L2_BUF_FLAG_KEYFRAME</constant> |
1076 | this flags predicted frames or fields which contain only differences to a | 1068 | this flags predicted frames or fields which contain only differences to a |
1077 | previous key frame.</entry> | 1069 | previous key frame. Applications can set this bit when <structfield>type</structfield> |
1070 | refers to an output stream.</entry> | ||
1078 | </row> | 1071 | </row> |
1079 | <row> | 1072 | <row> |
1080 | <entry><constant>V4L2_BUF_FLAG_BFRAME</constant></entry> | 1073 | <entry><constant>V4L2_BUF_FLAG_BFRAME</constant></entry> |
1081 | <entry>0x0020</entry> | 1074 | <entry>0x00000020</entry> |
1082 | <entry>Similar to <constant>V4L2_BUF_FLAG_PFRAME</constant> | 1075 | <entry>Similar to <constant>V4L2_BUF_FLAG_KEYFRAME</constant> |
1083 | this is a bidirectional predicted frame or field. [ooc tbd]</entry> | 1076 | this flags a bi-directional predicted frame or field which contains only |
1077 | the differences between the current frame and both the preceding and following | ||
1078 | key frames to specify its content. Applications can set this bit when | ||
1079 | <structfield>type</structfield> refers to an output stream.</entry> | ||
1084 | </row> | 1080 | </row> |
1085 | <row> | 1081 | <row> |
1086 | <entry><constant>V4L2_BUF_FLAG_TIMECODE</constant></entry> | 1082 | <entry><constant>V4L2_BUF_FLAG_TIMECODE</constant></entry> |
1087 | <entry>0x0100</entry> | 1083 | <entry>0x00000100</entry> |
1088 | <entry>The <structfield>timecode</structfield> field is valid. | 1084 | <entry>The <structfield>timecode</structfield> field is valid. |
1089 | Drivers set or clear this flag when the <constant>VIDIOC_DQBUF</constant> | 1085 | Drivers set or clear this flag when the <constant>VIDIOC_DQBUF</constant> |
1090 | ioctl is called.</entry> | 1086 | ioctl is called. Applications can set this bit and the corresponding |
1087 | <structfield>timecode</structfield> structure when <structfield>type</structfield> | ||
1088 | refers to an output stream.</entry> | ||
1091 | </row> | 1089 | </row> |
1092 | <row> | 1090 | <row> |
1093 | <entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry> | 1091 | <entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry> |
1094 | <entry>0x0400</entry> | 1092 | <entry>0x00000400</entry> |
1095 | <entry>The buffer has been prepared for I/O and can be queued by the | 1093 | <entry>The buffer has been prepared for I/O and can be queued by the |
1096 | application. Drivers set or clear this flag when the | 1094 | application. Drivers set or clear this flag when the |
1097 | <link linkend="vidioc-querybuf">VIDIOC_QUERYBUF</link>, <link | 1095 | <link linkend="vidioc-querybuf">VIDIOC_QUERYBUF</link>, <link |
@@ -1101,7 +1099,7 @@ application. Drivers set or clear this flag when the | |||
1101 | </row> | 1099 | </row> |
1102 | <row> | 1100 | <row> |
1103 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> | 1101 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> |
1104 | <entry>0x0800</entry> | 1102 | <entry>0x00000800</entry> |
1105 | <entry>Caches do not have to be invalidated for this buffer. | 1103 | <entry>Caches do not have to be invalidated for this buffer. |
1106 | Typically applications shall use this flag if the data captured in the buffer | 1104 | Typically applications shall use this flag if the data captured in the buffer |
1107 | is not going to be touched by the CPU, instead the buffer will, probably, be | 1105 | is not going to be touched by the CPU, instead the buffer will, probably, be |
@@ -1110,7 +1108,7 @@ passed on to a DMA-capable hardware unit for further processing or output. | |||
1110 | </row> | 1108 | </row> |
1111 | <row> | 1109 | <row> |
1112 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> | 1110 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> |
1113 | <entry>0x1000</entry> | 1111 | <entry>0x00001000</entry> |
1114 | <entry>Caches do not have to be cleaned for this buffer. | 1112 | <entry>Caches do not have to be cleaned for this buffer. |
1115 | Typically applications shall use this flag for output buffers if the data | 1113 | Typically applications shall use this flag for output buffers if the data |
1116 | in this buffer has not been created by the CPU but by some DMA-capable unit, | 1114 | in this buffer has not been created by the CPU but by some DMA-capable unit, |
@@ -1118,7 +1116,7 @@ in which case caches have not been used.</entry> | |||
1118 | </row> | 1116 | </row> |
1119 | <row> | 1117 | <row> |
1120 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry> | 1118 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry> |
1121 | <entry>0xe000</entry> | 1119 | <entry>0x0000e000</entry> |
1122 | <entry>Mask for timestamp types below. To test the | 1120 | <entry>Mask for timestamp types below. To test the |
1123 | timestamp type, mask out bits not belonging to timestamp | 1121 | timestamp type, mask out bits not belonging to timestamp |
1124 | type by performing a logical and operation with buffer | 1122 | type by performing a logical and operation with buffer |
@@ -1126,7 +1124,7 @@ in which case caches have not been used.</entry> | |||
1126 | </row> | 1124 | </row> |
1127 | <row> | 1125 | <row> |
1128 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN</constant></entry> | 1126 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN</constant></entry> |
1129 | <entry>0x0000</entry> | 1127 | <entry>0x00000000</entry> |
1130 | <entry>Unknown timestamp type. This type is used by | 1128 | <entry>Unknown timestamp type. This type is used by |
1131 | drivers before Linux 3.9 and may be either monotonic (see | 1129 | drivers before Linux 3.9 and may be either monotonic (see |
1132 | below) or realtime (wall clock). Monotonic clock has been | 1130 | below) or realtime (wall clock). Monotonic clock has been |
@@ -1139,7 +1137,7 @@ in which case caches have not been used.</entry> | |||
1139 | </row> | 1137 | </row> |
1140 | <row> | 1138 | <row> |
1141 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC</constant></entry> | 1139 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC</constant></entry> |
1142 | <entry>0x2000</entry> | 1140 | <entry>0x00002000</entry> |
1143 | <entry>The buffer timestamp has been taken from the | 1141 | <entry>The buffer timestamp has been taken from the |
1144 | <constant>CLOCK_MONOTONIC</constant> clock. To access the | 1142 | <constant>CLOCK_MONOTONIC</constant> clock. To access the |
1145 | same clock outside V4L2, use | 1143 | same clock outside V4L2, use |
@@ -1147,10 +1145,42 @@ in which case caches have not been used.</entry> | |||
1147 | </row> | 1145 | </row> |
1148 | <row> | 1146 | <row> |
1149 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant></entry> | 1147 | <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant></entry> |
1150 | <entry>0x4000</entry> | 1148 | <entry>0x00004000</entry> |
1151 | <entry>The CAPTURE buffer timestamp has been taken from the | 1149 | <entry>The CAPTURE buffer timestamp has been taken from the |
1152 | corresponding OUTPUT buffer. This flag applies only to mem2mem devices.</entry> | 1150 | corresponding OUTPUT buffer. This flag applies only to mem2mem devices.</entry> |
1153 | </row> | 1151 | </row> |
1152 | <row> | ||
1153 | <entry><constant>V4L2_BUF_FLAG_TSTAMP_SRC_MASK</constant></entry> | ||
1154 | <entry>0x00070000</entry> | ||
1155 | <entry>Mask for timestamp sources below. The timestamp source | ||
1156 | defines the point of time the timestamp is taken in relation to | ||
1157 | the frame. Logical 'and' operation between the | ||
1158 | <structfield>flags</structfield> field and | ||
1159 | <constant>V4L2_BUF_FLAG_TSTAMP_SRC_MASK</constant> produces the | ||
1160 | value of the timestamp source. Applications must set the timestamp | ||
1161 | source when <structfield>type</structfield> refers to an output stream | ||
1162 | and <constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant> is set.</entry> | ||
1163 | </row> | ||
1164 | <row> | ||
1165 | <entry><constant>V4L2_BUF_FLAG_TSTAMP_SRC_EOF</constant></entry> | ||
1166 | <entry>0x00000000</entry> | ||
1167 | <entry>End Of Frame. The buffer timestamp has been taken | ||
1168 | when the last pixel of the frame has been received or the | ||
1169 | last pixel of the frame has been transmitted. In practice, | ||
1170 | software generated timestamps will typically be read from | ||
1171 | the clock a small amount of time after the last pixel has | ||
1172 | been received or transmitten, depending on the system and | ||
1173 | other activity in it.</entry> | ||
1174 | </row> | ||
1175 | <row> | ||
1176 | <entry><constant>V4L2_BUF_FLAG_TSTAMP_SRC_SOE</constant></entry> | ||
1177 | <entry>0x00010000</entry> | ||
1178 | <entry>Start Of Exposure. The buffer timestamp has been | ||
1179 | taken when the exposure of the frame has begun. This is | ||
1180 | only valid for the | ||
1181 | <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> buffer | ||
1182 | type.</entry> | ||
1183 | </row> | ||
1154 | </tbody> | 1184 | </tbody> |
1155 | </tgroup> | 1185 | </tgroup> |
1156 | </table> | 1186 | </table> |
@@ -1440,10 +1470,9 @@ or application, depending on data direction, must set &v4l2-buffer; | |||
1440 | <constant>V4L2_FIELD_BOTTOM</constant>. Any two successive fields pair | 1470 | <constant>V4L2_FIELD_BOTTOM</constant>. Any two successive fields pair |
1441 | to build a frame. If fields are successive, without any dropped fields | 1471 | to build a frame. If fields are successive, without any dropped fields |
1442 | between them (fields can drop individually), can be determined from | 1472 | between them (fields can drop individually), can be determined from |
1443 | the &v4l2-buffer; <structfield>sequence</structfield> field. Image | 1473 | the &v4l2-buffer; <structfield>sequence</structfield> field. This format |
1444 | sizes refer to the frame, not fields. This format cannot be selected | 1474 | cannot be selected when using the read/write I/O method since there |
1445 | when using the read/write I/O method.<!-- Where it's indistinguishable | 1475 | is no way to communicate if a field was a top or bottom field.</entry> |
1446 | from V4L2_FIELD_SEQ_*. --></entry> | ||
1447 | </row> | 1476 | </row> |
1448 | <row> | 1477 | <row> |
1449 | <entry><constant>V4L2_FIELD_INTERLACED_TB</constant></entry> | 1478 | <entry><constant>V4L2_FIELD_INTERLACED_TB</constant></entry> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml index c51d5a4cda09..fb2b5e35d665 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml | |||
@@ -12,18 +12,17 @@ | |||
12 | <refsect1> | 12 | <refsect1> |
13 | <title>Description</title> | 13 | <title>Description</title> |
14 | 14 | ||
15 | <para>This is a multi-planar, two-plane version of the YUV 4:2:0 format. | 15 | <para>This is a multi-planar, two-plane version of the YUV 4:2:2 format. |
16 | The three components are separated into two sub-images or planes. | 16 | The three components are separated into two sub-images or planes. |
17 | <constant>V4L2_PIX_FMT_NV16M</constant> differs from <constant>V4L2_PIX_FMT_NV16 | 17 | <constant>V4L2_PIX_FMT_NV16M</constant> differs from <constant>V4L2_PIX_FMT_NV16 |
18 | </constant> in that the two planes are non-contiguous in memory, i.e. the chroma | 18 | </constant> in that the two planes are non-contiguous in memory, i.e. the chroma |
19 | plane does not necessarily immediately follows the luma plane. | 19 | plane does not necessarily immediately follow the luma plane. |
20 | The luminance data occupies the first plane. The Y plane has one byte per pixel. | 20 | The luminance data occupies the first plane. The Y plane has one byte per pixel. |
21 | In the second plane there is chrominance data with alternating chroma samples. | 21 | In the second plane there is chrominance data with alternating chroma samples. |
22 | The CbCr plane is the same width and height, in bytes, as the Y plane. | 22 | The CbCr plane is the same width and height, in bytes, as the Y plane. |
23 | Each CbCr pair belongs to four pixels. For example, | 23 | Each CbCr pair belongs to two pixels. For example, |
24 | Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to | 24 | Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to |
25 | Y'<subscript>00</subscript>, Y'<subscript>01</subscript>, | 25 | Y'<subscript>00</subscript>, Y'<subscript>01</subscript>. |
26 | Y'<subscript>10</subscript>, Y'<subscript>11</subscript>. | ||
27 | <constant>V4L2_PIX_FMT_NV61M</constant> is the same as <constant>V4L2_PIX_FMT_NV16M</constant> | 26 | <constant>V4L2_PIX_FMT_NV61M</constant> is the same as <constant>V4L2_PIX_FMT_NV16M</constant> |
28 | except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para> | 27 | except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para> |
29 | 28 | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d65e4f7..e1c4f8b4c0b3 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml | |||
@@ -121,14 +121,14 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
121 | <entry><constant>V4L2_PIX_FMT_RGB332</constant></entry> | 121 | <entry><constant>V4L2_PIX_FMT_RGB332</constant></entry> |
122 | <entry>'RGB1'</entry> | 122 | <entry>'RGB1'</entry> |
123 | <entry></entry> | 123 | <entry></entry> |
124 | <entry>b<subscript>1</subscript></entry> | ||
125 | <entry>b<subscript>0</subscript></entry> | ||
126 | <entry>g<subscript>2</subscript></entry> | ||
127 | <entry>g<subscript>1</subscript></entry> | ||
128 | <entry>g<subscript>0</subscript></entry> | ||
129 | <entry>r<subscript>2</subscript></entry> | 124 | <entry>r<subscript>2</subscript></entry> |
130 | <entry>r<subscript>1</subscript></entry> | 125 | <entry>r<subscript>1</subscript></entry> |
131 | <entry>r<subscript>0</subscript></entry> | 126 | <entry>r<subscript>0</subscript></entry> |
127 | <entry>g<subscript>2</subscript></entry> | ||
128 | <entry>g<subscript>1</subscript></entry> | ||
129 | <entry>g<subscript>0</subscript></entry> | ||
130 | <entry>b<subscript>1</subscript></entry> | ||
131 | <entry>b<subscript>0</subscript></entry> | ||
132 | </row> | 132 | </row> |
133 | <row id="V4L2-PIX-FMT-RGB444"> | 133 | <row id="V4L2-PIX-FMT-RGB444"> |
134 | <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry> | 134 | <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry> |
@@ -159,18 +159,18 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
159 | <entry>g<subscript>2</subscript></entry> | 159 | <entry>g<subscript>2</subscript></entry> |
160 | <entry>g<subscript>1</subscript></entry> | 160 | <entry>g<subscript>1</subscript></entry> |
161 | <entry>g<subscript>0</subscript></entry> | 161 | <entry>g<subscript>0</subscript></entry> |
162 | <entry>r<subscript>4</subscript></entry> | ||
163 | <entry>r<subscript>3</subscript></entry> | ||
164 | <entry>r<subscript>2</subscript></entry> | ||
165 | <entry>r<subscript>1</subscript></entry> | ||
166 | <entry>r<subscript>0</subscript></entry> | ||
167 | <entry></entry> | ||
168 | <entry>a</entry> | ||
169 | <entry>b<subscript>4</subscript></entry> | 162 | <entry>b<subscript>4</subscript></entry> |
170 | <entry>b<subscript>3</subscript></entry> | 163 | <entry>b<subscript>3</subscript></entry> |
171 | <entry>b<subscript>2</subscript></entry> | 164 | <entry>b<subscript>2</subscript></entry> |
172 | <entry>b<subscript>1</subscript></entry> | 165 | <entry>b<subscript>1</subscript></entry> |
173 | <entry>b<subscript>0</subscript></entry> | 166 | <entry>b<subscript>0</subscript></entry> |
167 | <entry></entry> | ||
168 | <entry>a</entry> | ||
169 | <entry>r<subscript>4</subscript></entry> | ||
170 | <entry>r<subscript>3</subscript></entry> | ||
171 | <entry>r<subscript>2</subscript></entry> | ||
172 | <entry>r<subscript>1</subscript></entry> | ||
173 | <entry>r<subscript>0</subscript></entry> | ||
174 | <entry>g<subscript>4</subscript></entry> | 174 | <entry>g<subscript>4</subscript></entry> |
175 | <entry>g<subscript>3</subscript></entry> | 175 | <entry>g<subscript>3</subscript></entry> |
176 | </row> | 176 | </row> |
@@ -181,17 +181,17 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
181 | <entry>g<subscript>2</subscript></entry> | 181 | <entry>g<subscript>2</subscript></entry> |
182 | <entry>g<subscript>1</subscript></entry> | 182 | <entry>g<subscript>1</subscript></entry> |
183 | <entry>g<subscript>0</subscript></entry> | 183 | <entry>g<subscript>0</subscript></entry> |
184 | <entry>r<subscript>4</subscript></entry> | ||
185 | <entry>r<subscript>3</subscript></entry> | ||
186 | <entry>r<subscript>2</subscript></entry> | ||
187 | <entry>r<subscript>1</subscript></entry> | ||
188 | <entry>r<subscript>0</subscript></entry> | ||
189 | <entry></entry> | ||
190 | <entry>b<subscript>4</subscript></entry> | 184 | <entry>b<subscript>4</subscript></entry> |
191 | <entry>b<subscript>3</subscript></entry> | 185 | <entry>b<subscript>3</subscript></entry> |
192 | <entry>b<subscript>2</subscript></entry> | 186 | <entry>b<subscript>2</subscript></entry> |
193 | <entry>b<subscript>1</subscript></entry> | 187 | <entry>b<subscript>1</subscript></entry> |
194 | <entry>b<subscript>0</subscript></entry> | 188 | <entry>b<subscript>0</subscript></entry> |
189 | <entry></entry> | ||
190 | <entry>r<subscript>4</subscript></entry> | ||
191 | <entry>r<subscript>3</subscript></entry> | ||
192 | <entry>r<subscript>2</subscript></entry> | ||
193 | <entry>r<subscript>1</subscript></entry> | ||
194 | <entry>r<subscript>0</subscript></entry> | ||
195 | <entry>g<subscript>5</subscript></entry> | 195 | <entry>g<subscript>5</subscript></entry> |
196 | <entry>g<subscript>4</subscript></entry> | 196 | <entry>g<subscript>4</subscript></entry> |
197 | <entry>g<subscript>3</subscript></entry> | 197 | <entry>g<subscript>3</subscript></entry> |
@@ -201,32 +201,32 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
201 | <entry>'RGBQ'</entry> | 201 | <entry>'RGBQ'</entry> |
202 | <entry></entry> | 202 | <entry></entry> |
203 | <entry>a</entry> | 203 | <entry>a</entry> |
204 | <entry>b<subscript>4</subscript></entry> | ||
205 | <entry>b<subscript>3</subscript></entry> | ||
206 | <entry>b<subscript>2</subscript></entry> | ||
207 | <entry>b<subscript>1</subscript></entry> | ||
208 | <entry>b<subscript>0</subscript></entry> | ||
209 | <entry>g<subscript>4</subscript></entry> | ||
210 | <entry>g<subscript>3</subscript></entry> | ||
211 | <entry></entry> | ||
212 | <entry>g<subscript>2</subscript></entry> | ||
213 | <entry>g<subscript>1</subscript></entry> | ||
214 | <entry>g<subscript>0</subscript></entry> | ||
215 | <entry>r<subscript>4</subscript></entry> | 204 | <entry>r<subscript>4</subscript></entry> |
216 | <entry>r<subscript>3</subscript></entry> | 205 | <entry>r<subscript>3</subscript></entry> |
217 | <entry>r<subscript>2</subscript></entry> | 206 | <entry>r<subscript>2</subscript></entry> |
218 | <entry>r<subscript>1</subscript></entry> | 207 | <entry>r<subscript>1</subscript></entry> |
219 | <entry>r<subscript>0</subscript></entry> | 208 | <entry>r<subscript>0</subscript></entry> |
220 | </row> | 209 | <entry>g<subscript>4</subscript></entry> |
221 | <row id="V4L2-PIX-FMT-RGB565X"> | 210 | <entry>g<subscript>3</subscript></entry> |
222 | <entry><constant>V4L2_PIX_FMT_RGB565X</constant></entry> | ||
223 | <entry>'RGBR'</entry> | ||
224 | <entry></entry> | 211 | <entry></entry> |
212 | <entry>g<subscript>2</subscript></entry> | ||
213 | <entry>g<subscript>1</subscript></entry> | ||
214 | <entry>g<subscript>0</subscript></entry> | ||
225 | <entry>b<subscript>4</subscript></entry> | 215 | <entry>b<subscript>4</subscript></entry> |
226 | <entry>b<subscript>3</subscript></entry> | 216 | <entry>b<subscript>3</subscript></entry> |
227 | <entry>b<subscript>2</subscript></entry> | 217 | <entry>b<subscript>2</subscript></entry> |
228 | <entry>b<subscript>1</subscript></entry> | 218 | <entry>b<subscript>1</subscript></entry> |
229 | <entry>b<subscript>0</subscript></entry> | 219 | <entry>b<subscript>0</subscript></entry> |
220 | </row> | ||
221 | <row id="V4L2-PIX-FMT-RGB565X"> | ||
222 | <entry><constant>V4L2_PIX_FMT_RGB565X</constant></entry> | ||
223 | <entry>'RGBR'</entry> | ||
224 | <entry></entry> | ||
225 | <entry>r<subscript>4</subscript></entry> | ||
226 | <entry>r<subscript>3</subscript></entry> | ||
227 | <entry>r<subscript>2</subscript></entry> | ||
228 | <entry>r<subscript>1</subscript></entry> | ||
229 | <entry>r<subscript>0</subscript></entry> | ||
230 | <entry>g<subscript>5</subscript></entry> | 230 | <entry>g<subscript>5</subscript></entry> |
231 | <entry>g<subscript>4</subscript></entry> | 231 | <entry>g<subscript>4</subscript></entry> |
232 | <entry>g<subscript>3</subscript></entry> | 232 | <entry>g<subscript>3</subscript></entry> |
@@ -234,11 +234,11 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
234 | <entry>g<subscript>2</subscript></entry> | 234 | <entry>g<subscript>2</subscript></entry> |
235 | <entry>g<subscript>1</subscript></entry> | 235 | <entry>g<subscript>1</subscript></entry> |
236 | <entry>g<subscript>0</subscript></entry> | 236 | <entry>g<subscript>0</subscript></entry> |
237 | <entry>r<subscript>4</subscript></entry> | 237 | <entry>b<subscript>4</subscript></entry> |
238 | <entry>r<subscript>3</subscript></entry> | 238 | <entry>b<subscript>3</subscript></entry> |
239 | <entry>r<subscript>2</subscript></entry> | 239 | <entry>b<subscript>2</subscript></entry> |
240 | <entry>r<subscript>1</subscript></entry> | 240 | <entry>b<subscript>1</subscript></entry> |
241 | <entry>r<subscript>0</subscript></entry> | 241 | <entry>b<subscript>0</subscript></entry> |
242 | </row> | 242 | </row> |
243 | <row id="V4L2-PIX-FMT-BGR666"> | 243 | <row id="V4L2-PIX-FMT-BGR666"> |
244 | <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> | 244 | <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> |
@@ -385,6 +385,15 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
385 | <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry> | 385 | <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry> |
386 | <entry>'RGB4'</entry> | 386 | <entry>'RGB4'</entry> |
387 | <entry></entry> | 387 | <entry></entry> |
388 | <entry>a<subscript>7</subscript></entry> | ||
389 | <entry>a<subscript>6</subscript></entry> | ||
390 | <entry>a<subscript>5</subscript></entry> | ||
391 | <entry>a<subscript>4</subscript></entry> | ||
392 | <entry>a<subscript>3</subscript></entry> | ||
393 | <entry>a<subscript>2</subscript></entry> | ||
394 | <entry>a<subscript>1</subscript></entry> | ||
395 | <entry>a<subscript>0</subscript></entry> | ||
396 | <entry></entry> | ||
388 | <entry>r<subscript>7</subscript></entry> | 397 | <entry>r<subscript>7</subscript></entry> |
389 | <entry>r<subscript>6</subscript></entry> | 398 | <entry>r<subscript>6</subscript></entry> |
390 | <entry>r<subscript>5</subscript></entry> | 399 | <entry>r<subscript>5</subscript></entry> |
@@ -411,25 +420,16 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
411 | <entry>b<subscript>2</subscript></entry> | 420 | <entry>b<subscript>2</subscript></entry> |
412 | <entry>b<subscript>1</subscript></entry> | 421 | <entry>b<subscript>1</subscript></entry> |
413 | <entry>b<subscript>0</subscript></entry> | 422 | <entry>b<subscript>0</subscript></entry> |
414 | <entry></entry> | ||
415 | <entry>a<subscript>7</subscript></entry> | ||
416 | <entry>a<subscript>6</subscript></entry> | ||
417 | <entry>a<subscript>5</subscript></entry> | ||
418 | <entry>a<subscript>4</subscript></entry> | ||
419 | <entry>a<subscript>3</subscript></entry> | ||
420 | <entry>a<subscript>2</subscript></entry> | ||
421 | <entry>a<subscript>1</subscript></entry> | ||
422 | <entry>a<subscript>0</subscript></entry> | ||
423 | </row> | 423 | </row> |
424 | </tbody> | 424 | </tbody> |
425 | </tgroup> | 425 | </tgroup> |
426 | </table> | 426 | </table> |
427 | 427 | ||
428 | <para>Bit 7 is the most significant bit. The value of a = alpha | 428 | <para>Bit 7 is the most significant bit. The value of the a = alpha |
429 | bits is undefined when reading from the driver, ignored when writing | 429 | bits is undefined when reading from the driver, ignored when writing |
430 | to the driver, except when alpha blending has been negotiated for a | 430 | to the driver, except when alpha blending has been negotiated for a |
431 | <link linkend="overlay">Video Overlay</link> or <link linkend="osd"> | 431 | <link linkend="overlay">Video Overlay</link> or <link linkend="osd"> |
432 | Video Output Overlay</link> or when alpha component has been configured | 432 | Video Output Overlay</link> or when the alpha component has been configured |
433 | for a <link linkend="capture">Video Capture</link> by means of <link | 433 | for a <link linkend="capture">Video Capture</link> by means of <link |
434 | linkend="v4l2-alpha-component"> <constant>V4L2_CID_ALPHA_COMPONENT | 434 | linkend="v4l2-alpha-component"> <constant>V4L2_CID_ALPHA_COMPONENT |
435 | </constant> </link> control.</para> | 435 | </constant> </link> control.</para> |
@@ -512,421 +512,6 @@ image</title> | |||
512 | </formalpara> | 512 | </formalpara> |
513 | </example> | 513 | </example> |
514 | 514 | ||
515 | <important> | ||
516 | <para>Drivers may interpret these formats differently.</para> | ||
517 | </important> | ||
518 | |||
519 | <para>Some RGB formats above are uncommon and were probably | ||
520 | defined in error. Drivers may interpret them as in <xref | ||
521 | linkend="rgb-formats-corrected" />.</para> | ||
522 | |||
523 | <table pgwide="1" frame="none" id="rgb-formats-corrected"> | ||
524 | <title>Packed RGB Image Formats (corrected)</title> | ||
525 | <tgroup cols="37" align="center"> | ||
526 | <colspec colname="id" align="left" /> | ||
527 | <colspec colname="fourcc" /> | ||
528 | <colspec colname="bit" /> | ||
529 | |||
530 | <colspec colnum="4" colname="b07" align="center" /> | ||
531 | <colspec colnum="5" colname="b06" align="center" /> | ||
532 | <colspec colnum="6" colname="b05" align="center" /> | ||
533 | <colspec colnum="7" colname="b04" align="center" /> | ||
534 | <colspec colnum="8" colname="b03" align="center" /> | ||
535 | <colspec colnum="9" colname="b02" align="center" /> | ||
536 | <colspec colnum="10" colname="b01" align="center" /> | ||
537 | <colspec colnum="11" colname="b00" align="center" /> | ||
538 | |||
539 | <colspec colnum="13" colname="b17" align="center" /> | ||
540 | <colspec colnum="14" colname="b16" align="center" /> | ||
541 | <colspec colnum="15" colname="b15" align="center" /> | ||
542 | <colspec colnum="16" colname="b14" align="center" /> | ||
543 | <colspec colnum="17" colname="b13" align="center" /> | ||
544 | <colspec colnum="18" colname="b12" align="center" /> | ||
545 | <colspec colnum="19" colname="b11" align="center" /> | ||
546 | <colspec colnum="20" colname="b10" align="center" /> | ||
547 | |||
548 | <colspec colnum="22" colname="b27" align="center" /> | ||
549 | <colspec colnum="23" colname="b26" align="center" /> | ||
550 | <colspec colnum="24" colname="b25" align="center" /> | ||
551 | <colspec colnum="25" colname="b24" align="center" /> | ||
552 | <colspec colnum="26" colname="b23" align="center" /> | ||
553 | <colspec colnum="27" colname="b22" align="center" /> | ||
554 | <colspec colnum="28" colname="b21" align="center" /> | ||
555 | <colspec colnum="29" colname="b20" align="center" /> | ||
556 | |||
557 | <colspec colnum="31" colname="b37" align="center" /> | ||
558 | <colspec colnum="32" colname="b36" align="center" /> | ||
559 | <colspec colnum="33" colname="b35" align="center" /> | ||
560 | <colspec colnum="34" colname="b34" align="center" /> | ||
561 | <colspec colnum="35" colname="b33" align="center" /> | ||
562 | <colspec colnum="36" colname="b32" align="center" /> | ||
563 | <colspec colnum="37" colname="b31" align="center" /> | ||
564 | <colspec colnum="38" colname="b30" align="center" /> | ||
565 | |||
566 | <spanspec namest="b07" nameend="b00" spanname="b0" /> | ||
567 | <spanspec namest="b17" nameend="b10" spanname="b1" /> | ||
568 | <spanspec namest="b27" nameend="b20" spanname="b2" /> | ||
569 | <spanspec namest="b37" nameend="b30" spanname="b3" /> | ||
570 | <thead> | ||
571 | <row> | ||
572 | <entry>Identifier</entry> | ||
573 | <entry>Code</entry> | ||
574 | <entry> </entry> | ||
575 | <entry spanname="b0">Byte 0 in memory</entry> | ||
576 | <entry spanname="b1">Byte 1</entry> | ||
577 | <entry spanname="b2">Byte 2</entry> | ||
578 | <entry spanname="b3">Byte 3</entry> | ||
579 | </row> | ||
580 | <row> | ||
581 | <entry> </entry> | ||
582 | <entry> </entry> | ||
583 | <entry>Bit</entry> | ||
584 | <entry>7</entry> | ||
585 | <entry>6</entry> | ||
586 | <entry>5</entry> | ||
587 | <entry>4</entry> | ||
588 | <entry>3</entry> | ||
589 | <entry>2</entry> | ||
590 | <entry>1</entry> | ||
591 | <entry>0</entry> | ||
592 | <entry> </entry> | ||
593 | <entry>7</entry> | ||
594 | <entry>6</entry> | ||
595 | <entry>5</entry> | ||
596 | <entry>4</entry> | ||
597 | <entry>3</entry> | ||
598 | <entry>2</entry> | ||
599 | <entry>1</entry> | ||
600 | <entry>0</entry> | ||
601 | <entry> </entry> | ||
602 | <entry>7</entry> | ||
603 | <entry>6</entry> | ||
604 | <entry>5</entry> | ||
605 | <entry>4</entry> | ||
606 | <entry>3</entry> | ||
607 | <entry>2</entry> | ||
608 | <entry>1</entry> | ||
609 | <entry>0</entry> | ||
610 | <entry> </entry> | ||
611 | <entry>7</entry> | ||
612 | <entry>6</entry> | ||
613 | <entry>5</entry> | ||
614 | <entry>4</entry> | ||
615 | <entry>3</entry> | ||
616 | <entry>2</entry> | ||
617 | <entry>1</entry> | ||
618 | <entry>0</entry> | ||
619 | </row> | ||
620 | </thead> | ||
621 | <tbody valign="top"> | ||
622 | <row><!-- id="V4L2-PIX-FMT-RGB332" --> | ||
623 | <entry><constant>V4L2_PIX_FMT_RGB332</constant></entry> | ||
624 | <entry>'RGB1'</entry> | ||
625 | <entry></entry> | ||
626 | <entry>r<subscript>2</subscript></entry> | ||
627 | <entry>r<subscript>1</subscript></entry> | ||
628 | <entry>r<subscript>0</subscript></entry> | ||
629 | <entry>g<subscript>2</subscript></entry> | ||
630 | <entry>g<subscript>1</subscript></entry> | ||
631 | <entry>g<subscript>0</subscript></entry> | ||
632 | <entry>b<subscript>1</subscript></entry> | ||
633 | <entry>b<subscript>0</subscript></entry> | ||
634 | </row> | ||
635 | <row><!-- id="V4L2-PIX-FMT-RGB444" --> | ||
636 | <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry> | ||
637 | <entry>'R444'</entry> | ||
638 | <entry></entry> | ||
639 | <entry>g<subscript>3</subscript></entry> | ||
640 | <entry>g<subscript>2</subscript></entry> | ||
641 | <entry>g<subscript>1</subscript></entry> | ||
642 | <entry>g<subscript>0</subscript></entry> | ||
643 | <entry>b<subscript>3</subscript></entry> | ||
644 | <entry>b<subscript>2</subscript></entry> | ||
645 | <entry>b<subscript>1</subscript></entry> | ||
646 | <entry>b<subscript>0</subscript></entry> | ||
647 | <entry></entry> | ||
648 | <entry>a<subscript>3</subscript></entry> | ||
649 | <entry>a<subscript>2</subscript></entry> | ||
650 | <entry>a<subscript>1</subscript></entry> | ||
651 | <entry>a<subscript>0</subscript></entry> | ||
652 | <entry>r<subscript>3</subscript></entry> | ||
653 | <entry>r<subscript>2</subscript></entry> | ||
654 | <entry>r<subscript>1</subscript></entry> | ||
655 | <entry>r<subscript>0</subscript></entry> | ||
656 | </row> | ||
657 | <row><!-- id="V4L2-PIX-FMT-RGB555" --> | ||
658 | <entry><constant>V4L2_PIX_FMT_RGB555</constant></entry> | ||
659 | <entry>'RGBO'</entry> | ||
660 | <entry></entry> | ||
661 | <entry>g<subscript>2</subscript></entry> | ||
662 | <entry>g<subscript>1</subscript></entry> | ||
663 | <entry>g<subscript>0</subscript></entry> | ||
664 | <entry>b<subscript>4</subscript></entry> | ||
665 | <entry>b<subscript>3</subscript></entry> | ||
666 | <entry>b<subscript>2</subscript></entry> | ||
667 | <entry>b<subscript>1</subscript></entry> | ||
668 | <entry>b<subscript>0</subscript></entry> | ||
669 | <entry></entry> | ||
670 | <entry>a</entry> | ||
671 | <entry>r<subscript>4</subscript></entry> | ||
672 | <entry>r<subscript>3</subscript></entry> | ||
673 | <entry>r<subscript>2</subscript></entry> | ||
674 | <entry>r<subscript>1</subscript></entry> | ||
675 | <entry>r<subscript>0</subscript></entry> | ||
676 | <entry>g<subscript>4</subscript></entry> | ||
677 | <entry>g<subscript>3</subscript></entry> | ||
678 | </row> | ||
679 | <row><!-- id="V4L2-PIX-FMT-RGB565" --> | ||
680 | <entry><constant>V4L2_PIX_FMT_RGB565</constant></entry> | ||
681 | <entry>'RGBP'</entry> | ||
682 | <entry></entry> | ||
683 | <entry>g<subscript>2</subscript></entry> | ||
684 | <entry>g<subscript>1</subscript></entry> | ||
685 | <entry>g<subscript>0</subscript></entry> | ||
686 | <entry>b<subscript>4</subscript></entry> | ||
687 | <entry>b<subscript>3</subscript></entry> | ||
688 | <entry>b<subscript>2</subscript></entry> | ||
689 | <entry>b<subscript>1</subscript></entry> | ||
690 | <entry>b<subscript>0</subscript></entry> | ||
691 | <entry></entry> | ||
692 | <entry>r<subscript>4</subscript></entry> | ||
693 | <entry>r<subscript>3</subscript></entry> | ||
694 | <entry>r<subscript>2</subscript></entry> | ||
695 | <entry>r<subscript>1</subscript></entry> | ||
696 | <entry>r<subscript>0</subscript></entry> | ||
697 | <entry>g<subscript>5</subscript></entry> | ||
698 | <entry>g<subscript>4</subscript></entry> | ||
699 | <entry>g<subscript>3</subscript></entry> | ||
700 | </row> | ||
701 | <row><!-- id="V4L2-PIX-FMT-RGB555X" --> | ||
702 | <entry><constant>V4L2_PIX_FMT_RGB555X</constant></entry> | ||
703 | <entry>'RGBQ'</entry> | ||
704 | <entry></entry> | ||
705 | <entry>a</entry> | ||
706 | <entry>r<subscript>4</subscript></entry> | ||
707 | <entry>r<subscript>3</subscript></entry> | ||
708 | <entry>r<subscript>2</subscript></entry> | ||
709 | <entry>r<subscript>1</subscript></entry> | ||
710 | <entry>r<subscript>0</subscript></entry> | ||
711 | <entry>g<subscript>4</subscript></entry> | ||
712 | <entry>g<subscript>3</subscript></entry> | ||
713 | <entry></entry> | ||
714 | <entry>g<subscript>2</subscript></entry> | ||
715 | <entry>g<subscript>1</subscript></entry> | ||
716 | <entry>g<subscript>0</subscript></entry> | ||
717 | <entry>b<subscript>4</subscript></entry> | ||
718 | <entry>b<subscript>3</subscript></entry> | ||
719 | <entry>b<subscript>2</subscript></entry> | ||
720 | <entry>b<subscript>1</subscript></entry> | ||
721 | <entry>b<subscript>0</subscript></entry> | ||
722 | </row> | ||
723 | <row><!-- id="V4L2-PIX-FMT-RGB565X" --> | ||
724 | <entry><constant>V4L2_PIX_FMT_RGB565X</constant></entry> | ||
725 | <entry>'RGBR'</entry> | ||
726 | <entry></entry> | ||
727 | <entry>r<subscript>4</subscript></entry> | ||
728 | <entry>r<subscript>3</subscript></entry> | ||
729 | <entry>r<subscript>2</subscript></entry> | ||
730 | <entry>r<subscript>1</subscript></entry> | ||
731 | <entry>r<subscript>0</subscript></entry> | ||
732 | <entry>g<subscript>5</subscript></entry> | ||
733 | <entry>g<subscript>4</subscript></entry> | ||
734 | <entry>g<subscript>3</subscript></entry> | ||
735 | <entry></entry> | ||
736 | <entry>g<subscript>2</subscript></entry> | ||
737 | <entry>g<subscript>1</subscript></entry> | ||
738 | <entry>g<subscript>0</subscript></entry> | ||
739 | <entry>b<subscript>4</subscript></entry> | ||
740 | <entry>b<subscript>3</subscript></entry> | ||
741 | <entry>b<subscript>2</subscript></entry> | ||
742 | <entry>b<subscript>1</subscript></entry> | ||
743 | <entry>b<subscript>0</subscript></entry> | ||
744 | </row> | ||
745 | <row><!-- id="V4L2-PIX-FMT-BGR666" --> | ||
746 | <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> | ||
747 | <entry>'BGRH'</entry> | ||
748 | <entry></entry> | ||
749 | <entry>b<subscript>5</subscript></entry> | ||
750 | <entry>b<subscript>4</subscript></entry> | ||
751 | <entry>b<subscript>3</subscript></entry> | ||
752 | <entry>b<subscript>2</subscript></entry> | ||
753 | <entry>b<subscript>1</subscript></entry> | ||
754 | <entry>b<subscript>0</subscript></entry> | ||
755 | <entry>g<subscript>5</subscript></entry> | ||
756 | <entry>g<subscript>4</subscript></entry> | ||
757 | <entry></entry> | ||
758 | <entry>g<subscript>3</subscript></entry> | ||
759 | <entry>g<subscript>2</subscript></entry> | ||
760 | <entry>g<subscript>1</subscript></entry> | ||
761 | <entry>g<subscript>0</subscript></entry> | ||
762 | <entry>r<subscript>5</subscript></entry> | ||
763 | <entry>r<subscript>4</subscript></entry> | ||
764 | <entry>r<subscript>3</subscript></entry> | ||
765 | <entry>r<subscript>2</subscript></entry> | ||
766 | <entry></entry> | ||
767 | <entry>r<subscript>1</subscript></entry> | ||
768 | <entry>r<subscript>0</subscript></entry> | ||
769 | <entry></entry> | ||
770 | <entry></entry> | ||
771 | <entry></entry> | ||
772 | <entry></entry> | ||
773 | <entry></entry> | ||
774 | <entry></entry> | ||
775 | <entry></entry> | ||
776 | <entry></entry> | ||
777 | <entry></entry> | ||
778 | <entry></entry> | ||
779 | <entry></entry> | ||
780 | <entry></entry> | ||
781 | <entry></entry> | ||
782 | <entry></entry> | ||
783 | </row> | ||
784 | <row><!-- id="V4L2-PIX-FMT-BGR24" --> | ||
785 | <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry> | ||
786 | <entry>'BGR3'</entry> | ||
787 | <entry></entry> | ||
788 | <entry>b<subscript>7</subscript></entry> | ||
789 | <entry>b<subscript>6</subscript></entry> | ||
790 | <entry>b<subscript>5</subscript></entry> | ||
791 | <entry>b<subscript>4</subscript></entry> | ||
792 | <entry>b<subscript>3</subscript></entry> | ||
793 | <entry>b<subscript>2</subscript></entry> | ||
794 | <entry>b<subscript>1</subscript></entry> | ||
795 | <entry>b<subscript>0</subscript></entry> | ||
796 | <entry></entry> | ||
797 | <entry>g<subscript>7</subscript></entry> | ||
798 | <entry>g<subscript>6</subscript></entry> | ||
799 | <entry>g<subscript>5</subscript></entry> | ||
800 | <entry>g<subscript>4</subscript></entry> | ||
801 | <entry>g<subscript>3</subscript></entry> | ||
802 | <entry>g<subscript>2</subscript></entry> | ||
803 | <entry>g<subscript>1</subscript></entry> | ||
804 | <entry>g<subscript>0</subscript></entry> | ||
805 | <entry></entry> | ||
806 | <entry>r<subscript>7</subscript></entry> | ||
807 | <entry>r<subscript>6</subscript></entry> | ||
808 | <entry>r<subscript>5</subscript></entry> | ||
809 | <entry>r<subscript>4</subscript></entry> | ||
810 | <entry>r<subscript>3</subscript></entry> | ||
811 | <entry>r<subscript>2</subscript></entry> | ||
812 | <entry>r<subscript>1</subscript></entry> | ||
813 | <entry>r<subscript>0</subscript></entry> | ||
814 | </row> | ||
815 | <row><!-- id="V4L2-PIX-FMT-RGB24" --> | ||
816 | <entry><constant>V4L2_PIX_FMT_RGB24</constant></entry> | ||
817 | <entry>'RGB3'</entry> | ||
818 | <entry></entry> | ||
819 | <entry>r<subscript>7</subscript></entry> | ||
820 | <entry>r<subscript>6</subscript></entry> | ||
821 | <entry>r<subscript>5</subscript></entry> | ||
822 | <entry>r<subscript>4</subscript></entry> | ||
823 | <entry>r<subscript>3</subscript></entry> | ||
824 | <entry>r<subscript>2</subscript></entry> | ||
825 | <entry>r<subscript>1</subscript></entry> | ||
826 | <entry>r<subscript>0</subscript></entry> | ||
827 | <entry></entry> | ||
828 | <entry>g<subscript>7</subscript></entry> | ||
829 | <entry>g<subscript>6</subscript></entry> | ||
830 | <entry>g<subscript>5</subscript></entry> | ||
831 | <entry>g<subscript>4</subscript></entry> | ||
832 | <entry>g<subscript>3</subscript></entry> | ||
833 | <entry>g<subscript>2</subscript></entry> | ||
834 | <entry>g<subscript>1</subscript></entry> | ||
835 | <entry>g<subscript>0</subscript></entry> | ||
836 | <entry></entry> | ||
837 | <entry>b<subscript>7</subscript></entry> | ||
838 | <entry>b<subscript>6</subscript></entry> | ||
839 | <entry>b<subscript>5</subscript></entry> | ||
840 | <entry>b<subscript>4</subscript></entry> | ||
841 | <entry>b<subscript>3</subscript></entry> | ||
842 | <entry>b<subscript>2</subscript></entry> | ||
843 | <entry>b<subscript>1</subscript></entry> | ||
844 | <entry>b<subscript>0</subscript></entry> | ||
845 | </row> | ||
846 | <row><!-- id="V4L2-PIX-FMT-BGR32" --> | ||
847 | <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry> | ||
848 | <entry>'BGR4'</entry> | ||
849 | <entry></entry> | ||
850 | <entry>b<subscript>7</subscript></entry> | ||
851 | <entry>b<subscript>6</subscript></entry> | ||
852 | <entry>b<subscript>5</subscript></entry> | ||
853 | <entry>b<subscript>4</subscript></entry> | ||
854 | <entry>b<subscript>3</subscript></entry> | ||
855 | <entry>b<subscript>2</subscript></entry> | ||
856 | <entry>b<subscript>1</subscript></entry> | ||
857 | <entry>b<subscript>0</subscript></entry> | ||
858 | <entry></entry> | ||
859 | <entry>g<subscript>7</subscript></entry> | ||
860 | <entry>g<subscript>6</subscript></entry> | ||
861 | <entry>g<subscript>5</subscript></entry> | ||
862 | <entry>g<subscript>4</subscript></entry> | ||
863 | <entry>g<subscript>3</subscript></entry> | ||
864 | <entry>g<subscript>2</subscript></entry> | ||
865 | <entry>g<subscript>1</subscript></entry> | ||
866 | <entry>g<subscript>0</subscript></entry> | ||
867 | <entry></entry> | ||
868 | <entry>r<subscript>7</subscript></entry> | ||
869 | <entry>r<subscript>6</subscript></entry> | ||
870 | <entry>r<subscript>5</subscript></entry> | ||
871 | <entry>r<subscript>4</subscript></entry> | ||
872 | <entry>r<subscript>3</subscript></entry> | ||
873 | <entry>r<subscript>2</subscript></entry> | ||
874 | <entry>r<subscript>1</subscript></entry> | ||
875 | <entry>r<subscript>0</subscript></entry> | ||
876 | <entry></entry> | ||
877 | <entry>a<subscript>7</subscript></entry> | ||
878 | <entry>a<subscript>6</subscript></entry> | ||
879 | <entry>a<subscript>5</subscript></entry> | ||
880 | <entry>a<subscript>4</subscript></entry> | ||
881 | <entry>a<subscript>3</subscript></entry> | ||
882 | <entry>a<subscript>2</subscript></entry> | ||
883 | <entry>a<subscript>1</subscript></entry> | ||
884 | <entry>a<subscript>0</subscript></entry> | ||
885 | </row> | ||
886 | <row><!-- id="V4L2-PIX-FMT-RGB32" --> | ||
887 | <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry> | ||
888 | <entry>'RGB4'</entry> | ||
889 | <entry></entry> | ||
890 | <entry>a<subscript>7</subscript></entry> | ||
891 | <entry>a<subscript>6</subscript></entry> | ||
892 | <entry>a<subscript>5</subscript></entry> | ||
893 | <entry>a<subscript>4</subscript></entry> | ||
894 | <entry>a<subscript>3</subscript></entry> | ||
895 | <entry>a<subscript>2</subscript></entry> | ||
896 | <entry>a<subscript>1</subscript></entry> | ||
897 | <entry>a<subscript>0</subscript></entry> | ||
898 | <entry></entry> | ||
899 | <entry>r<subscript>7</subscript></entry> | ||
900 | <entry>r<subscript>6</subscript></entry> | ||
901 | <entry>r<subscript>5</subscript></entry> | ||
902 | <entry>r<subscript>4</subscript></entry> | ||
903 | <entry>r<subscript>3</subscript></entry> | ||
904 | <entry>r<subscript>2</subscript></entry> | ||
905 | <entry>r<subscript>1</subscript></entry> | ||
906 | <entry>r<subscript>0</subscript></entry> | ||
907 | <entry></entry> | ||
908 | <entry>g<subscript>7</subscript></entry> | ||
909 | <entry>g<subscript>6</subscript></entry> | ||
910 | <entry>g<subscript>5</subscript></entry> | ||
911 | <entry>g<subscript>4</subscript></entry> | ||
912 | <entry>g<subscript>3</subscript></entry> | ||
913 | <entry>g<subscript>2</subscript></entry> | ||
914 | <entry>g<subscript>1</subscript></entry> | ||
915 | <entry>g<subscript>0</subscript></entry> | ||
916 | <entry></entry> | ||
917 | <entry>b<subscript>7</subscript></entry> | ||
918 | <entry>b<subscript>6</subscript></entry> | ||
919 | <entry>b<subscript>5</subscript></entry> | ||
920 | <entry>b<subscript>4</subscript></entry> | ||
921 | <entry>b<subscript>3</subscript></entry> | ||
922 | <entry>b<subscript>2</subscript></entry> | ||
923 | <entry>b<subscript>1</subscript></entry> | ||
924 | <entry>b<subscript>0</subscript></entry> | ||
925 | </row> | ||
926 | </tbody> | ||
927 | </tgroup> | ||
928 | </table> | ||
929 | |||
930 | <para>A test utility to determine which RGB formats a driver | 515 | <para>A test utility to determine which RGB formats a driver |
931 | actually supports is available from the LinuxTV v4l-dvb repository. | 516 | actually supports is available from the LinuxTV v4l-dvb repository. |
932 | See &v4l-dvb; for access instructions.</para> | 517 | See &v4l-dvb; for access instructions.</para> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt-sdr-cu08.xml b/Documentation/DocBook/media/v4l/pixfmt-sdr-cu08.xml new file mode 100644 index 000000000000..2d80104c178b --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-sdr-cu08.xml | |||
@@ -0,0 +1,44 @@ | |||
1 | <refentry id="V4L2-SDR-FMT-CU08"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_SDR_FMT_CU8 ('CU08')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname> | ||
8 | <constant>V4L2_SDR_FMT_CU8</constant> | ||
9 | </refname> | ||
10 | <refpurpose>Complex unsigned 8-bit IQ sample</refpurpose> | ||
11 | </refnamediv> | ||
12 | <refsect1> | ||
13 | <title>Description</title> | ||
14 | <para> | ||
15 | This format contains sequence of complex number samples. Each complex number | ||
16 | consist two parts, called In-phase and Quadrature (IQ). Both I and Q are | ||
17 | represented as a 8 bit unsigned number. I value comes first and Q value after | ||
18 | that. | ||
19 | </para> | ||
20 | <example> | ||
21 | <title><constant>V4L2_SDR_FMT_CU8</constant> 1 sample</title> | ||
22 | <formalpara> | ||
23 | <title>Byte Order.</title> | ||
24 | <para>Each cell is one byte. | ||
25 | <informaltable frame="none"> | ||
26 | <tgroup cols="2" align="center"> | ||
27 | <colspec align="left" colwidth="2*" /> | ||
28 | <tbody valign="top"> | ||
29 | <row> | ||
30 | <entry>start + 0:</entry> | ||
31 | <entry>I'<subscript>0</subscript></entry> | ||
32 | </row> | ||
33 | <row> | ||
34 | <entry>start + 1:</entry> | ||
35 | <entry>Q'<subscript>0</subscript></entry> | ||
36 | </row> | ||
37 | </tbody> | ||
38 | </tgroup> | ||
39 | </informaltable> | ||
40 | </para> | ||
41 | </formalpara> | ||
42 | </example> | ||
43 | </refsect1> | ||
44 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt-sdr-cu16le.xml b/Documentation/DocBook/media/v4l/pixfmt-sdr-cu16le.xml new file mode 100644 index 000000000000..26288ffa9071 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-sdr-cu16le.xml | |||
@@ -0,0 +1,46 @@ | |||
1 | <refentry id="V4L2-SDR-FMT-CU16LE"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_SDR_FMT_CU16LE ('CU16')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname> | ||
8 | <constant>V4L2_SDR_FMT_CU16LE</constant> | ||
9 | </refname> | ||
10 | <refpurpose>Complex unsigned 16-bit little endian IQ sample</refpurpose> | ||
11 | </refnamediv> | ||
12 | <refsect1> | ||
13 | <title>Description</title> | ||
14 | <para> | ||
15 | This format contains sequence of complex number samples. Each complex number | ||
16 | consist two parts, called In-phase and Quadrature (IQ). Both I and Q are | ||
17 | represented as a 16 bit unsigned little endian number. I value comes first | ||
18 | and Q value after that. | ||
19 | </para> | ||
20 | <example> | ||
21 | <title><constant>V4L2_SDR_FMT_CU16LE</constant> 1 sample</title> | ||
22 | <formalpara> | ||
23 | <title>Byte Order.</title> | ||
24 | <para>Each cell is one byte. | ||
25 | <informaltable frame="none"> | ||
26 | <tgroup cols="3" align="center"> | ||
27 | <colspec align="left" colwidth="2*" /> | ||
28 | <tbody valign="top"> | ||
29 | <row> | ||
30 | <entry>start + 0:</entry> | ||
31 | <entry>I'<subscript>0[7:0]</subscript></entry> | ||
32 | <entry>I'<subscript>0[15:8]</subscript></entry> | ||
33 | </row> | ||
34 | <row> | ||
35 | <entry>start + 2:</entry> | ||
36 | <entry>Q'<subscript>0[7:0]</subscript></entry> | ||
37 | <entry>Q'<subscript>0[15:8]</subscript></entry> | ||
38 | </row> | ||
39 | </tbody> | ||
40 | </tgroup> | ||
41 | </informaltable> | ||
42 | </para> | ||
43 | </formalpara> | ||
44 | </example> | ||
45 | </refsect1> | ||
46 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 72d72bd67d0a..ea514d6075c5 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
@@ -25,7 +25,12 @@ capturing and output, for overlay frame buffer formats see also | |||
25 | <row> | 25 | <row> |
26 | <entry>__u32</entry> | 26 | <entry>__u32</entry> |
27 | <entry><structfield>height</structfield></entry> | 27 | <entry><structfield>height</structfield></entry> |
28 | <entry>Image height in pixels.</entry> | 28 | <entry>Image height in pixels. If <structfield>field</structfield> is |
29 | one of <constant>V4L2_FIELD_TOP</constant>, <constant>V4L2_FIELD_BOTTOM</constant> | ||
30 | or <constant>V4L2_FIELD_ALTERNATE</constant> then height refers to the | ||
31 | number of lines in the field, otherwise it refers to the number of | ||
32 | lines in the frame (which is twice the field height for interlaced | ||
33 | formats).</entry> | ||
29 | </row> | 34 | </row> |
30 | <row> | 35 | <row> |
31 | <entry spanname="hspan">Applications set these fields to | 36 | <entry spanname="hspan">Applications set these fields to |
@@ -54,7 +59,7 @@ linkend="reserved-formats" /></entry> | |||
54 | can request to capture or output only the top or bottom field, or both | 59 | can request to capture or output only the top or bottom field, or both |
55 | fields interlaced or sequentially stored in one buffer or alternating | 60 | fields interlaced or sequentially stored in one buffer or alternating |
56 | in separate buffers. Drivers return the actual field order selected. | 61 | in separate buffers. Drivers return the actual field order selected. |
57 | For details see <xref linkend="field-order" />.</entry> | 62 | For more details on fields see <xref linkend="field-order" />.</entry> |
58 | </row> | 63 | </row> |
59 | <row> | 64 | <row> |
60 | <entry>__u32</entry> | 65 | <entry>__u32</entry> |
@@ -81,7 +86,10 @@ plane and is divided by the same factor as the | |||
81 | example the Cb and Cr planes of a YUV 4:2:0 image have half as many | 86 | example the Cb and Cr planes of a YUV 4:2:0 image have half as many |
82 | padding bytes following each line as the Y plane. To avoid ambiguities | 87 | padding bytes following each line as the Y plane. To avoid ambiguities |
83 | drivers must return a <structfield>bytesperline</structfield> value | 88 | drivers must return a <structfield>bytesperline</structfield> value |
84 | rounded up to a multiple of the scale factor.</para></entry> | 89 | rounded up to a multiple of the scale factor.</para> |
90 | <para>For compressed formats the <structfield>bytesperline</structfield> | ||
91 | value makes no sense. Applications and drivers must set this to 0 in | ||
92 | that case.</para></entry> | ||
85 | </row> | 93 | </row> |
86 | <row> | 94 | <row> |
87 | <entry>__u32</entry> | 95 | <entry>__u32</entry> |
@@ -97,7 +105,8 @@ hold an image.</entry> | |||
97 | <entry>&v4l2-colorspace;</entry> | 105 | <entry>&v4l2-colorspace;</entry> |
98 | <entry><structfield>colorspace</structfield></entry> | 106 | <entry><structfield>colorspace</structfield></entry> |
99 | <entry>This information supplements the | 107 | <entry>This information supplements the |
100 | <structfield>pixelformat</structfield> and must be set by the driver, | 108 | <structfield>pixelformat</structfield> and must be set by the driver for |
109 | capture streams and by the application for output streams, | ||
101 | see <xref linkend="colorspaces" />.</entry> | 110 | see <xref linkend="colorspaces" />.</entry> |
102 | </row> | 111 | </row> |
103 | <row> | 112 | <row> |
@@ -135,7 +144,7 @@ set this field to zero.</entry> | |||
135 | <entry>__u16</entry> | 144 | <entry>__u16</entry> |
136 | <entry><structfield>bytesperline</structfield></entry> | 145 | <entry><structfield>bytesperline</structfield></entry> |
137 | <entry>Distance in bytes between the leftmost pixels in two adjacent | 146 | <entry>Distance in bytes between the leftmost pixels in two adjacent |
138 | lines.</entry> | 147 | lines. See &v4l2-pix-format;.</entry> |
139 | </row> | 148 | </row> |
140 | <row> | 149 | <row> |
141 | <entry>__u16</entry> | 150 | <entry>__u16</entry> |
@@ -154,12 +163,12 @@ set this field to zero.</entry> | |||
154 | <row> | 163 | <row> |
155 | <entry>__u32</entry> | 164 | <entry>__u32</entry> |
156 | <entry><structfield>width</structfield></entry> | 165 | <entry><structfield>width</structfield></entry> |
157 | <entry>Image width in pixels.</entry> | 166 | <entry>Image width in pixels. See &v4l2-pix-format;.</entry> |
158 | </row> | 167 | </row> |
159 | <row> | 168 | <row> |
160 | <entry>__u32</entry> | 169 | <entry>__u32</entry> |
161 | <entry><structfield>height</structfield></entry> | 170 | <entry><structfield>height</structfield></entry> |
162 | <entry>Image height in pixels.</entry> | 171 | <entry>Image height in pixels. See &v4l2-pix-format;.</entry> |
163 | </row> | 172 | </row> |
164 | <row> | 173 | <row> |
165 | <entry>__u32</entry> | 174 | <entry>__u32</entry> |
@@ -811,6 +820,17 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see | |||
811 | </table> | 820 | </table> |
812 | </section> | 821 | </section> |
813 | 822 | ||
823 | <section id="sdr-formats"> | ||
824 | <title>SDR Formats</title> | ||
825 | |||
826 | <para>These formats are used for <link linkend="sdr">SDR Capture</link> | ||
827 | interface only.</para> | ||
828 | |||
829 | &sub-sdr-cu08; | ||
830 | &sub-sdr-cu16le; | ||
831 | |||
832 | </section> | ||
833 | |||
814 | <section id="pixfmt-reserved"> | 834 | <section id="pixfmt-reserved"> |
815 | <title>Reserved Format Identifiers</title> | 835 | <title>Reserved Format Identifiers</title> |
816 | 836 | ||
diff --git a/Documentation/DocBook/media/v4l/remote_controllers.xml b/Documentation/DocBook/media/v4l/remote_controllers.xml index 160e464d44b7..5124a6c4daa8 100644 --- a/Documentation/DocBook/media/v4l/remote_controllers.xml +++ b/Documentation/DocBook/media/v4l/remote_controllers.xml | |||
@@ -1,10 +1,152 @@ | |||
1 | <partinfo> | ||
2 | <authorgroup> | ||
3 | <author> | ||
4 | <firstname>Mauro</firstname> | ||
5 | <surname>Chehab</surname> | ||
6 | <othername role="mi">Carvalho</othername> | ||
7 | <affiliation><address><email>m.chehab@samsung.com</email></address></affiliation> | ||
8 | <contrib>Initial version.</contrib> | ||
9 | </author> | ||
10 | </authorgroup> | ||
11 | <copyright> | ||
12 | <year>2009-2014</year> | ||
13 | <holder>Mauro Carvalho Chehab</holder> | ||
14 | </copyright> | ||
15 | |||
16 | <revhistory> | ||
17 | <!-- Put document revisions here, newest first. --> | ||
18 | <revision> | ||
19 | <revnumber>3.15</revnumber> | ||
20 | <date>2014-02-06</date> | ||
21 | <authorinitials>mcc</authorinitials> | ||
22 | <revremark>Added the interface description and the RC sysfs class description.</revremark> | ||
23 | </revision> | ||
24 | <revision> | ||
25 | <revnumber>1.0</revnumber> | ||
26 | <date>2009-09-06</date> | ||
27 | <authorinitials>mcc</authorinitials> | ||
28 | <revremark>Initial revision</revremark> | ||
29 | </revision> | ||
30 | </revhistory> | ||
31 | </partinfo> | ||
32 | |||
33 | <title>Remote Controller API</title> | ||
34 | <chapter id="remote_controllers"> | ||
35 | |||
1 | <title>Remote Controllers</title> | 36 | <title>Remote Controllers</title> |
37 | |||
2 | <section id="Remote_controllers_Intro"> | 38 | <section id="Remote_controllers_Intro"> |
3 | <title>Introduction</title> | 39 | <title>Introduction</title> |
4 | 40 | ||
5 | <para>Currently, most analog and digital devices have a Infrared input for remote controllers. Each | 41 | <para>Currently, most analog and digital devices have a Infrared input for remote controllers. Each |
6 | manufacturer has their own type of control. It is not rare for the same manufacturer to ship different | 42 | manufacturer has their own type of control. It is not rare for the same manufacturer to ship different |
7 | types of controls, depending on the device.</para> | 43 | types of controls, depending on the device.</para> |
44 | <para>A Remote Controller interface is mapped as a normal evdev/input interface, just like a keyboard or a mouse. | ||
45 | So, it uses all ioctls already defined for any other input devices.</para> | ||
46 | <para>However, remove controllers are more flexible than a normal input device, as the IR | ||
47 | receiver (and/or transmitter) can be used in conjunction with a wide variety of different IR remotes.</para> | ||
48 | <para>In order to allow flexibility, the Remote Controller subsystem allows controlling the | ||
49 | RC-specific attributes via <link linkend="remote_controllers_sysfs_nodes">the sysfs class nodes</link>.</para> | ||
50 | </section> | ||
51 | |||
52 | <section id="remote_controllers_sysfs_nodes"> | ||
53 | <title>Remote Controller's sysfs nodes</title> | ||
54 | <para>As defined at <constant>Documentation/ABI/testing/sysfs-class-rc</constant>, those are the sysfs nodes that control the Remote Controllers:</para> | ||
55 | |||
56 | <section id="sys_class_rc"> | ||
57 | <title>/sys/class/rc/</title> | ||
58 | <para>The <constant>/sys/class/rc/</constant> class sub-directory belongs to the Remote Controller | ||
59 | core and provides a sysfs interface for configuring infrared remote controller receivers. | ||
60 | </para> | ||
61 | |||
62 | </section> | ||
63 | <section id="sys_class_rc_rcN"> | ||
64 | <title>/sys/class/rc/rcN/</title> | ||
65 | <para>A <constant>/sys/class/rc/rcN</constant> directory is created for each remote | ||
66 | control receiver device where N is the number of the receiver.</para> | ||
67 | |||
68 | </section> | ||
69 | <section id="sys_class_rc_rcN_protocols"> | ||
70 | <title>/sys/class/rc/rcN/protocols</title> | ||
71 | <para>Reading this file returns a list of available protocols, something like:</para> | ||
72 | <para><constant>rc5 [rc6] nec jvc [sony]</constant></para> | ||
73 | <para>Enabled protocols are shown in [] brackets.</para> | ||
74 | <para>Writing "+proto" will add a protocol to the list of enabled protocols.</para> | ||
75 | <para>Writing "-proto" will remove a protocol from the list of enabled protocols.</para> | ||
76 | <para>Writing "proto" will enable only "proto".</para> | ||
77 | <para>Writing "none" will disable all protocols.</para> | ||
78 | <para>Write fails with EINVAL if an invalid protocol combination or unknown protocol name is used.</para> | ||
79 | |||
80 | </section> | ||
81 | <section id="sys_class_rc_rcN_filter"> | ||
82 | <title>/sys/class/rc/rcN/filter</title> | ||
83 | <para>Sets the scancode filter expected value.</para> | ||
84 | <para>Use in combination with <constant>/sys/class/rc/rcN/filter_mask</constant> to set the | ||
85 | expected value of the bits set in the filter mask. | ||
86 | If the hardware supports it then scancodes which do not match | ||
87 | the filter will be ignored. Otherwise the write will fail with | ||
88 | an error.</para> | ||
89 | <para>This value may be reset to 0 if the current protocol is altered.</para> | ||
90 | |||
91 | </section> | ||
92 | <section id="sys_class_rc_rcN_filter_mask"> | ||
93 | <title>/sys/class/rc/rcN/filter_mask</title> | ||
94 | <para>Sets the scancode filter mask of bits to compare. | ||
95 | Use in combination with <constant>/sys/class/rc/rcN/filter</constant> to set the bits | ||
96 | of the scancode which should be compared against the expected | ||
97 | value. A value of 0 disables the filter to allow all valid | ||
98 | scancodes to be processed.</para> | ||
99 | <para>If the hardware supports it then scancodes which do not match | ||
100 | the filter will be ignored. Otherwise the write will fail with | ||
101 | an error.</para> | ||
102 | <para>This value may be reset to 0 if the current protocol is altered.</para> | ||
103 | |||
104 | </section> | ||
105 | <section id="sys_class_rc_rcN_wakeup_protocols"> | ||
106 | <title>/sys/class/rc/rcN/wakeup_protocols</title> | ||
107 | <para>Reading this file returns a list of available protocols to use for the | ||
108 | wakeup filter, something like:</para> | ||
109 | <para><constant>rc5 rc6 nec jvc [sony]</constant></para> | ||
110 | <para>The enabled wakeup protocol is shown in [] brackets.</para> | ||
111 | <para>Writing "+proto" will add a protocol to the list of enabled wakeup | ||
112 | protocols.</para> | ||
113 | <para>Writing "-proto" will remove a protocol from the list of enabled wakeup | ||
114 | protocols.</para> | ||
115 | <para>Writing "proto" will use "proto" for wakeup events.</para> | ||
116 | <para>Writing "none" will disable wakeup.</para> | ||
117 | <para>Write fails with EINVAL if an invalid protocol combination or unknown | ||
118 | protocol name is used, or if wakeup is not supported by the hardware.</para> | ||
119 | |||
120 | </section> | ||
121 | <section id="sys_class_rc_rcN_wakeup_filter"> | ||
122 | <title>/sys/class/rc/rcN/wakeup_filter</title> | ||
123 | <para>Sets the scancode wakeup filter expected value. | ||
124 | Use in combination with <constant>/sys/class/rc/rcN/wakeup_filter_mask</constant> to | ||
125 | set the expected value of the bits set in the wakeup filter mask | ||
126 | to trigger a system wake event.</para> | ||
127 | <para>If the hardware supports it and wakeup_filter_mask is not 0 then | ||
128 | scancodes which match the filter will wake the system from e.g. | ||
129 | suspend to RAM or power off. | ||
130 | Otherwise the write will fail with an error.</para> | ||
131 | <para>This value may be reset to 0 if the wakeup protocol is altered.</para> | ||
132 | |||
133 | </section> | ||
134 | <section id="sys_class_rc_rcN_wakeup_filter_mask"> | ||
135 | <title>/sys/class/rc/rcN/wakeup_filter_mask</title> | ||
136 | <para>Sets the scancode wakeup filter mask of bits to compare. | ||
137 | Use in combination with <constant>/sys/class/rc/rcN/wakeup_filter</constant> to set | ||
138 | the bits of the scancode which should be compared against the | ||
139 | expected value to trigger a system wake event.</para> | ||
140 | <para>If the hardware supports it and wakeup_filter_mask is not 0 then | ||
141 | scancodes which match the filter will wake the system from e.g. | ||
142 | suspend to RAM or power off. | ||
143 | Otherwise the write will fail with an error.</para> | ||
144 | <para>This value may be reset to 0 if the wakeup protocol is altered.</para> | ||
145 | </section> | ||
146 | </section> | ||
147 | |||
148 | <section id="Remote_controllers_tables"> | ||
149 | <title>Remote controller tables</title> | ||
8 | <para>Unfortunately, for several years, there was no effort to create uniform IR keycodes for | 150 | <para>Unfortunately, for several years, there was no effort to create uniform IR keycodes for |
9 | different devices. This caused the same IR keyname to be mapped completely differently on | 151 | different devices. This caused the same IR keyname to be mapped completely differently on |
10 | different IR devices. This resulted that the same IR keyname to be mapped completely different on | 152 | different IR devices. This resulted that the same IR keyname to be mapped completely different on |
@@ -175,3 +317,4 @@ keymapping.</para> | |||
175 | </section> | 317 | </section> |
176 | 318 | ||
177 | &sub-lirc_device_interface; | 319 | &sub-lirc_device_interface; |
320 | </chapter> | ||
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 74b7f27af71a..b445161b912c 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -70,7 +70,7 @@ MPEG stream embedded, sliced VBI data format in this specification. | |||
70 | Remote Controller chapter.</contrib> | 70 | Remote Controller chapter.</contrib> |
71 | <affiliation> | 71 | <affiliation> |
72 | <address> | 72 | <address> |
73 | <email>mchehab@redhat.com</email> | 73 | <email>m.chehab@samsung.com</email> |
74 | </address> | 74 | </address> |
75 | </affiliation> | 75 | </affiliation> |
76 | </author> | 76 | </author> |
@@ -107,6 +107,16 @@ Remote Controller chapter.</contrib> | |||
107 | </address> | 107 | </address> |
108 | </affiliation> | 108 | </affiliation> |
109 | </author> | 109 | </author> |
110 | <author> | ||
111 | <firstname>Antti</firstname> | ||
112 | <surname>Palosaari</surname> | ||
113 | <contrib>SDR API.</contrib> | ||
114 | <affiliation> | ||
115 | <address> | ||
116 | <email>crope@iki.fi</email> | ||
117 | </address> | ||
118 | </affiliation> | ||
119 | </author> | ||
110 | </authorgroup> | 120 | </authorgroup> |
111 | 121 | ||
112 | <copyright> | 122 | <copyright> |
@@ -125,6 +135,7 @@ Remote Controller chapter.</contrib> | |||
125 | <year>2011</year> | 135 | <year>2011</year> |
126 | <year>2012</year> | 136 | <year>2012</year> |
127 | <year>2013</year> | 137 | <year>2013</year> |
138 | <year>2014</year> | ||
128 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin | 139 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin |
129 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, | 140 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, |
130 | Pawel Osciak</holder> | 141 | Pawel Osciak</holder> |
@@ -141,6 +152,16 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
141 | applications. --> | 152 | applications. --> |
142 | 153 | ||
143 | <revision> | 154 | <revision> |
155 | <revnumber>3.15</revnumber> | ||
156 | <date>2014-02-03</date> | ||
157 | <authorinitials>hv, ap</authorinitials> | ||
158 | <revremark>Update several sections of "Common API Elements": "Opening and Closing Devices" | ||
159 | "Querying Capabilities", "Application Priority", "Video Inputs and Outputs", "Audio Inputs and Outputs" | ||
160 | "Tuners and Modulators", "Video Standards" and "Digital Video (DV) Timings". Added SDR API. | ||
161 | </revremark> | ||
162 | </revision> | ||
163 | |||
164 | <revision> | ||
144 | <revnumber>3.14</revnumber> | 165 | <revnumber>3.14</revnumber> |
145 | <date>2013-11-25</date> | 166 | <date>2013-11-25</date> |
146 | <authorinitials>rr</authorinitials> | 167 | <authorinitials>rr</authorinitials> |
@@ -537,6 +558,7 @@ and discussions on the V4L mailing list.</revremark> | |||
537 | <section id="ttx"> &sub-dev-teletext; </section> | 558 | <section id="ttx"> &sub-dev-teletext; </section> |
538 | <section id="radio"> &sub-dev-radio; </section> | 559 | <section id="radio"> &sub-dev-radio; </section> |
539 | <section id="rds"> &sub-dev-rds; </section> | 560 | <section id="rds"> &sub-dev-rds; </section> |
561 | <section id="sdr"> &sub-dev-sdr; </section> | ||
540 | <section id="event"> &sub-dev-event; </section> | 562 | <section id="event"> &sub-dev-event; </section> |
541 | <section id="subdev"> &sub-dev-subdev; </section> | 563 | <section id="subdev"> &sub-dev-subdev; </section> |
542 | </chapter> | 564 | </chapter> |
@@ -585,6 +607,7 @@ and discussions on the V4L mailing list.</revremark> | |||
585 | &sub-g-crop; | 607 | &sub-g-crop; |
586 | &sub-g-ctrl; | 608 | &sub-g-ctrl; |
587 | &sub-g-dv-timings; | 609 | &sub-g-dv-timings; |
610 | &sub-g-edid; | ||
588 | &sub-g-enc-index; | 611 | &sub-g-enc-index; |
589 | &sub-g-ext-ctrls; | 612 | &sub-g-ext-ctrls; |
590 | &sub-g-fbuf; | 613 | &sub-g-fbuf; |
@@ -616,7 +639,6 @@ and discussions on the V4L mailing list.</revremark> | |||
616 | &sub-subdev-enum-frame-size; | 639 | &sub-subdev-enum-frame-size; |
617 | &sub-subdev-enum-mbus-code; | 640 | &sub-subdev-enum-mbus-code; |
618 | &sub-subdev-g-crop; | 641 | &sub-subdev-g-crop; |
619 | &sub-subdev-g-edid; | ||
620 | &sub-subdev-g-fmt; | 642 | &sub-subdev-g-fmt; |
621 | &sub-subdev-g-frame-interval; | 643 | &sub-subdev-g-frame-interval; |
622 | &sub-subdev-g-selection; | 644 | &sub-subdev-g-selection; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml b/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml index 6541ba0175ed..4e8ea65f7282 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml | |||
@@ -100,7 +100,7 @@ See <xref linkend="v4l2-tuner-type" /></entry> | |||
100 | <entry><structfield>capability</structfield></entry> | 100 | <entry><structfield>capability</structfield></entry> |
101 | <entry spanname="hspan">The tuner/modulator capability flags for | 101 | <entry spanname="hspan">The tuner/modulator capability flags for |
102 | this frequency band, see <xref linkend="tuner-capability" />. The <constant>V4L2_TUNER_CAP_LOW</constant> | 102 | this frequency band, see <xref linkend="tuner-capability" />. The <constant>V4L2_TUNER_CAP_LOW</constant> |
103 | capability must be the same for all frequency bands of the selected tuner/modulator. | 103 | or <constant>V4L2_TUNER_CAP_1HZ</constant> capability must be the same for all frequency bands of the selected tuner/modulator. |
104 | So either all bands have that capability set, or none of them have that capability.</entry> | 104 | So either all bands have that capability set, or none of them have that capability.</entry> |
105 | </row> | 105 | </row> |
106 | <row> | 106 | <row> |
@@ -109,7 +109,8 @@ So either all bands have that capability set, or none of them have that capabili | |||
109 | <entry spanname="hspan">The lowest tunable frequency in | 109 | <entry spanname="hspan">The lowest tunable frequency in |
110 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 110 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
111 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 111 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
112 | Hz, for this frequency band.</entry> | 112 | Hz, for this frequency band. A 1 Hz unit is used when the <structfield>capability</structfield> flag |
113 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set.</entry> | ||
113 | </row> | 114 | </row> |
114 | <row> | 115 | <row> |
115 | <entry>__u32</entry> | 116 | <entry>__u32</entry> |
@@ -117,7 +118,8 @@ Hz, for this frequency band.</entry> | |||
117 | <entry spanname="hspan">The highest tunable frequency in | 118 | <entry spanname="hspan">The highest tunable frequency in |
118 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 119 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
119 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 120 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
120 | Hz, for this frequency band.</entry> | 121 | Hz, for this frequency band. A 1 Hz unit is used when the <structfield>capability</structfield> flag |
122 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set.</entry> | ||
121 | </row> | 123 | </row> |
122 | <row> | 124 | <row> |
123 | <entry>__u32</entry> | 125 | <entry>__u32</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-edid.xml b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml index bbd18f0e6ede..ce4563b87131 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-edid.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml | |||
@@ -1,12 +1,12 @@ | |||
1 | <refentry id="vidioc-subdev-g-edid"> | 1 | <refentry id="vidioc-g-edid"> |
2 | <refmeta> | 2 | <refmeta> |
3 | <refentrytitle>ioctl VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID</refentrytitle> | 3 | <refentrytitle>ioctl VIDIOC_G_EDID, VIDIOC_S_EDID</refentrytitle> |
4 | &manvol; | 4 | &manvol; |
5 | </refmeta> | 5 | </refmeta> |
6 | 6 | ||
7 | <refnamediv> | 7 | <refnamediv> |
8 | <refname>VIDIOC_SUBDEV_G_EDID</refname> | 8 | <refname>VIDIOC_G_EDID</refname> |
9 | <refname>VIDIOC_SUBDEV_S_EDID</refname> | 9 | <refname>VIDIOC_S_EDID</refname> |
10 | <refpurpose>Get or set the EDID of a video receiver/transmitter</refpurpose> | 10 | <refpurpose>Get or set the EDID of a video receiver/transmitter</refpurpose> |
11 | </refnamediv> | 11 | </refnamediv> |
12 | 12 | ||
@@ -16,7 +16,7 @@ | |||
16 | <funcdef>int <function>ioctl</function></funcdef> | 16 | <funcdef>int <function>ioctl</function></funcdef> |
17 | <paramdef>int <parameter>fd</parameter></paramdef> | 17 | <paramdef>int <parameter>fd</parameter></paramdef> |
18 | <paramdef>int <parameter>request</parameter></paramdef> | 18 | <paramdef>int <parameter>request</parameter></paramdef> |
19 | <paramdef>struct v4l2_subdev_edid *<parameter>argp</parameter></paramdef> | 19 | <paramdef>struct v4l2_edid *<parameter>argp</parameter></paramdef> |
20 | </funcprototype> | 20 | </funcprototype> |
21 | </funcsynopsis> | 21 | </funcsynopsis> |
22 | <funcsynopsis> | 22 | <funcsynopsis> |
@@ -24,7 +24,7 @@ | |||
24 | <funcdef>int <function>ioctl</function></funcdef> | 24 | <funcdef>int <function>ioctl</function></funcdef> |
25 | <paramdef>int <parameter>fd</parameter></paramdef> | 25 | <paramdef>int <parameter>fd</parameter></paramdef> |
26 | <paramdef>int <parameter>request</parameter></paramdef> | 26 | <paramdef>int <parameter>request</parameter></paramdef> |
27 | <paramdef>const struct v4l2_subdev_edid *<parameter>argp</parameter></paramdef> | 27 | <paramdef>const struct v4l2_edid *<parameter>argp</parameter></paramdef> |
28 | </funcprototype> | 28 | </funcprototype> |
29 | </funcsynopsis> | 29 | </funcsynopsis> |
30 | </refsynopsisdiv> | 30 | </refsynopsisdiv> |
@@ -42,7 +42,7 @@ | |||
42 | <varlistentry> | 42 | <varlistentry> |
43 | <term><parameter>request</parameter></term> | 43 | <term><parameter>request</parameter></term> |
44 | <listitem> | 44 | <listitem> |
45 | <para>VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID</para> | 45 | <para>VIDIOC_G_EDID, VIDIOC_S_EDID</para> |
46 | </listitem> | 46 | </listitem> |
47 | </varlistentry> | 47 | </varlistentry> |
48 | <varlistentry> | 48 | <varlistentry> |
@@ -56,12 +56,20 @@ | |||
56 | 56 | ||
57 | <refsect1> | 57 | <refsect1> |
58 | <title>Description</title> | 58 | <title>Description</title> |
59 | <para>These ioctls can be used to get or set an EDID associated with an input pad | 59 | <para>These ioctls can be used to get or set an EDID associated with an input |
60 | from a receiver or an output pad of a transmitter subdevice.</para> | 60 | from a receiver or an output of a transmitter device. They can be |
61 | used with subdevice nodes (/dev/v4l-subdevX) or with video nodes (/dev/videoX).</para> | ||
62 | |||
63 | <para>When used with video nodes the <structfield>pad</structfield> field represents the | ||
64 | input (for video capture devices) or output (for video output devices) index as | ||
65 | is returned by &VIDIOC-ENUMINPUT; and &VIDIOC-ENUMOUTPUT; respectively. When used | ||
66 | with subdevice nodes the <structfield>pad</structfield> field represents the | ||
67 | input or output pad of the subdevice. If there is no EDID support for the given | ||
68 | <structfield>pad</structfield> value, then the &EINVAL; will be returned.</para> | ||
61 | 69 | ||
62 | <para>To get the EDID data the application has to fill in the <structfield>pad</structfield>, | 70 | <para>To get the EDID data the application has to fill in the <structfield>pad</structfield>, |
63 | <structfield>start_block</structfield>, <structfield>blocks</structfield> and <structfield>edid</structfield> | 71 | <structfield>start_block</structfield>, <structfield>blocks</structfield> and <structfield>edid</structfield> |
64 | fields and call <constant>VIDIOC_SUBDEV_G_EDID</constant>. The current EDID from block | 72 | fields and call <constant>VIDIOC_G_EDID</constant>. The current EDID from block |
65 | <structfield>start_block</structfield> and of size <structfield>blocks</structfield> | 73 | <structfield>start_block</structfield> and of size <structfield>blocks</structfield> |
66 | will be placed in the memory <structfield>edid</structfield> points to. The <structfield>edid</structfield> | 74 | will be placed in the memory <structfield>edid</structfield> points to. The <structfield>edid</structfield> |
67 | pointer must point to memory at least <structfield>blocks</structfield> * 128 bytes | 75 | pointer must point to memory at least <structfield>blocks</structfield> * 128 bytes |
@@ -91,15 +99,17 @@ | |||
91 | data in some way. In any case, the end result is the same: the EDID is no longer available. | 99 | data in some way. In any case, the end result is the same: the EDID is no longer available. |
92 | </para> | 100 | </para> |
93 | 101 | ||
94 | <table pgwide="1" frame="none" id="v4l2-subdev-edid"> | 102 | <table pgwide="1" frame="none" id="v4l2-edid"> |
95 | <title>struct <structname>v4l2_subdev_edid</structname></title> | 103 | <title>struct <structname>v4l2_edid</structname></title> |
96 | <tgroup cols="3"> | 104 | <tgroup cols="3"> |
97 | &cs-str; | 105 | &cs-str; |
98 | <tbody valign="top"> | 106 | <tbody valign="top"> |
99 | <row> | 107 | <row> |
100 | <entry>__u32</entry> | 108 | <entry>__u32</entry> |
101 | <entry><structfield>pad</structfield></entry> | 109 | <entry><structfield>pad</structfield></entry> |
102 | <entry>Pad for which to get/set the EDID blocks.</entry> | 110 | <entry>Pad for which to get/set the EDID blocks. When used with a video device |
111 | node the pad represents the input or output index as returned by | ||
112 | &VIDIOC-ENUMINPUT; and &VIDIOC-ENUMOUTPUT; respectively.</entry> | ||
103 | </row> | 113 | </row> |
104 | <row> | 114 | <row> |
105 | <entry>__u32</entry> | 115 | <entry>__u32</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index b3bb9575b2e0..e9f6735c0823 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | |||
@@ -327,7 +327,12 @@ These controls are described in <xref | |||
327 | These controls are described in <xref | 327 | These controls are described in <xref |
328 | linkend="fm-rx-controls" />.</entry> | 328 | linkend="fm-rx-controls" />.</entry> |
329 | </row> | 329 | </row> |
330 | 330 | <row> | |
331 | <entry><constant>V4L2_CTRL_CLASS_RF_TUNER</constant></entry> | ||
332 | <entry>0xa20000</entry> | ||
333 | <entry>The class containing RF tuner controls. | ||
334 | These controls are described in <xref linkend="rf-tuner-controls" />.</entry> | ||
335 | </row> | ||
331 | </tbody> | 336 | </tbody> |
332 | </tgroup> | 337 | </tgroup> |
333 | </table> | 338 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml index ee8f56e1bac0..4fe19a7a9a31 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml | |||
@@ -172,6 +172,13 @@ capture and output devices.</entry> | |||
172 | </row> | 172 | </row> |
173 | <row> | 173 | <row> |
174 | <entry></entry> | 174 | <entry></entry> |
175 | <entry>&v4l2-sdr-format;</entry> | ||
176 | <entry><structfield>sdr</structfield></entry> | ||
177 | <entry>Definition of a data format, see | ||
178 | <xref linkend="pixfmt" />, used by SDR capture devices.</entry> | ||
179 | </row> | ||
180 | <row> | ||
181 | <entry></entry> | ||
175 | <entry>__u8</entry> | 182 | <entry>__u8</entry> |
176 | <entry><structfield>raw_data</structfield>[200]</entry> | 183 | <entry><structfield>raw_data</structfield>[200]</entry> |
177 | <entry>Place holder for future extensions.</entry> | 184 | <entry>Place holder for future extensions.</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml index c7a1c462e724..d1034fb61d15 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml | |||
@@ -109,9 +109,10 @@ See <xref linkend="v4l2-tuner-type" /></entry> | |||
109 | <entry>__u32</entry> | 109 | <entry>__u32</entry> |
110 | <entry><structfield>frequency</structfield></entry> | 110 | <entry><structfield>frequency</structfield></entry> |
111 | <entry>Tuning frequency in units of 62.5 kHz, or if the | 111 | <entry>Tuning frequency in units of 62.5 kHz, or if the |
112 | &v4l2-tuner; or &v4l2-modulator; <structfield>capabilities</structfield> flag | 112 | &v4l2-tuner; or &v4l2-modulator; <structfield>capability</structfield> flag |
113 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 113 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
114 | Hz.</entry> | 114 | Hz. A 1 Hz unit is used when the <structfield>capability</structfield> flag |
115 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set.</entry> | ||
115 | </row> | 116 | </row> |
116 | <row> | 117 | <row> |
117 | <entry>__u32</entry> | 118 | <entry>__u32</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml index 7f4ac7e41fa8..7068b599a00d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml | |||
@@ -113,7 +113,8 @@ change for example with the current video standard.</entry> | |||
113 | <entry>The lowest tunable frequency in units of 62.5 | 113 | <entry>The lowest tunable frequency in units of 62.5 |
114 | KHz, or if the <structfield>capability</structfield> flag | 114 | KHz, or if the <structfield>capability</structfield> flag |
115 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 115 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
116 | Hz.</entry> | 116 | Hz, or if the <structfield>capability</structfield> flag |
117 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set, in units of 1 Hz.</entry> | ||
117 | </row> | 118 | </row> |
118 | <row> | 119 | <row> |
119 | <entry>__u32</entry> | 120 | <entry>__u32</entry> |
@@ -121,7 +122,8 @@ Hz.</entry> | |||
121 | <entry>The highest tunable frequency in units of 62.5 | 122 | <entry>The highest tunable frequency in units of 62.5 |
122 | KHz, or if the <structfield>capability</structfield> flag | 123 | KHz, or if the <structfield>capability</structfield> flag |
123 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 124 | <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
124 | Hz.</entry> | 125 | Hz, or if the <structfield>capability</structfield> flag |
126 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set, in units of 1 Hz.</entry> | ||
125 | </row> | 127 | </row> |
126 | <row> | 128 | <row> |
127 | <entry>__u32</entry> | 129 | <entry>__u32</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml index 6cc82010c736..b0d865933da6 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | |||
@@ -134,7 +134,9 @@ the structure refers to a radio tuner the | |||
134 | <entry spanname="hspan">The lowest tunable frequency in | 134 | <entry spanname="hspan">The lowest tunable frequency in |
135 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 135 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
136 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 136 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
137 | Hz. If multiple frequency bands are supported, then | 137 | Hz, or if the <structfield>capability</structfield> flag |
138 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set, in units of 1 Hz. | ||
139 | If multiple frequency bands are supported, then | ||
138 | <structfield>rangelow</structfield> is the lowest frequency | 140 | <structfield>rangelow</structfield> is the lowest frequency |
139 | of all the frequency bands.</entry> | 141 | of all the frequency bands.</entry> |
140 | </row> | 142 | </row> |
@@ -144,7 +146,9 @@ of all the frequency bands.</entry> | |||
144 | <entry spanname="hspan">The highest tunable frequency in | 146 | <entry spanname="hspan">The highest tunable frequency in |
145 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 147 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
146 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 148 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
147 | Hz. If multiple frequency bands are supported, then | 149 | Hz, or if the <structfield>capability</structfield> flag |
150 | <constant>V4L2_TUNER_CAP_1HZ</constant> is set, in units of 1 Hz. | ||
151 | If multiple frequency bands are supported, then | ||
148 | <structfield>rangehigh</structfield> is the highest frequency | 152 | <structfield>rangehigh</structfield> is the highest frequency |
149 | of all the frequency bands.</entry> | 153 | of all the frequency bands.</entry> |
150 | </row> | 154 | </row> |
@@ -270,7 +274,7 @@ applications must set the array to zero.</entry> | |||
270 | <entry><constant>V4L2_TUNER_CAP_LOW</constant></entry> | 274 | <entry><constant>V4L2_TUNER_CAP_LOW</constant></entry> |
271 | <entry>0x0001</entry> | 275 | <entry>0x0001</entry> |
272 | <entry>When set, tuning frequencies are expressed in units of | 276 | <entry>When set, tuning frequencies are expressed in units of |
273 | 62.5 Hz, otherwise in units of 62.5 kHz.</entry> | 277 | 62.5 Hz instead of 62.5 kHz.</entry> |
274 | </row> | 278 | </row> |
275 | <row> | 279 | <row> |
276 | <entry><constant>V4L2_TUNER_CAP_NORM</constant></entry> | 280 | <entry><constant>V4L2_TUNER_CAP_NORM</constant></entry> |
@@ -360,6 +364,11 @@ radio tuners.</entry> | |||
360 | <entry>The range to search when using the hardware seek functionality | 364 | <entry>The range to search when using the hardware seek functionality |
361 | is programmable, see &VIDIOC-S-HW-FREQ-SEEK; for details.</entry> | 365 | is programmable, see &VIDIOC-S-HW-FREQ-SEEK; for details.</entry> |
362 | </row> | 366 | </row> |
367 | <row> | ||
368 | <entry><constant>V4L2_TUNER_CAP_1HZ</constant></entry> | ||
369 | <entry>0x1000</entry> | ||
370 | <entry>When set, tuning frequencies are expressed in units of 1 Hz instead of 62.5 kHz.</entry> | ||
371 | </row> | ||
363 | </tbody> | 372 | </tbody> |
364 | </tgroup> | 373 | </tgroup> |
365 | </table> | 374 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index d5a3c97b206a..370d49d6fb64 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml | |||
@@ -296,6 +296,12 @@ modulator programming see | |||
296 | <xref linkend="tuner" />.</entry> | 296 | <xref linkend="tuner" />.</entry> |
297 | </row> | 297 | </row> |
298 | <row> | 298 | <row> |
299 | <entry><constant>V4L2_CAP_SDR_CAPTURE</constant></entry> | ||
300 | <entry>0x00100000</entry> | ||
301 | <entry>The device supports the | ||
302 | <link linkend="sdr">SDR Capture</link> interface.</entry> | ||
303 | </row> | ||
304 | <row> | ||
299 | <entry><constant>V4L2_CAP_READWRITE</constant></entry> | 305 | <entry><constant>V4L2_CAP_READWRITE</constant></entry> |
300 | <entry>0x01000000</entry> | 306 | <entry>0x01000000</entry> |
301 | <entry>The device supports the <link | 307 | <entry>The device supports the <link |
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml index 5b379e752194..a5fc4c4880f3 100644 --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | |||
@@ -121,7 +121,9 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
121 | <entry>If non-zero, the lowest tunable frequency of the band to | 121 | <entry>If non-zero, the lowest tunable frequency of the band to |
122 | search in units of 62.5 kHz, or if the &v4l2-tuner; | 122 | search in units of 62.5 kHz, or if the &v4l2-tuner; |
123 | <structfield>capability</structfield> field has the | 123 | <structfield>capability</structfield> field has the |
124 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz. | 124 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz or if the &v4l2-tuner; |
125 | <structfield>capability</structfield> field has the | ||
126 | <constant>V4L2_TUNER_CAP_1HZ</constant> flag set, in units of 1 Hz. | ||
125 | If <structfield>rangelow</structfield> is zero a reasonable default value | 127 | If <structfield>rangelow</structfield> is zero a reasonable default value |
126 | is used.</entry> | 128 | is used.</entry> |
127 | </row> | 129 | </row> |
@@ -131,7 +133,9 @@ is used.</entry> | |||
131 | <entry>If non-zero, the highest tunable frequency of the band to | 133 | <entry>If non-zero, the highest tunable frequency of the band to |
132 | search in units of 62.5 kHz, or if the &v4l2-tuner; | 134 | search in units of 62.5 kHz, or if the &v4l2-tuner; |
133 | <structfield>capability</structfield> field has the | 135 | <structfield>capability</structfield> field has the |
134 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz. | 136 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz or if the &v4l2-tuner; |
137 | <structfield>capability</structfield> field has the | ||
138 | <constant>V4L2_TUNER_CAP_1HZ</constant> flag set, in units of 1 Hz. | ||
135 | If <structfield>rangehigh</structfield> is zero a reasonable default value | 139 | If <structfield>rangehigh</structfield> is zero a reasonable default value |
136 | is used.</entry> | 140 | is used.</entry> |
137 | </row> | 141 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-streamon.xml b/Documentation/DocBook/media/v4l/vidioc-streamon.xml index 65dff55079d7..df2c63d07bac 100644 --- a/Documentation/DocBook/media/v4l/vidioc-streamon.xml +++ b/Documentation/DocBook/media/v4l/vidioc-streamon.xml | |||
@@ -52,16 +52,24 @@ | |||
52 | <para>The <constant>VIDIOC_STREAMON</constant> and | 52 | <para>The <constant>VIDIOC_STREAMON</constant> and |
53 | <constant>VIDIOC_STREAMOFF</constant> ioctl start and stop the capture | 53 | <constant>VIDIOC_STREAMOFF</constant> ioctl start and stop the capture |
54 | or output process during streaming (<link linkend="mmap">memory | 54 | or output process during streaming (<link linkend="mmap">memory |
55 | mapping</link> or <link linkend="userp">user pointer</link>) I/O.</para> | 55 | mapping</link>, <link linkend="userp">user pointer</link> or |
56 | <link linkend="dmabuf">DMABUF</link>) I/O.</para> | ||
56 | 57 | ||
57 | <para>Specifically the capture hardware is disabled and no input | 58 | <para>Capture hardware is disabled and no input |
58 | buffers are filled (if there are any empty buffers in the incoming | 59 | buffers are filled (if there are any empty buffers in the incoming |
59 | queue) until <constant>VIDIOC_STREAMON</constant> has been called. | 60 | queue) until <constant>VIDIOC_STREAMON</constant> has been called. |
60 | Accordingly the output hardware is disabled, no video signal is | 61 | Output hardware is disabled and no video signal is |
61 | produced until <constant>VIDIOC_STREAMON</constant> has been called. | 62 | produced until <constant>VIDIOC_STREAMON</constant> has been called. |
62 | The ioctl will succeed when at least one output buffer is in the | 63 | The ioctl will succeed when at least one output buffer is in the |
63 | incoming queue.</para> | 64 | incoming queue.</para> |
64 | 65 | ||
66 | <para>Memory-to-memory devices will not start until | ||
67 | <constant>VIDIOC_STREAMON</constant> has been called for both the capture | ||
68 | and output stream types.</para> | ||
69 | |||
70 | <para>If <constant>VIDIOC_STREAMON</constant> fails then any already | ||
71 | queued buffers will remain queued.</para> | ||
72 | |||
65 | <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of | 73 | <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of |
66 | aborting or finishing any DMA in progress, unlocks any user pointer | 74 | aborting or finishing any DMA in progress, unlocks any user pointer |
67 | buffers locked in physical memory, and it removes all buffers from the | 75 | buffers locked in physical memory, and it removes all buffers from the |
@@ -70,14 +78,22 @@ dequeued yet will be lost, likewise all images enqueued for output but | |||
70 | not transmitted yet. I/O returns to the same state as after calling | 78 | not transmitted yet. I/O returns to the same state as after calling |
71 | &VIDIOC-REQBUFS; and can be restarted accordingly.</para> | 79 | &VIDIOC-REQBUFS; and can be restarted accordingly.</para> |
72 | 80 | ||
81 | <para>If buffers have been queued with &VIDIOC-QBUF; and | ||
82 | <constant>VIDIOC_STREAMOFF</constant> is called without ever having | ||
83 | called <constant>VIDIOC_STREAMON</constant>, then those queued buffers | ||
84 | will also be removed from the incoming queue and all are returned to the | ||
85 | same state as after calling &VIDIOC-REQBUFS; and can be restarted | ||
86 | accordingly.</para> | ||
87 | |||
73 | <para>Both ioctls take a pointer to an integer, the desired buffer or | 88 | <para>Both ioctls take a pointer to an integer, the desired buffer or |
74 | stream type. This is the same as &v4l2-requestbuffers; | 89 | stream type. This is the same as &v4l2-requestbuffers; |
75 | <structfield>type</structfield>.</para> | 90 | <structfield>type</structfield>.</para> |
76 | 91 | ||
77 | <para>If <constant>VIDIOC_STREAMON</constant> is called when streaming | 92 | <para>If <constant>VIDIOC_STREAMON</constant> is called when streaming |
78 | is already in progress, or if <constant>VIDIOC_STREAMOFF</constant> is called | 93 | is already in progress, or if <constant>VIDIOC_STREAMOFF</constant> is called |
79 | when streaming is already stopped, then the ioctl does nothing and 0 is | 94 | when streaming is already stopped, then 0 is returned. Nothing happens in the |
80 | returned.</para> | 95 | case of <constant>VIDIOC_STREAMON</constant>, but <constant>VIDIOC_STREAMOFF</constant> |
96 | will return queued buffers to their starting state as mentioned above.</para> | ||
81 | 97 | ||
82 | <para>Note that applications can be preempted for unknown periods right | 98 | <para>Note that applications can be preempted for unknown periods right |
83 | before or after the <constant>VIDIOC_STREAMON</constant> or | 99 | before or after the <constant>VIDIOC_STREAMON</constant> or |
@@ -93,7 +109,7 @@ synchronize with other events.</para> | |||
93 | <varlistentry> | 109 | <varlistentry> |
94 | <term><errorcode>EINVAL</errorcode></term> | 110 | <term><errorcode>EINVAL</errorcode></term> |
95 | <listitem> | 111 | <listitem> |
96 | <para>The buffer<structfield>type</structfield> is not supported, | 112 | <para>The buffer <structfield>type</structfield> is not supported, |
97 | or no buffers have been allocated (memory mapping) or enqueued | 113 | or no buffers have been allocated (memory mapping) or enqueued |
98 | (output) yet.</para> | 114 | (output) yet.</para> |
99 | </listitem> | 115 | </listitem> |
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index 4c8d282545a2..4decb46bfa76 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl | |||
@@ -34,22 +34,20 @@ | |||
34 | 34 | ||
35 | <book id="media_api"> | 35 | <book id="media_api"> |
36 | <bookinfo> | 36 | <bookinfo> |
37 | <title>LINUX MEDIA INFRASTRUCTURE API</title> | 37 | <title>LINUX MEDIA INFRASTRUCTURE API</title> |
38 | 38 | ||
39 | <copyright> | 39 | <copyright> |
40 | <year>2009-2012</year> | 40 | <year>2009-2014</year> |
41 | <holder>LinuxTV Developers</holder> | 41 | <holder>LinuxTV Developers</holder> |
42 | </copyright> | 42 | </copyright> |
43 | 43 | ||
44 | <legalnotice> | 44 | <legalnotice> |
45 | 45 | <para>Permission is granted to copy, distribute and/or modify | |
46 | <para>Permission is granted to copy, distribute and/or modify | 46 | this document under the terms of the GNU Free Documentation License, |
47 | this document under the terms of the GNU Free Documentation License, | 47 | Version 1.1 or any later version published by the Free Software |
48 | Version 1.1 or any later version published by the Free Software | 48 | Foundation. A copy of the license is included in the chapter entitled |
49 | Foundation. A copy of the license is included in the chapter entitled | 49 | "GNU Free Documentation License"</para> |
50 | "GNU Free Documentation License"</para> | 50 | </legalnotice> |
51 | </legalnotice> | ||
52 | |||
53 | </bookinfo> | 51 | </bookinfo> |
54 | 52 | ||
55 | <toc></toc> <!-- autogenerated --> | 53 | <toc></toc> <!-- autogenerated --> |
@@ -58,12 +56,13 @@ Foundation. A copy of the license is included in the chapter entitled | |||
58 | <title>Introduction</title> | 56 | <title>Introduction</title> |
59 | 57 | ||
60 | <para>This document covers the Linux Kernel to Userspace API's used by | 58 | <para>This document covers the Linux Kernel to Userspace API's used by |
61 | video and radio straming devices, including video cameras, | 59 | video and radio streaming devices, including video cameras, |
62 | analog and digital TV receiver cards, AM/FM receiver cards, | 60 | analog and digital TV receiver cards, AM/FM receiver cards, |
63 | streaming capture devices.</para> | 61 | streaming capture and output devices, codec devices and remote |
62 | controllers.</para> | ||
64 | <para>It is divided into four parts.</para> | 63 | <para>It is divided into four parts.</para> |
65 | <para>The first part covers radio, capture, | 64 | <para>The first part covers radio, video capture and output, |
66 | cameras and analog TV devices.</para> | 65 | cameras, analog TV devices and codecs.</para> |
67 | <para>The second part covers the | 66 | <para>The second part covers the |
68 | API used for digital TV and Internet reception via one of the | 67 | API used for digital TV and Internet reception via one of the |
69 | several digital tv standards. While it is called as DVB API, | 68 | several digital tv standards. While it is called as DVB API, |
@@ -75,55 +74,14 @@ Foundation. A copy of the license is included in the chapter entitled | |||
75 | <para>For additional information and for the latest development code, | 74 | <para>For additional information and for the latest development code, |
76 | see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> | 75 | see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> |
77 | <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> | 76 | <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> |
78 | |||
79 | </preface> | 77 | </preface> |
80 | 78 | ||
81 | <part id="v4l2spec"> | 79 | <part id="v4l2spec">&sub-v4l2;</part> |
82 | &sub-v4l2; | 80 | <part id="dvbapi">&sub-dvbapi;</part> |
83 | </part> | 81 | <part id="remotes">&sub-remote_controllers;</part> |
84 | <part id="dvbapi"> | 82 | <part id="media_common">&sub-media-controller;</part> |
85 | &sub-dvbapi; | ||
86 | </part> | ||
87 | <part id="v4ldvb_common"> | ||
88 | <partinfo> | ||
89 | <authorgroup> | ||
90 | <author> | ||
91 | <firstname>Mauro</firstname> | ||
92 | <surname>Chehab</surname> | ||
93 | <othername role="mi">Carvalho</othername> | ||
94 | <affiliation><address><email>mchehab@redhat.com</email></address></affiliation> | ||
95 | <contrib>Initial version.</contrib> | ||
96 | </author> | ||
97 | </authorgroup> | ||
98 | <copyright> | ||
99 | <year>2009-2012</year> | ||
100 | <holder>Mauro Carvalho Chehab</holder> | ||
101 | </copyright> | ||
102 | |||
103 | <revhistory> | ||
104 | <!-- Put document revisions here, newest first. --> | ||
105 | <revision> | ||
106 | <revnumber>1.0.0</revnumber> | ||
107 | <date>2009-09-06</date> | ||
108 | <authorinitials>mcc</authorinitials> | ||
109 | <revremark>Initial revision</revremark> | ||
110 | </revision> | ||
111 | </revhistory> | ||
112 | </partinfo> | ||
113 | |||
114 | <title>Remote Controller API</title> | ||
115 | <chapter id="remote_controllers"> | ||
116 | &sub-remote_controllers; | ||
117 | </chapter> | ||
118 | </part> | ||
119 | <part id="media_common"> | ||
120 | &sub-media-controller; | ||
121 | </part> | ||
122 | |||
123 | <chapter id="gen_errors"> | ||
124 | &sub-gen-errors; | ||
125 | </chapter> | ||
126 | 83 | ||
84 | <chapter id="gen_errors">&sub-gen-errors;</chapter> | ||
127 | 85 | ||
128 | &sub-fdl-appendix; | 86 | &sub-fdl-appendix; |
129 | 87 | ||
diff --git a/Documentation/DocBook/w1.tmpl b/Documentation/DocBook/w1.tmpl new file mode 100644 index 000000000000..b0228d4c81bb --- /dev/null +++ b/Documentation/DocBook/w1.tmpl | |||
@@ -0,0 +1,101 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="w1id"> | ||
6 | <bookinfo> | ||
7 | <title>W1: Dallas' 1-wire bus</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>David</firstname> | ||
12 | <surname>Fries</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>David@Fries.net</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | |||
20 | </authorgroup> | ||
21 | |||
22 | <copyright> | ||
23 | <year>2013</year> | ||
24 | <!-- | ||
25 | <holder></holder> | ||
26 | --> | ||
27 | </copyright> | ||
28 | |||
29 | <legalnotice> | ||
30 | <para> | ||
31 | This documentation is free software; you can redistribute | ||
32 | it and/or modify it under the terms of the GNU General Public | ||
33 | License version 2. | ||
34 | </para> | ||
35 | |||
36 | <para> | ||
37 | This program is distributed in the hope that it will be | ||
38 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
39 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
40 | For more details see the file COPYING in the source | ||
41 | distribution of Linux. | ||
42 | </para> | ||
43 | </legalnotice> | ||
44 | </bookinfo> | ||
45 | |||
46 | <toc></toc> | ||
47 | |||
48 | <chapter id="w1_internal"> | ||
49 | <title>W1 API internal to the kernel</title> | ||
50 | |||
51 | <sect1 id="w1_internal_api"> | ||
52 | <title>W1 API internal to the kernel</title> | ||
53 | <sect2 id="w1.h"> | ||
54 | <title>drivers/w1/w1.h</title> | ||
55 | <para>W1 core functions.</para> | ||
56 | !Idrivers/w1/w1.h | ||
57 | </sect2> | ||
58 | |||
59 | <sect2 id="w1.c"> | ||
60 | <title>drivers/w1/w1.c</title> | ||
61 | <para>W1 core functions.</para> | ||
62 | !Idrivers/w1/w1.c | ||
63 | </sect2> | ||
64 | |||
65 | <sect2 id="w1_family.h"> | ||
66 | <title>drivers/w1/w1_family.h</title> | ||
67 | <para>Allows registering device family operations.</para> | ||
68 | !Idrivers/w1/w1_family.h | ||
69 | </sect2> | ||
70 | |||
71 | <sect2 id="w1_family.c"> | ||
72 | <title>drivers/w1/w1_family.c</title> | ||
73 | <para>Allows registering device family operations.</para> | ||
74 | !Edrivers/w1/w1_family.c | ||
75 | </sect2> | ||
76 | |||
77 | <sect2 id="w1_int.c"> | ||
78 | <title>drivers/w1/w1_int.c</title> | ||
79 | <para>W1 internal initialization for master devices.</para> | ||
80 | !Edrivers/w1/w1_int.c | ||
81 | </sect2> | ||
82 | |||
83 | <sect2 id="w1_netlink.h"> | ||
84 | <title>drivers/w1/w1_netlink.h</title> | ||
85 | <para>W1 external netlink API structures and commands.</para> | ||
86 | !Idrivers/w1/w1_netlink.h | ||
87 | </sect2> | ||
88 | |||
89 | <sect2 id="w1_io.c"> | ||
90 | <title>drivers/w1/w1_io.c</title> | ||
91 | <para>W1 input/output.</para> | ||
92 | !Edrivers/w1/w1_io.c | ||
93 | !Idrivers/w1/w1_io.c | ||
94 | </sect2> | ||
95 | |||
96 | </sect1> | ||
97 | |||
98 | |||
99 | </chapter> | ||
100 | |||
101 | </book> | ||
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 06741e925985..d0056a4e9c53 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -468,8 +468,6 @@ | |||
468 | return err; | 468 | return err; |
469 | } | 469 | } |
470 | 470 | ||
471 | snd_card_set_dev(card, &pci->dev); | ||
472 | |||
473 | *rchip = chip; | 471 | *rchip = chip; |
474 | return 0; | 472 | return 0; |
475 | } | 473 | } |
@@ -492,7 +490,8 @@ | |||
492 | } | 490 | } |
493 | 491 | ||
494 | /* (2) */ | 492 | /* (2) */ |
495 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 493 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
494 | 0, &card); | ||
496 | if (err < 0) | 495 | if (err < 0) |
497 | return err; | 496 | return err; |
498 | 497 | ||
@@ -591,7 +590,8 @@ | |||
591 | struct snd_card *card; | 590 | struct snd_card *card; |
592 | int err; | 591 | int err; |
593 | .... | 592 | .... |
594 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 593 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
594 | 0, &card); | ||
595 | ]]> | 595 | ]]> |
596 | </programlisting> | 596 | </programlisting> |
597 | </informalexample> | 597 | </informalexample> |
@@ -809,28 +809,34 @@ | |||
809 | 809 | ||
810 | <para> | 810 | <para> |
811 | As mentioned above, to create a card instance, call | 811 | As mentioned above, to create a card instance, call |
812 | <function>snd_card_create()</function>. | 812 | <function>snd_card_new()</function>. |
813 | 813 | ||
814 | <informalexample> | 814 | <informalexample> |
815 | <programlisting> | 815 | <programlisting> |
816 | <![CDATA[ | 816 | <![CDATA[ |
817 | struct snd_card *card; | 817 | struct snd_card *card; |
818 | int err; | 818 | int err; |
819 | err = snd_card_create(index, id, module, extra_size, &card); | 819 | err = snd_card_new(&pci->dev, index, id, module, extra_size, &card); |
820 | ]]> | 820 | ]]> |
821 | </programlisting> | 821 | </programlisting> |
822 | </informalexample> | 822 | </informalexample> |
823 | </para> | 823 | </para> |
824 | 824 | ||
825 | <para> | 825 | <para> |
826 | The function takes five arguments, the card-index number, the | 826 | The function takes six arguments: the parent device pointer, |
827 | id string, the module pointer (usually | 827 | the card-index number, the id string, the module pointer (usually |
828 | <constant>THIS_MODULE</constant>), | 828 | <constant>THIS_MODULE</constant>), |
829 | the size of extra-data space, and the pointer to return the | 829 | the size of extra-data space, and the pointer to return the |
830 | card instance. The extra_size argument is used to | 830 | card instance. The extra_size argument is used to |
831 | allocate card->private_data for the | 831 | allocate card->private_data for the |
832 | chip-specific data. Note that these data | 832 | chip-specific data. Note that these data |
833 | are allocated by <function>snd_card_create()</function>. | 833 | are allocated by <function>snd_card_new()</function>. |
834 | </para> | ||
835 | |||
836 | <para> | ||
837 | The first argument, the pointer of struct | ||
838 | <structname>device</structname>, specifies the parent device. | ||
839 | For PCI devices, typically &pci-> is passed there. | ||
834 | </para> | 840 | </para> |
835 | </section> | 841 | </section> |
836 | 842 | ||
@@ -916,16 +922,16 @@ | |||
916 | </para> | 922 | </para> |
917 | 923 | ||
918 | <section id="card-management-chip-specific-snd-card-new"> | 924 | <section id="card-management-chip-specific-snd-card-new"> |
919 | <title>1. Allocating via <function>snd_card_create()</function>.</title> | 925 | <title>1. Allocating via <function>snd_card_new()</function>.</title> |
920 | <para> | 926 | <para> |
921 | As mentioned above, you can pass the extra-data-length | 927 | As mentioned above, you can pass the extra-data-length |
922 | to the 4th argument of <function>snd_card_create()</function>, i.e. | 928 | to the 5th argument of <function>snd_card_new()</function>, i.e. |
923 | 929 | ||
924 | <informalexample> | 930 | <informalexample> |
925 | <programlisting> | 931 | <programlisting> |
926 | <![CDATA[ | 932 | <![CDATA[ |
927 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 933 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
928 | sizeof(struct mychip), &card); | 934 | sizeof(struct mychip), &card); |
929 | ]]> | 935 | ]]> |
930 | </programlisting> | 936 | </programlisting> |
931 | </informalexample> | 937 | </informalexample> |
@@ -954,7 +960,7 @@ | |||
954 | 960 | ||
955 | <para> | 961 | <para> |
956 | After allocating a card instance via | 962 | After allocating a card instance via |
957 | <function>snd_card_create()</function> (with | 963 | <function>snd_card_new()</function> (with |
958 | <constant>0</constant> on the 4th arg), call | 964 | <constant>0</constant> on the 4th arg), call |
959 | <function>kzalloc()</function>. | 965 | <function>kzalloc()</function>. |
960 | 966 | ||
@@ -963,7 +969,8 @@ | |||
963 | <![CDATA[ | 969 | <![CDATA[ |
964 | struct snd_card *card; | 970 | struct snd_card *card; |
965 | struct mychip *chip; | 971 | struct mychip *chip; |
966 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 972 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
973 | 0, &card); | ||
967 | ..... | 974 | ..... |
968 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 975 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
969 | ]]> | 976 | ]]> |
@@ -1170,8 +1177,6 @@ | |||
1170 | return err; | 1177 | return err; |
1171 | } | 1178 | } |
1172 | 1179 | ||
1173 | snd_card_set_dev(card, &pci->dev); | ||
1174 | |||
1175 | *rchip = chip; | 1180 | *rchip = chip; |
1176 | return 0; | 1181 | return 0; |
1177 | } | 1182 | } |
@@ -1526,30 +1531,6 @@ | |||
1526 | 1531 | ||
1527 | </section> | 1532 | </section> |
1528 | 1533 | ||
1529 | <section id="pci-resource-device-struct"> | ||
1530 | <title>Registration of Device Struct</title> | ||
1531 | <para> | ||
1532 | At some point, typically after calling <function>snd_device_new()</function>, | ||
1533 | you need to register the struct <structname>device</structname> of the chip | ||
1534 | you're handling for udev and co. ALSA provides a macro for compatibility with | ||
1535 | older kernels. Simply call like the following: | ||
1536 | <informalexample> | ||
1537 | <programlisting> | ||
1538 | <![CDATA[ | ||
1539 | snd_card_set_dev(card, &pci->dev); | ||
1540 | ]]> | ||
1541 | </programlisting> | ||
1542 | </informalexample> | ||
1543 | so that it stores the PCI's device pointer to the card. This will be | ||
1544 | referred by ALSA core functions later when the devices are registered. | ||
1545 | </para> | ||
1546 | <para> | ||
1547 | In the case of non-PCI, pass the proper device struct pointer of the BUS | ||
1548 | instead. (In the case of legacy ISA without PnP, you don't have to do | ||
1549 | anything.) | ||
1550 | </para> | ||
1551 | </section> | ||
1552 | |||
1553 | <section id="pci-resource-entries"> | 1534 | <section id="pci-resource-entries"> |
1554 | <title>PCI Entries</title> | 1535 | <title>PCI Entries</title> |
1555 | <para> | 1536 | <para> |
@@ -5740,7 +5721,8 @@ struct _snd_pcm_runtime { | |||
5740 | struct mychip *chip; | 5721 | struct mychip *chip; |
5741 | int err; | 5722 | int err; |
5742 | .... | 5723 | .... |
5743 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 5724 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
5725 | 0, &card); | ||
5744 | .... | 5726 | .... |
5745 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 5727 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
5746 | .... | 5728 | .... |
@@ -5752,7 +5734,7 @@ struct _snd_pcm_runtime { | |||
5752 | </informalexample> | 5734 | </informalexample> |
5753 | 5735 | ||
5754 | When you created the chip data with | 5736 | When you created the chip data with |
5755 | <function>snd_card_create()</function>, it's anyway accessible | 5737 | <function>snd_card_new()</function>, it's anyway accessible |
5756 | via <structfield>private_data</structfield> field. | 5738 | via <structfield>private_data</structfield> field. |
5757 | 5739 | ||
5758 | <informalexample> | 5740 | <informalexample> |
@@ -5766,8 +5748,8 @@ struct _snd_pcm_runtime { | |||
5766 | struct mychip *chip; | 5748 | struct mychip *chip; |
5767 | int err; | 5749 | int err; |
5768 | .... | 5750 | .... |
5769 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 5751 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
5770 | sizeof(struct mychip), &card); | 5752 | sizeof(struct mychip), &card); |
5771 | .... | 5753 | .... |
5772 | chip = card->private_data; | 5754 | chip = card->private_data; |
5773 | .... | 5755 | .... |
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt index 86551cc72e03..2d91ae251982 100644 --- a/Documentation/PCI/pci-iov-howto.txt +++ b/Documentation/PCI/pci-iov-howto.txt | |||
@@ -68,10 +68,6 @@ To disable SR-IOV capability: | |||
68 | echo 0 > \ | 68 | echo 0 > \ |
69 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs | 69 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs |
70 | 70 | ||
71 | To notify SR-IOV core of Virtual Function Migration: | ||
72 | (a) In the driver: | ||
73 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); | ||
74 | |||
75 | 3.2 Usage example | 71 | 3.2 Usage example |
76 | 72 | ||
77 | Following piece of code illustrates the usage of the SR-IOV API. | 73 | Following piece of code illustrates the usage of the SR-IOV API. |
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt index 273e654d7d08..2f0fcb2112d2 100644 --- a/Documentation/RCU/RTFP.txt +++ b/Documentation/RCU/RTFP.txt | |||
@@ -31,6 +31,14 @@ has lapsed, so this approach may be used in non-GPL software, if desired. | |||
31 | (In contrast, implementation of RCU is permitted only in software licensed | 31 | (In contrast, implementation of RCU is permitted only in software licensed |
32 | under either GPL or LGPL. Sorry!!!) | 32 | under either GPL or LGPL. Sorry!!!) |
33 | 33 | ||
34 | In 1987, Rashid et al. described lazy TLB-flush [RichardRashid87a]. | ||
35 | At first glance, this has nothing to do with RCU, but nevertheless | ||
36 | this paper helped inspire the update-side batching used in the later | ||
37 | RCU implementation in DYNIX/ptx. In 1988, Barbara Liskov published | ||
38 | a description of Argus that noted that use of out-of-date values can | ||
39 | be tolerated in some situations. Thus, this paper provides some early | ||
40 | theoretical justification for use of stale data. | ||
41 | |||
34 | In 1990, Pugh [Pugh90] noted that explicitly tracking which threads | 42 | In 1990, Pugh [Pugh90] noted that explicitly tracking which threads |
35 | were reading a given data structure permitted deferred free to operate | 43 | were reading a given data structure permitted deferred free to operate |
36 | in the presence of non-terminating threads. However, this explicit | 44 | in the presence of non-terminating threads. However, this explicit |
@@ -41,11 +49,11 @@ providing a fine-grained locking design, however, it would be interesting | |||
41 | to see how much of the performance advantage reported in 1990 remains | 49 | to see how much of the performance advantage reported in 1990 remains |
42 | today. | 50 | today. |
43 | 51 | ||
44 | At about this same time, Adams [Adams91] described ``chaotic relaxation'', | 52 | At about this same time, Andrews [Andrews91textbook] described ``chaotic |
45 | where the normal barriers between successive iterations of convergent | 53 | relaxation'', where the normal barriers between successive iterations |
46 | numerical algorithms are relaxed, so that iteration $n$ might use | 54 | of convergent numerical algorithms are relaxed, so that iteration $n$ |
47 | data from iteration $n-1$ or even $n-2$. This introduces error, | 55 | might use data from iteration $n-1$ or even $n-2$. This introduces |
48 | which typically slows convergence and thus increases the number of | 56 | error, which typically slows convergence and thus increases the number of |
49 | iterations required. However, this increase is sometimes more than made | 57 | iterations required. However, this increase is sometimes more than made |
50 | up for by a reduction in the number of expensive barrier operations, | 58 | up for by a reduction in the number of expensive barrier operations, |
51 | which are otherwise required to synchronize the threads at the end | 59 | which are otherwise required to synchronize the threads at the end |
@@ -55,7 +63,8 @@ is thus inapplicable to most data structures in operating-system kernels. | |||
55 | 63 | ||
56 | In 1992, Henry (now Alexia) Massalin completed a dissertation advising | 64 | In 1992, Henry (now Alexia) Massalin completed a dissertation advising |
57 | parallel programmers to defer processing when feasible to simplify | 65 | parallel programmers to defer processing when feasible to simplify |
58 | synchronization. RCU makes extremely heavy use of this advice. | 66 | synchronization [HMassalinPhD]. RCU makes extremely heavy use of |
67 | this advice. | ||
59 | 68 | ||
60 | In 1993, Jacobson [Jacobson93] verbally described what is perhaps the | 69 | In 1993, Jacobson [Jacobson93] verbally described what is perhaps the |
61 | simplest deferred-free technique: simply waiting a fixed amount of time | 70 | simplest deferred-free technique: simply waiting a fixed amount of time |
@@ -90,27 +99,29 @@ mechanism, which is quite similar to RCU [Gamsa99]. These operating | |||
90 | systems made pervasive use of RCU in place of "existence locks", which | 99 | systems made pervasive use of RCU in place of "existence locks", which |
91 | greatly simplifies locking hierarchies and helps avoid deadlocks. | 100 | greatly simplifies locking hierarchies and helps avoid deadlocks. |
92 | 101 | ||
93 | 2001 saw the first RCU presentation involving Linux [McKenney01a] | 102 | The year 2000 saw an email exchange that would likely have |
94 | at OLS. The resulting abundance of RCU patches was presented the | 103 | led to yet another independent invention of something like RCU |
95 | following year [McKenney02a], and use of RCU in dcache was first | 104 | [RustyRussell2000a,RustyRussell2000b]. Instead, 2001 saw the first |
96 | described that same year [Linder02a]. | 105 | RCU presentation involving Linux [McKenney01a] at OLS. The resulting |
106 | abundance of RCU patches was presented the following year [McKenney02a], | ||
107 | and use of RCU in dcache was first described that same year [Linder02a]. | ||
97 | 108 | ||
98 | Also in 2002, Michael [Michael02b,Michael02a] presented "hazard-pointer" | 109 | Also in 2002, Michael [Michael02b,Michael02a] presented "hazard-pointer" |
99 | techniques that defer the destruction of data structures to simplify | 110 | techniques that defer the destruction of data structures to simplify |
100 | non-blocking synchronization (wait-free synchronization, lock-free | 111 | non-blocking synchronization (wait-free synchronization, lock-free |
101 | synchronization, and obstruction-free synchronization are all examples of | 112 | synchronization, and obstruction-free synchronization are all examples of |
102 | non-blocking synchronization). In particular, this technique eliminates | 113 | non-blocking synchronization). The corresponding journal article appeared |
103 | locking, reduces contention, reduces memory latency for readers, and | 114 | in 2004 [MagedMichael04a]. This technique eliminates locking, reduces |
104 | parallelizes pipeline stalls and memory latency for writers. However, | 115 | contention, reduces memory latency for readers, and parallelizes pipeline |
105 | these techniques still impose significant read-side overhead in the | 116 | stalls and memory latency for writers. However, these techniques still |
106 | form of memory barriers. Researchers at Sun worked along similar lines | 117 | impose significant read-side overhead in the form of memory barriers. |
107 | in the same timeframe [HerlihyLM02]. These techniques can be thought | 118 | Researchers at Sun worked along similar lines in the same timeframe |
108 | of as inside-out reference counts, where the count is represented by the | 119 | [HerlihyLM02]. These techniques can be thought of as inside-out reference |
109 | number of hazard pointers referencing a given data structure rather than | 120 | counts, where the count is represented by the number of hazard pointers |
110 | the more conventional counter field within the data structure itself. | 121 | referencing a given data structure rather than the more conventional |
111 | The key advantage of inside-out reference counts is that they can be | 122 | counter field within the data structure itself. The key advantage |
112 | stored in immortal variables, thus allowing races between access and | 123 | of inside-out reference counts is that they can be stored in immortal |
113 | deletion to be avoided. | 124 | variables, thus allowing races between access and deletion to be avoided. |
114 | 125 | ||
115 | By the same token, RCU can be thought of as a "bulk reference count", | 126 | By the same token, RCU can be thought of as a "bulk reference count", |
116 | where some form of reference counter covers all reference by a given CPU | 127 | where some form of reference counter covers all reference by a given CPU |
@@ -123,8 +134,10 @@ can be thought of in other terms as well. | |||
123 | 134 | ||
124 | In 2003, the K42 group described how RCU could be used to create | 135 | In 2003, the K42 group described how RCU could be used to create |
125 | hot-pluggable implementations of operating-system functions [Appavoo03a]. | 136 | hot-pluggable implementations of operating-system functions [Appavoo03a]. |
126 | Later that year saw a paper describing an RCU implementation of System | 137 | Later that year saw a paper describing an RCU implementation |
127 | V IPC [Arcangeli03], and an introduction to RCU in Linux Journal | 138 | of System V IPC [Arcangeli03] (following up on a suggestion by |
139 | Hugh Dickins [Dickins02a] and an implementation by Mingming Cao | ||
140 | [MingmingCao2002IPCRCU]), and an introduction to RCU in Linux Journal | ||
128 | [McKenney03a]. | 141 | [McKenney03a]. |
129 | 142 | ||
130 | 2004 has seen a Linux-Journal article on use of RCU in dcache | 143 | 2004 has seen a Linux-Journal article on use of RCU in dcache |
@@ -383,6 +396,21 @@ for Programming Languages and Operating Systems}" | |||
383 | } | 396 | } |
384 | } | 397 | } |
385 | 398 | ||
399 | @phdthesis{HMassalinPhD | ||
400 | ,author="H. Massalin" | ||
401 | ,title="Synthesis: An Efficient Implementation of Fundamental Operating | ||
402 | System Services" | ||
403 | ,school="Columbia University" | ||
404 | ,address="New York, NY" | ||
405 | ,year="1992" | ||
406 | ,annotation={ | ||
407 | Mondo optimizing compiler. | ||
408 | Wait-free stuff. | ||
409 | Good advice: defer work to avoid synchronization. See page 90 | ||
410 | (PDF page 106), Section 5.4, fourth bullet point. | ||
411 | } | ||
412 | } | ||
413 | |||
386 | @unpublished{Jacobson93 | 414 | @unpublished{Jacobson93 |
387 | ,author="Van Jacobson" | 415 | ,author="Van Jacobson" |
388 | ,title="Avoid Read-Side Locking Via Delayed Free" | 416 | ,title="Avoid Read-Side Locking Via Delayed Free" |
@@ -671,6 +699,20 @@ Orran Krieger and Rusty Russell and Dipankar Sarma and Maneesh Soni" | |||
671 | [Viewed October 18, 2004]" | 699 | [Viewed October 18, 2004]" |
672 | } | 700 | } |
673 | 701 | ||
702 | @conference{Michael02b | ||
703 | ,author="Maged M. Michael" | ||
704 | ,title="High Performance Dynamic Lock-Free Hash Tables and List-Based Sets" | ||
705 | ,Year="2002" | ||
706 | ,Month="August" | ||
707 | ,booktitle="{Proceedings of the 14\textsuperscript{th} Annual ACM | ||
708 | Symposium on Parallel | ||
709 | Algorithms and Architecture}" | ||
710 | ,pages="73-82" | ||
711 | ,annotation={ | ||
712 | Like the title says... | ||
713 | } | ||
714 | } | ||
715 | |||
674 | @Conference{Linder02a | 716 | @Conference{Linder02a |
675 | ,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" | 717 | ,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" |
676 | ,Title="Scalability of the Directory Entry Cache" | 718 | ,Title="Scalability of the Directory Entry Cache" |
@@ -727,6 +769,24 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell" | |||
727 | } | 769 | } |
728 | } | 770 | } |
729 | 771 | ||
772 | @conference{Michael02a | ||
773 | ,author="Maged M. Michael" | ||
774 | ,title="Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic | ||
775 | Reads and Writes" | ||
776 | ,Year="2002" | ||
777 | ,Month="August" | ||
778 | ,booktitle="{Proceedings of the 21\textsuperscript{st} Annual ACM | ||
779 | Symposium on Principles of Distributed Computing}" | ||
780 | ,pages="21-30" | ||
781 | ,annotation={ | ||
782 | Each thread keeps an array of pointers to items that it is | ||
783 | currently referencing. Sort of an inside-out garbage collection | ||
784 | mechanism, but one that requires the accessing code to explicitly | ||
785 | state its needs. Also requires read-side memory barriers on | ||
786 | most architectures. | ||
787 | } | ||
788 | } | ||
789 | |||
730 | @unpublished{Dickins02a | 790 | @unpublished{Dickins02a |
731 | ,author="Hugh Dickins" | 791 | ,author="Hugh Dickins" |
732 | ,title="Use RCU for System-V IPC" | 792 | ,title="Use RCU for System-V IPC" |
@@ -735,6 +795,17 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell" | |||
735 | ,note="private communication" | 795 | ,note="private communication" |
736 | } | 796 | } |
737 | 797 | ||
798 | @InProceedings{HerlihyLM02 | ||
799 | ,author={Maurice Herlihy and Victor Luchangco and Mark Moir} | ||
800 | ,title="The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, | ||
801 | Lock-Free Data Structures" | ||
802 | ,booktitle={Proceedings of 16\textsuperscript{th} International | ||
803 | Symposium on Distributed Computing} | ||
804 | ,year=2002 | ||
805 | ,month="October" | ||
806 | ,pages="339-353" | ||
807 | } | ||
808 | |||
738 | @unpublished{Sarma02b | 809 | @unpublished{Sarma02b |
739 | ,Author="Dipankar Sarma" | 810 | ,Author="Dipankar Sarma" |
740 | ,Title="Some dcache\_rcu benchmark numbers" | 811 | ,Title="Some dcache\_rcu benchmark numbers" |
@@ -749,6 +820,19 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell" | |||
749 | } | 820 | } |
750 | } | 821 | } |
751 | 822 | ||
823 | @unpublished{MingmingCao2002IPCRCU | ||
824 | ,Author="Mingming Cao" | ||
825 | ,Title="[PATCH]updated ipc lock patch" | ||
826 | ,month="October" | ||
827 | ,year="2002" | ||
828 | ,note="Available: | ||
829 | \url{https://lkml.org/lkml/2002/10/24/262} | ||
830 | [Viewed February 15, 2014]" | ||
831 | ,annotation={ | ||
832 | Mingming Cao's patch to introduce RCU to SysV IPC. | ||
833 | } | ||
834 | } | ||
835 | |||
752 | @unpublished{LinusTorvalds2003a | 836 | @unpublished{LinusTorvalds2003a |
753 | ,Author="Linus Torvalds" | 837 | ,Author="Linus Torvalds" |
754 | ,Title="Re: {[PATCH]} small fixes in brlock.h" | 838 | ,Title="Re: {[PATCH]} small fixes in brlock.h" |
@@ -982,6 +1066,23 @@ Realtime Applications" | |||
982 | } | 1066 | } |
983 | } | 1067 | } |
984 | 1068 | ||
1069 | @article{MagedMichael04a | ||
1070 | ,author="Maged M. Michael" | ||
1071 | ,title="Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects" | ||
1072 | ,Year="2004" | ||
1073 | ,Month="June" | ||
1074 | ,journal="IEEE Transactions on Parallel and Distributed Systems" | ||
1075 | ,volume="15" | ||
1076 | ,number="6" | ||
1077 | ,pages="491-504" | ||
1078 | ,url="Available: | ||
1079 | \url{http://www.research.ibm.com/people/m/michael/ieeetpds-2004.pdf} | ||
1080 | [Viewed March 1, 2005]" | ||
1081 | ,annotation={ | ||
1082 | New canonical hazard-pointer citation. | ||
1083 | } | ||
1084 | } | ||
1085 | |||
985 | @phdthesis{PaulEdwardMcKenneyPhD | 1086 | @phdthesis{PaulEdwardMcKenneyPhD |
986 | ,author="Paul E. McKenney" | 1087 | ,author="Paul E. McKenney" |
987 | ,title="Exploiting Deferred Destruction: | 1088 | ,title="Exploiting Deferred Destruction: |
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 91266193b8f4..9d10d1db16a5 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -256,10 +256,10 @@ over a rather long period of time, but improvements are always welcome! | |||
256 | variations on this theme. | 256 | variations on this theme. |
257 | 257 | ||
258 | b. Limiting update rate. For example, if updates occur only | 258 | b. Limiting update rate. For example, if updates occur only |
259 | once per hour, then no explicit rate limiting is required, | 259 | once per hour, then no explicit rate limiting is |
260 | unless your system is already badly broken. The dcache | 260 | required, unless your system is already badly broken. |
261 | subsystem takes this approach -- updates are guarded | 261 | Older versions of the dcache subsystem take this approach, |
262 | by a global lock, limiting their rate. | 262 | guarding updates with a global lock, limiting their rate. |
263 | 263 | ||
264 | c. Trusted update -- if updates can only be done manually by | 264 | c. Trusted update -- if updates can only be done manually by |
265 | superuser or some other trusted user, then it might not | 265 | superuser or some other trusted user, then it might not |
@@ -268,7 +268,8 @@ over a rather long period of time, but improvements are always welcome! | |||
268 | the machine. | 268 | the machine. |
269 | 269 | ||
270 | d. Use call_rcu_bh() rather than call_rcu(), in order to take | 270 | d. Use call_rcu_bh() rather than call_rcu(), in order to take |
271 | advantage of call_rcu_bh()'s faster grace periods. | 271 | advantage of call_rcu_bh()'s faster grace periods. (This |
272 | is only a partial solution, though.) | ||
272 | 273 | ||
273 | e. Periodically invoke synchronize_rcu(), permitting a limited | 274 | e. Periodically invoke synchronize_rcu(), permitting a limited |
274 | number of updates per grace period. | 275 | number of updates per grace period. |
@@ -276,6 +277,13 @@ over a rather long period of time, but improvements are always welcome! | |||
276 | The same cautions apply to call_rcu_bh(), call_rcu_sched(), | 277 | The same cautions apply to call_rcu_bh(), call_rcu_sched(), |
277 | call_srcu(), and kfree_rcu(). | 278 | call_srcu(), and kfree_rcu(). |
278 | 279 | ||
280 | Note that although these primitives do take action to avoid memory | ||
281 | exhaustion when any given CPU has too many callbacks, a determined | ||
282 | user could still exhaust memory. This is especially the case | ||
283 | if a system with a large number of CPUs has been configured to | ||
284 | offload all of its RCU callbacks onto a single CPU, or if the | ||
285 | system has relatively little free memory. | ||
286 | |||
279 | 9. All RCU list-traversal primitives, which include | 287 | 9. All RCU list-traversal primitives, which include |
280 | rcu_dereference(), list_for_each_entry_rcu(), and | 288 | rcu_dereference(), list_for_each_entry_rcu(), and |
281 | list_for_each_safe_rcu(), must be either within an RCU read-side | 289 | list_for_each_safe_rcu(), must be either within an RCU read-side |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 26b1e31d5a13..2a8e89e13e45 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -14,7 +14,10 @@ Read Documentation/SubmitChecklist for a list of items to check | |||
14 | before submitting code. If you are submitting a driver, also read | 14 | before submitting code. If you are submitting a driver, also read |
15 | Documentation/SubmittingDrivers. | 15 | Documentation/SubmittingDrivers. |
16 | 16 | ||
17 | 17 | Many of these steps describe the default behavior of the git version | |
18 | control system; if you use git to prepare your patches, you'll find much | ||
19 | of the mechanical work done for you, though you'll still need to prepare | ||
20 | and document a sensible set of patches. | ||
18 | 21 | ||
19 | -------------------------------------------- | 22 | -------------------------------------------- |
20 | SECTION 1 - CREATING AND SENDING YOUR CHANGE | 23 | SECTION 1 - CREATING AND SENDING YOUR CHANGE |
@@ -25,7 +28,9 @@ SECTION 1 - CREATING AND SENDING YOUR CHANGE | |||
25 | 1) "diff -up" | 28 | 1) "diff -up" |
26 | ------------ | 29 | ------------ |
27 | 30 | ||
28 | Use "diff -up" or "diff -uprN" to create patches. | 31 | Use "diff -up" or "diff -uprN" to create patches. git generates patches |
32 | in this form by default; if you're using git, you can skip this section | ||
33 | entirely. | ||
29 | 34 | ||
30 | All changes to the Linux kernel occur in the form of patches, as | 35 | All changes to the Linux kernel occur in the form of patches, as |
31 | generated by diff(1). When creating your patch, make sure to create it | 36 | generated by diff(1). When creating your patch, make sure to create it |
@@ -66,19 +71,14 @@ Make sure your patch does not include any extra files which do not | |||
66 | belong in a patch submission. Make sure to review your patch -after- | 71 | belong in a patch submission. Make sure to review your patch -after- |
67 | generated it with diff(1), to ensure accuracy. | 72 | generated it with diff(1), to ensure accuracy. |
68 | 73 | ||
69 | If your changes produce a lot of deltas, you may want to look into | 74 | If your changes produce a lot of deltas, you need to split them into |
70 | splitting them into individual patches which modify things in | 75 | individual patches which modify things in logical stages; see section |
71 | logical stages. This will facilitate easier reviewing by other | 76 | #3. This will facilitate easier reviewing by other kernel developers, |
72 | kernel developers, very important if you want your patch accepted. | 77 | very important if you want your patch accepted. |
73 | There are a number of scripts which can aid in this: | ||
74 | |||
75 | Quilt: | ||
76 | http://savannah.nongnu.org/projects/quilt | ||
77 | 78 | ||
78 | Andrew Morton's patch scripts: | 79 | If you're using git, "git rebase -i" can help you with this process. If |
79 | http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz | 80 | you're not using git, quilt <http://savannah.nongnu.org/projects/quilt> |
80 | Instead of these scripts, quilt is the recommended patch management | 81 | is another popular alternative. |
81 | tool (see above). | ||
82 | 82 | ||
83 | 83 | ||
84 | 84 | ||
@@ -106,8 +106,21 @@ I.e., the patch (series) and its description should be self-contained. | |||
106 | This benefits both the patch merger(s) and reviewers. Some reviewers | 106 | This benefits both the patch merger(s) and reviewers. Some reviewers |
107 | probably didn't even receive earlier versions of the patch. | 107 | probably didn't even receive earlier versions of the patch. |
108 | 108 | ||
109 | Describe your changes in imperative mood, e.g. "make xyzzy do frotz" | ||
110 | instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy | ||
111 | to do frotz", as if you are giving orders to the codebase to change | ||
112 | its behaviour. | ||
113 | |||
109 | If the patch fixes a logged bug entry, refer to that bug entry by | 114 | If the patch fixes a logged bug entry, refer to that bug entry by |
110 | number and URL. | 115 | number and URL. If the patch follows from a mailing list discussion, |
116 | give a URL to the mailing list archive; use the https://lkml.kernel.org/ | ||
117 | redirector with a Message-Id, to ensure that the links cannot become | ||
118 | stale. | ||
119 | |||
120 | However, try to make your explanation understandable without external | ||
121 | resources. In addition to giving a URL to a mailing list archive or | ||
122 | bug, summarize the relevant points of the discussion that led to the | ||
123 | patch as submitted. | ||
111 | 124 | ||
112 | If you want to refer to a specific commit, don't just refer to the | 125 | If you want to refer to a specific commit, don't just refer to the |
113 | SHA-1 ID of the commit. Please also include the oneline summary of | 126 | SHA-1 ID of the commit. Please also include the oneline summary of |
@@ -594,7 +607,8 @@ patch. | |||
594 | If you are going to include a diffstat after the "---" marker, please | 607 | If you are going to include a diffstat after the "---" marker, please |
595 | use diffstat options "-p 1 -w 70" so that filenames are listed from | 608 | use diffstat options "-p 1 -w 70" so that filenames are listed from |
596 | the top of the kernel source tree and don't use too much horizontal | 609 | the top of the kernel source tree and don't use too much horizontal |
597 | space (easily fit in 80 columns, maybe with some indentation). | 610 | space (easily fit in 80 columns, maybe with some indentation). (git |
611 | generates appropriate diffstats by default.) | ||
598 | 612 | ||
599 | See more details on the proper patch format in the following | 613 | See more details on the proper patch format in the following |
600 | references. | 614 | references. |
@@ -725,7 +739,7 @@ SECTION 3 - REFERENCES | |||
725 | ---------------------- | 739 | ---------------------- |
726 | 740 | ||
727 | Andrew Morton, "The perfect patch" (tpp). | 741 | Andrew Morton, "The perfect patch" (tpp). |
728 | <http://userweb.kernel.org/~akpm/stuff/tpp.txt> | 742 | <http://www.ozlabs.org/~akpm/stuff/tpp.txt> |
729 | 743 | ||
730 | Jeff Garzik, "Linux kernel patch submission format". | 744 | Jeff Garzik, "Linux kernel patch submission format". |
731 | <http://linux.yyz.us/patch-format.html> | 745 | <http://linux.yyz.us/patch-format.html> |
@@ -738,7 +752,7 @@ Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". | |||
738 | <http://www.kroah.com/log/linux/maintainer-05.html> | 752 | <http://www.kroah.com/log/linux/maintainer-05.html> |
739 | 753 | ||
740 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! | 754 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! |
741 | <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> | 755 | <https://lkml.org/lkml/2005/7/11/336> |
742 | 756 | ||
743 | Kernel Documentation/CodingStyle: | 757 | Kernel Documentation/CodingStyle: |
744 | <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle> | 758 | <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle> |
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README index 5a930c1528ad..963ec445e15a 100644 --- a/Documentation/arm/Marvell/README +++ b/Documentation/arm/Marvell/README | |||
@@ -83,14 +83,24 @@ EBU Armada family | |||
83 | 88F6710 | 83 | 88F6710 |
84 | 88F6707 | 84 | 88F6707 |
85 | 88F6W11 | 85 | 88F6W11 |
86 | Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf | ||
87 | |||
88 | Armada 375 Flavors: | ||
89 | 88F6720 | ||
90 | Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf | ||
91 | |||
92 | Armada 380/385 Flavors: | ||
93 | 88F6810 | ||
94 | 88F6820 | ||
95 | 88F6828 | ||
86 | 96 | ||
87 | Armada XP Flavors: | 97 | Armada XP Flavors: |
88 | MV78230 | 98 | MV78230 |
89 | MV78260 | 99 | MV78260 |
90 | MV78460 | 100 | MV78460 |
91 | NOTE: not to be confused with the non-SMP 78xx0 SoCs | 101 | NOTE: not to be confused with the non-SMP 78xx0 SoCs |
102 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | ||
92 | 103 | ||
93 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | ||
94 | No public datasheet available. | 104 | No public datasheet available. |
95 | 105 | ||
96 | Core: Sheeva ARMv7 compatible | 106 | Core: Sheeva ARMv7 compatible |
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index 5e054bfe4dde..d50fa618371b 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
@@ -35,11 +35,13 @@ ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | |||
35 | 35 | ||
36 | ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] | 36 | ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] |
37 | 37 | ||
38 | ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device | 38 | ffffffbffa000000 ffffffbffaffffff 16MB PCI I/O space |
39 | 39 | ||
40 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space | 40 | ffffffbffb000000 ffffffbffbbfffff 12MB [guard] |
41 | 41 | ||
42 | ffffffbffbe10000 ffffffbcffffffff ~2MB [guard] | 42 | ffffffbffbc00000 ffffffbffbdfffff 2MB fixed mappings |
43 | |||
44 | ffffffbffbe00000 ffffffbffbffffff 2MB [guard] | ||
43 | 45 | ||
44 | ffffffbffc000000 ffffffbfffffffff 64MB modules | 46 | ffffffbffc000000 ffffffbfffffffff 64MB modules |
45 | 47 | ||
@@ -60,11 +62,13 @@ fffffdfc00000000 fffffdfdffffffff 8GB vmemmap | |||
60 | 62 | ||
61 | fffffdfe00000000 fffffdfffbbfffff ~8GB [guard, future vmmemap] | 63 | fffffdfe00000000 fffffdfffbbfffff ~8GB [guard, future vmmemap] |
62 | 64 | ||
63 | fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk device | 65 | fffffdfffa000000 fffffdfffaffffff 16MB PCI I/O space |
66 | |||
67 | fffffdfffb000000 fffffdfffbbfffff 12MB [guard] | ||
64 | 68 | ||
65 | fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O space | 69 | fffffdfffbc00000 fffffdfffbdfffff 2MB fixed mappings |
66 | 70 | ||
67 | fffffdfffbe10000 fffffdfffbffffff ~2MB [guard] | 71 | fffffdfffbe00000 fffffdfffbffffff 2MB [guard] |
68 | 72 | ||
69 | fffffdfffc000000 fffffdffffffffff 64MB modules | 73 | fffffdfffc000000 fffffdffffffffff 64MB modules |
70 | 74 | ||
diff --git a/Documentation/blockdev/drbd/data-structure-v9.txt b/Documentation/blockdev/drbd/data-structure-v9.txt new file mode 100644 index 000000000000..1e52a0e32624 --- /dev/null +++ b/Documentation/blockdev/drbd/data-structure-v9.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | This describes the in kernel data structure for DRBD-9. Starting with | ||
2 | Linux v3.14 we are reorganizing DRBD to use this data structure. | ||
3 | |||
4 | Basic Data Structure | ||
5 | ==================== | ||
6 | |||
7 | A node has a number of DRBD resources. Each such resource has a number of | ||
8 | devices (aka volumes) and connections to other nodes ("peer nodes"). Each DRBD | ||
9 | device is represented by a block device locally. | ||
10 | |||
11 | The DRBD objects are interconnected to form a matrix as depicted below; a | ||
12 | drbd_peer_device object sits at each intersection between a drbd_device and a | ||
13 | drbd_connection: | ||
14 | |||
15 | /--------------+---------------+.....+---------------\ | ||
16 | | resource | device | | device | | ||
17 | +--------------+---------------+.....+---------------+ | ||
18 | | connection | peer_device | | peer_device | | ||
19 | +--------------+---------------+.....+---------------+ | ||
20 | : : : : : | ||
21 | : : : : : | ||
22 | +--------------+---------------+.....+---------------+ | ||
23 | | connection | peer_device | | peer_device | | ||
24 | \--------------+---------------+.....+---------------/ | ||
25 | |||
26 | In this table, horizontally, devices can be accessed from resources by their | ||
27 | volume number. Likewise, peer_devices can be accessed from connections by | ||
28 | their volume number. Objects in the vertical direction are connected by double | ||
29 | linked lists. There are back pointers from peer_devices to their connections a | ||
30 | devices, and from connections and devices to their resource. | ||
31 | |||
32 | All resources are in the drbd_resources double-linked list. In addition, all | ||
33 | devices can be accessed by their minor device number via the drbd_devices idr. | ||
34 | |||
35 | The drbd_resource, drbd_connection, and drbd_device objects are reference | ||
36 | counted. The peer_device objects only serve to establish the links between | ||
37 | devices and connections; their lifetime is determined by the lifetime of the | ||
38 | device and connection which they reference. | ||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt index 2eccddffa6c8..0595c3f56ccf 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.txt | |||
@@ -21,7 +21,43 @@ Following shows a typical sequence of steps for using zram. | |||
21 | This creates 4 devices: /dev/zram{0,1,2,3} | 21 | This creates 4 devices: /dev/zram{0,1,2,3} |
22 | (num_devices parameter is optional. Default: 1) | 22 | (num_devices parameter is optional. Default: 1) |
23 | 23 | ||
24 | 2) Set Disksize | 24 | 2) Set max number of compression streams |
25 | Compression backend may use up to max_comp_streams compression streams, | ||
26 | thus allowing up to max_comp_streams concurrent compression operations. | ||
27 | By default, compression backend uses single compression stream. | ||
28 | |||
29 | Examples: | ||
30 | #show max compression streams number | ||
31 | cat /sys/block/zram0/max_comp_streams | ||
32 | |||
33 | #set max compression streams number to 3 | ||
34 | echo 3 > /sys/block/zram0/max_comp_streams | ||
35 | |||
36 | Note: | ||
37 | In order to enable compression backend's multi stream support max_comp_streams | ||
38 | must be initially set to desired concurrency level before ZRAM device | ||
39 | initialisation. Once the device initialised as a single stream compression | ||
40 | backend (max_comp_streams equals to 1), you will see error if you try to change | ||
41 | the value of max_comp_streams because single stream compression backend | ||
42 | implemented as a special case by lock overhead issue and does not support | ||
43 | dynamic max_comp_streams. Only multi stream backend supports dynamic | ||
44 | max_comp_streams adjustment. | ||
45 | |||
46 | 3) Select compression algorithm | ||
47 | Using comp_algorithm device attribute one can see available and | ||
48 | currently selected (shown in square brackets) compression algortithms, | ||
49 | change selected compression algorithm (once the device is initialised | ||
50 | there is no way to change compression algorithm). | ||
51 | |||
52 | Examples: | ||
53 | #show supported compression algorithms | ||
54 | cat /sys/block/zram0/comp_algorithm | ||
55 | lzo [lz4] | ||
56 | |||
57 | #select lzo compression algorithm | ||
58 | echo lzo > /sys/block/zram0/comp_algorithm | ||
59 | |||
60 | 4) Set Disksize | ||
25 | Set disk size by writing the value to sysfs node 'disksize'. | 61 | Set disk size by writing the value to sysfs node 'disksize'. |
26 | The value can be either in bytes or you can use mem suffixes. | 62 | The value can be either in bytes or you can use mem suffixes. |
27 | Examples: | 63 | Examples: |
@@ -33,32 +69,38 @@ Following shows a typical sequence of steps for using zram. | |||
33 | echo 512M > /sys/block/zram0/disksize | 69 | echo 512M > /sys/block/zram0/disksize |
34 | echo 1G > /sys/block/zram0/disksize | 70 | echo 1G > /sys/block/zram0/disksize |
35 | 71 | ||
36 | 3) Activate: | 72 | Note: |
73 | There is little point creating a zram of greater than twice the size of memory | ||
74 | since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the | ||
75 | size of the disk when not in use so a huge zram is wasteful. | ||
76 | |||
77 | 5) Activate: | ||
37 | mkswap /dev/zram0 | 78 | mkswap /dev/zram0 |
38 | swapon /dev/zram0 | 79 | swapon /dev/zram0 |
39 | 80 | ||
40 | mkfs.ext4 /dev/zram1 | 81 | mkfs.ext4 /dev/zram1 |
41 | mount /dev/zram1 /tmp | 82 | mount /dev/zram1 /tmp |
42 | 83 | ||
43 | 4) Stats: | 84 | 6) Stats: |
44 | Per-device statistics are exported as various nodes under | 85 | Per-device statistics are exported as various nodes under |
45 | /sys/block/zram<id>/ | 86 | /sys/block/zram<id>/ |
46 | disksize | 87 | disksize |
47 | num_reads | 88 | num_reads |
48 | num_writes | 89 | num_writes |
90 | failed_reads | ||
91 | failed_writes | ||
49 | invalid_io | 92 | invalid_io |
50 | notify_free | 93 | notify_free |
51 | discard | ||
52 | zero_pages | 94 | zero_pages |
53 | orig_data_size | 95 | orig_data_size |
54 | compr_data_size | 96 | compr_data_size |
55 | mem_used_total | 97 | mem_used_total |
56 | 98 | ||
57 | 5) Deactivate: | 99 | 7) Deactivate: |
58 | swapoff /dev/zram0 | 100 | swapoff /dev/zram0 |
59 | umount /dev/zram1 | 101 | umount /dev/zram1 |
60 | 102 | ||
61 | 6) Reset: | 103 | 8) Reset: |
62 | Write any positive value to 'reset' sysfs node | 104 | Write any positive value to 'reset' sysfs node |
63 | echo 1 > /sys/block/zram0/reset | 105 | echo 1 > /sys/block/zram0/reset |
64 | echo 1 > /sys/block/zram1/reset | 106 | echo 1 > /sys/block/zram1/reset |
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt index ce94a83a7d9a..80ac454704b8 100644 --- a/Documentation/cgroups/memcg_test.txt +++ b/Documentation/cgroups/memcg_test.txt | |||
@@ -24,7 +24,7 @@ Please note that implementation details can be changed. | |||
24 | 24 | ||
25 | a page/swp_entry may be charged (usage += PAGE_SIZE) at | 25 | a page/swp_entry may be charged (usage += PAGE_SIZE) at |
26 | 26 | ||
27 | mem_cgroup_newpage_charge() | 27 | mem_cgroup_charge_anon() |
28 | Called at new page fault and Copy-On-Write. | 28 | Called at new page fault and Copy-On-Write. |
29 | 29 | ||
30 | mem_cgroup_try_charge_swapin() | 30 | mem_cgroup_try_charge_swapin() |
@@ -32,7 +32,7 @@ Please note that implementation details can be changed. | |||
32 | Followed by charge-commit-cancel protocol. (With swap accounting) | 32 | Followed by charge-commit-cancel protocol. (With swap accounting) |
33 | At commit, a charge recorded in swap_cgroup is removed. | 33 | At commit, a charge recorded in swap_cgroup is removed. |
34 | 34 | ||
35 | mem_cgroup_cache_charge() | 35 | mem_cgroup_charge_file() |
36 | Called at add_to_page_cache() | 36 | Called at add_to_page_cache() |
37 | 37 | ||
38 | mem_cgroup_cache_charge_swapin() | 38 | mem_cgroup_cache_charge_swapin() |
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt index 5108afb3645c..762ca54eb929 100644 --- a/Documentation/cgroups/resource_counter.txt +++ b/Documentation/cgroups/resource_counter.txt | |||
@@ -76,15 +76,7 @@ to work with it. | |||
76 | limit_fail_at parameter is set to the particular res_counter element | 76 | limit_fail_at parameter is set to the particular res_counter element |
77 | where the charging failed. | 77 | where the charging failed. |
78 | 78 | ||
79 | d. int res_counter_charge_locked | 79 | d. u64 res_counter_uncharge(struct res_counter *rc, unsigned long val) |
80 | (struct res_counter *rc, unsigned long val, bool force) | ||
81 | |||
82 | The same as res_counter_charge(), but it must not acquire/release the | ||
83 | res_counter->lock internally (it must be called with res_counter->lock | ||
84 | held). The force parameter indicates whether we can bypass the limit. | ||
85 | |||
86 | e. u64 res_counter_uncharge[_locked] | ||
87 | (struct res_counter *rc, unsigned long val) | ||
88 | 80 | ||
89 | When a resource is released (freed) it should be de-accounted | 81 | When a resource is released (freed) it should be de-accounted |
90 | from the resource counter it was accounted to. This is called | 82 | from the resource counter it was accounted to. This is called |
@@ -93,7 +85,7 @@ to work with it. | |||
93 | 85 | ||
94 | The _locked routines imply that the res_counter->lock is taken. | 86 | The _locked routines imply that the res_counter->lock is taken. |
95 | 87 | ||
96 | f. u64 res_counter_uncharge_until | 88 | e. u64 res_counter_uncharge_until |
97 | (struct res_counter *rc, struct res_counter *top, | 89 | (struct res_counter *rc, struct res_counter *top, |
98 | unsigned long val) | 90 | unsigned long val) |
99 | 91 | ||
diff --git a/Documentation/clk.txt b/Documentation/clk.txt index 699ef2a323b1..c9c399af7c08 100644 --- a/Documentation/clk.txt +++ b/Documentation/clk.txt | |||
@@ -255,3 +255,37 @@ are sorted out. | |||
255 | 255 | ||
256 | To bypass this disabling, include "clk_ignore_unused" in the bootargs to the | 256 | To bypass this disabling, include "clk_ignore_unused" in the bootargs to the |
257 | kernel. | 257 | kernel. |
258 | |||
259 | Part 7 - Locking | ||
260 | |||
261 | The common clock framework uses two global locks, the prepare lock and the | ||
262 | enable lock. | ||
263 | |||
264 | The enable lock is a spinlock and is held across calls to the .enable, | ||
265 | .disable and .is_enabled operations. Those operations are thus not allowed to | ||
266 | sleep, and calls to the clk_enable(), clk_disable() and clk_is_enabled() API | ||
267 | functions are allowed in atomic context. | ||
268 | |||
269 | The prepare lock is a mutex and is held across calls to all other operations. | ||
270 | All those operations are allowed to sleep, and calls to the corresponding API | ||
271 | functions are not allowed in atomic context. | ||
272 | |||
273 | This effectively divides operations in two groups from a locking perspective. | ||
274 | |||
275 | Drivers don't need to manually protect resources shared between the operations | ||
276 | of one group, regardless of whether those resources are shared by multiple | ||
277 | clocks or not. However, access to resources that are shared between operations | ||
278 | of the two groups needs to be protected by the drivers. An example of such a | ||
279 | resource would be a register that controls both the clock rate and the clock | ||
280 | enable/disable state. | ||
281 | |||
282 | The clock framework is reentrant, in that a driver is allowed to call clock | ||
283 | framework functions from within its implementation of clock operations. This | ||
284 | can for instance cause a .set_rate operation of one clock being called from | ||
285 | within the .set_rate operation of another clock. This case must be considered | ||
286 | in the driver implementations, but the code flow is usually controlled by the | ||
287 | driver in that case. | ||
288 | |||
289 | Note that locking must also be considered when code outside of the common | ||
290 | clock framework needs to access resources used by the clock operations. This | ||
291 | is considered out of scope of this document. | ||
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c index adcca0368d60..d12cc944b696 100644 --- a/Documentation/connector/cn_test.c +++ b/Documentation/connector/cn_test.c | |||
@@ -145,7 +145,7 @@ static void cn_test_timer_func(unsigned long __data) | |||
145 | 145 | ||
146 | memcpy(m + 1, data, m->len); | 146 | memcpy(m + 1, data, m->len); |
147 | 147 | ||
148 | cn_netlink_send(m, 0, GFP_ATOMIC); | 148 | cn_netlink_send(m, 0, 0, GFP_ATOMIC); |
149 | kfree(m); | 149 | kfree(m); |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index ce0666e51036..0060d76b445f 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt | |||
@@ -92,7 +92,3 @@ values: | |||
92 | cpu - number of the affected CPU | 92 | cpu - number of the affected CPU |
93 | old - old frequency | 93 | old - old frequency |
94 | new - new frequency | 94 | new - new frequency |
95 | |||
96 | If the cpufreq core detects the frequency has changed while the system | ||
97 | was suspended, these notifiers are called with CPUFREQ_RESUMECHANGE as | ||
98 | second argument. | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 8b1a4451422e..48da5fdcb9f1 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -61,7 +61,13 @@ target_index - See below on the differences. | |||
61 | 61 | ||
62 | And optionally | 62 | And optionally |
63 | 63 | ||
64 | cpufreq_driver.exit - A pointer to a per-CPU cleanup function. | 64 | cpufreq_driver.exit - A pointer to a per-CPU cleanup |
65 | function called during CPU_POST_DEAD | ||
66 | phase of cpu hotplug process. | ||
67 | |||
68 | cpufreq_driver.stop_cpu - A pointer to a per-CPU stop function | ||
69 | called during CPU_DOWN_PREPARE phase of | ||
70 | cpu hotplug process. | ||
65 | 71 | ||
66 | cpufreq_driver.resume - A pointer to a per-CPU resume function | 72 | cpufreq_driver.resume - A pointer to a per-CPU resume function |
67 | which is called with interrupts disabled | 73 | which is called with interrupts disabled |
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index be675d2d15a7..a0b005d2bd95 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -312,12 +312,57 @@ things will happen if a notifier in path sent a BAD notify code. | |||
312 | Q: I don't see my action being called for all CPUs already up and running? | 312 | Q: I don't see my action being called for all CPUs already up and running? |
313 | A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. | 313 | A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. |
314 | If you need to perform some action for each cpu already in the system, then | 314 | If you need to perform some action for each cpu already in the system, then |
315 | do this: | ||
315 | 316 | ||
316 | for_each_online_cpu(i) { | 317 | for_each_online_cpu(i) { |
317 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i); | 318 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i); |
318 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_ONLINE, i); | 319 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_ONLINE, i); |
319 | } | 320 | } |
320 | 321 | ||
322 | However, if you want to register a hotplug callback, as well as perform | ||
323 | some initialization for CPUs that are already online, then do this: | ||
324 | |||
325 | Version 1: (Correct) | ||
326 | --------- | ||
327 | |||
328 | cpu_notifier_register_begin(); | ||
329 | |||
330 | for_each_online_cpu(i) { | ||
331 | foobar_cpu_callback(&foobar_cpu_notifier, | ||
332 | CPU_UP_PREPARE, i); | ||
333 | foobar_cpu_callback(&foobar_cpu_notifier, | ||
334 | CPU_ONLINE, i); | ||
335 | } | ||
336 | |||
337 | /* Note the use of the double underscored version of the API */ | ||
338 | __register_cpu_notifier(&foobar_cpu_notifier); | ||
339 | |||
340 | cpu_notifier_register_done(); | ||
341 | |||
342 | Note that the following code is *NOT* the right way to achieve this, | ||
343 | because it is prone to an ABBA deadlock between the cpu_add_remove_lock | ||
344 | and the cpu_hotplug.lock. | ||
345 | |||
346 | Version 2: (Wrong!) | ||
347 | --------- | ||
348 | |||
349 | get_online_cpus(); | ||
350 | |||
351 | for_each_online_cpu(i) { | ||
352 | foobar_cpu_callback(&foobar_cpu_notifier, | ||
353 | CPU_UP_PREPARE, i); | ||
354 | foobar_cpu_callback(&foobar_cpu_notifier, | ||
355 | CPU_ONLINE, i); | ||
356 | } | ||
357 | |||
358 | register_cpu_notifier(&foobar_cpu_notifier); | ||
359 | |||
360 | put_online_cpus(); | ||
361 | |||
362 | So always use the first version shown above when you want to register | ||
363 | callbacks as well as initialize the already online CPUs. | ||
364 | |||
365 | |||
321 | Q: If i would like to develop cpu hotplug support for a new architecture, | 366 | Q: If i would like to develop cpu hotplug support for a new architecture, |
322 | what do i need at a minimum? | 367 | what do i need at a minimum? |
323 | A: The following are what is required for CPU hotplug infrastructure to work | 368 | A: The following are what is required for CPU hotplug infrastructure to work |
diff --git a/Documentation/device-mapper/era.txt b/Documentation/device-mapper/era.txt new file mode 100644 index 000000000000..3c6d01be3560 --- /dev/null +++ b/Documentation/device-mapper/era.txt | |||
@@ -0,0 +1,108 @@ | |||
1 | Introduction | ||
2 | ============ | ||
3 | |||
4 | dm-era is a target that behaves similar to the linear target. In | ||
5 | addition it keeps track of which blocks were written within a user | ||
6 | defined period of time called an 'era'. Each era target instance | ||
7 | maintains the current era as a monotonically increasing 32-bit | ||
8 | counter. | ||
9 | |||
10 | Use cases include tracking changed blocks for backup software, and | ||
11 | partially invalidating the contents of a cache to restore cache | ||
12 | coherency after rolling back a vendor snapshot. | ||
13 | |||
14 | Constructor | ||
15 | =========== | ||
16 | |||
17 | era <metadata dev> <origin dev> <block size> | ||
18 | |||
19 | metadata dev : fast device holding the persistent metadata | ||
20 | origin dev : device holding data blocks that may change | ||
21 | block size : block size of origin data device, granularity that is | ||
22 | tracked by the target | ||
23 | |||
24 | Messages | ||
25 | ======== | ||
26 | |||
27 | None of the dm messages take any arguments. | ||
28 | |||
29 | checkpoint | ||
30 | ---------- | ||
31 | |||
32 | Possibly move to a new era. You shouldn't assume the era has | ||
33 | incremented. After sending this message, you should check the | ||
34 | current era via the status line. | ||
35 | |||
36 | take_metadata_snap | ||
37 | ------------------ | ||
38 | |||
39 | Create a clone of the metadata, to allow a userland process to read it. | ||
40 | |||
41 | drop_metadata_snap | ||
42 | ------------------ | ||
43 | |||
44 | Drop the metadata snapshot. | ||
45 | |||
46 | Status | ||
47 | ====== | ||
48 | |||
49 | <metadata block size> <#used metadata blocks>/<#total metadata blocks> | ||
50 | <current era> <held metadata root | '-'> | ||
51 | |||
52 | metadata block size : Fixed block size for each metadata block in | ||
53 | sectors | ||
54 | #used metadata blocks : Number of metadata blocks used | ||
55 | #total metadata blocks : Total number of metadata blocks | ||
56 | current era : The current era | ||
57 | held metadata root : The location, in blocks, of the metadata root | ||
58 | that has been 'held' for userspace read | ||
59 | access. '-' indicates there is no held root | ||
60 | |||
61 | Detailed use case | ||
62 | ================= | ||
63 | |||
64 | The scenario of invalidating a cache when rolling back a vendor | ||
65 | snapshot was the primary use case when developing this target: | ||
66 | |||
67 | Taking a vendor snapshot | ||
68 | ------------------------ | ||
69 | |||
70 | - Send a checkpoint message to the era target | ||
71 | - Make a note of the current era in its status line | ||
72 | - Take vendor snapshot (the era and snapshot should be forever | ||
73 | associated now). | ||
74 | |||
75 | Rolling back to an vendor snapshot | ||
76 | ---------------------------------- | ||
77 | |||
78 | - Cache enters passthrough mode (see: dm-cache's docs in cache.txt) | ||
79 | - Rollback vendor storage | ||
80 | - Take metadata snapshot | ||
81 | - Ascertain which blocks have been written since the snapshot was taken | ||
82 | by checking each block's era | ||
83 | - Invalidate those blocks in the caching software | ||
84 | - Cache returns to writeback/writethrough mode | ||
85 | |||
86 | Memory usage | ||
87 | ============ | ||
88 | |||
89 | The target uses a bitset to record writes in the current era. It also | ||
90 | has a spare bitset ready for switching over to a new era. Other than | ||
91 | that it uses a few 4k blocks for updating metadata. | ||
92 | |||
93 | (4 * nr_blocks) bytes + buffers | ||
94 | |||
95 | Resilience | ||
96 | ========== | ||
97 | |||
98 | Metadata is updated on disk before a write to a previously unwritten | ||
99 | block is performed. As such dm-era should not be effected by a hard | ||
100 | crash such as power failure. | ||
101 | |||
102 | Userland tools | ||
103 | ============== | ||
104 | |||
105 | Userland tools are found in the increasingly poorly named | ||
106 | thin-provisioning-tools project: | ||
107 | |||
108 | https://github.com/jthornber/thin-provisioning-tools | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 10378cc48374..87b4c5e82d39 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -353,6 +353,7 @@ Your cooperation is appreciated. | |||
353 | 133 = /dev/exttrp External device trap | 353 | 133 = /dev/exttrp External device trap |
354 | 134 = /dev/apm_bios Advanced Power Management BIOS | 354 | 134 = /dev/apm_bios Advanced Power Management BIOS |
355 | 135 = /dev/rtc Real Time Clock | 355 | 135 = /dev/rtc Real Time Clock |
356 | 137 = /dev/vhci Bluetooth virtual HCI driver | ||
356 | 139 = /dev/openprom SPARC OpenBoot PROM | 357 | 139 = /dev/openprom SPARC OpenBoot PROM |
357 | 140 = /dev/relay8 Berkshire Products Octal relay card | 358 | 140 = /dev/relay8 Berkshire Products Octal relay card |
358 | 141 = /dev/relay16 Berkshire Products ISO-16 relay card | 359 | 141 = /dev/relay16 Berkshire Products ISO-16 relay card |
@@ -410,6 +411,7 @@ Your cooperation is appreciated. | |||
410 | 194 = /dev/zkshim Zero-Knowledge network shim control | 411 | 194 = /dev/zkshim Zero-Knowledge network shim control |
411 | 195 = /dev/elographics/e2201 Elographics touchscreen E271-2201 | 412 | 195 = /dev/elographics/e2201 Elographics touchscreen E271-2201 |
412 | 196 = /dev/vfio/vfio VFIO userspace driver interface | 413 | 196 = /dev/vfio/vfio VFIO userspace driver interface |
414 | 197 = /dev/pxa3xx-gcu PXA3xx graphics controller unit driver | ||
413 | 198 = /dev/sexec Signed executable interface | 415 | 198 = /dev/sexec Signed executable interface |
414 | 199 = /dev/scanners/cuecat :CueCat barcode scanner | 416 | 199 = /dev/scanners/cuecat :CueCat barcode scanner |
415 | 200 = /dev/net/tun TAP/TUN network device | 417 | 200 = /dev/net/tun TAP/TUN network device |
@@ -451,6 +453,7 @@ Your cooperation is appreciated. | |||
451 | 236 = /dev/mapper/control Device-Mapper control device | 453 | 236 = /dev/mapper/control Device-Mapper control device |
452 | 237 = /dev/loop-control Loopback control device | 454 | 237 = /dev/loop-control Loopback control device |
453 | 238 = /dev/vhost-net Host kernel accelerator for virtio net | 455 | 238 = /dev/vhost-net Host kernel accelerator for virtio net |
456 | 239 = /dev/uhid User-space I/O driver support for HID subsystem | ||
454 | 457 | ||
455 | 240-254 Reserved for local use | 458 | 240-254 Reserved for local use |
456 | 255 Reserved for MISC_DYNAMIC_MINOR | 459 | 255 Reserved for MISC_DYNAMIC_MINOR |
@@ -1491,10 +1494,17 @@ Your cooperation is appreciated. | |||
1491 | 64 = /dev/radio0 Radio device | 1494 | 64 = /dev/radio0 Radio device |
1492 | ... | 1495 | ... |
1493 | 127 = /dev/radio63 Radio device | 1496 | 127 = /dev/radio63 Radio device |
1497 | 128 = /dev/swradio0 Software Defined Radio device | ||
1498 | ... | ||
1499 | 191 = /dev/swradio63 Software Defined Radio device | ||
1494 | 224 = /dev/vbi0 Vertical blank interrupt | 1500 | 224 = /dev/vbi0 Vertical blank interrupt |
1495 | ... | 1501 | ... |
1496 | 255 = /dev/vbi31 Vertical blank interrupt | 1502 | 255 = /dev/vbi31 Vertical blank interrupt |
1497 | 1503 | ||
1504 | Minor numbers are allocated dynamically unless | ||
1505 | CONFIG_VIDEO_FIXED_MINOR_RANGES (default n) | ||
1506 | configuration option is set. | ||
1507 | |||
1498 | 81 block I2O hard disk | 1508 | 81 block I2O hard disk |
1499 | 0 = /dev/i2o/hdq 17th I2O hard disk, whole disk | 1509 | 0 = /dev/i2o/hdq 17th I2O hard disk, whole disk |
1500 | 16 = /dev/i2o/hdr 18th I2O hard disk, whole disk | 1510 | 16 = /dev/i2o/hdr 18th I2O hard disk, whole disk |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt index d74091a8a3bf..5fc03134a999 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | Marvell Armada 370 and Armada XP Interrupt Controller | 1 | Marvell Armada 370, 375, 38x, XP Interrupt Controller |
2 | ----------------------------------------------------- | 2 | ----------------------------------------------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
@@ -16,7 +16,13 @@ Required properties: | |||
16 | automatically map to the interrupt controller registers of the | 16 | automatically map to the interrupt controller registers of the |
17 | current CPU) | 17 | current CPU) |
18 | 18 | ||
19 | Optional properties: | ||
19 | 20 | ||
21 | - interrupts: If defined, then it indicates that this MPIC is | ||
22 | connected as a slave to another interrupt controller. This is | ||
23 | typically the case on Armada 375 and Armada 38x, where the MPIC is | ||
24 | connected as a slave to the Cortex-A9 GIC. The provided interrupt | ||
25 | indicate to which GIC interrupt the MPIC output is connected. | ||
20 | 26 | ||
21 | Example: | 27 | Example: |
22 | 28 | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-375.txt b/Documentation/devicetree/bindings/arm/armada-375.txt new file mode 100644 index 000000000000..867d0b80cb8f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-375.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Marvell Armada 375 Platforms Device Tree Bindings | ||
2 | ------------------------------------------------- | ||
3 | |||
4 | Boards with a SoC of the Marvell Armada 375 family shall have the | ||
5 | following property: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | compatible: must contain "marvell,armada375" | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-38x.txt b/Documentation/devicetree/bindings/arm/armada-38x.txt new file mode 100644 index 000000000000..11f2330a6554 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-38x.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Marvell Armada 38x Platforms Device Tree Bindings | ||
2 | ------------------------------------------------- | ||
3 | |||
4 | Boards with a SoC of the Marvell Armada 38x family shall have the | ||
5 | following property: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | - compatible: must contain either "marvell,armada380" or | ||
10 | "marvell,armada385" depending on the variant of the SoC being used. | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm21664.txt b/Documentation/devicetree/bindings/arm/bcm/bcm21664.txt new file mode 100644 index 000000000000..e0774255e1a6 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/bcm21664.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Broadcom BCM21664 device tree bindings | ||
2 | -------------------------------------- | ||
3 | |||
4 | This document describes the device tree bindings for boards with the BCM21664 | ||
5 | SoC. | ||
6 | |||
7 | Required root node property: | ||
8 | - compatible: brcm,bcm21664 | ||
9 | |||
10 | Example: | ||
11 | / { | ||
12 | model = "BCM21664 SoC"; | ||
13 | compatible = "brcm,bcm21664"; | ||
14 | [...] | ||
15 | } | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/kona-resetmgr.txt b/Documentation/devicetree/bindings/arm/bcm/kona-resetmgr.txt new file mode 100644 index 000000000000..93f31ca1ef4b --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/kona-resetmgr.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Broadcom Kona Family Reset Manager | ||
2 | ---------------------------------- | ||
3 | |||
4 | The reset manager is used on the Broadcom BCM21664 SoC. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: brcm,bcm21664-resetmgr | ||
8 | - reg: memory address & range | ||
9 | |||
10 | Example: | ||
11 | brcm,resetmgr@35001f00 { | ||
12 | compatible = "brcm,bcm21664-resetmgr"; | ||
13 | reg = <0x35001f00 0x24>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm4708.txt new file mode 100644 index 000000000000..6b0f49f6f499 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm4708.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | Broadcom BCM4708 device tree bindings | ||
2 | ------------------------------------------- | ||
3 | |||
4 | Boards with the BCM4708 SoC shall have the following properties: | ||
5 | |||
6 | Required root node property: | ||
7 | |||
8 | compatible = "brcm,bcm4708"; | ||
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 91304353eea4..333f4aea3029 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
@@ -180,7 +180,11 @@ nodes to be present and contain the properties described below. | |||
180 | be one of: | 180 | be one of: |
181 | "spin-table" | 181 | "spin-table" |
182 | "psci" | 182 | "psci" |
183 | # On ARM 32-bit systems this property is optional. | 183 | # On ARM 32-bit systems this property is optional and |
184 | can be one of: | ||
185 | "qcom,gcc-msm8660" | ||
186 | "qcom,kpss-acc-v1" | ||
187 | "qcom,kpss-acc-v2" | ||
184 | 188 | ||
185 | - cpu-release-addr | 189 | - cpu-release-addr |
186 | Usage: required for systems that have an "enable-method" | 190 | Usage: required for systems that have an "enable-method" |
@@ -191,6 +195,21 @@ nodes to be present and contain the properties described below. | |||
191 | property identifying a 64-bit zero-initialised | 195 | property identifying a 64-bit zero-initialised |
192 | memory location. | 196 | memory location. |
193 | 197 | ||
198 | - qcom,saw | ||
199 | Usage: required for systems that have an "enable-method" | ||
200 | property value of "qcom,kpss-acc-v1" or | ||
201 | "qcom,kpss-acc-v2" | ||
202 | Value type: <phandle> | ||
203 | Definition: Specifies the SAW[1] node associated with this CPU. | ||
204 | |||
205 | - qcom,acc | ||
206 | Usage: required for systems that have an "enable-method" | ||
207 | property value of "qcom,kpss-acc-v1" or | ||
208 | "qcom,kpss-acc-v2" | ||
209 | Value type: <phandle> | ||
210 | Definition: Specifies the ACC[2] node associated with this CPU. | ||
211 | |||
212 | |||
194 | Example 1 (dual-cluster big.LITTLE system 32-bit): | 213 | Example 1 (dual-cluster big.LITTLE system 32-bit): |
195 | 214 | ||
196 | cpus { | 215 | cpus { |
@@ -382,3 +401,7 @@ cpus { | |||
382 | cpu-release-addr = <0 0x20000000>; | 401 | cpu-release-addr = <0 0x20000000>; |
383 | }; | 402 | }; |
384 | }; | 403 | }; |
404 | |||
405 | -- | ||
406 | [1] arm/msm/qcom,saw2.txt | ||
407 | [2] arm/msm/qcom,kpss-acc.txt | ||
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt index bae0d87a38b2..5573c08d3180 100644 --- a/Documentation/devicetree/bindings/arm/gic.txt +++ b/Documentation/devicetree/bindings/arm/gic.txt | |||
@@ -50,6 +50,11 @@ Optional | |||
50 | regions, used when the GIC doesn't have banked registers. The offset is | 50 | regions, used when the GIC doesn't have banked registers. The offset is |
51 | cpu-offset * cpu-nr. | 51 | cpu-offset * cpu-nr. |
52 | 52 | ||
53 | - arm,routable-irqs : Total number of gic irq inputs which are not directly | ||
54 | connected from the peripherals, but are routed dynamically | ||
55 | by a crossbar/multiplexer preceding the GIC. The GIC irq | ||
56 | input line is assigned dynamically when the corresponding | ||
57 | peripheral's crossbar line is mapped. | ||
53 | Example: | 58 | Example: |
54 | 59 | ||
55 | intc: interrupt-controller@fff11000 { | 60 | intc: interrupt-controller@fff11000 { |
@@ -57,6 +62,7 @@ Example: | |||
57 | #interrupt-cells = <3>; | 62 | #interrupt-cells = <3>; |
58 | #address-cells = <1>; | 63 | #address-cells = <1>; |
59 | interrupt-controller; | 64 | interrupt-controller; |
65 | arm,routable-irqs = <160>; | ||
60 | reg = <0xfff11000 0x1000>, | 66 | reg = <0xfff11000 0x1000>, |
61 | <0xfff10100 0x100>; | 67 | <0xfff10100 0x100>; |
62 | }; | 68 | }; |
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt index 8c7a4653508d..df0a452b8526 100644 --- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt +++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | |||
@@ -30,3 +30,17 @@ Example: | |||
30 | resume-offset = <0x308>; | 30 | resume-offset = <0x308>; |
31 | reboot-offset = <0x4>; | 31 | reboot-offset = <0x4>; |
32 | }; | 32 | }; |
33 | |||
34 | PCTRL: Peripheral misc control register | ||
35 | |||
36 | Required Properties: | ||
37 | - compatible: "hisilicon,pctrl" | ||
38 | - reg: Address and size of pctrl. | ||
39 | |||
40 | Example: | ||
41 | |||
42 | /* for Hi3620 */ | ||
43 | pctrl: pctrl@fca09000 { | ||
44 | compatible = "hisilicon,pctrl"; | ||
45 | reg = <0xfca09000 0x1000>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt index 63c0e6ae5cf7..59d7a46f85eb 100644 --- a/Documentation/devicetree/bindings/arm/keystone/keystone.txt +++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt | |||
@@ -8,3 +8,13 @@ Required properties: | |||
8 | - compatible: All TI specific devices present in Keystone SOC should be in | 8 | - compatible: All TI specific devices present in Keystone SOC should be in |
9 | the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 | 9 | the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 |
10 | type UART should use the specified compatible for those devices. | 10 | type UART should use the specified compatible for those devices. |
11 | |||
12 | Boards: | ||
13 | - Keystone 2 Hawking/Kepler EVM | ||
14 | compatible = "ti,k2hk-evm","ti,keystone" | ||
15 | |||
16 | - Keystone 2 Lamarr EVM | ||
17 | compatible = "ti,k2l-evm","ti,keystone" | ||
18 | |||
19 | - Keystone 2 Edison EVM | ||
20 | compatible = "ti,k2e-evm","ti,keystone" | ||
diff --git a/Documentation/devicetree/bindings/arm/marvell,dove.txt b/Documentation/devicetree/bindings/arm/marvell,dove.txt new file mode 100644 index 000000000000..aaaf64c56e44 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/marvell,dove.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Marvell Dove Platforms Device Tree Bindings | ||
2 | ----------------------------------------------- | ||
3 | |||
4 | Boards with a Marvell Dove SoC shall have the following properties: | ||
5 | |||
6 | Required root node property: | ||
7 | - compatible: must contain "marvell,dove"; | ||
8 | |||
9 | * Global Configuration registers | ||
10 | |||
11 | Global Configuration registers of Dove SoC are shared by a syscon node. | ||
12 | |||
13 | Required properties: | ||
14 | - compatible: must contain "marvell,dove-global-config" and "syscon". | ||
15 | - reg: base address and size of the Global Configuration registers. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | gconf: global-config@e802c { | ||
20 | compatible = "marvell,dove-global-config", "syscon"; | ||
21 | reg = <0xe802c 0x14>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/feroceon.txt b/Documentation/devicetree/bindings/arm/mrvl/feroceon.txt new file mode 100644 index 000000000000..0d244b999d10 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl/feroceon.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Marvell Feroceon Cache | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be either "marvell,feroceon-cache" or | ||
5 | "marvell,kirkwood-cache". | ||
6 | |||
7 | Optional properties: | ||
8 | - reg : Address of the L2 cache control register. Mandatory for | ||
9 | "marvell,kirkwood-cache", not used by "marvell,feroceon-cache" | ||
10 | |||
11 | |||
12 | Example: | ||
13 | l2: l2-cache@20128 { | ||
14 | compatible = "marvell,kirkwood-cache"; | ||
15 | reg = <0x20128 0x4>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt new file mode 100644 index 000000000000..1333db9acfee --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) | ||
2 | |||
3 | The KPSS ACC provides clock, power domain, and reset control to a Krait CPU. | ||
4 | There is one ACC register region per CPU within the KPSS remapped region as | ||
5 | well as an alias register region that remaps accesses to the ACC associated | ||
6 | with the CPU accessing the region. | ||
7 | |||
8 | PROPERTIES | ||
9 | |||
10 | - compatible: | ||
11 | Usage: required | ||
12 | Value type: <string> | ||
13 | Definition: should be one of: | ||
14 | "qcom,kpss-acc-v1" | ||
15 | "qcom,kpss-acc-v2" | ||
16 | |||
17 | - reg: | ||
18 | Usage: required | ||
19 | Value type: <prop-encoded-array> | ||
20 | Definition: the first element specifies the base address and size of | ||
21 | the register region. An optional second element specifies | ||
22 | the base address and size of the alias register region. | ||
23 | |||
24 | Example: | ||
25 | |||
26 | clock-controller@2088000 { | ||
27 | compatible = "qcom,kpss-acc-v2"; | ||
28 | reg = <0x02088000 0x1000>, | ||
29 | <0x02008000 0x1000>; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt b/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt new file mode 100644 index 000000000000..1505fb8e131a --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | SPM AVS Wrapper 2 (SAW2) | ||
2 | |||
3 | The SAW2 is a wrapper around the Subsystem Power Manager (SPM) and the | ||
4 | Adaptive Voltage Scaling (AVS) hardware. The SPM is a programmable | ||
5 | micro-controller that transitions a piece of hardware (like a processor or | ||
6 | subsystem) into and out of low power modes via a direct connection to | ||
7 | the PMIC. It can also be wired up to interact with other processors in the | ||
8 | system, notifying them when a low power state is entered or exited. | ||
9 | |||
10 | PROPERTIES | ||
11 | |||
12 | - compatible: | ||
13 | Usage: required | ||
14 | Value type: <string> | ||
15 | Definition: shall contain "qcom,saw2". A more specific value should be | ||
16 | one of: | ||
17 | "qcom,saw2-v1" | ||
18 | "qcom,saw2-v1.1" | ||
19 | "qcom,saw2-v2" | ||
20 | "qcom,saw2-v2.1" | ||
21 | |||
22 | - reg: | ||
23 | Usage: required | ||
24 | Value type: <prop-encoded-array> | ||
25 | Definition: the first element specifies the base address and size of | ||
26 | the register region. An optional second element specifies | ||
27 | the base address and size of the alias register region. | ||
28 | |||
29 | |||
30 | Example: | ||
31 | |||
32 | regulator@2099000 { | ||
33 | compatible = "qcom,saw2"; | ||
34 | reg = <0x02099000 0x1000>, <0x02009000 0x1000>; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt index 081c6a786c8a..d24ab2ebf8a7 100644 --- a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt +++ b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt | |||
@@ -1,12 +1,13 @@ | |||
1 | MVEBU System Controller | 1 | MVEBU System Controller |
2 | ----------------------- | 2 | ----------------------- |
3 | MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x) | 3 | MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x) |
4 | 4 | ||
5 | Required properties: | 5 | Required properties: |
6 | 6 | ||
7 | - compatible: one of: | 7 | - compatible: one of: |
8 | - "marvell,orion-system-controller" | 8 | - "marvell,orion-system-controller" |
9 | - "marvell,armada-370-xp-system-controller" | 9 | - "marvell,armada-370-xp-system-controller" |
10 | - "marvell,armada-375-system-controller" | ||
10 | - reg: Should contain system controller registers location and length. | 11 | - reg: Should contain system controller registers location and length. |
11 | 12 | ||
12 | Example: | 13 | Example: |
diff --git a/Documentation/devicetree/bindings/arm/omap/crossbar.txt b/Documentation/devicetree/bindings/arm/omap/crossbar.txt new file mode 100644 index 000000000000..fb88585cfb93 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/crossbar.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Some socs have a large number of interrupts requests to service | ||
2 | the needs of its many peripherals and subsystems. All of the | ||
3 | interrupt lines from the subsystems are not needed at the same | ||
4 | time, so they have to be muxed to the irq-controller appropriately. | ||
5 | In such places a interrupt controllers are preceded by an CROSSBAR | ||
6 | that provides flexibility in muxing the device requests to the controller | ||
7 | inputs. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible : Should be "ti,irq-crossbar" | ||
11 | - reg: Base address and the size of the crossbar registers. | ||
12 | - ti,max-irqs: Total number of irqs available at the interrupt controller. | ||
13 | - ti,reg-size: Size of a individual register in bytes. Every individual | ||
14 | register is assumed to be of same size. Valid sizes are 1, 2, 4. | ||
15 | - ti,irqs-reserved: List of the reserved irq lines that are not muxed using | ||
16 | crossbar. These interrupt lines are reserved in the soc, | ||
17 | so crossbar bar driver should not consider them as free | ||
18 | lines. | ||
19 | |||
20 | Examples: | ||
21 | crossbar_mpu: @4a020000 { | ||
22 | compatible = "ti,irq-crossbar"; | ||
23 | reg = <0x4a002a48 0x130>; | ||
24 | ti,max-irqs = <160>; | ||
25 | ti,reg-size = <2>; | ||
26 | ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/dmm.txt b/Documentation/devicetree/bindings/arm/omap/dmm.txt new file mode 100644 index 000000000000..8bd6d0a238a8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/dmm.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | OMAP Dynamic Memory Manager (DMM) bindings | ||
2 | |||
3 | The dynamic memory manager (DMM) is a module located immediately in front of the | ||
4 | SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory | ||
5 | accesses such as priority generation amongst initiators, configuration of SDRAM | ||
6 | interleaving, optimizing transfer of 2D block objects, and provide MMU-like page | ||
7 | translation for initiators which need contiguous dma bus addresses. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible: Should contain "ti,omap4-dmm" for OMAP4 family | ||
11 | Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family | ||
12 | - reg: Contains DMM register address range (base address and length) | ||
13 | - interrupts: Should contain an interrupt-specifier for DMM_IRQ. | ||
14 | - ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" | ||
15 | |||
16 | Example: | ||
17 | |||
18 | dmm@4e000000 { | ||
19 | compatible = "ti,omap4-dmm"; | ||
20 | reg = <0x4e000000 0x800>; | ||
21 | ti,hwmods = "dmm"; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index af9b4a0d902b..36ede19a1630 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -99,6 +99,9 @@ Boards: | |||
99 | - OMAP4 PandaBoard : Low cost community board | 99 | - OMAP4 PandaBoard : Low cost community board |
100 | compatible = "ti,omap4-panda", "ti,omap4430" | 100 | compatible = "ti,omap4-panda", "ti,omap4430" |
101 | 101 | ||
102 | - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board | ||
103 | compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; | ||
104 | |||
102 | - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x | 105 | - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x |
103 | compatible = "ti,omap3-evm", "ti,omap3" | 106 | compatible = "ti,omap3-evm", "ti,omap3" |
104 | 107 | ||
@@ -114,5 +117,8 @@ Boards: | |||
114 | - AM43x EPOS EVM | 117 | - AM43x EPOS EVM |
115 | compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43" | 118 | compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43" |
116 | 119 | ||
120 | - AM437x GP EVM | ||
121 | compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" | ||
122 | |||
117 | - DRA7 EVM: Software Developement Board for DRA7XX | 123 | - DRA7 EVM: Software Developement Board for DRA7XX |
118 | compatible = "ti,dra7-evm", "ti,dra7" | 124 | compatible = "ti,dra7-evm", "ti,dra7" |
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt index 3e1e498fea96..fe5cef8976cb 100644 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ b/Documentation/devicetree/bindings/arm/pmu.txt | |||
@@ -9,6 +9,7 @@ Required properties: | |||
9 | - compatible : should be one of | 9 | - compatible : should be one of |
10 | "arm,armv8-pmuv3" | 10 | "arm,armv8-pmuv3" |
11 | "arm,cortex-a15-pmu" | 11 | "arm,cortex-a15-pmu" |
12 | "arm,cortex-a12-pmu" | ||
12 | "arm,cortex-a9-pmu" | 13 | "arm,cortex-a9-pmu" |
13 | "arm,cortex-a8-pmu" | 14 | "arm,cortex-a8-pmu" |
14 | "arm,cortex-a7-pmu" | 15 | "arm,cortex-a7-pmu" |
@@ -16,7 +17,14 @@ Required properties: | |||
16 | "arm,arm11mpcore-pmu" | 17 | "arm,arm11mpcore-pmu" |
17 | "arm,arm1176-pmu" | 18 | "arm,arm1176-pmu" |
18 | "arm,arm1136-pmu" | 19 | "arm,arm1136-pmu" |
19 | - interrupts : 1 combined interrupt or 1 per core. | 20 | "qcom,krait-pmu" |
21 | - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu | ||
22 | interrupt (PPI) then 1 interrupt should be specified. | ||
23 | |||
24 | Optional properties: | ||
25 | |||
26 | - qcom,no-pc-write : Indicates that this PMU doesn't support the 0xc and 0xd | ||
27 | events. | ||
20 | 28 | ||
21 | Example: | 29 | Example: |
22 | 30 | ||
diff --git a/Documentation/devicetree/bindings/arm/rockchip/pmu.txt b/Documentation/devicetree/bindings/arm/rockchip/pmu.txt new file mode 100644 index 000000000000..3ee9b428b2f7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/rockchip/pmu.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Rockchip power-management-unit: | ||
2 | ------------------------------- | ||
3 | |||
4 | The pmu is used to turn off and on different power domains of the SoCs | ||
5 | This includes the power to the CPU cores. | ||
6 | |||
7 | Required node properties: | ||
8 | - compatible value : = "rockchip,rk3066-pmu"; | ||
9 | - reg : physical base address and the size of the registers window | ||
10 | |||
11 | Example: | ||
12 | |||
13 | pmu@20004000 { | ||
14 | compatible = "rockchip,rk3066-pmu"; | ||
15 | reg = <0x20004000 0x100>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt b/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt new file mode 100644 index 000000000000..d9416fb8db6f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | Rockchip SRAM for smp bringup: | ||
2 | ------------------------------ | ||
3 | |||
4 | Rockchip's smp-capable SoCs use the first part of the sram for the bringup | ||
5 | of the cores. Once the core gets powered up it executes the code that is | ||
6 | residing at the very beginning of the sram. | ||
7 | |||
8 | Therefore a reserved section sub-node has to be added to the mmio-sram | ||
9 | declaration. | ||
10 | |||
11 | Required sub-node properties: | ||
12 | - compatible : should be "rockchip,rk3066-smp-sram" | ||
13 | |||
14 | The rest of the properties should follow the generic mmio-sram discription | ||
15 | found in ../../misc/sram.txt | ||
16 | |||
17 | Example: | ||
18 | |||
19 | sram: sram@10080000 { | ||
20 | compatible = "mmio-sram"; | ||
21 | reg = <0x10080000 0x10000>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | ranges; | ||
25 | |||
26 | smp-sram@10080000 { | ||
27 | compatible = "rockchip,rk3066-smp-sram"; | ||
28 | reg = <0x10080000 0x50>; | ||
29 | }; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt new file mode 100644 index 000000000000..f1f155255f28 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | SAMSUNG Exynos SoC series PMU Registers | ||
2 | |||
3 | Properties: | ||
4 | - compatible : should contain two values. First value must be one from following list: | ||
5 | - "samsung,exynos5250-pmu" - for Exynos5250 SoC, | ||
6 | - "samsung,exynos5420-pmu" - for Exynos5420 SoC. | ||
7 | second value must be always "syscon". | ||
8 | |||
9 | - reg : offset and length of the register set. | ||
10 | |||
11 | Example : | ||
12 | pmu_system_controller: system-controller@10040000 { | ||
13 | compatible = "samsung,exynos5250-pmu", "syscon"; | ||
14 | reg = <0x10040000 0x5000>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 89de1564950c..48b285ffa3a6 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
@@ -4,17 +4,33 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. | |||
4 | Each SATA controller should have its own node. | 4 | Each SATA controller should have its own node. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : compatible list, contains "snps,spear-ahci" | 7 | - compatible : compatible list, one of "snps,spear-ahci", |
8 | "snps,exynos5440-ahci", "ibm,476gtr-ahci", | ||
9 | "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" | ||
10 | "fsl,imx6q-ahci" or "snps,dwc-ahci" | ||
8 | - interrupts : <interrupt mapping for SATA IRQ> | 11 | - interrupts : <interrupt mapping for SATA IRQ> |
9 | - reg : <registers mapping> | 12 | - reg : <registers mapping> |
10 | 13 | ||
11 | Optional properties: | 14 | Optional properties: |
12 | - dma-coherent : Present if dma operations are coherent | 15 | - dma-coherent : Present if dma operations are coherent |
16 | - clocks : a list of phandle + clock specifier pairs | ||
17 | - target-supply : regulator for SATA target power | ||
13 | 18 | ||
14 | Example: | 19 | "fsl,imx53-ahci", "fsl,imx6q-ahci" required properties: |
20 | - clocks : must contain the sata, sata_ref and ahb clocks | ||
21 | - clock-names : must contain "ahb" for the ahb clock | ||
22 | |||
23 | Examples: | ||
15 | sata@ffe08000 { | 24 | sata@ffe08000 { |
16 | compatible = "snps,spear-ahci"; | 25 | compatible = "snps,spear-ahci"; |
17 | reg = <0xffe08000 0x1000>; | 26 | reg = <0xffe08000 0x1000>; |
18 | interrupts = <115>; | 27 | interrupts = <115>; |
19 | |||
20 | }; | 28 | }; |
29 | |||
30 | ahci: sata@01c18000 { | ||
31 | compatible = "allwinner,sun4i-a10-ahci"; | ||
32 | reg = <0x01c18000 0x1000>; | ||
33 | interrupts = <56>; | ||
34 | clocks = <&pll6 0>, <&ahb_gates 25>; | ||
35 | target-supply = <®_ahci_5v>; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/apm-xgene.txt b/Documentation/devicetree/bindings/ata/apm-xgene.txt new file mode 100644 index 000000000000..7bcfbf59810e --- /dev/null +++ b/Documentation/devicetree/bindings/ata/apm-xgene.txt | |||
@@ -0,0 +1,76 @@ | |||
1 | * APM X-Gene 6.0 Gb/s SATA host controller nodes | ||
2 | |||
3 | SATA host controller nodes are defined to describe on-chip Serial ATA | ||
4 | controllers. Each SATA controller (pair of ports) have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Shall contain: | ||
8 | * "apm,xgene-ahci" | ||
9 | - reg : First memory resource shall be the AHCI memory | ||
10 | resource. | ||
11 | Second memory resource shall be the host controller | ||
12 | core memory resource. | ||
13 | Third memory resource shall be the host controller | ||
14 | diagnostic memory resource. | ||
15 | 4th memory resource shall be the host controller | ||
16 | AXI memory resource. | ||
17 | 5th optional memory resource shall be the host | ||
18 | controller MUX memory resource if required. | ||
19 | - interrupts : Interrupt-specifier for SATA host controller IRQ. | ||
20 | - clocks : Reference to the clock entry. | ||
21 | - phys : A list of phandles + phy-specifiers, one for each | ||
22 | entry in phy-names. | ||
23 | - phy-names : Should contain: | ||
24 | * "sata-phy" for the SATA 6.0Gbps PHY | ||
25 | |||
26 | Optional properties: | ||
27 | - status : Shall be "ok" if enabled or "disabled" if disabled. | ||
28 | Default is "ok". | ||
29 | |||
30 | Example: | ||
31 | sataclk: sataclk { | ||
32 | compatible = "fixed-clock"; | ||
33 | #clock-cells = <1>; | ||
34 | clock-frequency = <100000000>; | ||
35 | clock-output-names = "sataclk"; | ||
36 | }; | ||
37 | |||
38 | phy2: phy@1f22a000 { | ||
39 | compatible = "apm,xgene-phy"; | ||
40 | reg = <0x0 0x1f22a000 0x0 0x100>; | ||
41 | #phy-cells = <1>; | ||
42 | }; | ||
43 | |||
44 | phy3: phy@1f23a000 { | ||
45 | compatible = "apm,xgene-phy"; | ||
46 | reg = <0x0 0x1f23a000 0x0 0x100>; | ||
47 | #phy-cells = <1>; | ||
48 | }; | ||
49 | |||
50 | sata2: sata@1a400000 { | ||
51 | compatible = "apm,xgene-ahci"; | ||
52 | reg = <0x0 0x1a400000 0x0 0x1000>, | ||
53 | <0x0 0x1f220000 0x0 0x1000>, | ||
54 | <0x0 0x1f22d000 0x0 0x1000>, | ||
55 | <0x0 0x1f22e000 0x0 0x1000>, | ||
56 | <0x0 0x1f227000 0x0 0x1000>; | ||
57 | interrupts = <0x0 0x87 0x4>; | ||
58 | status = "ok"; | ||
59 | clocks = <&sataclk 0>; | ||
60 | phys = <&phy2 0>; | ||
61 | phy-names = "sata-phy"; | ||
62 | }; | ||
63 | |||
64 | sata3: sata@1a800000 { | ||
65 | compatible = "apm,xgene-ahci-pcie"; | ||
66 | reg = <0x0 0x1a800000 0x0 0x1000>, | ||
67 | <0x0 0x1f230000 0x0 0x1000>, | ||
68 | <0x0 0x1f23d000 0x0 0x1000>, | ||
69 | <0x0 0x1f23e000 0x0 0x1000>, | ||
70 | <0x0 0x1f237000 0x0 0x1000>; | ||
71 | interrupts = <0x0 0x88 0x4>; | ||
72 | status = "ok"; | ||
73 | clocks = <&sataclk 0>; | ||
74 | phys = <&phy3 0>; | ||
75 | phy-names = "sata-phy"; | ||
76 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt b/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt deleted file mode 100644 index 37824fac688e..000000000000 --- a/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | * Samsung SATA PHY Controller | ||
2 | |||
3 | SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. | ||
4 | Each SATA PHY controller should have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, contains "samsung,exynos5-sata-phy" | ||
8 | - reg : <registers mapping> | ||
9 | |||
10 | Example: | ||
11 | sata@ffe07000 { | ||
12 | compatible = "samsung,exynos5-sata-phy"; | ||
13 | reg = <0xffe07000 0x1000>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata.txt b/Documentation/devicetree/bindings/ata/exynos-sata.txt index 0849f1025e34..cb48448247ea 100644 --- a/Documentation/devicetree/bindings/ata/exynos-sata.txt +++ b/Documentation/devicetree/bindings/ata/exynos-sata.txt | |||
@@ -4,14 +4,27 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. | |||
4 | Each SATA controller should have its own node. | 4 | Each SATA controller should have its own node. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : compatible list, contains "samsung,exynos5-sata" | 7 | - compatible : compatible list, contains "samsung,exynos5-sata" |
8 | - interrupts : <interrupt mapping for SATA IRQ> | 8 | - interrupts : <interrupt mapping for SATA IRQ> |
9 | - reg : <registers mapping> | 9 | - reg : <registers mapping> |
10 | - samsung,sata-freq : <frequency in MHz> | 10 | - samsung,sata-freq : <frequency in MHz> |
11 | - phys : Must contain exactly one entry as specified | ||
12 | in phy-bindings.txt | ||
13 | - phy-names : Must be "sata-phy" | ||
14 | |||
15 | Optional properties: | ||
16 | - clocks : Must contain an entry for each entry in clock-names. | ||
17 | - clock-names : Shall be "sata" for the external SATA bus clock, | ||
18 | and "sclk_sata" for the internal controller clock. | ||
11 | 19 | ||
12 | Example: | 20 | Example: |
13 | sata@ffe08000 { | 21 | sata@122f0000 { |
14 | compatible = "samsung,exynos5-sata"; | 22 | compatible = "snps,dwc-ahci"; |
15 | reg = <0xffe08000 0x1000>; | 23 | samsung,sata-freq = <66>; |
16 | interrupts = <115>; | 24 | reg = <0x122f0000 0x1ff>; |
17 | }; | 25 | interrupts = <0 115 0>; |
26 | clocks = <&clock 277>, <&clock 143>; | ||
27 | clock-names = "sata", "sclk_sata"; | ||
28 | phys = <&sata_phy>; | ||
29 | phy-names = "sata-phy"; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt index 0fd76c405208..6630d842c7a3 100644 --- a/Documentation/devicetree/bindings/bus/imx-weim.txt +++ b/Documentation/devicetree/bindings/bus/imx-weim.txt | |||
@@ -8,7 +8,12 @@ The actual devices are instantiated from the child nodes of a WEIM node. | |||
8 | 8 | ||
9 | Required properties: | 9 | Required properties: |
10 | 10 | ||
11 | - compatible: Should be set to "fsl,<soc>-weim" | 11 | - compatible: Should contain one of the following: |
12 | "fsl,imx1-weim" | ||
13 | "fsl,imx27-weim" | ||
14 | "fsl,imx51-weim" | ||
15 | "fsl,imx50-weim" | ||
16 | "fsl,imx6q-weim" | ||
12 | - reg: A resource specifier for the register space | 17 | - reg: A resource specifier for the register space |
13 | (see the example below) | 18 | (see the example below) |
14 | - clocks: the clock, see the example below. | 19 | - clocks: the clock, see the example below. |
@@ -19,6 +24,26 @@ Required properties: | |||
19 | 24 | ||
20 | <cs-number> 0 <physical address of mapping> <size> | 25 | <cs-number> 0 <physical address of mapping> <size> |
21 | 26 | ||
27 | Optional properties: | ||
28 | |||
29 | - fsl,weim-cs-gpr: For "fsl,imx50-weim" and "fsl,imx6q-weim" type of | ||
30 | devices, it should be the phandle to the system General | ||
31 | Purpose Register controller that contains WEIM CS GPR | ||
32 | register, e.g. IOMUXC_GPR1 on i.MX6Q. IOMUXC_GPR1[11:0] | ||
33 | should be set up as one of the following 4 possible | ||
34 | values depending on the CS space configuration. | ||
35 | |||
36 | IOMUXC_GPR1[11:0] CS0 CS1 CS2 CS3 | ||
37 | --------------------------------------------- | ||
38 | 05 128M 0M 0M 0M | ||
39 | 033 64M 64M 0M 0M | ||
40 | 0113 64M 32M 32M 0M | ||
41 | 01111 32M 32M 32M 32M | ||
42 | |||
43 | In case that the property is absent, the reset value or | ||
44 | what bootloader sets up in IOMUXC_GPR1[11:0] will be | ||
45 | used. | ||
46 | |||
22 | Timing property for child nodes. It is mandatory, not optional. | 47 | Timing property for child nodes. It is mandatory, not optional. |
23 | 48 | ||
24 | - fsl,weim-cs-timing: The timing array, contains timing values for the | 49 | - fsl,weim-cs-timing: The timing array, contains timing values for the |
@@ -43,6 +68,7 @@ Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM: | |||
43 | #address-cells = <2>; | 68 | #address-cells = <2>; |
44 | #size-cells = <1>; | 69 | #size-cells = <1>; |
45 | ranges = <0 0 0x08000000 0x08000000>; | 70 | ranges = <0 0 0x08000000 0x08000000>; |
71 | fsl,weim-cs-gpr = <&gpr>; | ||
46 | 72 | ||
47 | nor@0,0 { | 73 | nor@0,0 { |
48 | compatible = "cfi-flash"; | 74 | compatible = "cfi-flash"; |
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt index 0045433eae1f..5dfd145d3ccf 100644 --- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt +++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt | |||
@@ -23,3 +23,8 @@ Optional properties: | |||
23 | and the bit index. | 23 | and the bit index. |
24 | - div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, | 24 | - div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, |
25 | and width. | 25 | and width. |
26 | - clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls | ||
27 | the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second | ||
28 | value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct | ||
29 | hold/delay times that is needed for the SD/MMC CIU clock. The values of both | ||
30 | can be 0-315 degrees, in 45 degree increments. | ||
diff --git a/Documentation/devicetree/bindings/clock/arm-integrator.txt b/Documentation/devicetree/bindings/clock/arm-integrator.txt new file mode 100644 index 000000000000..652914b17b95 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/arm-integrator.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Clock bindings for ARM Integrator Core Module clocks | ||
2 | |||
3 | Auxilary Oscillator Clock | ||
4 | |||
5 | This is a configurable clock fed from a 24 MHz chrystal, | ||
6 | used for generating e.g. video clocks. It is located on the | ||
7 | core module and there is only one of these. | ||
8 | |||
9 | This clock node *must* be a subnode of the core module, since | ||
10 | it obtains the base address for it's address range from its | ||
11 | parent node. | ||
12 | |||
13 | |||
14 | Required properties: | ||
15 | - compatible: must be "arm,integrator-cm-auxosc" | ||
16 | - #clock-cells: must be <0> | ||
17 | |||
18 | Optional properties: | ||
19 | - clocks: parent clock(s) | ||
20 | |||
21 | Example: | ||
22 | |||
23 | core-module@10000000 { | ||
24 | xtal24mhz: xtal24mhz@24M { | ||
25 | #clock-cells = <0>; | ||
26 | compatible = "fixed-clock"; | ||
27 | clock-frequency = <24000000>; | ||
28 | }; | ||
29 | auxosc: cm_aux_osc@25M { | ||
30 | #clock-cells = <0>; | ||
31 | compatible = "arm,integrator-cm-auxosc"; | ||
32 | clocks = <&xtal24mhz>; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/axi-clkgen.txt b/Documentation/devicetree/bindings/clock/axi-clkgen.txt index 028b493e97ff..20e1704e7df2 100644 --- a/Documentation/devicetree/bindings/clock/axi-clkgen.txt +++ b/Documentation/devicetree/bindings/clock/axi-clkgen.txt | |||
@@ -5,7 +5,7 @@ This binding uses the common clock binding[1]. | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | 5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt |
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | - compatible : shall be "adi,axi-clkgen". | 8 | - compatible : shall be "adi,axi-clkgen-1.00.a" or "adi,axi-clkgen-2.00.a". |
9 | - #clock-cells : from common clock binding; Should always be set to 0. | 9 | - #clock-cells : from common clock binding; Should always be set to 0. |
10 | - reg : Address and length of the axi-clkgen register set. | 10 | - reg : Address and length of the axi-clkgen register set. |
11 | - clocks : Phandle and clock specifier for the parent clock. | 11 | - clocks : Phandle and clock specifier for the parent clock. |
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 7c52c29d99fa..700e7aac3717 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt | |||
@@ -44,6 +44,23 @@ For example: | |||
44 | clocks by index. The names should reflect the clock output signal | 44 | clocks by index. The names should reflect the clock output signal |
45 | names for the device. | 45 | names for the device. |
46 | 46 | ||
47 | clock-indices: If the identifyng number for the clocks in the node | ||
48 | is not linear from zero, then the this mapping allows | ||
49 | the mapping of identifiers into the clock-output-names | ||
50 | array. | ||
51 | |||
52 | For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: | ||
53 | |||
54 | oscillator { | ||
55 | compatible = "myclocktype"; | ||
56 | #clock-cells = <1>; | ||
57 | clock-indices = <1>, <3>; | ||
58 | clock-output-names = "clka", "clkb"; | ||
59 | } | ||
60 | |||
61 | This ensures we do not have any empty nodes in clock-output-names | ||
62 | |||
63 | |||
47 | ==Clock consumers== | 64 | ==Clock consumers== |
48 | 65 | ||
49 | Required properties: | 66 | Required properties: |
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt index a2ac2d9ac71a..f5a5b19ed3b2 100644 --- a/Documentation/devicetree/bindings/clock/exynos4-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt | |||
@@ -15,259 +15,12 @@ Required Properties: | |||
15 | 15 | ||
16 | - #clock-cells: should be 1. | 16 | - #clock-cells: should be 1. |
17 | 17 | ||
18 | The following is the list of clocks generated by the controller. Each clock is | 18 | Each clock is assigned an identifier and client nodes can use this identifier |
19 | assigned an identifier and client nodes use this identifier to specify the | 19 | to specify the clock which they consume. |
20 | clock which they consume. Some of the clocks are available only on a particular | ||
21 | Exynos4 SoC and this is specified where applicable. | ||
22 | |||
23 | |||
24 | [Core Clocks] | ||
25 | |||
26 | Clock ID SoC (if specific) | ||
27 | ----------------------------------------------- | ||
28 | |||
29 | xxti 1 | ||
30 | xusbxti 2 | ||
31 | fin_pll 3 | ||
32 | fout_apll 4 | ||
33 | fout_mpll 5 | ||
34 | fout_epll 6 | ||
35 | fout_vpll 7 | ||
36 | sclk_apll 8 | ||
37 | sclk_mpll 9 | ||
38 | sclk_epll 10 | ||
39 | sclk_vpll 11 | ||
40 | arm_clk 12 | ||
41 | aclk200 13 | ||
42 | aclk100 14 | ||
43 | aclk160 15 | ||
44 | aclk133 16 | ||
45 | mout_mpll_user_t 17 Exynos4x12 | ||
46 | mout_mpll_user_c 18 Exynos4x12 | ||
47 | mout_core 19 | ||
48 | mout_apll 20 | ||
49 | |||
50 | |||
51 | [Clock Gate for Special Clocks] | ||
52 | |||
53 | Clock ID SoC (if specific) | ||
54 | ----------------------------------------------- | ||
55 | |||
56 | sclk_fimc0 128 | ||
57 | sclk_fimc1 129 | ||
58 | sclk_fimc2 130 | ||
59 | sclk_fimc3 131 | ||
60 | sclk_cam0 132 | ||
61 | sclk_cam1 133 | ||
62 | sclk_csis0 134 | ||
63 | sclk_csis1 135 | ||
64 | sclk_hdmi 136 | ||
65 | sclk_mixer 137 | ||
66 | sclk_dac 138 | ||
67 | sclk_pixel 139 | ||
68 | sclk_fimd0 140 | ||
69 | sclk_mdnie0 141 Exynos4412 | ||
70 | sclk_mdnie_pwm0 12 142 Exynos4412 | ||
71 | sclk_mipi0 143 | ||
72 | sclk_audio0 144 | ||
73 | sclk_mmc0 145 | ||
74 | sclk_mmc1 146 | ||
75 | sclk_mmc2 147 | ||
76 | sclk_mmc3 148 | ||
77 | sclk_mmc4 149 | ||
78 | sclk_sata 150 Exynos4210 | ||
79 | sclk_uart0 151 | ||
80 | sclk_uart1 152 | ||
81 | sclk_uart2 153 | ||
82 | sclk_uart3 154 | ||
83 | sclk_uart4 155 | ||
84 | sclk_audio1 156 | ||
85 | sclk_audio2 157 | ||
86 | sclk_spdif 158 | ||
87 | sclk_spi0 159 | ||
88 | sclk_spi1 160 | ||
89 | sclk_spi2 161 | ||
90 | sclk_slimbus 162 | ||
91 | sclk_fimd1 163 Exynos4210 | ||
92 | sclk_mipi1 164 Exynos4210 | ||
93 | sclk_pcm1 165 | ||
94 | sclk_pcm2 166 | ||
95 | sclk_i2s1 167 | ||
96 | sclk_i2s2 168 | ||
97 | sclk_mipihsi 169 Exynos4412 | ||
98 | sclk_mfc 170 | ||
99 | sclk_pcm0 171 | ||
100 | sclk_g3d 172 | ||
101 | sclk_pwm_isp 173 Exynos4x12 | ||
102 | sclk_spi0_isp 174 Exynos4x12 | ||
103 | sclk_spi1_isp 175 Exynos4x12 | ||
104 | sclk_uart_isp 176 Exynos4x12 | ||
105 | sclk_fimg2d 177 | ||
106 | |||
107 | [Peripheral Clock Gates] | ||
108 | |||
109 | Clock ID SoC (if specific) | ||
110 | ----------------------------------------------- | ||
111 | |||
112 | fimc0 256 | ||
113 | fimc1 257 | ||
114 | fimc2 258 | ||
115 | fimc3 259 | ||
116 | csis0 260 | ||
117 | csis1 261 | ||
118 | jpeg 262 | ||
119 | smmu_fimc0 263 | ||
120 | smmu_fimc1 264 | ||
121 | smmu_fimc2 265 | ||
122 | smmu_fimc3 266 | ||
123 | smmu_jpeg 267 | ||
124 | vp 268 | ||
125 | mixer 269 | ||
126 | tvenc 270 Exynos4210 | ||
127 | hdmi 271 | ||
128 | smmu_tv 272 | ||
129 | mfc 273 | ||
130 | smmu_mfcl 274 | ||
131 | smmu_mfcr 275 | ||
132 | g3d 276 | ||
133 | g2d 277 | ||
134 | rotator 278 Exynos4210 | ||
135 | mdma 279 Exynos4210 | ||
136 | smmu_g2d 280 Exynos4210 | ||
137 | smmu_rotator 281 Exynos4210 | ||
138 | smmu_mdma 282 Exynos4210 | ||
139 | fimd0 283 | ||
140 | mie0 284 | ||
141 | mdnie0 285 Exynos4412 | ||
142 | dsim0 286 | ||
143 | smmu_fimd0 287 | ||
144 | fimd1 288 Exynos4210 | ||
145 | mie1 289 Exynos4210 | ||
146 | dsim1 290 Exynos4210 | ||
147 | smmu_fimd1 291 Exynos4210 | ||
148 | pdma0 292 | ||
149 | pdma1 293 | ||
150 | pcie_phy 294 | ||
151 | sata_phy 295 Exynos4210 | ||
152 | tsi 296 | ||
153 | sdmmc0 297 | ||
154 | sdmmc1 298 | ||
155 | sdmmc2 299 | ||
156 | sdmmc3 300 | ||
157 | sdmmc4 301 | ||
158 | sata 302 Exynos4210 | ||
159 | sromc 303 | ||
160 | usb_host 304 | ||
161 | usb_device 305 | ||
162 | pcie 306 | ||
163 | onenand 307 | ||
164 | nfcon 308 | ||
165 | smmu_pcie 309 | ||
166 | gps 310 | ||
167 | smmu_gps 311 | ||
168 | uart0 312 | ||
169 | uart1 313 | ||
170 | uart2 314 | ||
171 | uart3 315 | ||
172 | uart4 316 | ||
173 | i2c0 317 | ||
174 | i2c1 318 | ||
175 | i2c2 319 | ||
176 | i2c3 320 | ||
177 | i2c4 321 | ||
178 | i2c5 322 | ||
179 | i2c6 323 | ||
180 | i2c7 324 | ||
181 | i2c_hdmi 325 | ||
182 | tsadc 326 | ||
183 | spi0 327 | ||
184 | spi1 328 | ||
185 | spi2 329 | ||
186 | i2s1 330 | ||
187 | i2s2 331 | ||
188 | pcm0 332 | ||
189 | i2s0 333 | ||
190 | pcm1 334 | ||
191 | pcm2 335 | ||
192 | pwm 336 | ||
193 | slimbus 337 | ||
194 | spdif 338 | ||
195 | ac97 339 | ||
196 | modemif 340 | ||
197 | chipid 341 | ||
198 | sysreg 342 | ||
199 | hdmi_cec 343 | ||
200 | mct 344 | ||
201 | wdt 345 | ||
202 | rtc 346 | ||
203 | keyif 347 | ||
204 | audss 348 | ||
205 | mipi_hsi 349 Exynos4210 | ||
206 | mdma2 350 Exynos4210 | ||
207 | pixelasyncm0 351 | ||
208 | pixelasyncm1 352 | ||
209 | fimc_lite0 353 Exynos4x12 | ||
210 | fimc_lite1 354 Exynos4x12 | ||
211 | ppmuispx 355 Exynos4x12 | ||
212 | ppmuispmx 356 Exynos4x12 | ||
213 | fimc_isp 357 Exynos4x12 | ||
214 | fimc_drc 358 Exynos4x12 | ||
215 | fimc_fd 359 Exynos4x12 | ||
216 | mcuisp 360 Exynos4x12 | ||
217 | gicisp 361 Exynos4x12 | ||
218 | smmu_isp 362 Exynos4x12 | ||
219 | smmu_drc 363 Exynos4x12 | ||
220 | smmu_fd 364 Exynos4x12 | ||
221 | smmu_lite0 365 Exynos4x12 | ||
222 | smmu_lite1 366 Exynos4x12 | ||
223 | mcuctl_isp 367 Exynos4x12 | ||
224 | mpwm_isp 368 Exynos4x12 | ||
225 | i2c0_isp 369 Exynos4x12 | ||
226 | i2c1_isp 370 Exynos4x12 | ||
227 | mtcadc_isp 371 Exynos4x12 | ||
228 | pwm_isp 372 Exynos4x12 | ||
229 | wdt_isp 373 Exynos4x12 | ||
230 | uart_isp 374 Exynos4x12 | ||
231 | asyncaxim 375 Exynos4x12 | ||
232 | smmu_ispcx 376 Exynos4x12 | ||
233 | spi0_isp 377 Exynos4x12 | ||
234 | spi1_isp 378 Exynos4x12 | ||
235 | pwm_isp_sclk 379 Exynos4x12 | ||
236 | spi0_isp_sclk 380 Exynos4x12 | ||
237 | spi1_isp_sclk 381 Exynos4x12 | ||
238 | uart_isp_sclk 382 Exynos4x12 | ||
239 | tmu_apbif 383 | ||
240 | |||
241 | [Mux Clocks] | ||
242 | |||
243 | Clock ID SoC (if specific) | ||
244 | ----------------------------------------------- | ||
245 | |||
246 | mout_fimc0 384 | ||
247 | mout_fimc1 385 | ||
248 | mout_fimc2 386 | ||
249 | mout_fimc3 387 | ||
250 | mout_cam0 388 | ||
251 | mout_cam1 389 | ||
252 | mout_csis0 390 | ||
253 | mout_csis1 391 | ||
254 | mout_g3d0 392 | ||
255 | mout_g3d1 393 | ||
256 | mout_g3d 394 | ||
257 | aclk400_mcuisp 395 Exynos4x12 | ||
258 | |||
259 | [Div Clocks] | ||
260 | |||
261 | Clock ID SoC (if specific) | ||
262 | ----------------------------------------------- | ||
263 | |||
264 | div_isp0 450 Exynos4x12 | ||
265 | div_isp1 451 Exynos4x12 | ||
266 | div_mcuisp0 452 Exynos4x12 | ||
267 | div_mcuisp1 453 Exynos4x12 | ||
268 | div_aclk200 454 Exynos4x12 | ||
269 | div_aclk400_mcuisp 455 Exynos4x12 | ||
270 | 20 | ||
21 | All available clocks are defined as preprocessor macros in | ||
22 | dt-bindings/clock/exynos4.h header and can be used in device | ||
23 | tree sources. | ||
271 | 24 | ||
272 | Example 1: An example of a clock controller node is listed below. | 25 | Example 1: An example of a clock controller node is listed below. |
273 | 26 | ||
@@ -285,6 +38,6 @@ Example 2: UART controller node that consumes the clock generated by the clock | |||
285 | compatible = "samsung,exynos4210-uart"; | 38 | compatible = "samsung,exynos4210-uart"; |
286 | reg = <0x13820000 0x100>; | 39 | reg = <0x13820000 0x100>; |
287 | interrupts = <0 54 0>; | 40 | interrupts = <0 54 0>; |
288 | clocks = <&clock 314>, <&clock 153>; | 41 | clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>; |
289 | clock-names = "uart", "clk_uart_baud0"; | 42 | clock-names = "uart", "clk_uart_baud0"; |
290 | }; | 43 | }; |
diff --git a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt index 72ce617dea82..536eacd1063f 100644 --- a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt | |||
@@ -13,163 +13,12 @@ Required Properties: | |||
13 | 13 | ||
14 | - #clock-cells: should be 1. | 14 | - #clock-cells: should be 1. |
15 | 15 | ||
16 | The following is the list of clocks generated by the controller. Each clock is | 16 | Each clock is assigned an identifier and client nodes can use this identifier |
17 | assigned an identifier and client nodes use this identifier to specify the | 17 | to specify the clock which they consume. |
18 | clock which they consume. | ||
19 | |||
20 | |||
21 | [Core Clocks] | ||
22 | |||
23 | Clock ID | ||
24 | ---------------------------- | ||
25 | |||
26 | fin_pll 1 | ||
27 | |||
28 | [Clock Gate for Special Clocks] | ||
29 | |||
30 | Clock ID | ||
31 | ---------------------------- | ||
32 | |||
33 | sclk_cam_bayer 128 | ||
34 | sclk_cam0 129 | ||
35 | sclk_cam1 130 | ||
36 | sclk_gscl_wa 131 | ||
37 | sclk_gscl_wb 132 | ||
38 | sclk_fimd1 133 | ||
39 | sclk_mipi1 134 | ||
40 | sclk_dp 135 | ||
41 | sclk_hdmi 136 | ||
42 | sclk_pixel 137 | ||
43 | sclk_audio0 138 | ||
44 | sclk_mmc0 139 | ||
45 | sclk_mmc1 140 | ||
46 | sclk_mmc2 141 | ||
47 | sclk_mmc3 142 | ||
48 | sclk_sata 143 | ||
49 | sclk_usb3 144 | ||
50 | sclk_jpeg 145 | ||
51 | sclk_uart0 146 | ||
52 | sclk_uart1 147 | ||
53 | sclk_uart2 148 | ||
54 | sclk_uart3 149 | ||
55 | sclk_pwm 150 | ||
56 | sclk_audio1 151 | ||
57 | sclk_audio2 152 | ||
58 | sclk_spdif 153 | ||
59 | sclk_spi0 154 | ||
60 | sclk_spi1 155 | ||
61 | sclk_spi2 156 | ||
62 | div_i2s1 157 | ||
63 | div_i2s2 158 | ||
64 | sclk_hdmiphy 159 | ||
65 | div_pcm0 160 | ||
66 | |||
67 | |||
68 | [Peripheral Clock Gates] | ||
69 | |||
70 | Clock ID | ||
71 | ---------------------------- | ||
72 | |||
73 | gscl0 256 | ||
74 | gscl1 257 | ||
75 | gscl2 258 | ||
76 | gscl3 259 | ||
77 | gscl_wa 260 | ||
78 | gscl_wb 261 | ||
79 | smmu_gscl0 262 | ||
80 | smmu_gscl1 263 | ||
81 | smmu_gscl2 264 | ||
82 | smmu_gscl3 265 | ||
83 | mfc 266 | ||
84 | smmu_mfcl 267 | ||
85 | smmu_mfcr 268 | ||
86 | rotator 269 | ||
87 | jpeg 270 | ||
88 | mdma1 271 | ||
89 | smmu_rotator 272 | ||
90 | smmu_jpeg 273 | ||
91 | smmu_mdma1 274 | ||
92 | pdma0 275 | ||
93 | pdma1 276 | ||
94 | sata 277 | ||
95 | usbotg 278 | ||
96 | mipi_hsi 279 | ||
97 | sdmmc0 280 | ||
98 | sdmmc1 281 | ||
99 | sdmmc2 282 | ||
100 | sdmmc3 283 | ||
101 | sromc 284 | ||
102 | usb2 285 | ||
103 | usb3 286 | ||
104 | sata_phyctrl 287 | ||
105 | sata_phyi2c 288 | ||
106 | uart0 289 | ||
107 | uart1 290 | ||
108 | uart2 291 | ||
109 | uart3 292 | ||
110 | uart4 293 | ||
111 | i2c0 294 | ||
112 | i2c1 295 | ||
113 | i2c2 296 | ||
114 | i2c3 297 | ||
115 | i2c4 298 | ||
116 | i2c5 299 | ||
117 | i2c6 300 | ||
118 | i2c7 301 | ||
119 | i2c_hdmi 302 | ||
120 | adc 303 | ||
121 | spi0 304 | ||
122 | spi1 305 | ||
123 | spi2 306 | ||
124 | i2s1 307 | ||
125 | i2s2 308 | ||
126 | pcm1 309 | ||
127 | pcm2 310 | ||
128 | pwm 311 | ||
129 | spdif 312 | ||
130 | ac97 313 | ||
131 | hsi2c0 314 | ||
132 | hsi2c1 315 | ||
133 | hs12c2 316 | ||
134 | hs12c3 317 | ||
135 | chipid 318 | ||
136 | sysreg 319 | ||
137 | pmu 320 | ||
138 | cmu_top 321 | ||
139 | cmu_core 322 | ||
140 | cmu_mem 323 | ||
141 | tzpc0 324 | ||
142 | tzpc1 325 | ||
143 | tzpc2 326 | ||
144 | tzpc3 327 | ||
145 | tzpc4 328 | ||
146 | tzpc5 329 | ||
147 | tzpc6 330 | ||
148 | tzpc7 331 | ||
149 | tzpc8 332 | ||
150 | tzpc9 333 | ||
151 | hdmi_cec 334 | ||
152 | mct 335 | ||
153 | wdt 336 | ||
154 | rtc 337 | ||
155 | tmu 338 | ||
156 | fimd1 339 | ||
157 | mie1 340 | ||
158 | dsim0 341 | ||
159 | dp 342 | ||
160 | mixer 343 | ||
161 | hdmi 344 | ||
162 | g2d 345 | ||
163 | mdma0 346 | ||
164 | smmu_mdma0 347 | ||
165 | |||
166 | |||
167 | [Clock Muxes] | ||
168 | |||
169 | Clock ID | ||
170 | ---------------------------- | ||
171 | mout_hdmi 1024 | ||
172 | 18 | ||
19 | All available clocks are defined as preprocessor macros in | ||
20 | dt-bindings/clock/exynos5250.h header and can be used in device | ||
21 | tree sources. | ||
173 | 22 | ||
174 | Example 1: An example of a clock controller node is listed below. | 23 | Example 1: An example of a clock controller node is listed below. |
175 | 24 | ||
@@ -187,6 +36,6 @@ Example 2: UART controller node that consumes the clock generated by the clock | |||
187 | compatible = "samsung,exynos4210-uart"; | 36 | compatible = "samsung,exynos4210-uart"; |
188 | reg = <0x13820000 0x100>; | 37 | reg = <0x13820000 0x100>; |
189 | interrupts = <0 54 0>; | 38 | interrupts = <0 54 0>; |
190 | clocks = <&clock 314>, <&clock 153>; | 39 | clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>; |
191 | clock-names = "uart", "clk_uart_baud0"; | 40 | clock-names = "uart", "clk_uart_baud0"; |
192 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index 458f34789e5d..ca88c97a8562 100644 --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt | |||
@@ -13,184 +13,12 @@ Required Properties: | |||
13 | 13 | ||
14 | - #clock-cells: should be 1. | 14 | - #clock-cells: should be 1. |
15 | 15 | ||
16 | The following is the list of clocks generated by the controller. Each clock is | 16 | Each clock is assigned an identifier and client nodes can use this identifier |
17 | assigned an identifier and client nodes use this identifier to specify the | 17 | to specify the clock which they consume. |
18 | clock which they consume. | ||
19 | 18 | ||
20 | 19 | All available clocks are defined as preprocessor macros in | |
21 | [Core Clocks] | 20 | dt-bindings/clock/exynos5420.h header and can be used in device |
22 | 21 | tree sources. | |
23 | Clock ID | ||
24 | ---------------------------- | ||
25 | |||
26 | fin_pll 1 | ||
27 | |||
28 | [Clock Gate for Special Clocks] | ||
29 | |||
30 | Clock ID | ||
31 | ---------------------------- | ||
32 | sclk_uart0 128 | ||
33 | sclk_uart1 129 | ||
34 | sclk_uart2 130 | ||
35 | sclk_uart3 131 | ||
36 | sclk_mmc0 132 | ||
37 | sclk_mmc1 133 | ||
38 | sclk_mmc2 134 | ||
39 | sclk_spi0 135 | ||
40 | sclk_spi1 136 | ||
41 | sclk_spi2 137 | ||
42 | sclk_i2s1 138 | ||
43 | sclk_i2s2 139 | ||
44 | sclk_pcm1 140 | ||
45 | sclk_pcm2 141 | ||
46 | sclk_spdif 142 | ||
47 | sclk_hdmi 143 | ||
48 | sclk_pixel 144 | ||
49 | sclk_dp1 145 | ||
50 | sclk_mipi1 146 | ||
51 | sclk_fimd1 147 | ||
52 | sclk_maudio0 148 | ||
53 | sclk_maupcm0 149 | ||
54 | sclk_usbd300 150 | ||
55 | sclk_usbd301 151 | ||
56 | sclk_usbphy300 152 | ||
57 | sclk_usbphy301 153 | ||
58 | sclk_unipro 154 | ||
59 | sclk_pwm 155 | ||
60 | sclk_gscl_wa 156 | ||
61 | sclk_gscl_wb 157 | ||
62 | sclk_hdmiphy 158 | ||
63 | |||
64 | [Peripheral Clock Gates] | ||
65 | |||
66 | Clock ID | ||
67 | ---------------------------- | ||
68 | |||
69 | aclk66_peric 256 | ||
70 | uart0 257 | ||
71 | uart1 258 | ||
72 | uart2 259 | ||
73 | uart3 260 | ||
74 | i2c0 261 | ||
75 | i2c1 262 | ||
76 | i2c2 263 | ||
77 | i2c3 264 | ||
78 | i2c4 265 | ||
79 | i2c5 266 | ||
80 | i2c6 267 | ||
81 | i2c7 268 | ||
82 | i2c_hdmi 269 | ||
83 | tsadc 270 | ||
84 | spi0 271 | ||
85 | spi1 272 | ||
86 | spi2 273 | ||
87 | keyif 274 | ||
88 | i2s1 275 | ||
89 | i2s2 276 | ||
90 | pcm1 277 | ||
91 | pcm2 278 | ||
92 | pwm 279 | ||
93 | spdif 280 | ||
94 | i2c8 281 | ||
95 | i2c9 282 | ||
96 | i2c10 283 | ||
97 | aclk66_psgen 300 | ||
98 | chipid 301 | ||
99 | sysreg 302 | ||
100 | tzpc0 303 | ||
101 | tzpc1 304 | ||
102 | tzpc2 305 | ||
103 | tzpc3 306 | ||
104 | tzpc4 307 | ||
105 | tzpc5 308 | ||
106 | tzpc6 309 | ||
107 | tzpc7 310 | ||
108 | tzpc8 311 | ||
109 | tzpc9 312 | ||
110 | hdmi_cec 313 | ||
111 | seckey 314 | ||
112 | mct 315 | ||
113 | wdt 316 | ||
114 | rtc 317 | ||
115 | tmu 318 | ||
116 | tmu_gpu 319 | ||
117 | pclk66_gpio 330 | ||
118 | aclk200_fsys2 350 | ||
119 | mmc0 351 | ||
120 | mmc1 352 | ||
121 | mmc2 353 | ||
122 | sromc 354 | ||
123 | ufs 355 | ||
124 | aclk200_fsys 360 | ||
125 | tsi 361 | ||
126 | pdma0 362 | ||
127 | pdma1 363 | ||
128 | rtic 364 | ||
129 | usbh20 365 | ||
130 | usbd300 366 | ||
131 | usbd301 377 | ||
132 | aclk400_mscl 380 | ||
133 | mscl0 381 | ||
134 | mscl1 382 | ||
135 | mscl2 383 | ||
136 | smmu_mscl0 384 | ||
137 | smmu_mscl1 385 | ||
138 | smmu_mscl2 386 | ||
139 | aclk333 400 | ||
140 | mfc 401 | ||
141 | smmu_mfcl 402 | ||
142 | smmu_mfcr 403 | ||
143 | aclk200_disp1 410 | ||
144 | dsim1 411 | ||
145 | dp1 412 | ||
146 | hdmi 413 | ||
147 | aclk300_disp1 420 | ||
148 | fimd1 421 | ||
149 | smmu_fimd1 422 | ||
150 | aclk166 430 | ||
151 | mixer 431 | ||
152 | aclk266 440 | ||
153 | rotator 441 | ||
154 | mdma1 442 | ||
155 | smmu_rotator 443 | ||
156 | smmu_mdma1 444 | ||
157 | aclk300_jpeg 450 | ||
158 | jpeg 451 | ||
159 | jpeg2 452 | ||
160 | smmu_jpeg 453 | ||
161 | aclk300_gscl 460 | ||
162 | smmu_gscl0 461 | ||
163 | smmu_gscl1 462 | ||
164 | gscl_wa 463 | ||
165 | gscl_wb 464 | ||
166 | gscl0 465 | ||
167 | gscl1 466 | ||
168 | clk_3aa 467 | ||
169 | aclk266_g2d 470 | ||
170 | sss 471 | ||
171 | slim_sss 472 | ||
172 | mdma0 473 | ||
173 | aclk333_g2d 480 | ||
174 | g2d 481 | ||
175 | aclk333_432_gscl 490 | ||
176 | smmu_3aa 491 | ||
177 | smmu_fimcl0 492 | ||
178 | smmu_fimcl1 493 | ||
179 | smmu_fimcl3 494 | ||
180 | fimc_lite3 495 | ||
181 | aclk_g3d 500 | ||
182 | g3d 501 | ||
183 | smmu_mixer 502 | ||
184 | |||
185 | Mux ID | ||
186 | ---------------------------- | ||
187 | |||
188 | mout_hdmi 640 | ||
189 | |||
190 | Divider ID | ||
191 | ---------------------------- | ||
192 | |||
193 | dout_pixel 768 | ||
194 | 22 | ||
195 | Example 1: An example of a clock controller node is listed below. | 23 | Example 1: An example of a clock controller node is listed below. |
196 | 24 | ||
@@ -208,6 +36,6 @@ Example 2: UART controller node that consumes the clock generated by the clock | |||
208 | compatible = "samsung,exynos4210-uart"; | 36 | compatible = "samsung,exynos4210-uart"; |
209 | reg = <0x13820000 0x100>; | 37 | reg = <0x13820000 0x100>; |
210 | interrupts = <0 54 0>; | 38 | interrupts = <0 54 0>; |
211 | clocks = <&clock 259>, <&clock 130>; | 39 | clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>; |
212 | clock-names = "uart", "clk_uart_baud0"; | 40 | clock-names = "uart", "clk_uart_baud0"; |
213 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt index 9955dc9c7d96..5f7005f73058 100644 --- a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt | |||
@@ -12,45 +12,12 @@ Required Properties: | |||
12 | 12 | ||
13 | - #clock-cells: should be 1. | 13 | - #clock-cells: should be 1. |
14 | 14 | ||
15 | The following is the list of clocks generated by the controller. Each clock is | 15 | Each clock is assigned an identifier and client nodes can use this identifier |
16 | assigned an identifier and client nodes use this identifier to specify the | 16 | to specify the clock which they consume. |
17 | clock which they consume. | 17 | |
18 | 18 | All available clocks are defined as preprocessor macros in | |
19 | 19 | dt-bindings/clock/exynos5440.h header and can be used in device | |
20 | [Core Clocks] | 20 | tree sources. |
21 | |||
22 | Clock ID | ||
23 | ---------------------------- | ||
24 | |||
25 | xtal 1 | ||
26 | arm_clk 2 | ||
27 | |||
28 | [Peripheral Clock Gates] | ||
29 | |||
30 | Clock ID | ||
31 | ---------------------------- | ||
32 | |||
33 | spi_baud 16 | ||
34 | pb0_250 17 | ||
35 | pr0_250 18 | ||
36 | pr1_250 19 | ||
37 | b_250 20 | ||
38 | b_125 21 | ||
39 | b_200 22 | ||
40 | sata 23 | ||
41 | usb 24 | ||
42 | gmac0 25 | ||
43 | cs250 26 | ||
44 | pb0_250_o 27 | ||
45 | pr0_250_o 28 | ||
46 | pr1_250_o 29 | ||
47 | b_250_o 30 | ||
48 | b_125_o 31 | ||
49 | b_200_o 32 | ||
50 | sata_o 33 | ||
51 | usb_o 34 | ||
52 | gmac0_o 35 | ||
53 | cs250_o 36 | ||
54 | 21 | ||
55 | Example: An example of a clock controller node is listed below. | 22 | Example: An example of a clock controller node is listed below. |
56 | 23 | ||
diff --git a/Documentation/devicetree/bindings/clock/hi3620-clock.txt b/Documentation/devicetree/bindings/clock/hi3620-clock.txt index 4b71ab41be53..dad6269f52c5 100644 --- a/Documentation/devicetree/bindings/clock/hi3620-clock.txt +++ b/Documentation/devicetree/bindings/clock/hi3620-clock.txt | |||
@@ -7,6 +7,7 @@ Required Properties: | |||
7 | 7 | ||
8 | - compatible: should be one of the following. | 8 | - compatible: should be one of the following. |
9 | - "hisilicon,hi3620-clock" - controller compatible with Hi3620 SoC. | 9 | - "hisilicon,hi3620-clock" - controller compatible with Hi3620 SoC. |
10 | - "hisilicon,hi3620-mmc-clock" - controller specific for Hi3620 mmc. | ||
10 | 11 | ||
11 | - reg: physical base address of the controller and length of memory mapped | 12 | - reg: physical base address of the controller and length of memory mapped |
12 | region. | 13 | region. |
diff --git a/Documentation/devicetree/bindings/clock/moxa,moxart-clock.txt b/Documentation/devicetree/bindings/clock/moxa,moxart-clock.txt new file mode 100644 index 000000000000..fedea84314a1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/moxa,moxart-clock.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Device Tree Clock bindings for arch-moxart | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | MOXA ART SoCs allow to determine PLL output and APB frequencies | ||
8 | by reading registers holding multiplier and divisor information. | ||
9 | |||
10 | |||
11 | PLL: | ||
12 | |||
13 | Required properties: | ||
14 | - compatible : Must be "moxa,moxart-pll-clock" | ||
15 | - #clock-cells : Should be 0 | ||
16 | - reg : Should contain registers location and length | ||
17 | - clocks : Should contain phandle + clock-specifier for the parent clock | ||
18 | |||
19 | Optional properties: | ||
20 | - clock-output-names : Should contain clock name | ||
21 | |||
22 | |||
23 | APB: | ||
24 | |||
25 | Required properties: | ||
26 | - compatible : Must be "moxa,moxart-apb-clock" | ||
27 | - #clock-cells : Should be 0 | ||
28 | - reg : Should contain registers location and length | ||
29 | - clocks : Should contain phandle + clock-specifier for the parent clock | ||
30 | |||
31 | Optional properties: | ||
32 | - clock-output-names : Should contain clock name | ||
33 | |||
34 | |||
35 | For example: | ||
36 | |||
37 | clk_pll: clk_pll@98100000 { | ||
38 | compatible = "moxa,moxart-pll-clock"; | ||
39 | #clock-cells = <0>; | ||
40 | reg = <0x98100000 0x34>; | ||
41 | }; | ||
42 | |||
43 | clk_apb: clk_apb@98100000 { | ||
44 | compatible = "moxa,moxart-apb-clock"; | ||
45 | #clock-cells = <0>; | ||
46 | reg = <0x98100000 0x34>; | ||
47 | clocks = <&clk_pll>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt index 1e662948661e..307a503c5db8 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt | |||
@@ -11,6 +11,18 @@ The following is a list of provided IDs and clock names on Armada 370/XP: | |||
11 | 3 = hclk (DRAM control clock) | 11 | 3 = hclk (DRAM control clock) |
12 | 4 = dramclk (DDR clock) | 12 | 4 = dramclk (DDR clock) |
13 | 13 | ||
14 | The following is a list of provided IDs and clock names on Armada 375: | ||
15 | 0 = tclk (Internal Bus clock) | ||
16 | 1 = cpuclk (CPU clock) | ||
17 | 2 = l2clk (L2 Cache clock) | ||
18 | 3 = ddrclk (DDR clock) | ||
19 | |||
20 | The following is a list of provided IDs and clock names on Armada 380/385: | ||
21 | 0 = tclk (Internal Bus clock) | ||
22 | 1 = cpuclk (CPU clock) | ||
23 | 2 = l2clk (L2 Cache clock) | ||
24 | 3 = ddrclk (DDR clock) | ||
25 | |||
14 | The following is a list of provided IDs and clock names on Kirkwood and Dove: | 26 | The following is a list of provided IDs and clock names on Kirkwood and Dove: |
15 | 0 = tclk (Internal Bus clock) | 27 | 0 = tclk (Internal Bus clock) |
16 | 1 = cpuclk (CPU0 clock) | 28 | 1 = cpuclk (CPU0 clock) |
@@ -20,6 +32,8 @@ The following is a list of provided IDs and clock names on Kirkwood and Dove: | |||
20 | Required properties: | 32 | Required properties: |
21 | - compatible : shall be one of the following: | 33 | - compatible : shall be one of the following: |
22 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks | 34 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks |
35 | "marvell,armada-375-core-clock" - For Armada 375 SoC core clocks | ||
36 | "marvell,armada-380-core-clock" - For Armada 380/385 SoC core clocks | ||
23 | "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks | 37 | "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks |
24 | "marvell,dove-core-clock" - for Dove SoC core clocks | 38 | "marvell,dove-core-clock" - for Dove SoC core clocks |
25 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) | 39 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) |
diff --git a/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt index c62391fc0e39..520562a7dc2a 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt | |||
@@ -4,7 +4,10 @@ The following is a list of provided IDs and clock names on Armada 370/XP: | |||
4 | 0 = nand (NAND clock) | 4 | 0 = nand (NAND clock) |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : must be "marvell,armada-370-corediv-clock" | 7 | - compatible : must be "marvell,armada-370-corediv-clock", |
8 | "marvell,armada-375-corediv-clock", | ||
9 | "marvell,armada-380-corediv-clock", | ||
10 | |||
8 | - reg : must be the register address of Core Divider control register | 11 | - reg : must be the register address of Core Divider control register |
9 | - #clock-cells : from common clock binding; shall be set to 1 | 12 | - #clock-cells : from common clock binding; shall be set to 1 |
10 | - clocks : must be set to the parent's phandle | 13 | - clocks : must be set to the parent's phandle |
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt index fc2910fa7e45..76477be742b2 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | |||
@@ -1,9 +1,10 @@ | |||
1 | * Gated Clock bindings for Marvell EBU SoCs | 1 | * Gated Clock bindings for Marvell EBU SoCs |
2 | 2 | ||
3 | Marvell Armada 370/XP, Dove and Kirkwood allow some peripheral clocks to be | 3 | Marvell Armada 370/375/380/385/XP, Dove and Kirkwood allow some |
4 | gated to save some power. The clock consumer should specify the desired clock | 4 | peripheral clocks to be gated to save some power. The clock consumer |
5 | by having the clock ID in its "clocks" phandle cell. The clock ID is directly | 5 | should specify the desired clock by having the clock ID in its |
6 | mapped to the corresponding clock gating control bit in HW to ease manual clock | 6 | "clocks" phandle cell. The clock ID is directly mapped to the |
7 | corresponding clock gating control bit in HW to ease manual clock | ||
7 | lookup in datasheet. | 8 | lookup in datasheet. |
8 | 9 | ||
9 | The following is a list of provided IDs for Armada 370: | 10 | The following is a list of provided IDs for Armada 370: |
@@ -22,6 +23,60 @@ ID Clock Peripheral | |||
22 | 28 ddr DDR Cntrl | 23 | 28 ddr DDR Cntrl |
23 | 30 sata1 SATA Host 0 | 24 | 30 sata1 SATA Host 0 |
24 | 25 | ||
26 | The following is a list of provided IDs for Armada 375: | ||
27 | ID Clock Peripheral | ||
28 | ----------------------------------- | ||
29 | 2 mu Management Unit | ||
30 | 3 pp Packet Processor | ||
31 | 4 ptp PTP | ||
32 | 5 pex0 PCIe 0 Clock out | ||
33 | 6 pex1 PCIe 1 Clock out | ||
34 | 8 audio Audio Cntrl | ||
35 | 11 nd_clk Nand Flash Cntrl | ||
36 | 14 sata0_link SATA 0 Link | ||
37 | 15 sata0_core SATA 0 Core | ||
38 | 16 usb3 USB3 Host | ||
39 | 17 sdio SDHCI Host | ||
40 | 18 usb USB Host | ||
41 | 19 gop Gigabit Ethernet MAC | ||
42 | 20 sata1_link SATA 1 Link | ||
43 | 21 sata1_core SATA 1 Core | ||
44 | 22 xor0 XOR DMA 0 | ||
45 | 23 xor1 XOR DMA 0 | ||
46 | 24 copro Coprocessor | ||
47 | 25 tdm Time Division Mplx | ||
48 | 28 crypto0_enc Cryptographic Unit Port 0 Encryption | ||
49 | 29 crypto0_core Cryptographic Unit Port 0 Core | ||
50 | 30 crypto1_enc Cryptographic Unit Port 1 Encryption | ||
51 | 31 crypto1_core Cryptographic Unit Port 1 Core | ||
52 | |||
53 | The following is a list of provided IDs for Armada 380/385: | ||
54 | ID Clock Peripheral | ||
55 | ----------------------------------- | ||
56 | 0 audio Audio | ||
57 | 2 ge2 Gigabit Ethernet 2 | ||
58 | 3 ge1 Gigabit Ethernet 1 | ||
59 | 4 ge0 Gigabit Ethernet 0 | ||
60 | 5 pex1 PCIe 1 | ||
61 | 6 pex2 PCIe 2 | ||
62 | 7 pex3 PCIe 3 | ||
63 | 8 pex0 PCIe 0 | ||
64 | 9 usb3h0 USB3 Host 0 | ||
65 | 10 usb3h1 USB3 Host 1 | ||
66 | 11 usb3d USB3 Device | ||
67 | 13 bm Buffer Management | ||
68 | 14 crypto0z Cryptographic 0 Z | ||
69 | 15 sata0 SATA 0 | ||
70 | 16 crypto1z Cryptographic 1 Z | ||
71 | 17 sdio SDIO | ||
72 | 18 usb2 USB 2 | ||
73 | 21 crypto1 Cryptographic 1 | ||
74 | 22 xor0 XOR 0 | ||
75 | 23 crypto0 Cryptographic 0 | ||
76 | 25 tdm Time Division Multiplexing | ||
77 | 28 xor1 XOR 1 | ||
78 | 30 sata1 SATA 1 | ||
79 | |||
25 | The following is a list of provided IDs for Armada XP: | 80 | The following is a list of provided IDs for Armada XP: |
26 | ID Clock Peripheral | 81 | ID Clock Peripheral |
27 | ----------------------------------- | 82 | ----------------------------------- |
@@ -95,6 +150,8 @@ ID Clock Peripheral | |||
95 | Required properties: | 150 | Required properties: |
96 | - compatible : shall be one of the following: | 151 | - compatible : shall be one of the following: |
97 | "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating | 152 | "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating |
153 | "marvell,armada-375-gating-clock" - for Armada 375 SoC clock gating | ||
154 | "marvell,armada-380-gating-clock" - for Armada 380/385 SoC clock gating | ||
98 | "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating | 155 | "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating |
99 | "marvell,dove-gating-clock" - for Dove SoC clock gating | 156 | "marvell,dove-gating-clock" - for Dove SoC clock gating |
100 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating | 157 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating |
diff --git a/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt new file mode 100644 index 000000000000..98a257492522 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Renesas RZ Clock Pulse Generator (CPG) | ||
2 | |||
3 | The CPG generates core clocks for the RZ SoCs. It includes the PLL, variable | ||
4 | CPU and GPU clocks, and several fixed ratio dividers. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Must be one of | ||
9 | - "renesas,r7s72100-cpg-clocks" for the r7s72100 CPG | ||
10 | - "renesas,rz-cpg-clocks" for the generic RZ CPG | ||
11 | - reg: Base address and length of the memory resource used by the CPG | ||
12 | - clocks: References to possible parent clocks. Order must match clock modes | ||
13 | in the datasheet. For the r7s72100, this is extal, usb_x1. | ||
14 | - #clock-cells: Must be 1 | ||
15 | - clock-output-names: The names of the clocks. Supported clocks are "pll", | ||
16 | "i", and "g" | ||
17 | |||
18 | |||
19 | Example | ||
20 | ------- | ||
21 | |||
22 | cpg_clocks: cpg_clocks@fcfe0000 { | ||
23 | #clock-cells = <1>; | ||
24 | compatible = "renesas,r7s72100-cpg-clocks", | ||
25 | "renesas,rz-cpg-clocks"; | ||
26 | reg = <0xfcfe0000 0x18>; | ||
27 | clocks = <&extal_clk>, <&usb_x1_clk>; | ||
28 | clock-output-names = "pll", "i", "g"; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt new file mode 100644 index 000000000000..ae56315fcec5 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Binding for a ST divider and multiplexer clock driver. | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | Base address is located to the parent node. See clock binding[2] | ||
5 | |||
6 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
7 | [2] Documentation/devicetree/bindings/clock/st/st,clkgen.txt | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible : shall be: | ||
12 | "st,clkgena-divmux-c65-hs", "st,clkgena-divmux" | ||
13 | "st,clkgena-divmux-c65-ls", "st,clkgena-divmux" | ||
14 | "st,clkgena-divmux-c32-odf0", "st,clkgena-divmux" | ||
15 | "st,clkgena-divmux-c32-odf1", "st,clkgena-divmux" | ||
16 | "st,clkgena-divmux-c32-odf2", "st,clkgena-divmux" | ||
17 | "st,clkgena-divmux-c32-odf3", "st,clkgena-divmux" | ||
18 | |||
19 | - #clock-cells : From common clock binding; shall be set to 1. | ||
20 | |||
21 | - clocks : From common clock binding | ||
22 | |||
23 | - clock-output-names : From common clock binding. | ||
24 | |||
25 | Example: | ||
26 | |||
27 | clockgenA@fd345000 { | ||
28 | reg = <0xfd345000 0xb50>; | ||
29 | |||
30 | CLK_M_A1_DIV1: CLK_M_A1_DIV1 { | ||
31 | #clock-cells = <1>; | ||
32 | compatible = "st,clkgena-divmux-c32-odf1", | ||
33 | "st,clkgena-divmux"; | ||
34 | |||
35 | clocks = <&CLK_M_A1_OSC_PREDIV>, | ||
36 | <&CLK_M_A1_PLL0 1>, /* PLL0 PHI1 */ | ||
37 | <&CLK_M_A1_PLL1 1>; /* PLL1 PHI1 */ | ||
38 | |||
39 | clock-output-names = "CLK_M_RX_ICN_TS", | ||
40 | "CLK_M_RX_ICN_VDP_0", | ||
41 | "", /* Unused */ | ||
42 | "CLK_M_PRV_T1_BUS", | ||
43 | "CLK_M_ICN_REG_12", | ||
44 | "CLK_M_ICN_REG_10", | ||
45 | "", /* Unused */ | ||
46 | "CLK_M_ICN_ST231"; | ||
47 | }; | ||
48 | }; | ||
49 | |||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt new file mode 100644 index 000000000000..943e0808e212 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | Binding for a ST multiplexed clock driver. | ||
2 | |||
3 | This binding supports only simple indexed multiplexers, it does not | ||
4 | support table based parent index to hardware value translations. | ||
5 | |||
6 | This binding uses the common clock binding[1]. | ||
7 | |||
8 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
9 | |||
10 | Required properties: | ||
11 | |||
12 | - compatible : shall be: | ||
13 | "st,stih416-clkgenc-vcc-hd", "st,clkgen-mux" | ||
14 | "st,stih416-clkgenf-vcc-fvdp", "st,clkgen-mux" | ||
15 | "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux" | ||
16 | "st,stih416-clkgenf-vcc-hd", "st,clkgen-mux" | ||
17 | "st,stih416-clkgenf-vcc-sd", "st,clkgen-mux" | ||
18 | "st,stih415-clkgen-a9-mux", "st,clkgen-mux" | ||
19 | "st,stih416-clkgen-a9-mux", "st,clkgen-mux" | ||
20 | |||
21 | |||
22 | - #clock-cells : from common clock binding; shall be set to 0. | ||
23 | |||
24 | - reg : A Base address and length of the register set. | ||
25 | |||
26 | - clocks : from common clock binding | ||
27 | |||
28 | Example: | ||
29 | |||
30 | CLK_M_HVA: CLK_M_HVA { | ||
31 | #clock-cells = <0>; | ||
32 | compatible = "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux"; | ||
33 | reg = <0xfd690868 4>; | ||
34 | |||
35 | clocks = <&CLOCKGEN_F 1>, <&CLK_M_A1_DIV0 3>; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt new file mode 100644 index 000000000000..81eb3855ab92 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Binding for a ST pll clock driver. | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | Base address is located to the parent node. See clock binding[2] | ||
5 | |||
6 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
7 | [2] Documentation/devicetree/bindings/clock/st/st,clkgen.txt | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible : shall be: | ||
12 | "st,clkgena-prediv-c65", "st,clkgena-prediv" | ||
13 | "st,clkgena-prediv-c32", "st,clkgena-prediv" | ||
14 | |||
15 | "st,clkgena-plls-c65" | ||
16 | "st,plls-c32-a1x-0", "st,clkgen-plls-c32" | ||
17 | "st,plls-c32-a1x-1", "st,clkgen-plls-c32" | ||
18 | "st,stih415-plls-c32-a9", "st,clkgen-plls-c32" | ||
19 | "st,stih415-plls-c32-ddr", "st,clkgen-plls-c32" | ||
20 | "st,stih416-plls-c32-a9", "st,clkgen-plls-c32" | ||
21 | "st,stih416-plls-c32-ddr", "st,clkgen-plls-c32" | ||
22 | |||
23 | "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32" | ||
24 | "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32" | ||
25 | |||
26 | |||
27 | - #clock-cells : From common clock binding; shall be set to 1. | ||
28 | |||
29 | - clocks : From common clock binding | ||
30 | |||
31 | - clock-output-names : From common clock binding. | ||
32 | |||
33 | Example: | ||
34 | |||
35 | clockgenA@fee62000 { | ||
36 | reg = <0xfee62000 0xb48>; | ||
37 | |||
38 | CLK_S_A0_PLL: CLK_S_A0_PLL { | ||
39 | #clock-cells = <1>; | ||
40 | compatible = "st,clkgena-plls-c65"; | ||
41 | |||
42 | clocks = <&CLK_SYSIN>; | ||
43 | |||
44 | clock-output-names = "CLK_S_A0_PLL0_HS", | ||
45 | "CLK_S_A0_PLL0_LS", | ||
46 | "CLK_S_A0_PLL1"; | ||
47 | }; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt new file mode 100644 index 000000000000..566c9d79ed32 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | Binding for a ST pre-divider clock driver. | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | Base address is located to the parent node. See clock binding[2] | ||
5 | |||
6 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
7 | [2] Documentation/devicetree/bindings/clock/st/st,clkgen.txt | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible : shall be: | ||
12 | "st,clkgena-prediv-c65", "st,clkgena-prediv" | ||
13 | "st,clkgena-prediv-c32", "st,clkgena-prediv" | ||
14 | |||
15 | - #clock-cells : From common clock binding; shall be set to 0. | ||
16 | |||
17 | - clocks : From common clock binding | ||
18 | |||
19 | - clock-output-names : From common clock binding. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | clockgenA@fd345000 { | ||
24 | reg = <0xfd345000 0xb50>; | ||
25 | |||
26 | CLK_M_A2_OSC_PREDIV: CLK_M_A2_OSC_PREDIV { | ||
27 | #clock-cells = <0>; | ||
28 | compatible = "st,clkgena-prediv-c32", | ||
29 | "st,clkgena-prediv"; | ||
30 | |||
31 | clocks = <&CLK_SYSIN>; | ||
32 | |||
33 | clock-output-names = "CLK_M_A2_OSC_PREDIV"; | ||
34 | }; | ||
35 | }; | ||
36 | |||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt new file mode 100644 index 000000000000..4e3ff28b04c3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | Binding for a type of STMicroelectronics clock crossbar (VCC). | ||
2 | |||
3 | The crossbar can take up to 4 input clocks and control up to 16 | ||
4 | output clocks. Not all inputs or outputs have to be in use in a | ||
5 | particular instantiation. Each output can be individually enabled, | ||
6 | select any of the input clocks and apply a divide (by 1,2,4 or 8) to | ||
7 | that selected clock. | ||
8 | |||
9 | This binding uses the common clock binding[1]. | ||
10 | |||
11 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
12 | |||
13 | Required properties: | ||
14 | |||
15 | - compatible : shall be: | ||
16 | "st,stih416-clkgenc", "st,vcc" | ||
17 | "st,stih416-clkgenf", "st,vcc" | ||
18 | |||
19 | - #clock-cells : from common clock binding; shall be set to 1. | ||
20 | |||
21 | - reg : A Base address and length of the register set. | ||
22 | |||
23 | - clocks : from common clock binding | ||
24 | |||
25 | - clock-output-names : From common clock binding. The block has 16 | ||
26 | clock outputs but not all of them in a specific instance | ||
27 | have to be used in the SoC. If a clock name is left as | ||
28 | an empty string then no clock will be created for the | ||
29 | output associated with that string index. If fewer than | ||
30 | 16 strings are provided then no clocks will be created | ||
31 | for the remaining outputs. | ||
32 | |||
33 | Example: | ||
34 | |||
35 | CLOCKGEN_C_VCC: CLOCKGEN_C_VCC { | ||
36 | #clock-cells = <1>; | ||
37 | compatible = "st,stih416-clkgenc", "st,clkgen-vcc"; | ||
38 | reg = <0xfe8308ac 12>; | ||
39 | |||
40 | clocks = <&CLK_S_VCC_HD>, <&CLOCKGEN_C 1>, | ||
41 | <&CLK_S_TMDS_FROMPHY>, <&CLOCKGEN_C 2>; | ||
42 | |||
43 | clock-output-names = | ||
44 | "CLK_S_PIX_HDMI", "CLK_S_PIX_DVO", | ||
45 | "CLK_S_OUT_DVO", "CLK_S_PIX_HD", | ||
46 | "CLK_S_HDDAC", "CLK_S_DENC", | ||
47 | "CLK_S_SDDAC", "CLK_S_PIX_MAIN", | ||
48 | "CLK_S_PIX_AUX", "CLK_S_STFE_FRC_0", | ||
49 | "CLK_S_REF_MCRU", "CLK_S_SLAVE_MCRU", | ||
50 | "CLK_S_TMDS_HDMI", "CLK_S_HDMI_REJECT_PLL", | ||
51 | "CLK_S_THSENS"; | ||
52 | }; | ||
53 | |||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt new file mode 100644 index 000000000000..49ec5ae18b5b --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt | |||
@@ -0,0 +1,83 @@ | |||
1 | Binding for a Clockgen hardware block found on | ||
2 | certain STMicroelectronics consumer electronics SoC devices. | ||
3 | |||
4 | A Clockgen node can contain pll, diviser or multiplexer nodes. | ||
5 | |||
6 | We will find only the base address of the Clockgen, this base | ||
7 | address is common of all subnode. | ||
8 | |||
9 | clockgen_node { | ||
10 | reg = <>; | ||
11 | |||
12 | pll_node { | ||
13 | ... | ||
14 | }; | ||
15 | |||
16 | prediv_node { | ||
17 | ... | ||
18 | }; | ||
19 | |||
20 | divmux_node { | ||
21 | ... | ||
22 | }; | ||
23 | |||
24 | quadfs_node { | ||
25 | ... | ||
26 | }; | ||
27 | ... | ||
28 | }; | ||
29 | |||
30 | This binding uses the common clock binding[1]. | ||
31 | Each subnode should use the binding discribe in [2]..[4] | ||
32 | |||
33 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
34 | [2] Documentation/devicetree/bindings/clock/st,quadfs.txt | ||
35 | [3] Documentation/devicetree/bindings/clock/st,quadfs.txt | ||
36 | [4] Documentation/devicetree/bindings/clock/st,quadfs.txt | ||
37 | |||
38 | Required properties: | ||
39 | - reg : A Base address and length of the register set. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | clockgenA@fee62000 { | ||
44 | |||
45 | reg = <0xfee62000 0xb48>; | ||
46 | |||
47 | CLK_S_A0_PLL: CLK_S_A0_PLL { | ||
48 | #clock-cells = <1>; | ||
49 | compatible = "st,clkgena-plls-c65"; | ||
50 | |||
51 | clocks = <&CLK_SYSIN>; | ||
52 | |||
53 | clock-output-names = "CLK_S_A0_PLL0_HS", | ||
54 | "CLK_S_A0_PLL0_LS", | ||
55 | "CLK_S_A0_PLL1"; | ||
56 | }; | ||
57 | |||
58 | CLK_S_A0_OSC_PREDIV: CLK_S_A0_OSC_PREDIV { | ||
59 | #clock-cells = <0>; | ||
60 | compatible = "st,clkgena-prediv-c65", | ||
61 | "st,clkgena-prediv"; | ||
62 | |||
63 | clocks = <&CLK_SYSIN>; | ||
64 | |||
65 | clock-output-names = "CLK_S_A0_OSC_PREDIV"; | ||
66 | }; | ||
67 | |||
68 | CLK_S_A0_HS: CLK_S_A0_HS { | ||
69 | #clock-cells = <1>; | ||
70 | compatible = "st,clkgena-divmux-c65-hs", | ||
71 | "st,clkgena-divmux"; | ||
72 | |||
73 | clocks = <&CLK_S_A0_OSC_PREDIV>, | ||
74 | <&CLK_S_A0_PLL 0>, /* PLL0 HS */ | ||
75 | <&CLK_S_A0_PLL 2>; /* PLL1 */ | ||
76 | |||
77 | clock-output-names = "CLK_S_FDMA_0", | ||
78 | "CLK_S_FDMA_1", | ||
79 | ""; /* CLK_S_JIT_SENSE */ | ||
80 | /* Fourth output unused */ | ||
81 | }; | ||
82 | }; | ||
83 | |||
diff --git a/Documentation/devicetree/bindings/clock/st/st,quadfs.txt b/Documentation/devicetree/bindings/clock/st/st,quadfs.txt new file mode 100644 index 000000000000..ec86d62ca283 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st/st,quadfs.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | Binding for a type of quad channel digital frequency synthesizer found on | ||
2 | certain STMicroelectronics consumer electronics SoC devices. | ||
3 | |||
4 | This version contains a programmable PLL which can generate up to 216, 432 | ||
5 | or 660MHz (from a 30MHz oscillator input) as the input to the digital | ||
6 | synthesizers. | ||
7 | |||
8 | This binding uses the common clock binding[1]. | ||
9 | |||
10 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
11 | |||
12 | Required properties: | ||
13 | - compatible : shall be: | ||
14 | "st,stih416-quadfs216", "st,quadfs" | ||
15 | "st,stih416-quadfs432", "st,quadfs" | ||
16 | "st,stih416-quadfs660-E", "st,quadfs" | ||
17 | "st,stih416-quadfs660-F", "st,quadfs" | ||
18 | |||
19 | - #clock-cells : from common clock binding; shall be set to 1. | ||
20 | |||
21 | - reg : A Base address and length of the register set. | ||
22 | |||
23 | - clocks : from common clock binding | ||
24 | |||
25 | - clock-output-names : From common clock binding. The block has 4 | ||
26 | clock outputs but not all of them in a specific instance | ||
27 | have to be used in the SoC. If a clock name is left as | ||
28 | an empty string then no clock will be created for the | ||
29 | output associated with that string index. If fewer than | ||
30 | 4 strings are provided then no clocks will be created | ||
31 | for the remaining outputs. | ||
32 | |||
33 | Example: | ||
34 | |||
35 | CLOCKGEN_E: CLOCKGEN_E { | ||
36 | #clock-cells = <1>; | ||
37 | compatible = "st,stih416-quadfs660-E", "st,quadfs"; | ||
38 | reg = <0xfd3208bc 0xB0>; | ||
39 | |||
40 | clocks = <&CLK_SYSIN>; | ||
41 | clock-output-names = "CLK_M_PIX_MDTP_0", | ||
42 | "CLK_M_PIX_MDTP_1", | ||
43 | "CLK_M_PIX_MDTP_2", | ||
44 | "CLK_M_MPELPC"; | ||
45 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index c2cb7621ad2d..a5160d8cbb5f 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -6,37 +6,41 @@ This binding uses the common clock binding[1]. | |||
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | - compatible : shall be one of the following: | 8 | - compatible : shall be one of the following: |
9 | "allwinner,sun4i-osc-clk" - for a gatable oscillator | 9 | "allwinner,sun4i-a10-osc-clk" - for a gatable oscillator |
10 | "allwinner,sun4i-pll1-clk" - for the main PLL clock and PLL4 | 10 | "allwinner,sun4i-a10-pll1-clk" - for the main PLL clock and PLL4 |
11 | "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31 | 11 | "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31 |
12 | "allwinner,sun4i-pll5-clk" - for the PLL5 clock | 12 | "allwinner,sun4i-a10-pll5-clk" - for the PLL5 clock |
13 | "allwinner,sun4i-pll6-clk" - for the PLL6 clock | 13 | "allwinner,sun4i-a10-pll6-clk" - for the PLL6 clock |
14 | "allwinner,sun4i-cpu-clk" - for the CPU multiplexer clock | 14 | "allwinner,sun6i-a31-pll6-clk" - for the PLL6 clock on A31 |
15 | "allwinner,sun4i-axi-clk" - for the AXI clock | 15 | "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock |
16 | "allwinner,sun4i-axi-gates-clk" - for the AXI gates | 16 | "allwinner,sun4i-a10-axi-clk" - for the AXI clock |
17 | "allwinner,sun4i-ahb-clk" - for the AHB clock | 17 | "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates |
18 | "allwinner,sun4i-ahb-gates-clk" - for the AHB gates on A10 | 18 | "allwinner,sun4i-a10-ahb-clk" - for the AHB clock |
19 | "allwinner,sun4i-a10-ahb-gates-clk" - for the AHB gates on A10 | ||
19 | "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 | 20 | "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 |
20 | "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s | 21 | "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s |
21 | "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20 | 22 | "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20 |
22 | "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 | 23 | "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 |
23 | "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 | 24 | "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 |
24 | "allwinner,sun4i-apb0-clk" - for the APB0 clock | 25 | "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock |
25 | "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates on A10 | 26 | "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 |
26 | "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 | 27 | "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 |
27 | "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s | 28 | "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s |
28 | "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 | 29 | "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 |
29 | "allwinner,sun4i-apb1-clk" - for the APB1 clock | 30 | "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock |
30 | "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing | 31 | "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing |
31 | "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates on A10 | 32 | "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 |
32 | "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 | 33 | "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 |
33 | "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s | 34 | "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s |
34 | "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31 | 35 | "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31 |
35 | "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20 | 36 | "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20 |
36 | "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31 | 37 | "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31 |
37 | "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 | 38 | "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 |
38 | "allwinner,sun4i-mod0-clk" - for the module 0 family of clocks | 39 | "allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks |
39 | "allwinner,sun7i-a20-out-clk" - for the external output clocks | 40 | "allwinner,sun7i-a20-out-clk" - for the external output clocks |
41 | "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31 | ||
42 | "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 | ||
43 | "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 | ||
40 | 44 | ||
41 | Required properties for all clocks: | 45 | Required properties for all clocks: |
42 | - reg : shall be the control register address for the clock. | 46 | - reg : shall be the control register address for the clock. |
@@ -44,10 +48,17 @@ Required properties for all clocks: | |||
44 | multiplexed clocks, the list order must match the hardware | 48 | multiplexed clocks, the list order must match the hardware |
45 | programming order. | 49 | programming order. |
46 | - #clock-cells : from common clock binding; shall be set to 0 except for | 50 | - #clock-cells : from common clock binding; shall be set to 0 except for |
47 | "allwinner,*-gates-clk" where it shall be set to 1 | 51 | "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk" and |
52 | "allwinner,sun4i-pll6-clk" where it shall be set to 1 | ||
53 | - clock-output-names : shall be the corresponding names of the outputs. | ||
54 | If the clock module only has one output, the name shall be the | ||
55 | module name. | ||
48 | 56 | ||
49 | Additionally, "allwinner,*-gates-clk" clocks require: | 57 | And "allwinner,*-usb-clk" clocks also require: |
50 | - clock-output-names : the corresponding gate names that the clock controls | 58 | - reset-cells : shall be set to 1 |
59 | |||
60 | For "allwinner,sun7i-a20-gmac-clk", the parent clocks shall be fixed rate | ||
61 | dummy clocks at 25 MHz and 125 MHz, respectively. See example. | ||
51 | 62 | ||
52 | Clock consumers should specify the desired clocks they use with a | 63 | Clock consumers should specify the desired clocks they use with a |
53 | "clocks" phandle cell. Consumers that are using a gated clock should | 64 | "clocks" phandle cell. Consumers that are using a gated clock should |
@@ -56,23 +67,68 @@ offset of the bit controlling this particular gate in the register. | |||
56 | 67 | ||
57 | For example: | 68 | For example: |
58 | 69 | ||
59 | osc24M: osc24M@01c20050 { | 70 | osc24M: clk@01c20050 { |
60 | #clock-cells = <0>; | 71 | #clock-cells = <0>; |
61 | compatible = "allwinner,sun4i-osc-clk"; | 72 | compatible = "allwinner,sun4i-a10-osc-clk"; |
62 | reg = <0x01c20050 0x4>; | 73 | reg = <0x01c20050 0x4>; |
63 | clocks = <&osc24M_fixed>; | 74 | clocks = <&osc24M_fixed>; |
75 | clock-output-names = "osc24M"; | ||
64 | }; | 76 | }; |
65 | 77 | ||
66 | pll1: pll1@01c20000 { | 78 | pll1: clk@01c20000 { |
67 | #clock-cells = <0>; | 79 | #clock-cells = <0>; |
68 | compatible = "allwinner,sun4i-pll1-clk"; | 80 | compatible = "allwinner,sun4i-a10-pll1-clk"; |
69 | reg = <0x01c20000 0x4>; | 81 | reg = <0x01c20000 0x4>; |
70 | clocks = <&osc24M>; | 82 | clocks = <&osc24M>; |
83 | clock-output-names = "pll1"; | ||
84 | }; | ||
85 | |||
86 | pll5: clk@01c20020 { | ||
87 | #clock-cells = <1>; | ||
88 | compatible = "allwinner,sun4i-pll5-clk"; | ||
89 | reg = <0x01c20020 0x4>; | ||
90 | clocks = <&osc24M>; | ||
91 | clock-output-names = "pll5_ddr", "pll5_other"; | ||
71 | }; | 92 | }; |
72 | 93 | ||
73 | cpu: cpu@01c20054 { | 94 | cpu: cpu@01c20054 { |
74 | #clock-cells = <0>; | 95 | #clock-cells = <0>; |
75 | compatible = "allwinner,sun4i-cpu-clk"; | 96 | compatible = "allwinner,sun4i-a10-cpu-clk"; |
76 | reg = <0x01c20054 0x4>; | 97 | reg = <0x01c20054 0x4>; |
77 | clocks = <&osc32k>, <&osc24M>, <&pll1>; | 98 | clocks = <&osc32k>, <&osc24M>, <&pll1>; |
99 | clock-output-names = "cpu"; | ||
100 | }; | ||
101 | |||
102 | mmc0_clk: clk@01c20088 { | ||
103 | #clock-cells = <0>; | ||
104 | compatible = "allwinner,sun4i-mod0-clk"; | ||
105 | reg = <0x01c20088 0x4>; | ||
106 | clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; | ||
107 | clock-output-names = "mmc0"; | ||
108 | }; | ||
109 | |||
110 | mii_phy_tx_clk: clk@2 { | ||
111 | #clock-cells = <0>; | ||
112 | compatible = "fixed-clock"; | ||
113 | clock-frequency = <25000000>; | ||
114 | clock-output-names = "mii_phy_tx"; | ||
115 | }; | ||
116 | |||
117 | gmac_int_tx_clk: clk@3 { | ||
118 | #clock-cells = <0>; | ||
119 | compatible = "fixed-clock"; | ||
120 | clock-frequency = <125000000>; | ||
121 | clock-output-names = "gmac_int_tx"; | ||
122 | }; | ||
123 | |||
124 | gmac_clk: clk@01c20164 { | ||
125 | #clock-cells = <0>; | ||
126 | compatible = "allwinner,sun7i-a20-gmac-clk"; | ||
127 | reg = <0x01c20164 0x4>; | ||
128 | /* | ||
129 | * The first clock must be fixed at 25MHz; | ||
130 | * the second clock must be fixed at 125MHz | ||
131 | */ | ||
132 | clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; | ||
133 | clock-output-names = "gmac"; | ||
78 | }; | 134 | }; |
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt index 17b4a94916d6..d93746cf2975 100644 --- a/Documentation/devicetree/bindings/clock/zynq-7000.txt +++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt | |||
@@ -14,6 +14,7 @@ for all clock consumers of PS clocks. | |||
14 | Required properties: | 14 | Required properties: |
15 | - #clock-cells : Must be 1 | 15 | - #clock-cells : Must be 1 |
16 | - compatible : "xlnx,ps7-clkc" | 16 | - compatible : "xlnx,ps7-clkc" |
17 | - reg : SLCR offset and size taken via syscon < 0x100 0x100 > | ||
17 | - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ | 18 | - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ |
18 | (usually 33 MHz oscillators are used for Zynq platforms) | 19 | (usually 33 MHz oscillators are used for Zynq platforms) |
19 | - clock-output-names : List of strings used to name the clock outputs. Shall be | 20 | - clock-output-names : List of strings used to name the clock outputs. Shall be |
@@ -87,10 +88,11 @@ Clock outputs: | |||
87 | 47: dbg_apb | 88 | 47: dbg_apb |
88 | 89 | ||
89 | Example: | 90 | Example: |
90 | clkc: clkc { | 91 | clkc: clkc@100 { |
91 | #clock-cells = <1>; | 92 | #clock-cells = <1>; |
92 | compatible = "xlnx,ps7-clkc"; | 93 | compatible = "xlnx,ps7-clkc"; |
93 | ps-clk-frequency = <33333333>; | 94 | ps-clk-frequency = <33333333>; |
95 | reg = <0x100 0x100>; | ||
94 | clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", | 96 | clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", |
95 | "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", | 97 | "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", |
96 | "dci", "lqspi", "smc", "pcap", "gem0", "gem1", | 98 | "dci", "lqspi", "smc", "pcap", "gem0", "gem1", |
diff --git a/Documentation/devicetree/bindings/gpio/cirrus,clps711x-mctrl-gpio.txt b/Documentation/devicetree/bindings/gpio/cirrus,clps711x-mctrl-gpio.txt new file mode 100644 index 000000000000..94ae9f82dcf8 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/cirrus,clps711x-mctrl-gpio.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * ARM Cirrus Logic CLPS711X SYSFLG1 MCTRL GPIOs | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should contain "cirrus,clps711x-mctrl-gpio". | ||
5 | - gpio-controller: Marks the device node as a gpio controller. | ||
6 | - #gpio-cells: Should be two. The first cell is the pin number and | ||
7 | the second cell is used to specify the gpio polarity: | ||
8 | 0 = Active high, | ||
9 | 1 = Active low. | ||
10 | |||
11 | Example: | ||
12 | sysgpio: sysgpio { | ||
13 | compatible = "cirrus,ep7312-mctrl-gpio", | ||
14 | "cirrus,clps711x-mctrl-gpio"; | ||
15 | gpio-controller; | ||
16 | #gpio-cells = <2>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt index a2e839d6e338..5079ba7d6568 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt | |||
@@ -1,13 +1,17 @@ | |||
1 | Davinci GPIO controller bindings | 1 | Davinci/Keystone GPIO controller bindings |
2 | 2 | ||
3 | Required Properties: | 3 | Required Properties: |
4 | - compatible: should be "ti,dm6441-gpio" | 4 | - compatible: should be "ti,dm6441-gpio", "ti,keystone-gpio" |
5 | 5 | ||
6 | - reg: Physical base address of the controller and the size of memory mapped | 6 | - reg: Physical base address of the controller and the size of memory mapped |
7 | registers. | 7 | registers. |
8 | 8 | ||
9 | - gpio-controller : Marks the device node as a gpio controller. | 9 | - gpio-controller : Marks the device node as a gpio controller. |
10 | 10 | ||
11 | - #gpio-cells : Should be two. | ||
12 | - first cell is the pin number | ||
13 | - second cell is used to specify optional parameters (unused) | ||
14 | |||
11 | - interrupt-parent: phandle of the parent interrupt controller. | 15 | - interrupt-parent: phandle of the parent interrupt controller. |
12 | 16 | ||
13 | - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are | 17 | - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are |
@@ -27,6 +31,7 @@ Example: | |||
27 | gpio: gpio@1e26000 { | 31 | gpio: gpio@1e26000 { |
28 | compatible = "ti,dm6441-gpio"; | 32 | compatible = "ti,dm6441-gpio"; |
29 | gpio-controller; | 33 | gpio-controller; |
34 | #gpio-cells = <2>; | ||
30 | reg = <0x226000 0x1000>; | 35 | reg = <0x226000 0x1000>; |
31 | interrupt-parent = <&intc>; | 36 | interrupt-parent = <&intc>; |
32 | interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH | 37 | interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH |
@@ -39,3 +44,19 @@ gpio: gpio@1e26000 { | |||
39 | interrupt-controller; | 44 | interrupt-controller; |
40 | #interrupt-cells = <2>; | 45 | #interrupt-cells = <2>; |
41 | }; | 46 | }; |
47 | |||
48 | leds { | ||
49 | compatible = "gpio-leds"; | ||
50 | |||
51 | led1 { | ||
52 | label = "davinci:green:usr1"; | ||
53 | gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
54 | ... | ||
55 | }; | ||
56 | |||
57 | led2 { | ||
58 | label = "davinci:red:debug1"; | ||
59 | gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; | ||
60 | ... | ||
61 | }; | ||
62 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zevio.txt b/Documentation/devicetree/bindings/gpio/gpio-zevio.txt new file mode 100644 index 000000000000..a37bd9ae2730 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-zevio.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Zevio GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "lsi,zevio-gpio" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - #gpio-cells: Should be two. The first cell is the pin number and the | ||
7 | second cell is used to specify optional parameters (currently unused). | ||
8 | - gpio-controller: Marks the device node as a GPIO controller. | ||
9 | |||
10 | Example: | ||
11 | gpio: gpio@90000000 { | ||
12 | compatible = "lsi,zevio-gpio"; | ||
13 | reg = <0x90000000 0x1000>; | ||
14 | gpio-controller; | ||
15 | #gpio-cells = <2>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index 0c85bb6e3a80..3fb8f53071b8 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt | |||
@@ -13,11 +13,11 @@ properties, each containing a 'gpio-list': | |||
13 | gpio-specifier : Array of #gpio-cells specifying specific gpio | 13 | gpio-specifier : Array of #gpio-cells specifying specific gpio |
14 | (controller specific) | 14 | (controller specific) |
15 | 15 | ||
16 | GPIO properties should be named "[<name>-]gpios". Exact | 16 | GPIO properties should be named "[<name>-]gpios". The exact |
17 | meaning of each gpios property must be documented in the device tree | 17 | meaning of each gpios property must be documented in the device tree |
18 | binding for each device. | 18 | binding for each device. |
19 | 19 | ||
20 | For example, the following could be used to describe gpios pins to use | 20 | For example, the following could be used to describe GPIO pins used |
21 | as chip select lines; with chip selects 0, 1 and 3 populated, and chip | 21 | as chip select lines; with chip selects 0, 1 and 3 populated, and chip |
22 | select 2 left empty: | 22 | select 2 left empty: |
23 | 23 | ||
@@ -44,35 +44,79 @@ whether pin is open-drain and whether pin is logically inverted. | |||
44 | Exact meaning of each specifier cell is controller specific, and must | 44 | Exact meaning of each specifier cell is controller specific, and must |
45 | be documented in the device tree binding for the device. | 45 | be documented in the device tree binding for the device. |
46 | 46 | ||
47 | Example of the node using GPIOs: | 47 | Example of a node using GPIOs: |
48 | 48 | ||
49 | node { | 49 | node { |
50 | gpios = <&qe_pio_e 18 0>; | 50 | gpios = <&qe_pio_e 18 0>; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | In this example gpio-specifier is "18 0" and encodes GPIO pin number, | 53 | In this example gpio-specifier is "18 0" and encodes GPIO pin number, |
54 | and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller. | 54 | and GPIO flags as accepted by the "qe_pio_e" gpio-controller. |
55 | |||
56 | 1.1) GPIO specifier best practices | ||
57 | ---------------------------------- | ||
58 | |||
59 | A gpio-specifier should contain a flag indicating the GPIO polarity; active- | ||
60 | high or active-low. If it does, the follow best practices should be followed: | ||
61 | |||
62 | The gpio-specifier's polarity flag should represent the physical level at the | ||
63 | GPIO controller that achieves (or represents, for inputs) a logically asserted | ||
64 | value at the device. The exact definition of logically asserted should be | ||
65 | defined by the binding for the device. If the board inverts the signal between | ||
66 | the GPIO controller and the device, then the gpio-specifier will represent the | ||
67 | opposite physical level than the signal at the device's pin. | ||
68 | |||
69 | When the device's signal polarity is configurable, the binding for the | ||
70 | device must either: | ||
71 | |||
72 | a) Define a single static polarity for the signal, with the expectation that | ||
73 | any software using that binding would statically program the device to use | ||
74 | that signal polarity. | ||
75 | |||
76 | The static choice of polarity may be either: | ||
77 | |||
78 | a1) (Preferred) Dictated by a binding-specific DT property. | ||
79 | |||
80 | or: | ||
81 | |||
82 | a2) Defined statically by the DT binding itself. | ||
83 | |||
84 | In particular, the polarity cannot be derived from the gpio-specifier, since | ||
85 | that would prevent the DT from separately representing the two orthogonal | ||
86 | concepts of configurable signal polarity in the device, and possible board- | ||
87 | level signal inversion. | ||
88 | |||
89 | or: | ||
90 | |||
91 | b) Pick a single option for device signal polarity, and document this choice | ||
92 | in the binding. The gpio-specifier should represent the polarity of the signal | ||
93 | (at the GPIO controller) assuming that the device is configured for this | ||
94 | particular signal polarity choice. If software chooses to program the device | ||
95 | to generate or receive a signal of the opposite polarity, software will be | ||
96 | responsible for correctly interpreting (inverting) the GPIO signal at the GPIO | ||
97 | controller. | ||
55 | 98 | ||
56 | 2) gpio-controller nodes | 99 | 2) gpio-controller nodes |
57 | ------------------------ | 100 | ------------------------ |
58 | 101 | ||
59 | Every GPIO controller node must both an empty "gpio-controller" | 102 | Every GPIO controller node must contain both an empty "gpio-controller" |
60 | property, and have #gpio-cells contain the size of the gpio-specifier. | 103 | property, and a #gpio-cells integer property, which indicates the number of |
104 | cells in a gpio-specifier. | ||
61 | 105 | ||
62 | Example of two SOC GPIO banks defined as gpio-controller nodes: | 106 | Example of two SOC GPIO banks defined as gpio-controller nodes: |
63 | 107 | ||
64 | qe_pio_a: gpio-controller@1400 { | 108 | qe_pio_a: gpio-controller@1400 { |
65 | #gpio-cells = <2>; | ||
66 | compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank"; | 109 | compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank"; |
67 | reg = <0x1400 0x18>; | 110 | reg = <0x1400 0x18>; |
68 | gpio-controller; | 111 | gpio-controller; |
112 | #gpio-cells = <2>; | ||
69 | }; | 113 | }; |
70 | 114 | ||
71 | qe_pio_e: gpio-controller@1460 { | 115 | qe_pio_e: gpio-controller@1460 { |
72 | #gpio-cells = <2>; | ||
73 | compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; | 116 | compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; |
74 | reg = <0x1460 0x18>; | 117 | reg = <0x1460 0x18>; |
75 | gpio-controller; | 118 | gpio-controller; |
119 | #gpio-cells = <2>; | ||
76 | }; | 120 | }; |
77 | 121 | ||
78 | 2.1) gpio- and pin-controller interaction | 122 | 2.1) gpio- and pin-controller interaction |
diff --git a/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt b/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt new file mode 100644 index 000000000000..dd5d2c0394b1 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | * Synopsys DesignWare APB GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should contain "snps,dw-apb-gpio" | ||
5 | - reg : Address and length of the register set for the device. | ||
6 | - #address-cells : should be 1 (for addressing port subnodes). | ||
7 | - #size-cells : should be 0 (port subnodes). | ||
8 | |||
9 | The GPIO controller has a configurable number of ports, each of which are | ||
10 | represented as child nodes with the following properties: | ||
11 | |||
12 | Required properties: | ||
13 | - compatible : "snps,dw-apb-gpio-port" | ||
14 | - gpio-controller : Marks the device node as a gpio controller. | ||
15 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
16 | the second cell is used to specify the gpio polarity: | ||
17 | 0 = active high | ||
18 | 1 = active low | ||
19 | - reg : The integer port index of the port, a single cell. | ||
20 | |||
21 | Optional properties: | ||
22 | - interrupt-controller : The first port may be configured to be an interrupt | ||
23 | controller. | ||
24 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
25 | interrupt. Shall be set to 2. The first cell defines the interrupt number, | ||
26 | the second encodes the triger flags encoded as described in | ||
27 | Documentation/devicetree/bindings/interrupts.txt | ||
28 | - interrupt-parent : The parent interrupt controller. | ||
29 | - interrupts : The interrupt to the parent controller raised when GPIOs | ||
30 | generate the interrupts. | ||
31 | - snps,nr-gpios : The number of pins in the port, a single cell. | ||
32 | |||
33 | Example: | ||
34 | |||
35 | gpio: gpio@20000 { | ||
36 | compatible = "snps,dw-apb-gpio"; | ||
37 | reg = <0x20000 0x1000>; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <0>; | ||
40 | |||
41 | porta: gpio-controller@0 { | ||
42 | compatible = "snps,dw-apb-gpio-port"; | ||
43 | gpio-controller; | ||
44 | #gpio-cells = <2>; | ||
45 | snps,nr-gpios = <8>; | ||
46 | reg = <0>; | ||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <2>; | ||
49 | interrupt-parent = <&vic1>; | ||
50 | interrupts = <0>; | ||
51 | }; | ||
52 | |||
53 | portb: gpio-controller@1 { | ||
54 | compatible = "snps,dw-apb-gpio-port"; | ||
55 | gpio-controller; | ||
56 | #gpio-cells = <2>; | ||
57 | snps,nr-gpios = <8>; | ||
58 | reg = <1>; | ||
59 | }; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/graph.txt b/Documentation/devicetree/bindings/graph.txt new file mode 100644 index 000000000000..1a69c078adf2 --- /dev/null +++ b/Documentation/devicetree/bindings/graph.txt | |||
@@ -0,0 +1,129 @@ | |||
1 | Common bindings for device graphs | ||
2 | |||
3 | General concept | ||
4 | --------------- | ||
5 | |||
6 | The hierarchical organisation of the device tree is well suited to describe | ||
7 | control flow to devices, but there can be more complex connections between | ||
8 | devices that work together to form a logical compound device, following an | ||
9 | arbitrarily complex graph. | ||
10 | There already is a simple directed graph between devices tree nodes using | ||
11 | phandle properties pointing to other nodes to describe connections that | ||
12 | can not be inferred from device tree parent-child relationships. The device | ||
13 | tree graph bindings described herein abstract more complex devices that can | ||
14 | have multiple specifiable ports, each of which can be linked to one or more | ||
15 | ports of other devices. | ||
16 | |||
17 | These common bindings do not contain any information about the direction or | ||
18 | type of the connections, they just map their existence. Specific properties | ||
19 | may be described by specialized bindings depending on the type of connection. | ||
20 | |||
21 | To see how this binding applies to video pipelines, for example, see | ||
22 | Documentation/device-tree/bindings/media/video-interfaces.txt. | ||
23 | Here the ports describe data interfaces, and the links between them are | ||
24 | the connecting data buses. A single port with multiple connections can | ||
25 | correspond to multiple devices being connected to the same physical bus. | ||
26 | |||
27 | Organisation of ports and endpoints | ||
28 | ----------------------------------- | ||
29 | |||
30 | Ports are described by child 'port' nodes contained in the device node. | ||
31 | Each port node contains an 'endpoint' subnode for each remote device port | ||
32 | connected to this port. If a single port is connected to more than one | ||
33 | remote device, an 'endpoint' child node must be provided for each link. | ||
34 | If more than one port is present in a device node or there is more than one | ||
35 | endpoint at a port, or a port node needs to be associated with a selected | ||
36 | hardware interface, a common scheme using '#address-cells', '#size-cells' | ||
37 | and 'reg' properties is used number the nodes. | ||
38 | |||
39 | device { | ||
40 | ... | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <0>; | ||
43 | |||
44 | port@0 { | ||
45 | #address-cells = <1>; | ||
46 | #size-cells = <0>; | ||
47 | reg = <0>; | ||
48 | |||
49 | endpoint@0 { | ||
50 | reg = <0>; | ||
51 | ... | ||
52 | }; | ||
53 | endpoint@1 { | ||
54 | reg = <1>; | ||
55 | ... | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | port@1 { | ||
60 | reg = <1>; | ||
61 | |||
62 | endpoint { ... }; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | All 'port' nodes can be grouped under an optional 'ports' node, which | ||
67 | allows to specify #address-cells, #size-cells properties for the 'port' | ||
68 | nodes independently from any other child device nodes a device might | ||
69 | have. | ||
70 | |||
71 | device { | ||
72 | ... | ||
73 | ports { | ||
74 | #address-cells = <1>; | ||
75 | #size-cells = <0>; | ||
76 | |||
77 | port@0 { | ||
78 | ... | ||
79 | endpoint@0 { ... }; | ||
80 | endpoint@1 { ... }; | ||
81 | }; | ||
82 | |||
83 | port@1 { ... }; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | Links between endpoints | ||
88 | ----------------------- | ||
89 | |||
90 | Each endpoint should contain a 'remote-endpoint' phandle property that points | ||
91 | to the corresponding endpoint in the port of the remote device. In turn, the | ||
92 | remote endpoint should contain a 'remote-endpoint' property. If it has one, | ||
93 | it must not point to another than the local endpoint. Two endpoints with their | ||
94 | 'remote-endpoint' phandles pointing at each other form a link between the | ||
95 | containing ports. | ||
96 | |||
97 | device-1 { | ||
98 | port { | ||
99 | device_1_output: endpoint { | ||
100 | remote-endpoint = <&device_2_input>; | ||
101 | }; | ||
102 | }; | ||
103 | }; | ||
104 | |||
105 | device-2 { | ||
106 | port { | ||
107 | device_2_input: endpoint { | ||
108 | remote-endpoint = <&device_1_output>; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
112 | |||
113 | |||
114 | Required properties | ||
115 | ------------------- | ||
116 | |||
117 | If there is more than one 'port' or more than one 'endpoint' node or 'reg' | ||
118 | property is present in port and/or endpoint nodes the following properties | ||
119 | are required in a relevant parent node: | ||
120 | |||
121 | - #address-cells : number of cells required to define port/endpoint | ||
122 | identifier, should be 1. | ||
123 | - #size-cells : should be zero. | ||
124 | |||
125 | Optional endpoint properties | ||
126 | ---------------------------- | ||
127 | |||
128 | - remote-endpoint: phandle to an 'endpoint' subnode of a remote device node. | ||
129 | |||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index 1a1ac2e560e9..71724d026ffa 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -18,6 +18,7 @@ atmel,24c02 i2c serial eeprom (24cxx) | |||
18 | atmel,at97sc3204t i2c trusted platform module (TPM) | 18 | atmel,at97sc3204t i2c trusted platform module (TPM) |
19 | capella,cm32181 CM32181: Ambient Light Sensor | 19 | capella,cm32181 CM32181: Ambient Light Sensor |
20 | catalyst,24c32 i2c serial eeprom | 20 | catalyst,24c32 i2c serial eeprom |
21 | cirrus,cs42l51 Cirrus Logic CS42L51 audio codec | ||
21 | dallas,ds1307 64 x 8, Serial, I2C Real-Time Clock | 22 | dallas,ds1307 64 x 8, Serial, I2C Real-Time Clock |
22 | dallas,ds1338 I2C RTC with 56-Byte NV RAM | 23 | dallas,ds1338 I2C RTC with 56-Byte NV RAM |
23 | dallas,ds1339 I2C Serial Real-Time Clock | 24 | dallas,ds1339 I2C Serial Real-Time Clock |
@@ -58,6 +59,7 @@ plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch | |||
58 | ramtron,24c64 i2c serial eeprom (24cxx) | 59 | ramtron,24c64 i2c serial eeprom (24cxx) |
59 | ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 60 | ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
60 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) | 61 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) |
62 | sii,s35390a 2-wire CMOS real-time clock | ||
61 | st-micro,24c256 i2c serial eeprom (24cxx) | 63 | st-micro,24c256 i2c serial eeprom (24cxx) |
62 | stm,m41t00 Serial Access TIMEKEEPER | 64 | stm,m41t00 Serial Access TIMEKEEPER |
63 | stm,m41t62 Serial real-time clock (RTC) with alarm | 65 | stm,m41t62 Serial real-time clock (RTC) with alarm |
diff --git a/Documentation/devicetree/bindings/arm/atmel-adc.txt b/Documentation/devicetree/bindings/iio/adc/at91_adc.txt index d1061469f63d..0f813dec5e08 100644 --- a/Documentation/devicetree/bindings/arm/atmel-adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/at91_adc.txt | |||
@@ -5,32 +5,35 @@ Required properties: | |||
5 | <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5" | 5 | <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5" |
6 | - reg: Should contain ADC registers location and length | 6 | - reg: Should contain ADC registers location and length |
7 | - interrupts: Should contain the IRQ line for the ADC | 7 | - interrupts: Should contain the IRQ line for the ADC |
8 | - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this | 8 | - clock-names: tuple listing input clock names. |
9 | Required elements: "adc_clk", "adc_op_clk". | ||
10 | - clocks: phandles to input clocks. | ||
11 | - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this | ||
9 | device | 12 | device |
10 | - atmel,adc-startup-time: Startup Time of the ADC in microseconds as | 13 | - atmel,adc-startup-time: Startup Time of the ADC in microseconds as |
11 | defined in the datasheet | 14 | defined in the datasheet |
12 | - atmel,adc-vref: Reference voltage in millivolts for the conversions | 15 | - atmel,adc-vref: Reference voltage in millivolts for the conversions |
13 | - atmel,adc-res: List of resolution in bits supported by the ADC. List size | 16 | - atmel,adc-res: List of resolutions in bits supported by the ADC. List size |
14 | must be two at least. | 17 | must be two at least. |
15 | - atmel,adc-res-names: Contains one identifier string for each resolution | 18 | - atmel,adc-res-names: Contains one identifier string for each resolution |
16 | in atmel,adc-res property. "lowres" and "highres" | 19 | in atmel,adc-res property. "lowres" and "highres" |
17 | identifiers are required. | 20 | identifiers are required. |
18 | 21 | ||
19 | Optional properties: | 22 | Optional properties: |
20 | - atmel,adc-use-external: Boolean to enable of external triggers | 23 | - atmel,adc-use-external-triggers: Boolean to enable the external triggers |
21 | - atmel,adc-use-res: String corresponding to an identifier from | 24 | - atmel,adc-use-res: String corresponding to an identifier from |
22 | atmel,adc-res-names property. If not specified, the highest | 25 | atmel,adc-res-names property. If not specified, the highest |
23 | resolution will be used. | 26 | resolution will be used. |
24 | - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion | 27 | - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion |
25 | - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds | 28 | - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds |
26 | - atmel,adc-ts-wires: Number of touch screen wires. Should be 4 or 5. If this | 29 | - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this |
27 | value is set, then adc driver will enable touch screen | 30 | value is set, then the adc driver will enable touchscreen |
28 | support. | 31 | support. |
29 | NOTE: when adc touch screen enabled, the adc hardware trigger will be | 32 | NOTE: when adc touchscreen is enabled, the adc hardware trigger will be |
30 | disabled. Since touch screen will occupied the trigger register. | 33 | disabled. Since touchscreen will occupy the trigger register. |
31 | - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It | 34 | - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It |
32 | make touch detect more precision. | 35 | makes touch detection more precise. |
33 | 36 | ||
34 | Optional trigger Nodes: | 37 | Optional trigger Nodes: |
35 | - Required properties: | 38 | - Required properties: |
36 | * trigger-name: Name of the trigger exposed to the user | 39 | * trigger-name: Name of the trigger exposed to the user |
@@ -41,40 +44,43 @@ Optional trigger Nodes: | |||
41 | 44 | ||
42 | Examples: | 45 | Examples: |
43 | adc0: adc@fffb0000 { | 46 | adc0: adc@fffb0000 { |
47 | #address-cells = <1>; | ||
48 | #size-cells = <0>; | ||
44 | compatible = "atmel,at91sam9260-adc"; | 49 | compatible = "atmel,at91sam9260-adc"; |
45 | reg = <0xfffb0000 0x100>; | 50 | reg = <0xfffb0000 0x100>; |
46 | interrupts = <20 4>; | 51 | interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; |
47 | atmel,adc-channel-base = <0x30>; | 52 | clocks = <&adc_clk>, <&adc_op_clk>; |
53 | clock-names = "adc_clk", "adc_op_clk"; | ||
48 | atmel,adc-channels-used = <0xff>; | 54 | atmel,adc-channels-used = <0xff>; |
49 | atmel,adc-drdy-mask = <0x10000>; | ||
50 | atmel,adc-num-channels = <8>; | ||
51 | atmel,adc-startup-time = <40>; | 55 | atmel,adc-startup-time = <40>; |
52 | atmel,adc-status-register = <0x1c>; | 56 | atmel,adc-use-external-triggers; |
53 | atmel,adc-trigger-register = <0x08>; | ||
54 | atmel,adc-use-external; | ||
55 | atmel,adc-vref = <3300>; | 57 | atmel,adc-vref = <3300>; |
56 | atmel,adc-res = <8 10>; | 58 | atmel,adc-res = <8 10>; |
57 | atmel,adc-res-names = "lowres", "highres"; | 59 | atmel,adc-res-names = "lowres", "highres"; |
58 | atmel,adc-use-res = "lowres"; | 60 | atmel,adc-use-res = "lowres"; |
59 | 61 | ||
60 | trigger@0 { | 62 | trigger@0 { |
63 | reg = <0>; | ||
61 | trigger-name = "external-rising"; | 64 | trigger-name = "external-rising"; |
62 | trigger-value = <0x1>; | 65 | trigger-value = <0x1>; |
63 | trigger-external; | 66 | trigger-external; |
64 | }; | 67 | }; |
65 | trigger@1 { | 68 | trigger@1 { |
69 | reg = <1>; | ||
66 | trigger-name = "external-falling"; | 70 | trigger-name = "external-falling"; |
67 | trigger-value = <0x2>; | 71 | trigger-value = <0x2>; |
68 | trigger-external; | 72 | trigger-external; |
69 | }; | 73 | }; |
70 | 74 | ||
71 | trigger@2 { | 75 | trigger@2 { |
76 | reg = <2>; | ||
72 | trigger-name = "external-any"; | 77 | trigger-name = "external-any"; |
73 | trigger-value = <0x3>; | 78 | trigger-value = <0x3>; |
74 | trigger-external; | 79 | trigger-external; |
75 | }; | 80 | }; |
76 | 81 | ||
77 | trigger@3 { | 82 | trigger@3 { |
83 | reg = <3>; | ||
78 | trigger-name = "continuous"; | 84 | trigger-name = "continuous"; |
79 | trigger-value = <0x6>; | 85 | trigger-value = <0x6>; |
80 | }; | 86 | }; |
diff --git a/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt b/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt new file mode 100644 index 000000000000..6bdd21404b57 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * TWL4030 Monitoring Analog to Digital Converter (MADC) | ||
2 | |||
3 | The MADC subsystem in the TWL4030 consists of a 10-bit ADC | ||
4 | combined with a 16-input analog multiplexer. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should contain "ti,twl4030-madc". | ||
8 | - interrupts: IRQ line for the MADC submodule. | ||
9 | - #io-channel-cells: Should be set to <1>. | ||
10 | |||
11 | Optional properties: | ||
12 | - ti,system-uses-second-madc-irq: boolean, set if the second madc irq register | ||
13 | should be used, which is intended to be used | ||
14 | by Co-Processors (e.g. a modem). | ||
15 | |||
16 | Example: | ||
17 | |||
18 | &twl { | ||
19 | madc { | ||
20 | compatible = "ti,twl4030-madc"; | ||
21 | interrupts = <3>; | ||
22 | #io-channel-cells = <1>; | ||
23 | }; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt new file mode 100644 index 000000000000..dcebff1928e1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Freescale vf610 Analog to Digital Converter bindings | ||
2 | |||
3 | The devicetree bindings are for the new ADC driver written for | ||
4 | vf610/i.MX6slx and upward SoCs from Freescale. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should contain "fsl,vf610-adc" | ||
8 | - reg: Offset and length of the register set for the device | ||
9 | - interrupts: Should contain the interrupt for the device | ||
10 | - clocks: The clock is needed by the ADC controller, ADC clock source is ipg clock. | ||
11 | - clock-names: Must contain "adc", matching entry in the clocks property. | ||
12 | - vref-supply: The regulator supply ADC refrence voltage. | ||
13 | |||
14 | Example: | ||
15 | adc0: adc@4003b000 { | ||
16 | compatible = "fsl,vf610-adc"; | ||
17 | reg = <0x4003b000 0x1000>; | ||
18 | interrupts = <0 53 0x04>; | ||
19 | clocks = <&clks VF610_CLK_ADC0>; | ||
20 | clock-names = "adc"; | ||
21 | vref-supply = <®_vcc_3v3_mcu>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt new file mode 100644 index 000000000000..d9ee909d2b78 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt | |||
@@ -0,0 +1,113 @@ | |||
1 | Xilinx XADC device driver | ||
2 | |||
3 | This binding document describes the bindings for both of them since the | ||
4 | bindings are very similar. The Xilinx XADC is a ADC that can be found in the | ||
5 | series 7 FPGAs from Xilinx. The XADC has a DRP interface for communication. | ||
6 | Currently two different frontends for the DRP interface exist. One that is only | ||
7 | available on the ZYNQ family as a hardmacro in the SoC portion of the ZYNQ. The | ||
8 | other one is available on all series 7 platforms and is a softmacro with a AXI | ||
9 | interface. This binding document describes the bindings for both of them since | ||
10 | the bindings are very similar. | ||
11 | |||
12 | Required properties: | ||
13 | - compatible: Should be one of | ||
14 | * "xlnx,zynq-xadc-1.00.a": When using the ZYNQ device | ||
15 | configuration interface to interface to the XADC hardmacro. | ||
16 | * "xlnx,axi-xadc-1.00.a": When using the axi-xadc pcore to | ||
17 | interface to the XADC hardmacro. | ||
18 | - reg: Address and length of the register set for the device | ||
19 | - interrupts: Interrupt for the XADC control interface. | ||
20 | - clocks: When using the ZYNQ this must be the ZYNQ PCAP clock, | ||
21 | when using the AXI-XADC pcore this must be the clock that provides the | ||
22 | clock to the AXI bus interface of the core. | ||
23 | |||
24 | Optional properties: | ||
25 | - interrupt-parent: phandle to the parent interrupt controller | ||
26 | - xlnx,external-mux: | ||
27 | * "none": No external multiplexer is used, this is the default | ||
28 | if the property is omitted. | ||
29 | * "single": External multiplexer mode is used with one | ||
30 | multiplexer. | ||
31 | * "dual": External multiplexer mode is used with two | ||
32 | multiplexers for simultaneous sampling. | ||
33 | - xlnx,external-mux-channel: Configures which pair of pins is used to | ||
34 | sample data in external mux mode. | ||
35 | Valid values for single external multiplexer mode are: | ||
36 | 0: VP/VN | ||
37 | 1: VAUXP[0]/VAUXN[0] | ||
38 | 2: VAUXP[1]/VAUXN[1] | ||
39 | ... | ||
40 | 16: VAUXP[15]/VAUXN[15] | ||
41 | Valid values for dual external multiplexer mode are: | ||
42 | 1: VAUXP[0]/VAUXN[0] - VAUXP[8]/VAUXN[8] | ||
43 | 2: VAUXP[1]/VAUXN[1] - VAUXP[9]/VAUXN[9] | ||
44 | ... | ||
45 | 8: VAUXP[7]/VAUXN[7] - VAUXP[15]/VAUXN[15] | ||
46 | |||
47 | This property needs to be present if the device is configured for | ||
48 | external multiplexer mode (either single or dual). If the device is | ||
49 | not using external multiplexer mode the property is ignored. | ||
50 | - xnlx,channels: List of external channels that are connected to the ADC | ||
51 | Required properties: | ||
52 | * #address-cells: Should be 1. | ||
53 | * #size-cells: Should be 0. | ||
54 | |||
55 | The child nodes of this node represent the external channels which are | ||
56 | connected to the ADC. If the property is no present no external | ||
57 | channels will be assumed to be connected. | ||
58 | |||
59 | Each child node represents one channel and has the following | ||
60 | properties: | ||
61 | Required properties: | ||
62 | * reg: Pair of pins the the channel is connected to. | ||
63 | 0: VP/VN | ||
64 | 1: VAUXP[0]/VAUXN[0] | ||
65 | 2: VAUXP[1]/VAUXN[1] | ||
66 | ... | ||
67 | 16: VAUXP[15]/VAUXN[15] | ||
68 | Note each channel number should only be used at most | ||
69 | once. | ||
70 | Optional properties: | ||
71 | * xlnx,bipolar: If set the channel is used in bipolar | ||
72 | mode. | ||
73 | |||
74 | |||
75 | Examples: | ||
76 | xadc@f8007100 { | ||
77 | compatible = "xlnx,zynq-xadc-1.00.a"; | ||
78 | reg = <0xf8007100 0x20>; | ||
79 | interrupts = <0 7 4>; | ||
80 | interrupt-parent = <&gic>; | ||
81 | clocks = <&pcap_clk>; | ||
82 | |||
83 | xlnx,channels { | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <0>; | ||
86 | channel@0 { | ||
87 | reg = <0>; | ||
88 | }; | ||
89 | channel@1 { | ||
90 | reg = <1>; | ||
91 | }; | ||
92 | channel@8 { | ||
93 | reg = <8>; | ||
94 | }; | ||
95 | }; | ||
96 | }; | ||
97 | |||
98 | xadc@43200000 { | ||
99 | compatible = "xlnx,axi-xadc-1.00.a"; | ||
100 | reg = <0x43200000 0x1000>; | ||
101 | interrupts = <0 53 4>; | ||
102 | interrupt-parent = <&gic>; | ||
103 | clocks = <&fpga1_clk>; | ||
104 | |||
105 | xlnx,channels { | ||
106 | #address-cells = <1>; | ||
107 | #size-cells = <0>; | ||
108 | channel@0 { | ||
109 | reg = <0>; | ||
110 | xlnx,bipolar; | ||
111 | }; | ||
112 | }; | ||
113 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/clps711x-keypad.txt b/Documentation/devicetree/bindings/input/clps711x-keypad.txt new file mode 100644 index 000000000000..e68d2bbc6c07 --- /dev/null +++ b/Documentation/devicetree/bindings/input/clps711x-keypad.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * Cirrus Logic CLPS711X matrix keypad device tree bindings | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible: Shall contain "cirrus,clps711x-keypad". | ||
5 | - row-gpios: List of GPIOs used as row lines. | ||
6 | - poll-interval: Poll interval time in milliseconds. | ||
7 | - linux,keymap: The definition can be found at | ||
8 | bindings/input/matrix-keymap.txt. | ||
9 | |||
10 | Optional Properties: | ||
11 | - autorepeat: Enable autorepeat feature. | ||
12 | |||
13 | Example: | ||
14 | keypad { | ||
15 | compatible = "cirrus,ep7312-keypad", "cirrus,clps711x-keypad"; | ||
16 | autorepeat; | ||
17 | poll-interval = <120>; | ||
18 | row-gpios = <&porta 0 0>, | ||
19 | <&porta 1 0>; | ||
20 | |||
21 | linux,keymap = < | ||
22 | MATRIX_KEY(0, 0, KEY_UP) | ||
23 | MATRIX_KEY(0, 1, KEY_DOWN) | ||
24 | MATRIX_KEY(1, 0, KEY_LEFT) | ||
25 | MATRIX_KEY(1, 1, KEY_RIGHT) | ||
26 | >; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt new file mode 100644 index 000000000000..7d8cb92831d7 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | Qualcomm PM8xxx PMIC Keypad | ||
2 | |||
3 | PROPERTIES | ||
4 | |||
5 | - compatible: | ||
6 | Usage: required | ||
7 | Value type: <string> | ||
8 | Definition: must be one of: | ||
9 | "qcom,pm8058-keypad" | ||
10 | "qcom,pm8921-keypad" | ||
11 | |||
12 | - reg: | ||
13 | Usage: required | ||
14 | Value type: <prop-encoded-array> | ||
15 | Definition: address of keypad control register | ||
16 | |||
17 | - interrupts: | ||
18 | Usage: required | ||
19 | Value type: <prop-encoded-array> | ||
20 | Definition: the first interrupt specifies the key sense interrupt | ||
21 | and the second interrupt specifies the key stuck interrupt. | ||
22 | The format of the specifier is defined by the binding | ||
23 | document describing the node's interrupt parent. | ||
24 | |||
25 | - linux,keymap: | ||
26 | Usage: required | ||
27 | Value type: <prop-encoded-array> | ||
28 | Definition: the linux keymap. More information can be found in | ||
29 | input/matrix-keymap.txt. | ||
30 | |||
31 | - linux,keypad-no-autorepeat: | ||
32 | Usage: optional | ||
33 | Value type: <bool> | ||
34 | Definition: don't enable autorepeat feature. | ||
35 | |||
36 | - linux,keypad-wakeup: | ||
37 | Usage: optional | ||
38 | Value type: <bool> | ||
39 | Definition: use any event on keypad as wakeup event. | ||
40 | |||
41 | - keypad,num-rows: | ||
42 | Usage: required | ||
43 | Value type: <u32> | ||
44 | Definition: number of rows in the keymap. More information can be found | ||
45 | in input/matrix-keymap.txt. | ||
46 | |||
47 | - keypad,num-columns: | ||
48 | Usage: required | ||
49 | Value type: <u32> | ||
50 | Definition: number of columns in the keymap. More information can be | ||
51 | found in input/matrix-keymap.txt. | ||
52 | |||
53 | - debounce: | ||
54 | Usage: optional | ||
55 | Value type: <u32> | ||
56 | Definition: time in microseconds that key must be pressed or release | ||
57 | for key sense interrupt to trigger. | ||
58 | |||
59 | - scan-delay: | ||
60 | Usage: optional | ||
61 | Value type: <u32> | ||
62 | Definition: time in microseconds to pause between successive scans | ||
63 | of the matrix array. | ||
64 | |||
65 | - row-hold: | ||
66 | Usage: optional | ||
67 | Value type: <u32> | ||
68 | Definition: time in nanoseconds to pause between scans of each row in | ||
69 | the matrix array. | ||
70 | |||
71 | EXAMPLE | ||
72 | |||
73 | keypad@148 { | ||
74 | compatible = "qcom,pm8921-keypad"; | ||
75 | reg = <0x148>; | ||
76 | interrupt-parent = <&pmicintc>; | ||
77 | interrupts = <74 1>, <75 1>; | ||
78 | linux,keymap = < | ||
79 | MATRIX_KEY(0, 0, KEY_VOLUMEUP) | ||
80 | MATRIX_KEY(0, 1, KEY_VOLUMEDOWN) | ||
81 | MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS) | ||
82 | MATRIX_KEY(0, 3, KEY_CAMERA) | ||
83 | >; | ||
84 | keypad,num-rows = <1>; | ||
85 | keypad,num-columns = <5>; | ||
86 | debounce = <15>; | ||
87 | scan-delay = <32>; | ||
88 | row-hold = <91500>; | ||
89 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt new file mode 100644 index 000000000000..588536cc96ed --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | Qualcomm PM8xxx PMIC Power Key | ||
2 | |||
3 | PROPERTIES | ||
4 | |||
5 | - compatible: | ||
6 | Usage: required | ||
7 | Value type: <string> | ||
8 | Definition: must be one of: | ||
9 | "qcom,pm8058-pwrkey" | ||
10 | "qcom,pm8921-pwrkey" | ||
11 | |||
12 | - reg: | ||
13 | Usage: required | ||
14 | Value type: <prop-encoded-array> | ||
15 | Definition: address of power key control register | ||
16 | |||
17 | - interrupts: | ||
18 | Usage: required | ||
19 | Value type: <prop-encoded-array> | ||
20 | Definition: the first interrupt specifies the key release interrupt | ||
21 | and the second interrupt specifies the key press interrupt. | ||
22 | The format of the specifier is defined by the binding | ||
23 | document describing the node's interrupt parent. | ||
24 | |||
25 | - debounce: | ||
26 | Usage: optional | ||
27 | Value type: <u32> | ||
28 | Definition: time in microseconds that key must be pressed or release | ||
29 | for state change interrupt to trigger. | ||
30 | |||
31 | - pull-up: | ||
32 | Usage: optional | ||
33 | Value type: <empty> | ||
34 | Definition: presence of this property indicates that the KPDPWR_N pin | ||
35 | should be configured for pull up. | ||
36 | |||
37 | EXAMPLE | ||
38 | |||
39 | pwrkey@1c { | ||
40 | compatible = "qcom,pm8921-pwrkey"; | ||
41 | reg = <0x1c>; | ||
42 | interrupt-parent = <&pmicintc>; | ||
43 | interrupts = <50 1>, <51 1>; | ||
44 | debounce = <15625>; | ||
45 | pull-up; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt new file mode 100644 index 000000000000..4ed467b1e402 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Qualcomm PM8xxx PMIC Vibrator | ||
2 | |||
3 | PROPERTIES | ||
4 | |||
5 | - compatible: | ||
6 | Usage: required | ||
7 | Value type: <string> | ||
8 | Definition: must be one of: | ||
9 | "qcom,pm8058-vib" | ||
10 | "qcom,pm8921-vib" | ||
11 | |||
12 | - reg: | ||
13 | Usage: required | ||
14 | Value type: <prop-encoded-array> | ||
15 | Definition: address of vibration control register | ||
16 | |||
17 | EXAMPLE | ||
18 | |||
19 | vibrator@4a { | ||
20 | compatible = "qcom,pm8058-vib"; | ||
21 | reg = <0x4a>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt new file mode 100644 index 000000000000..76db96704a60 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | FocalTech EDT-FT5x06 Polytouch driver | ||
2 | ===================================== | ||
3 | |||
4 | There are 3 variants of the chip for various touch panel sizes | ||
5 | FT5206GE1 2.8" .. 3.8" | ||
6 | FT5306DE4 4.3" .. 7" | ||
7 | FT5406EE8 7" .. 8.9" | ||
8 | |||
9 | The software interface is identical for all those chips, so that | ||
10 | currently there is no need for the driver to distinguish between the | ||
11 | different chips. Nevertheless distinct compatible strings are used so | ||
12 | that a distinction can be added if necessary without changing the DT | ||
13 | bindings. | ||
14 | |||
15 | |||
16 | Required properties: | ||
17 | - compatible: "edt,edt-ft5206" | ||
18 | or: "edt,edt-ft5306" | ||
19 | or: "edt,edt-ft5406" | ||
20 | |||
21 | - reg: I2C slave address of the chip (0x38) | ||
22 | - interrupt-parent: a phandle pointing to the interrupt controller | ||
23 | serving the interrupt for this chip | ||
24 | - interrupts: interrupt specification for the touchdetect | ||
25 | interrupt | ||
26 | |||
27 | Optional properties: | ||
28 | - reset-gpios: GPIO specification for the RESET input | ||
29 | - wake-gpios: GPIO specification for the WAKE input | ||
30 | |||
31 | - pinctrl-names: should be "default" | ||
32 | - pinctrl-0: a phandle pointing to the pin settings for the | ||
33 | control gpios | ||
34 | |||
35 | - threshold: allows setting the "click"-threshold in the range | ||
36 | from 20 to 80. | ||
37 | |||
38 | - gain: allows setting the sensitivity in the range from 0 to | ||
39 | 31. Note that lower values indicate higher | ||
40 | sensitivity. | ||
41 | |||
42 | - offset: allows setting the edge compensation in the range from | ||
43 | 0 to 31. | ||
44 | |||
45 | Example: | ||
46 | polytouch: edt-ft5x06@38 { | ||
47 | compatible = "edt,edt-ft5406", "edt,edt-ft5x06"; | ||
48 | reg = <0x38>; | ||
49 | pinctrl-names = "default"; | ||
50 | pinctrl-0 = <&edt_ft5x06_pins>; | ||
51 | interrupt-parent = <&gpio2>; | ||
52 | interrupts = <5 0>; | ||
53 | reset-gpios = <&gpio2 6 1>; | ||
54 | wake-gpios = <&gpio4 9 0>; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt new file mode 100644 index 000000000000..2faf1f1fa39e --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Neonode infrared touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "neonode,zforce" | ||
5 | - reg: I2C address of the chip | ||
6 | - interrupts: interrupt to which the chip is connected | ||
7 | - gpios: gpios the chip is connected to | ||
8 | first one is the interrupt gpio and second one the reset gpio | ||
9 | - x-size: horizontal resolution of touchscreen | ||
10 | - y-size: vertical resolution of touchscreen | ||
11 | |||
12 | Example: | ||
13 | |||
14 | i2c@00000000 { | ||
15 | /* ... */ | ||
16 | |||
17 | zforce_ts@50 { | ||
18 | compatible = "neonode,zforce"; | ||
19 | reg = <0x50>; | ||
20 | interrupts = <2 0>; | ||
21 | |||
22 | gpios = <&gpio5 6 0>, /* INT */ | ||
23 | <&gpio5 9 0>; /* RST */ | ||
24 | |||
25 | x-size = <800>; | ||
26 | y-size = <600>; | ||
27 | }; | ||
28 | |||
29 | /* ... */ | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt index 32cec4b26cd0..b290ca150d30 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | |||
@@ -2,7 +2,7 @@ Allwinner Sunxi Interrupt Controller | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : should be "allwinner,sun4i-ic" | 5 | - compatible : should be "allwinner,sun4i-a10-ic" |
6 | - reg : Specifies base physical address and size of the registers. | 6 | - reg : Specifies base physical address and size of the registers. |
7 | - interrupt-controller : Identifies the node as an interrupt controller | 7 | - interrupt-controller : Identifies the node as an interrupt controller |
8 | - #interrupt-cells : Specifies the number of cells needed to encode an | 8 | - #interrupt-cells : Specifies the number of cells needed to encode an |
@@ -11,7 +11,7 @@ Required properties: | |||
11 | Example: | 11 | Example: |
12 | 12 | ||
13 | intc: interrupt-controller { | 13 | intc: interrupt-controller { |
14 | compatible = "allwinner,sun4i-ic"; | 14 | compatible = "allwinner,sun4i-a10-ic"; |
15 | reg = <0x01c20400 0x400>; | 15 | reg = <0x01c20400 0x400>; |
16 | interrupt-controller; | 16 | interrupt-controller; |
17 | #interrupt-cells = <1>; | 17 | #interrupt-cells = <1>; |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt new file mode 100644 index 000000000000..d1c5cdabc3e0 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Allwinner Sunxi NMI Controller | ||
2 | ============================== | ||
3 | |||
4 | Required properties: | ||
5 | |||
6 | - compatible : should be "allwinner,sun7i-a20-sc-nmi" or | ||
7 | "allwinner,sun6i-a31-sc-nmi" | ||
8 | - reg : Specifies base physical address and size of the registers. | ||
9 | - interrupt-controller : Identifies the node as an interrupt controller | ||
10 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
11 | interrupt source. The value shall be 2. The first cell is the IRQ number, the | ||
12 | second cell the trigger type as defined in interrupt.txt in this directory. | ||
13 | - interrupt-parent: Specifies the parent interrupt controller. | ||
14 | - interrupts: Specifies the interrupt line (NMI) which is handled by | ||
15 | the interrupt controller in the parent controller's notation. This value | ||
16 | shall be the NMI. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | sc-nmi-intc@01c00030 { | ||
21 | compatible = "allwinner,sun7i-a20-sc-nmi"; | ||
22 | interrupt-controller; | ||
23 | #interrupt-cells = <2>; | ||
24 | reg = <0x01c00030 0x0c>; | ||
25 | interrupt-parent = <&gic>; | ||
26 | interrupts = <0 0 4>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/cirrus,clps711x-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/cirrus,clps711x-intc.txt new file mode 100644 index 000000000000..759339c34e4f --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/cirrus,clps711x-intc.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Cirrus Logic CLPS711X Interrupt Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: Should be "cirrus,clps711x-intc". | ||
6 | - reg: Specifies base physical address of the registers set. | ||
7 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
8 | - #interrupt-cells: Specifies the number of cells needed to encode an | ||
9 | interrupt source. The value shall be 1. | ||
10 | |||
11 | The interrupt sources are as follows: | ||
12 | ID Name Description | ||
13 | --------------------------- | ||
14 | 1: BLINT Battery low (FIQ) | ||
15 | 3: MCINT Media changed (FIQ) | ||
16 | 4: CSINT CODEC sound | ||
17 | 5: EINT1 External 1 | ||
18 | 6: EINT2 External 2 | ||
19 | 7: EINT3 External 3 | ||
20 | 8: TC1OI TC1 under flow | ||
21 | 9: TC2OI TC2 under flow | ||
22 | 10: RTCMI RTC compare match | ||
23 | 11: TINT 64Hz tick | ||
24 | 12: UTXINT1 UART1 transmit FIFO half empty | ||
25 | 13: URXINT1 UART1 receive FIFO half full | ||
26 | 14: UMSINT UART1 modem status changed | ||
27 | 15: SSEOTI SSI1 end of transfer | ||
28 | 16: KBDINT Keyboard | ||
29 | 17: SS2RX SSI2 receive FIFO half or greater full | ||
30 | 18: SS2TX SSI2 transmit FIFO less than half empty | ||
31 | 28: UTXINT2 UART2 transmit FIFO half empty | ||
32 | 29: URXINT2 UART2 receive FIFO half full | ||
33 | 32: DAIINT DAI interface (FIQ) | ||
34 | |||
35 | Example: | ||
36 | intc: interrupt-controller { | ||
37 | compatible = "cirrus,clps711x-intc"; | ||
38 | reg = <0x80000000 0x4000>; | ||
39 | interrupt-controller; | ||
40 | #interrupt-cells = <1>; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt index e34c6cdd8ba8..f284b99402bc 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt | |||
@@ -48,6 +48,12 @@ conditions. | |||
48 | from the mmu-masters towards memory) node for this | 48 | from the mmu-masters towards memory) node for this |
49 | SMMU. | 49 | SMMU. |
50 | 50 | ||
51 | - calxeda,smmu-secure-config-access : Enable proper handling of buggy | ||
52 | implementations that always use secure access to | ||
53 | SMMU configuration registers. In this case non-secure | ||
54 | aliases of secure registers have to be used during | ||
55 | SMMU configuration. | ||
56 | |||
51 | Example: | 57 | Example: |
52 | 58 | ||
53 | smmu { | 59 | smmu { |
diff --git a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt new file mode 100644 index 000000000000..42531dc387aa --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | OMAP2+ IOMMU | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be one of, | ||
5 | "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances | ||
6 | "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances | ||
7 | "ti,dra7-iommu" for DRA7xx IOMMU instances | ||
8 | - ti,hwmods : Name of the hwmod associated with the IOMMU instance | ||
9 | - reg : Address space for the configuration registers | ||
10 | - interrupts : Interrupt specifier for the IOMMU instance | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,#tlb-entries : Number of entries in the translation look-aside buffer. | ||
14 | Should be either 8 or 32 (default: 32) | ||
15 | - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing | ||
16 | back a bus error response on MMU faults. | ||
17 | |||
18 | Example: | ||
19 | /* OMAP3 ISP MMU */ | ||
20 | mmu_isp: mmu@480bd400 { | ||
21 | compatible = "ti,omap2-iommu"; | ||
22 | reg = <0x480bd400 0x80>; | ||
23 | interrupts = <24>; | ||
24 | ti,hwmods = "mmu_isp"; | ||
25 | ti,#tlb-entries = <8>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/img-ir-rev1.txt b/Documentation/devicetree/bindings/media/img-ir-rev1.txt new file mode 100644 index 000000000000..5434ce61b925 --- /dev/null +++ b/Documentation/devicetree/bindings/media/img-ir-rev1.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * ImgTec Infrared (IR) decoder version 1 | ||
2 | |||
3 | This binding is for Imagination Technologies' Infrared decoder block, | ||
4 | specifically major revision 1. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be "img,ir-rev1" | ||
8 | - reg: Physical base address of the controller and length of | ||
9 | memory mapped region. | ||
10 | - interrupts: The interrupt specifier to the cpu. | ||
11 | |||
12 | Optional properties: | ||
13 | - clocks: List of clock specifiers as described in standard | ||
14 | clock bindings. | ||
15 | Up to 3 clocks may be specified in the following order: | ||
16 | 1st: Core clock (defaults to 32.768KHz if omitted). | ||
17 | 2nd: System side (fast) clock. | ||
18 | 3rd: Power modulation clock. | ||
19 | - clock-names: List of clock names corresponding to the clocks | ||
20 | specified in the clocks property. | ||
21 | Accepted clock names are: | ||
22 | "core": Core clock. | ||
23 | "sys": System clock. | ||
24 | "mod": Power modulation clock. | ||
25 | |||
26 | Example: | ||
27 | |||
28 | ir@02006200 { | ||
29 | compatible = "img,ir-rev1"; | ||
30 | reg = <0x02006200 0x100>; | ||
31 | interrupts = <29 4>; | ||
32 | clocks = <&clk_32khz>; | ||
33 | clock-names = "core"; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt index 96312f6c4c26..922d6f8e74be 100644 --- a/Documentation/devicetree/bindings/media/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt | |||
@@ -15,11 +15,21 @@ Common 'camera' node | |||
15 | 15 | ||
16 | Required properties: | 16 | Required properties: |
17 | 17 | ||
18 | - compatible : must be "samsung,fimc", "simple-bus" | 18 | - compatible: must be "samsung,fimc", "simple-bus" |
19 | - clocks : list of clock specifiers, corresponding to entries in | 19 | - clocks: list of clock specifiers, corresponding to entries in |
20 | the clock-names property; | 20 | the clock-names property; |
21 | - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0", | 21 | - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0", |
22 | "pxl_async1" entries, matching entries in the clocks property. | 22 | "pxl_async1" entries, matching entries in the clocks property. |
23 | |||
24 | - #clock-cells: from the common clock bindings (../clock/clock-bindings.txt), | ||
25 | must be 1. A clock provider is associated with the 'camera' node and it should | ||
26 | be referenced by external sensors that use clocks provided by the SoC on | ||
27 | CAM_*_CLKOUT pins. The clock specifier cell stores an index of a clock. | ||
28 | The indices are 0, 1 for CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively. | ||
29 | |||
30 | - clock-output-names: from the common clock bindings, should contain names of | ||
31 | clocks registered by the camera subsystem corresponding to CAM_A_CLKOUT, | ||
32 | CAM_B_CLKOUT output clocks respectively. | ||
23 | 33 | ||
24 | The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used | 34 | The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used |
25 | to define a required pinctrl state named "default" and optional pinctrl states: | 35 | to define a required pinctrl state named "default" and optional pinctrl states: |
@@ -32,6 +42,7 @@ way around. | |||
32 | 42 | ||
33 | The 'camera' node must include at least one 'fimc' child node. | 43 | The 'camera' node must include at least one 'fimc' child node. |
34 | 44 | ||
45 | |||
35 | 'fimc' device nodes | 46 | 'fimc' device nodes |
36 | ------------------- | 47 | ------------------- |
37 | 48 | ||
@@ -88,8 +99,8 @@ port nodes specifies data input - 0, 1 indicates input A, B respectively. | |||
88 | 99 | ||
89 | Optional properties | 100 | Optional properties |
90 | 101 | ||
91 | - samsung,camclk-out : specifies clock output for remote sensor, | 102 | - samsung,camclk-out (deprecated) : specifies clock output for remote sensor, |
92 | 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; | 103 | 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; |
93 | 104 | ||
94 | Image sensor nodes | 105 | Image sensor nodes |
95 | ------------------ | 106 | ------------------ |
@@ -97,8 +108,6 @@ Image sensor nodes | |||
97 | The sensor device nodes should be added to their control bus controller (e.g. | 108 | The sensor device nodes should be added to their control bus controller (e.g. |
98 | I2C0) nodes and linked to a port node in the csis or the parallel-ports node, | 109 | I2C0) nodes and linked to a port node in the csis or the parallel-ports node, |
99 | using the common video interfaces bindings, defined in video-interfaces.txt. | 110 | using the common video interfaces bindings, defined in video-interfaces.txt. |
100 | The implementation of this bindings requires clock-frequency property to be | ||
101 | present in the sensor device nodes. | ||
102 | 111 | ||
103 | Example: | 112 | Example: |
104 | 113 | ||
@@ -114,7 +123,7 @@ Example: | |||
114 | vddio-supply = <...>; | 123 | vddio-supply = <...>; |
115 | 124 | ||
116 | clock-frequency = <24000000>; | 125 | clock-frequency = <24000000>; |
117 | clocks = <...>; | 126 | clocks = <&camera 1>; |
118 | clock-names = "mclk"; | 127 | clock-names = "mclk"; |
119 | 128 | ||
120 | port { | 129 | port { |
@@ -135,7 +144,7 @@ Example: | |||
135 | vddio-supply = <...>; | 144 | vddio-supply = <...>; |
136 | 145 | ||
137 | clock-frequency = <24000000>; | 146 | clock-frequency = <24000000>; |
138 | clocks = <...>; | 147 | clocks = <&camera 0>; |
139 | clock-names = "mclk"; | 148 | clock-names = "mclk"; |
140 | 149 | ||
141 | port { | 150 | port { |
@@ -149,12 +158,17 @@ Example: | |||
149 | 158 | ||
150 | camera { | 159 | camera { |
151 | compatible = "samsung,fimc", "simple-bus"; | 160 | compatible = "samsung,fimc", "simple-bus"; |
152 | #address-cells = <1>; | 161 | clocks = <&clock 132>, <&clock 133>, <&clock 351>, |
153 | #size-cells = <1>; | 162 | <&clock 352>; |
154 | status = "okay"; | 163 | clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", |
155 | 164 | "pxl_async1"; | |
165 | #clock-cells = <1>; | ||
166 | clock-output-names = "cam_a_clkout", "cam_b_clkout"; | ||
156 | pinctrl-names = "default"; | 167 | pinctrl-names = "default"; |
157 | pinctrl-0 = <&cam_port_a_clk_active>; | 168 | pinctrl-0 = <&cam_port_a_clk_active>; |
169 | status = "okay"; | ||
170 | #address-cells = <1>; | ||
171 | #size-cells = <1>; | ||
158 | 172 | ||
159 | /* parallel camera ports */ | 173 | /* parallel camera ports */ |
160 | parallel-ports { | 174 | parallel-ports { |
diff --git a/Documentation/devicetree/bindings/media/samsung-s5c73m3.txt b/Documentation/devicetree/bindings/media/samsung-s5c73m3.txt new file mode 100644 index 000000000000..2c85c4538a6d --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung-s5c73m3.txt | |||
@@ -0,0 +1,97 @@ | |||
1 | Samsung S5C73M3 8Mp camera ISP | ||
2 | ------------------------------ | ||
3 | |||
4 | The S5C73M3 camera ISP supports MIPI CSI-2 and parallel (ITU-R BT.656) video | ||
5 | data busses. The I2C bus is the main control bus and additionally the SPI bus | ||
6 | is used, mostly for transferring the firmware to and from the device. Two | ||
7 | slave device nodes corresponding to these control bus interfaces are required | ||
8 | and should be placed under respective bus controller nodes. | ||
9 | |||
10 | I2C slave device node | ||
11 | --------------------- | ||
12 | |||
13 | Required properties: | ||
14 | |||
15 | - compatible : "samsung,s5c73m3"; | ||
16 | - reg : I2C slave address of the sensor; | ||
17 | - vdd-int-supply : digital power supply (1.2V); | ||
18 | - vdda-supply : analog power supply (1.2V); | ||
19 | - vdd-reg-supply : regulator input power supply (2.8V); | ||
20 | - vddio-host-supply : host I/O power supply (1.8V to 2.8V); | ||
21 | - vddio-cis-supply : CIS I/O power supply (1.2V to 1.8V); | ||
22 | - vdd-af-supply : lens power supply (2.8V); | ||
23 | - xshutdown-gpios : specifier of GPIO connected to the XSHUTDOWN pin; | ||
24 | - standby-gpios : specifier of GPIO connected to the STANDBY pin; | ||
25 | - clocks : should contain list of phandle and clock specifier pairs | ||
26 | according to common clock bindings for the clocks described | ||
27 | in the clock-names property; | ||
28 | - clock-names : should contain "cis_extclk" entry for the CIS_EXTCLK clock; | ||
29 | |||
30 | Optional properties: | ||
31 | |||
32 | - clock-frequency : the frequency at which the "cis_extclk" clock should be | ||
33 | configured to operate, in Hz; if this property is not | ||
34 | specified default 24 MHz value will be used. | ||
35 | |||
36 | The common video interfaces bindings (see video-interfaces.txt) should be used | ||
37 | to specify link from the S5C73M3 to an external image data receiver. The S5C73M3 | ||
38 | device node should contain one 'port' child node with an 'endpoint' subnode for | ||
39 | this purpose. The data link from a raw image sensor to the S5C73M3 can be | ||
40 | similarly specified, but it is optional since the S5C73M3 ISP and a raw image | ||
41 | sensor are usually inseparable and form a hybrid module. | ||
42 | |||
43 | Following properties are valid for the endpoint node(s): | ||
44 | |||
45 | endpoint subnode | ||
46 | ---------------- | ||
47 | |||
48 | - data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in | ||
49 | video-interfaces.txt. This sensor doesn't support data lane remapping | ||
50 | and physical lane indexes in subsequent elements of the array should | ||
51 | be only consecutive ascending values. | ||
52 | |||
53 | SPI device node | ||
54 | --------------- | ||
55 | |||
56 | Required properties: | ||
57 | |||
58 | - compatible : "samsung,s5c73m3"; | ||
59 | |||
60 | For more details see description of the SPI busses bindings | ||
61 | (../spi/spi-bus.txt) and bindings of a specific bus controller. | ||
62 | |||
63 | Example: | ||
64 | |||
65 | i2c@138A000000 { | ||
66 | ... | ||
67 | s5c73m3@3c { | ||
68 | compatible = "samsung,s5c73m3"; | ||
69 | reg = <0x3c>; | ||
70 | vdd-int-supply = <&buck9_reg>; | ||
71 | vdda-supply = <&ldo17_reg>; | ||
72 | vdd-reg-supply = <&cam_io_reg>; | ||
73 | vddio-host-supply = <&ldo18_reg>; | ||
74 | vddio-cis-supply = <&ldo9_reg>; | ||
75 | vdd-af-supply = <&cam_af_reg>; | ||
76 | clock-frequency = <24000000>; | ||
77 | clocks = <&clk 0>; | ||
78 | clock-names = "cis_extclk"; | ||
79 | reset-gpios = <&gpf1 3 1>; | ||
80 | standby-gpios = <&gpm0 1 1>; | ||
81 | port { | ||
82 | s5c73m3_ep: endpoint { | ||
83 | remote-endpoint = <&csis0_ep>; | ||
84 | data-lanes = <1 2 3 4>; | ||
85 | }; | ||
86 | }; | ||
87 | }; | ||
88 | }; | ||
89 | |||
90 | spi@1392000 { | ||
91 | ... | ||
92 | s5c73m3_spi: s5c73m3@0 { | ||
93 | compatible = "samsung,s5c73m3"; | ||
94 | reg = <0>; | ||
95 | ... | ||
96 | }; | ||
97 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/samsung-s5k6a3.txt b/Documentation/devicetree/bindings/media/samsung-s5k6a3.txt new file mode 100644 index 000000000000..cce01e82f3e3 --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung-s5k6a3.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Samsung S5K6A3(YX) raw image sensor | ||
2 | --------------------------------- | ||
3 | |||
4 | S5K6A3(YX) is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces | ||
5 | and CCI (I2C compatible) control bus. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible : "samsung,s5k6a3"; | ||
10 | - reg : I2C slave address of the sensor; | ||
11 | - svdda-supply : core voltage supply; | ||
12 | - svddio-supply : I/O voltage supply; | ||
13 | - afvdd-supply : AF (actuator) voltage supply; | ||
14 | - gpios : specifier of a GPIO connected to the RESET pin; | ||
15 | - clocks : should contain list of phandle and clock specifier pairs | ||
16 | according to common clock bindings for the clocks described | ||
17 | in the clock-names property; | ||
18 | - clock-names : should contain "extclk" entry for the sensor's EXTCLK clock; | ||
19 | |||
20 | Optional properties: | ||
21 | |||
22 | - clock-frequency : the frequency at which the "extclk" clock should be | ||
23 | configured to operate, in Hz; if this property is not | ||
24 | specified default 24 MHz value will be used. | ||
25 | |||
26 | The common video interfaces bindings (see video-interfaces.txt) should be | ||
27 | used to specify link to the image data receiver. The S5K6A3(YX) device | ||
28 | node should contain one 'port' child node with an 'endpoint' subnode. | ||
29 | |||
30 | Following properties are valid for the endpoint node: | ||
31 | |||
32 | - data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in | ||
33 | video-interfaces.txt. The sensor supports only one data lane. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt index d5e370450ac0..d5e370450ac0 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt +++ b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt | |||
diff --git a/Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt b/Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt new file mode 100644 index 000000000000..9592717f483f --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt | |||
@@ -0,0 +1,210 @@ | |||
1 | * Device tree bindings for Texas instruments AEMIF controller | ||
2 | |||
3 | The Async External Memory Interface (EMIF16/AEMIF) controller is intended to | ||
4 | provide a glue-less interface to a variety of asynchronous memory devices like | ||
5 | ASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories | ||
6 | can be accessed at any given time via four chip selects with 64M byte access | ||
7 | per chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM | ||
8 | and Mobile SDR are not supported. | ||
9 | |||
10 | Documentation: | ||
11 | Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf | ||
12 | OMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf | ||
13 | Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf | ||
14 | |||
15 | Required properties: | ||
16 | |||
17 | - compatible: "ti,davinci-aemif" | ||
18 | "ti,keystone-aemif" | ||
19 | "ti,da850-aemif" | ||
20 | |||
21 | - reg: contains offset/length value for AEMIF control registers | ||
22 | space. | ||
23 | |||
24 | - #address-cells: Must be 2. The partition number has to be encoded in the | ||
25 | first address cell and it may accept values 0..N-1 | ||
26 | (N - total number of partitions). It's recommended to | ||
27 | assign N-1 number for the control partition. The second | ||
28 | cell is the offset into the partition. | ||
29 | |||
30 | - #size-cells: Must be set to 1. | ||
31 | |||
32 | - ranges: Contains memory regions. There are two types of | ||
33 | ranges/partitions: | ||
34 | - CS-specific partition/range. If continuous, must be | ||
35 | set up to reflect the memory layout for 4 chipselects, | ||
36 | if not then additional range/partition can be added and | ||
37 | child device can select the proper one. | ||
38 | - control partition which is common for all CS | ||
39 | interfaces. | ||
40 | |||
41 | - clocks: the clock feeding the controller clock. Required only | ||
42 | if clock tree data present in device tree. | ||
43 | See clock-bindings.txt | ||
44 | |||
45 | - clock-names: clock name. It has to be "aemif". Required only if clock | ||
46 | tree data present in device tree, in another case don't | ||
47 | use it. | ||
48 | See clock-bindings.txt | ||
49 | |||
50 | - clock-ranges: Empty property indicating that child nodes can inherit | ||
51 | named clocks. Required only if clock tree data present | ||
52 | in device tree. | ||
53 | See clock-bindings.txt | ||
54 | |||
55 | |||
56 | Child chip-select (cs) nodes contain the memory devices nodes connected to | ||
57 | such as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt). | ||
58 | There might be board specific devices like FPGAs. | ||
59 | |||
60 | Required child cs node properties: | ||
61 | |||
62 | - #address-cells: Must be 2. | ||
63 | |||
64 | - #size-cells: Must be 1. | ||
65 | |||
66 | - ranges: Empty property indicating that child nodes can inherit | ||
67 | memory layout. | ||
68 | |||
69 | - clock-ranges: Empty property indicating that child nodes can inherit | ||
70 | named clocks. Required only if clock tree data present | ||
71 | in device tree. | ||
72 | |||
73 | - ti,cs-chipselect: number of chipselect. Indicates on the aemif driver | ||
74 | which chipselect is used for accessing the memory. For | ||
75 | compatibles "ti,davinci-aemif" and "ti,keystone-aemif" | ||
76 | it can be in range [0-3]. For compatible | ||
77 | "ti,da850-aemif" range is [2-5]. | ||
78 | |||
79 | Optional child cs node properties: | ||
80 | |||
81 | - ti,cs-bus-width: width of the asynchronous device's data bus | ||
82 | 8 or 16 if not preset 8 | ||
83 | |||
84 | - ti,cs-select-strobe-mode: enable/disable select strobe mode | ||
85 | In select strobe mode chip select behaves as | ||
86 | the strobe and is active only during the strobe | ||
87 | period. If present then enable. | ||
88 | |||
89 | - ti,cs-extended-wait-mode: enable/disable extended wait mode | ||
90 | if set, the controller monitors the EMIFWAIT pin | ||
91 | mapped to that chip select to determine if the | ||
92 | device wants to extend the strobe period. If | ||
93 | present then enable. | ||
94 | |||
95 | - ti,cs-min-turnaround-ns: minimum turn around time, ns | ||
96 | Time between the end of one asynchronous memory | ||
97 | access and the start of another asynchronous | ||
98 | memory access. This delay is not incurred | ||
99 | between a read followed by read or a write | ||
100 | followed by a write to same chip select. | ||
101 | |||
102 | - ti,cs-read-setup-ns: read setup width, ns | ||
103 | Time between the beginning of a memory cycle | ||
104 | and the activation of read strobe. | ||
105 | Minimum value is 1 (0 treated as 1). | ||
106 | |||
107 | - ti,cs-read-strobe-ns: read strobe width, ns | ||
108 | Time between the activation and deactivation of | ||
109 | the read strobe. | ||
110 | Minimum value is 1 (0 treated as 1). | ||
111 | |||
112 | - ti,cs-read-hold-ns: read hold width, ns | ||
113 | Time between the deactivation of the read | ||
114 | strobe and the end of the cycle (which may be | ||
115 | either an address change or the deactivation of | ||
116 | the chip select signal. | ||
117 | Minimum value is 1 (0 treated as 1). | ||
118 | |||
119 | - ti,cs-write-setup-ns: write setup width, ns | ||
120 | Time between the beginning of a memory cycle | ||
121 | and the activation of write strobe. | ||
122 | Minimum value is 1 (0 treated as 1). | ||
123 | |||
124 | - ti,cs-write-strobe-ns: write strobe width, ns | ||
125 | Time between the activation and deactivation of | ||
126 | the write strobe. | ||
127 | Minimum value is 1 (0 treated as 1). | ||
128 | |||
129 | - ti,cs-write-hold-ns: write hold width, ns | ||
130 | Time between the deactivation of the write | ||
131 | strobe and the end of the cycle (which may be | ||
132 | either an address change or the deactivation of | ||
133 | the chip select signal. | ||
134 | Minimum value is 1 (0 treated as 1). | ||
135 | |||
136 | If any of the above parameters are absent, current parameter value will be taken | ||
137 | from the corresponding HW reg. | ||
138 | |||
139 | Example for aemif, davinci nand and nor flash chip select shown below. | ||
140 | |||
141 | memory-controller@21000A00 { | ||
142 | compatible = "ti,davinci-aemif"; | ||
143 | #address-cells = <2>; | ||
144 | #size-cells = <1>; | ||
145 | clocks = <&clkaemif 0>; | ||
146 | clock-names = "aemif"; | ||
147 | clock-ranges; | ||
148 | reg = <0x21000A00 0x00000100>; | ||
149 | ranges = <0 0 0x70000000 0x10000000 | ||
150 | 1 0 0x21000A00 0x00000100>; | ||
151 | /* | ||
152 | * Partition0: CS-specific memory range which is | ||
153 | * implemented as continuous physical memory region | ||
154 | * Partition1: control memory range | ||
155 | */ | ||
156 | |||
157 | nand:cs2 { | ||
158 | #address-cells = <2>; | ||
159 | #size-cells = <1>; | ||
160 | clock-ranges; | ||
161 | ranges; | ||
162 | |||
163 | ti,cs-chipselect = <2>; | ||
164 | /* all timings in nanoseconds */ | ||
165 | ti,cs-min-turnaround-ns = <0>; | ||
166 | ti,cs-read-hold-ns = <7>; | ||
167 | ti,cs-read-strobe-ns = <42>; | ||
168 | ti,cs-read-setup-ns = <14>; | ||
169 | ti,cs-write-hold-ns = <7>; | ||
170 | ti,cs-write-strobe-ns = <42>; | ||
171 | ti,cs-write-setup-ns = <14>; | ||
172 | |||
173 | nand@0,0x8000000 { | ||
174 | compatible = "ti,davinci-nand"; | ||
175 | reg = <0 0x8000000 0x4000000 | ||
176 | 1 0x0000000 0x0000100>; | ||
177 | /* | ||
178 | * Partition0, offset 0x8000000, size 0x4000000 | ||
179 | * Partition1, offset 0x0000000, size 0x0000100 | ||
180 | */ | ||
181 | |||
182 | .. see davinci-nand.txt | ||
183 | }; | ||
184 | }; | ||
185 | |||
186 | nor:cs0 { | ||
187 | #address-cells = <2>; | ||
188 | #size-cells = <1>; | ||
189 | clock-ranges; | ||
190 | ranges; | ||
191 | |||
192 | ti,cs-chipselect = <0>; | ||
193 | /* all timings in nanoseconds */ | ||
194 | ti,cs-min-turnaround-ns = <0>; | ||
195 | ti,cs-read-hold-ns = <8>; | ||
196 | ti,cs-read-strobe-ns = <40>; | ||
197 | ti,cs-read-setup-ns = <14>; | ||
198 | ti,cs-write-hold-ns = <7>; | ||
199 | ti,cs-write-strobe-ns = <40>; | ||
200 | ti,cs-write-setup-ns = <14>; | ||
201 | ti,cs-bus-width = <16>; | ||
202 | |||
203 | flash@0,0x0000000 { | ||
204 | compatible = "cfi-flash"; | ||
205 | reg = <0 0x0000000 0x4000000>; | ||
206 | |||
207 | ... | ||
208 | }; | ||
209 | }; | ||
210 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index 0e295c9d8937..36a0c3d8c726 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt | |||
@@ -5,9 +5,10 @@ of analogue I/O. | |||
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | 7 | ||
8 | - compatible : one of the following chip-specific strings: | 8 | - compatible : One of the following chip-specific strings: |
9 | "wlf,wm5102" | 9 | "wlf,wm5102" |
10 | "wlf,wm5110" | 10 | "wlf,wm5110" |
11 | "wlf,wm8997" | ||
11 | - reg : I2C slave address when connected using I2C, chip select number when | 12 | - reg : I2C slave address when connected using I2C, chip select number when |
12 | using SPI. | 13 | using SPI. |
13 | 14 | ||
@@ -25,8 +26,9 @@ Required properties: | |||
25 | - #gpio-cells : Must be 2. The first cell is the pin number and the | 26 | - #gpio-cells : Must be 2. The first cell is the pin number and the |
26 | second cell is used to specify optional parameters (currently unused). | 27 | second cell is used to specify optional parameters (currently unused). |
27 | 28 | ||
28 | - AVDD1-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, CPVDD-supply, | 29 | - AVDD-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply (wm5102, wm5110), |
29 | SPKVDDL-supply, SPKVDDR-supply : power supplies for the device, as covered | 30 | CPVDD-supply, SPKVDDL-supply (wm5102, wm5110), SPKVDDR-supply (wm5102, |
31 | wm5110), SPKVDD-supply (wm8997) : Power supplies for the device, as covered | ||
30 | in Documentation/devicetree/bindings/regulator/regulator.txt | 32 | in Documentation/devicetree/bindings/regulator/regulator.txt |
31 | 33 | ||
32 | Optional properties: | 34 | Optional properties: |
@@ -46,6 +48,7 @@ codec: wm5102@1a { | |||
46 | compatible = "wlf,wm5102"; | 48 | compatible = "wlf,wm5102"; |
47 | reg = <0x1a>; | 49 | reg = <0x1a>; |
48 | interrupts = <347>; | 50 | interrupts = <347>; |
51 | interrupt-controller; | ||
49 | #interrupt-cells = <2>; | 52 | #interrupt-cells = <2>; |
50 | interrupt-parent = <&gic>; | 53 | interrupt-parent = <&gic>; |
51 | 54 | ||
@@ -53,10 +56,10 @@ codec: wm5102@1a { | |||
53 | #gpio-cells = <2>; | 56 | #gpio-cells = <2>; |
54 | 57 | ||
55 | wlf,gpio-defaults = < | 58 | wlf,gpio-defaults = < |
56 | 0x00000000, /* AIF1TXLRCLK */ | 59 | 0x00000000 /* AIF1TXLRCLK */ |
57 | 0xffffffff, | 60 | 0xffffffff |
58 | 0xffffffff, | 61 | 0xffffffff |
59 | 0xffffffff, | 62 | 0xffffffff |
60 | 0xffffffff, | 63 | 0xffffffff |
61 | >; | 64 | >; |
62 | }; | 65 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/bcm590xx.txt b/Documentation/devicetree/bindings/mfd/bcm590xx.txt new file mode 100644 index 000000000000..1fe30e2b10da --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/bcm590xx.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | ------------------------------- | ||
2 | BCM590xx Power Management Units | ||
3 | ------------------------------- | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: "brcm,bcm59056" | ||
7 | - reg: I2C slave address | ||
8 | - interrupts: interrupt for the PMU. Generic interrupt client node bindings | ||
9 | are described in interrupt-controller/interrupts.txt | ||
10 | |||
11 | ------------------ | ||
12 | Voltage Regulators | ||
13 | ------------------ | ||
14 | |||
15 | Optional child nodes: | ||
16 | - regulators: container node for regulators following the generic | ||
17 | regulator binding in regulator/regulator.txt | ||
18 | |||
19 | The valid regulator node names for BCM59056 are: | ||
20 | rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo, | ||
21 | mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo, | ||
22 | csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr | ||
23 | |||
24 | Example: | ||
25 | pmu: bcm59056@8 { | ||
26 | compatible = "brcm,bcm59056"; | ||
27 | reg = <0x08>; | ||
28 | interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>; | ||
29 | regulators { | ||
30 | rfldo_reg: rfldo { | ||
31 | regulator-min-microvolt = <1200000>; | ||
32 | regulator-max-microvolt = <3300000>; | ||
33 | }; | ||
34 | |||
35 | ... | ||
36 | }; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/da9055.txt b/Documentation/devicetree/bindings/mfd/da9055.txt new file mode 100644 index 000000000000..6dab34d34fce --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/da9055.txt | |||
@@ -0,0 +1,72 @@ | |||
1 | * Dialog DA9055 Power Management Integrated Circuit (PMIC) | ||
2 | |||
3 | DA9055 consists of a large and varied group of sub-devices (I2C Only): | ||
4 | |||
5 | Device Supply Names Description | ||
6 | ------ ------------ ----------- | ||
7 | da9055-gpio : : GPIOs | ||
8 | da9055-regulator : : Regulators | ||
9 | da9055-onkey : : On key | ||
10 | da9055-rtc : : RTC | ||
11 | da9055-hwmon : : ADC | ||
12 | da9055-watchdog : : Watchdog | ||
13 | |||
14 | The CODEC device in DA9055 has a separate, configurable I2C address and so | ||
15 | is instantiated separately from the PMIC. | ||
16 | |||
17 | For details on accompanying CODEC I2C device, see the following: | ||
18 | Documentation/devicetree/bindings/sound/da9055.txt | ||
19 | |||
20 | ====== | ||
21 | |||
22 | Required properties: | ||
23 | - compatible : Should be "dlg,da9055-pmic" | ||
24 | - reg: Specifies the I2C slave address (defaults to 0x5a but can be modified) | ||
25 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
26 | the IRQs from da9055 are delivered to. | ||
27 | - interrupts: IRQ line info for da9055 chip. | ||
28 | - interrupt-controller: da9055 has internal IRQs (has own IRQ domain). | ||
29 | - #interrupt-cells: Should be 1, is the local IRQ number for da9055. | ||
30 | |||
31 | Sub-nodes: | ||
32 | - regulators : Contain the regulator nodes. The DA9055 regulators are | ||
33 | bound using their names as listed below: | ||
34 | |||
35 | buck1 : regulator BUCK1 | ||
36 | buck2 : regulator BUCK2 | ||
37 | ldo1 : regulator LDO1 | ||
38 | ldo2 : regulator LDO2 | ||
39 | ldo3 : regulator LDO3 | ||
40 | ldo4 : regulator LDO4 | ||
41 | ldo5 : regulator LDO5 | ||
42 | ldo6 : regulator LDO6 | ||
43 | |||
44 | The bindings details of individual regulator device can be found in: | ||
45 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
46 | |||
47 | |||
48 | Example: | ||
49 | |||
50 | pmic: da9055-pmic@5a { | ||
51 | compatible = "dlg,da9055-pmic"; | ||
52 | reg = <0x5a>; | ||
53 | interrupt-parent = <&intc>; | ||
54 | interrupts = <5 IRQ_TYPE_LEVEL_LOW>; | ||
55 | interrupt-controller; | ||
56 | #interrupt-cells = <1>; | ||
57 | |||
58 | regulators { | ||
59 | buck1: BUCK1 { | ||
60 | regulator-min-microvolt = <725000>; | ||
61 | regulator-max-microvolt = <2075000>; | ||
62 | }; | ||
63 | buck2: BUCK2 { | ||
64 | regulator-min-microvolt = <925000>; | ||
65 | regulator-max-microvolt = <2500000>; | ||
66 | }; | ||
67 | ldo1: LDO1 { | ||
68 | regulator-min-microvolt = <900000>; | ||
69 | regulator-max-microvolt = <3300000>; | ||
70 | }; | ||
71 | }; | ||
72 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt b/Documentation/devicetree/bindings/mfd/omap-usb-host.txt index b381fa696bf9..4721b2d521e4 100644 --- a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt +++ b/Documentation/devicetree/bindings/mfd/omap-usb-host.txt | |||
@@ -32,6 +32,29 @@ Optional properties: | |||
32 | - single-ulpi-bypass: Must be present if the controller contains a single | 32 | - single-ulpi-bypass: Must be present if the controller contains a single |
33 | ULPI bypass control bit. e.g. OMAP3 silicon <= ES2.1 | 33 | ULPI bypass control bit. e.g. OMAP3 silicon <= ES2.1 |
34 | 34 | ||
35 | - clocks: a list of phandles and clock-specifier pairs, one for each entry in | ||
36 | clock-names. | ||
37 | |||
38 | - clock-names: should include: | ||
39 | For OMAP3 | ||
40 | * "usbhost_120m_fck" - 120MHz Functional clock. | ||
41 | |||
42 | For OMAP4+ | ||
43 | * "refclk_60m_int" - 60MHz internal reference clock for UTMI clock mux | ||
44 | * "refclk_60m_ext_p1" - 60MHz external ref. clock for Port 1's UTMI clock mux. | ||
45 | * "refclk_60m_ext_p2" - 60MHz external ref. clock for Port 2's UTMI clock mux | ||
46 | * "utmi_p1_gfclk" - Port 1 UTMI clock mux. | ||
47 | * "utmi_p2_gfclk" - Port 2 UTMI clock mux. | ||
48 | * "usb_host_hs_utmi_p1_clk" - Port 1 UTMI clock gate. | ||
49 | * "usb_host_hs_utmi_p2_clk" - Port 2 UTMI clock gate. | ||
50 | * "usb_host_hs_utmi_p3_clk" - Port 3 UTMI clock gate. | ||
51 | * "usb_host_hs_hsic480m_p1_clk" - Port 1 480MHz HSIC clock gate. | ||
52 | * "usb_host_hs_hsic480m_p2_clk" - Port 2 480MHz HSIC clock gate. | ||
53 | * "usb_host_hs_hsic480m_p3_clk" - Port 3 480MHz HSIC clock gate. | ||
54 | * "usb_host_hs_hsic60m_p1_clk" - Port 1 60MHz HSIC clock gate. | ||
55 | * "usb_host_hs_hsic60m_p2_clk" - Port 2 60MHz HSIC clock gate. | ||
56 | * "usb_host_hs_hsic60m_p3_clk" - Port 3 60MHz HSIC clock gate. | ||
57 | |||
35 | Required properties if child node exists: | 58 | Required properties if child node exists: |
36 | 59 | ||
37 | - #address-cells: Must be 1 | 60 | - #address-cells: Must be 1 |
diff --git a/Documentation/devicetree/bindings/mfd/omap-usb-tll.txt b/Documentation/devicetree/bindings/mfd/omap-usb-tll.txt index 62fe69724e3b..c58d70437fce 100644 --- a/Documentation/devicetree/bindings/mfd/omap-usb-tll.txt +++ b/Documentation/devicetree/bindings/mfd/omap-usb-tll.txt | |||
@@ -7,6 +7,16 @@ Required properties: | |||
7 | - interrupts : should contain the TLL module's interrupt | 7 | - interrupts : should contain the TLL module's interrupt |
8 | - ti,hwmod : must contain "usb_tll_hs" | 8 | - ti,hwmod : must contain "usb_tll_hs" |
9 | 9 | ||
10 | Optional properties: | ||
11 | |||
12 | - clocks: a list of phandles and clock-specifier pairs, one for each entry in | ||
13 | clock-names. | ||
14 | |||
15 | - clock-names: should include: | ||
16 | * "usb_tll_hs_usb_ch0_clk" - USB TLL channel 0 clock | ||
17 | * "usb_tll_hs_usb_ch1_clk" - USB TLL channel 1 clock | ||
18 | * "usb_tll_hs_usb_ch2_clk" - USB TLL channel 2 clock | ||
19 | |||
10 | Example: | 20 | Example: |
11 | 21 | ||
12 | usbhstll: usbhstll@4a062000 { | 22 | usbhstll: usbhstll@4a062000 { |
diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8xxx.txt b/Documentation/devicetree/bindings/mfd/qcom,pm8xxx.txt new file mode 100644 index 000000000000..03518dc8b6bd --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/qcom,pm8xxx.txt | |||
@@ -0,0 +1,96 @@ | |||
1 | Qualcomm PM8xxx PMIC multi-function devices | ||
2 | |||
3 | The PM8xxx family of Power Management ICs are used to provide regulated | ||
4 | voltages and other various functionality to Qualcomm SoCs. | ||
5 | |||
6 | = PROPERTIES | ||
7 | |||
8 | - compatible: | ||
9 | Usage: required | ||
10 | Value type: <string> | ||
11 | Definition: must be one of: | ||
12 | "qcom,pm8058" | ||
13 | "qcom,pm8921" | ||
14 | |||
15 | - #address-cells: | ||
16 | Usage: required | ||
17 | Value type: <u32> | ||
18 | Definition: must be 1 | ||
19 | |||
20 | - #size-cells: | ||
21 | Usage: required | ||
22 | Value type: <u32> | ||
23 | Definition: must be 0 | ||
24 | |||
25 | - interrupts: | ||
26 | Usage: required | ||
27 | Value type: <prop-encoded-array> | ||
28 | Definition: specifies the interrupt that indicates a subdevice | ||
29 | has generated an interrupt (summary interrupt). The | ||
30 | format of the specifier is defined by the binding document | ||
31 | describing the node's interrupt parent. | ||
32 | |||
33 | - #interrupt-cells: | ||
34 | Usage: required | ||
35 | Value type : <u32> | ||
36 | Definition: must be 2. Specifies the number of cells needed to encode | ||
37 | an interrupt source. The 1st cell contains the interrupt | ||
38 | number. The 2nd cell is the trigger type and level flags | ||
39 | encoded as follows: | ||
40 | |||
41 | 1 = low-to-high edge triggered | ||
42 | 2 = high-to-low edge triggered | ||
43 | 4 = active high level-sensitive | ||
44 | 8 = active low level-sensitive | ||
45 | |||
46 | - interrupt-controller: | ||
47 | Usage: required | ||
48 | Value type: <empty> | ||
49 | Definition: identifies this node as an interrupt controller | ||
50 | |||
51 | = SUBCOMPONENTS | ||
52 | |||
53 | The PMIC contains multiple independent functions, each described in a subnode. | ||
54 | The below bindings specify the set of valid subnodes. | ||
55 | |||
56 | == Real-Time Clock | ||
57 | |||
58 | - compatible: | ||
59 | Usage: required | ||
60 | Value type: <string> | ||
61 | Definition: must be one of: | ||
62 | "qcom,pm8058-rtc" | ||
63 | "qcom,pm8921-rtc" | ||
64 | |||
65 | - reg: | ||
66 | Usage: required | ||
67 | Value type: <prop-encoded-array> | ||
68 | Definition: single entry specifying the base address of the RTC registers | ||
69 | |||
70 | - interrupts: | ||
71 | Usage: required | ||
72 | Value type: <prop-encoded-array> | ||
73 | Definition: single entry specifying the RTC's alarm interrupt | ||
74 | |||
75 | - allow-set-time: | ||
76 | Usage: optional | ||
77 | Value type: <empty> | ||
78 | Definition: indicates that the setting of RTC time is allowed by | ||
79 | the host CPU | ||
80 | |||
81 | = EXAMPLE | ||
82 | |||
83 | pmicintc: pmic@0 { | ||
84 | compatible = "qcom,pm8921"; | ||
85 | interrupts = <104 8>; | ||
86 | #interrupt-cells = <2>; | ||
87 | interrupt-controller; | ||
88 | #address-cells = <1>; | ||
89 | #size-cells = <0>; | ||
90 | |||
91 | rtc@11d { | ||
92 | compatible = "qcom,pm8921-rtc"; | ||
93 | reg = <0x11d>; | ||
94 | interrupts = <0x27 0>; | ||
95 | }; | ||
96 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt new file mode 100644 index 000000000000..c13d3d8c3947 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/s2mpa01.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | |||
2 | * Samsung S2MPA01 Voltage and Current Regulator | ||
3 | |||
4 | The Samsung S2MPA01 is a multi-function device which includes high | ||
5 | efficiency buck converters including Dual-Phase buck converter, various LDOs, | ||
6 | and an RTC. It is interfaced to the host controller using an I2C interface. | ||
7 | Each sub-block is addressed by the host system using different I2C slave | ||
8 | addresses. | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: Should be "samsung,s2mpa01-pmic". | ||
12 | - reg: Specifies the I2C slave address of the PMIC block. It should be 0x66. | ||
13 | |||
14 | Optional properties: | ||
15 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
16 | the interrupts from s2mpa01 are delivered to. | ||
17 | - interrupts: An interrupt specifier for the sole interrupt generated by the | ||
18 | device. | ||
19 | |||
20 | Optional nodes: | ||
21 | - regulators: The regulators of s2mpa01 that have to be instantiated should be | ||
22 | included in a sub-node named 'regulators'. Regulator nodes and constraints | ||
23 | included in this sub-node use the standard regulator bindings which are | ||
24 | documented elsewhere. | ||
25 | |||
26 | Properties for BUCK regulator nodes: | ||
27 | - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500 | ||
28 | (default), 25000, or 50000. May be 0 for disabling the ramp delay on | ||
29 | BUCK{1,2,3,4}. | ||
30 | |||
31 | In the absence of the regulator-ramp-delay property, the default ramp | ||
32 | delay will be used. | ||
33 | |||
34 | NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set | ||
35 | for a particular group of BUCKs. So provide same regulator-ramp-delay=<value>. | ||
36 | |||
37 | The following BUCKs share ramp settings: | ||
38 | * 1 and 6 | ||
39 | * 2 and 4 | ||
40 | * 8, 9, and 10 | ||
41 | |||
42 | The following are the names of the regulators that the s2mpa01 PMIC block | ||
43 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number | ||
44 | as per the datasheet of s2mpa01. | ||
45 | |||
46 | - LDOn | ||
47 | - valid values for n are 1 to 26 | ||
48 | - Example: LDO1, LD02, LDO26 | ||
49 | - BUCKn | ||
50 | - valid values for n are 1 to 10. | ||
51 | - Example: BUCK1, BUCK2, BUCK9 | ||
52 | |||
53 | Example: | ||
54 | |||
55 | s2mpa01_pmic@66 { | ||
56 | compatible = "samsung,s2mpa01-pmic"; | ||
57 | reg = <0x66>; | ||
58 | |||
59 | regulators { | ||
60 | ldo1_reg: LDO1 { | ||
61 | regulator-name = "VDD_ALIVE"; | ||
62 | regulator-min-microvolt = <1000000>; | ||
63 | regulator-max-microvolt = <1000000>; | ||
64 | }; | ||
65 | |||
66 | ldo2_reg: LDO2 { | ||
67 | regulator-name = "VDDQ_MMC2"; | ||
68 | regulator-min-microvolt = <2800000>; | ||
69 | regulator-max-microvolt = <2800000>; | ||
70 | regulator-always-on; | ||
71 | }; | ||
72 | |||
73 | buck1_reg: BUCK1 { | ||
74 | regulator-name = "vdd_mif"; | ||
75 | regulator-min-microvolt = <950000>; | ||
76 | regulator-max-microvolt = <1350000>; | ||
77 | regulator-always-on; | ||
78 | regulator-boot-on; | ||
79 | }; | ||
80 | |||
81 | buck2_reg: BUCK2 { | ||
82 | regulator-name = "vdd_arm"; | ||
83 | regulator-min-microvolt = <950000>; | ||
84 | regulator-max-microvolt = <1350000>; | ||
85 | regulator-always-on; | ||
86 | regulator-boot-on; | ||
87 | regulator-ramp-delay = <50000>; | ||
88 | }; | ||
89 | }; | ||
90 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt index 15ee89c3cc7b..802e839b0829 100644 --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt +++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | * Samsung S2MPS11 Voltage and Current Regulator | 2 | * Samsung S2MPS11 and S2MPS14 Voltage and Current Regulator |
3 | 3 | ||
4 | The Samsung S2MPS11 is a multi-function device which includes voltage and | 4 | The Samsung S2MPS11 is a multi-function device which includes voltage and |
5 | current regulators, RTC, charger controller and other sub-blocks. It is | 5 | current regulators, RTC, charger controller and other sub-blocks. It is |
@@ -7,7 +7,7 @@ interfaced to the host controller using an I2C interface. Each sub-block is | |||
7 | addressed by the host system using different I2C slave addresses. | 7 | addressed by the host system using different I2C slave addresses. |
8 | 8 | ||
9 | Required properties: | 9 | Required properties: |
10 | - compatible: Should be "samsung,s2mps11-pmic". | 10 | - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic". |
11 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. | 11 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. |
12 | 12 | ||
13 | Optional properties: | 13 | Optional properties: |
@@ -16,20 +16,25 @@ Optional properties: | |||
16 | - interrupts: Interrupt specifiers for interrupt sources. | 16 | - interrupts: Interrupt specifiers for interrupt sources. |
17 | 17 | ||
18 | Optional nodes: | 18 | Optional nodes: |
19 | - clocks: s2mps11 provides three(AP/CP/BT) buffered 32.768 KHz outputs, so to | 19 | - clocks: s2mps11 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz |
20 | register these as clocks with common clock framework instantiate a sub-node | 20 | outputs, so to register these as clocks with common clock framework |
21 | named "clocks". It uses the common clock binding documented in : | 21 | instantiate a sub-node named "clocks". It uses the common clock binding |
22 | documented in : | ||
22 | [Documentation/devicetree/bindings/clock/clock-bindings.txt] | 23 | [Documentation/devicetree/bindings/clock/clock-bindings.txt] |
24 | The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs. | ||
23 | - #clock-cells: should be 1. | 25 | - #clock-cells: should be 1. |
24 | 26 | ||
25 | - The following is the list of clocks generated by the controller. Each clock | 27 | - The following is the list of clocks generated by the controller. Each clock |
26 | is assigned an identifier and client nodes use this identifier to specify | 28 | is assigned an identifier and client nodes use this identifier to specify |
27 | the clock which they consume. | 29 | the clock which they consume. |
28 | Clock ID | 30 | Clock ID Devices |
29 | ---------------------- | 31 | ---------------------------------------------------------- |
30 | 32KhzAP 0 | 32 | 32KhzAP 0 S2MPS11, S2MPS14, S5M8767 |
31 | 32KhzCP 1 | 33 | 32KhzCP 1 S2MPS11, S5M8767 |
32 | 32KhzBT 2 | 34 | 32KhzBT 2 S2MPS11, S2MPS14, S5M8767 |
35 | |||
36 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps14-clk", | ||
37 | "samsung,s5m8767-clk" | ||
33 | 38 | ||
34 | - regulators: The regulators of s2mps11 that have to be instantiated should be | 39 | - regulators: The regulators of s2mps11 that have to be instantiated should be |
35 | included in a sub-node named 'regulators'. Regulator nodes included in this | 40 | included in a sub-node named 'regulators'. Regulator nodes included in this |
@@ -59,10 +64,14 @@ supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number | |||
59 | as per the datasheet of s2mps11. | 64 | as per the datasheet of s2mps11. |
60 | 65 | ||
61 | - LDOn | 66 | - LDOn |
62 | - valid values for n are 1 to 38 | 67 | - valid values for n are: |
68 | - S2MPS11: 1 to 38 | ||
69 | - S2MPS14: 1 to 25 | ||
63 | - Example: LDO1, LD02, LDO28 | 70 | - Example: LDO1, LD02, LDO28 |
64 | - BUCKn | 71 | - BUCKn |
65 | - valid values for n are 1 to 10. | 72 | - valid values for n are: |
73 | - S2MPS11: 1 to 10 | ||
74 | - S2MPS14: 1 to 5 | ||
66 | - Example: BUCK1, BUCK2, BUCK9 | 75 | - Example: BUCK1, BUCK2, BUCK9 |
67 | 76 | ||
68 | Example: | 77 | Example: |
@@ -71,7 +80,8 @@ Example: | |||
71 | compatible = "samsung,s2mps11-pmic"; | 80 | compatible = "samsung,s2mps11-pmic"; |
72 | reg = <0x66>; | 81 | reg = <0x66>; |
73 | 82 | ||
74 | s2m_osc: clocks{ | 83 | s2m_osc: clocks { |
84 | compatible = "samsung,s2mps11-clk"; | ||
75 | #clock-cells = 1; | 85 | #clock-cells = 1; |
76 | clock-output-names = "xx", "yy", "zz"; | 86 | clock-output-names = "xx", "yy", "zz"; |
77 | }; | 87 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt index b4bd98af1cc7..38833e63a59f 100644 --- a/Documentation/devicetree/bindings/mfd/tps65910.txt +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt | |||
@@ -11,7 +11,7 @@ Required properties: | |||
11 | - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. | 11 | - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. |
12 | The first cell is the IRQ number. | 12 | The first cell is the IRQ number. |
13 | The second cell is the flags, encoded as the trigger masks from | 13 | The second cell is the flags, encoded as the trigger masks from |
14 | Documentation/devicetree/bindings/interrupts.txt | 14 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt |
15 | - regulators: This is the list of child nodes that specify the regulator | 15 | - regulators: This is the list of child nodes that specify the regulator |
16 | initialization data for defined regulators. Not all regulators for the given | 16 | initialization data for defined regulators. Not all regulators for the given |
17 | device need to be present. The definition for each of these nodes is defined | 17 | device need to be present. The definition for each of these nodes is defined |
diff --git a/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt index 68ba37295565..fabdf64a5737 100644 --- a/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt +++ b/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt | |||
@@ -1,12 +1,12 @@ | |||
1 | Allwinner sunxi-sid | 1 | Allwinner sunxi-sid |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: "allwinner,sun4i-sid" or "allwinner,sun7i-a20-sid". | 4 | - compatible: "allwinner,sun4i-a10-sid" or "allwinner,sun7i-a20-sid" |
5 | - reg: Should contain registers location and length | 5 | - reg: Should contain registers location and length |
6 | 6 | ||
7 | Example for sun4i: | 7 | Example for sun4i: |
8 | sid@01c23800 { | 8 | sid@01c23800 { |
9 | compatible = "allwinner,sun4i-sid"; | 9 | compatible = "allwinner,sun4i-a10-sid"; |
10 | reg = <0x01c23800 0x10> | 10 | reg = <0x01c23800 0x10> |
11 | }; | 11 | }; |
12 | 12 | ||
diff --git a/Documentation/devicetree/bindings/misc/atmel-ssc.txt b/Documentation/devicetree/bindings/misc/atmel-ssc.txt index 60960b2755f4..efc98ea1f23d 100644 --- a/Documentation/devicetree/bindings/misc/atmel-ssc.txt +++ b/Documentation/devicetree/bindings/misc/atmel-ssc.txt | |||
@@ -17,6 +17,14 @@ Required properties for devices compatible with "atmel,at91sam9g45-ssc": | |||
17 | See Documentation/devicetree/bindings/dma/atmel-dma.txt for details. | 17 | See Documentation/devicetree/bindings/dma/atmel-dma.txt for details. |
18 | - dma-names: Must be "tx", "rx". | 18 | - dma-names: Must be "tx", "rx". |
19 | 19 | ||
20 | Optional properties: | ||
21 | - atmel,clk-from-rk-pin: bool property. | ||
22 | - When SSC works in slave mode, according to the hardware design, the | ||
23 | clock can get from TK pin, and also can get from RK pin. So, add | ||
24 | this parameter to choose where the clock from. | ||
25 | - By default the clock is from TK pin, if the clock from RK pin, this | ||
26 | property is needed. | ||
27 | |||
20 | Examples: | 28 | Examples: |
21 | - PDC transfer: | 29 | - PDC transfer: |
22 | ssc0: ssc@fffbc000 { | 30 | ssc0: ssc@fffbc000 { |
diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/misc/sram.txt index 4d0a00e453a8..36cbe5aea990 100644 --- a/Documentation/devicetree/bindings/misc/sram.txt +++ b/Documentation/devicetree/bindings/misc/sram.txt | |||
@@ -8,9 +8,44 @@ Required properties: | |||
8 | 8 | ||
9 | - reg : SRAM iomem address range | 9 | - reg : SRAM iomem address range |
10 | 10 | ||
11 | Reserving sram areas: | ||
12 | --------------------- | ||
13 | |||
14 | Each child of the sram node specifies a region of reserved memory. Each | ||
15 | child node should use a 'reg' property to specify a specific range of | ||
16 | reserved memory. | ||
17 | |||
18 | Following the generic-names recommended practice, node names should | ||
19 | reflect the purpose of the node. Unit address (@<address>) should be | ||
20 | appended to the name. | ||
21 | |||
22 | Required properties in the sram node: | ||
23 | |||
24 | - #address-cells, #size-cells : should use the same values as the root node | ||
25 | - ranges : standard definition, should translate from local addresses | ||
26 | within the sram to bus addresses | ||
27 | |||
28 | Required properties in the area nodes: | ||
29 | |||
30 | - reg : iomem address range, relative to the SRAM range | ||
31 | |||
32 | Optional properties in the area nodes: | ||
33 | |||
34 | - compatible : standard definition, should contain a vendor specific string | ||
35 | in the form <vendor>,[<device>-]<usage> | ||
36 | |||
11 | Example: | 37 | Example: |
12 | 38 | ||
13 | sram: sram@5c000000 { | 39 | sram: sram@5c000000 { |
14 | compatible = "mmio-sram"; | 40 | compatible = "mmio-sram"; |
15 | reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */ | 41 | reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */ |
42 | |||
43 | #adress-cells = <1>; | ||
44 | #size-cells = <1>; | ||
45 | ranges = <0 0x5c000000 0x40000>; | ||
46 | |||
47 | smp-sram@100 { | ||
48 | compatible = "socvendor,smp-sram"; | ||
49 | reg = <0x100 0x50>; | ||
50 | }; | ||
16 | }; | 51 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt new file mode 100644 index 000000000000..4897bea7e3f8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Altera SOCFPGA specific extensions to the Synopsys Designware Mobile | ||
2 | Storage Host Controller | ||
3 | |||
4 | The Synopsys designware mobile storage host controller is used to interface | ||
5 | a SoC with storage medium such as eMMC or SD/MMC cards. This file documents | ||
6 | differences between the core Synopsys dw mshc controller properties described | ||
7 | by synopsys-dw-mshc.txt and the properties used by the Altera SOCFPGA specific | ||
8 | extensions to the Synopsys Designware Mobile Storage Host Controller. | ||
9 | |||
10 | Required Properties: | ||
11 | |||
12 | * compatible: should be | ||
13 | - "altr,socfpga-dw-mshc": for Altera's SOCFPGA platform | ||
14 | |||
15 | Example: | ||
16 | |||
17 | mmc: dwmmc0@ff704000 { | ||
18 | compatible = "altr,socfpga-dw-mshc"; | ||
19 | reg = <0xff704000 0x1000>; | ||
20 | interrupts = <0 129 4>; | ||
21 | #address-cells = <1>; | ||
22 | #size-cells = <0>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt index 03855c8c492a..b53f92e252d4 100644 --- a/Documentation/devicetree/bindings/mtd/nand.txt +++ b/Documentation/devicetree/bindings/mtd/nand.txt | |||
@@ -5,3 +5,17 @@ | |||
5 | "soft_bch". | 5 | "soft_bch". |
6 | - nand-bus-width : 8 or 16 bus width if not present 8 | 6 | - nand-bus-width : 8 or 16 bus width if not present 8 |
7 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false | 7 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false |
8 | |||
9 | - nand-ecc-strength: integer representing the number of bits to correct | ||
10 | per ECC step. | ||
11 | |||
12 | - nand-ecc-step-size: integer representing the number of data bytes | ||
13 | that are covered by a single ECC step. | ||
14 | |||
15 | The ECC strength and ECC step size properties define the correction capability | ||
16 | of a controller. Together, they say a controller can correct "{strength} bit | ||
17 | errors per {size} bytes". | ||
18 | |||
19 | The interpretation of these parameters is implementation-defined, so not all | ||
20 | implementations must support all possible combinations. However, implementations | ||
21 | are encouraged to further specify the value(s) they support. | ||
diff --git a/Documentation/devicetree/bindings/mtd/st-fsm.txt b/Documentation/devicetree/bindings/mtd/st-fsm.txt new file mode 100644 index 000000000000..c2489391c437 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/st-fsm.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * ST-Microelectronics SPI FSM Serial (NOR) Flash Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "st,spi-fsm" | ||
5 | - reg : Contains register's location and length. | ||
6 | - reg-names : Should contain the reg names "spi-fsm" | ||
7 | - interrupts : The interrupt number | ||
8 | - pinctrl-0 : Standard Pinctrl phandle (see: pinctrl/pinctrl-bindings.txt) | ||
9 | |||
10 | Optional properties: | ||
11 | - st,syscfg : Phandle to boot-device system configuration registers | ||
12 | - st,boot-device-reg : Address of the aforementioned boot-device register(s) | ||
13 | - st,boot-device-spi : Expected boot-device value if booted via this device | ||
14 | |||
15 | Example: | ||
16 | spifsm: spifsm@fe902000{ | ||
17 | compatible = "st,spi-fsm"; | ||
18 | reg = <0xfe902000 0x1000>; | ||
19 | reg-names = "spi-fsm"; | ||
20 | pinctrl-0 = <&pinctrl_fsm>; | ||
21 | st,syscfg = <&syscfg_rear>; | ||
22 | st,boot-device-reg = <0x958>; | ||
23 | st,boot-device-spi = <0x1a>; | ||
24 | status = "okay"; | ||
25 | }; | ||
26 | |||
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt index 863d5b8155c7..10640b17c866 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt | |||
@@ -5,13 +5,9 @@ Required properties: | |||
5 | "allwinner,sun4i-emac") | 5 | "allwinner,sun4i-emac") |
6 | - reg: address and length of the register set for the device. | 6 | - reg: address and length of the register set for the device. |
7 | - interrupts: interrupt for the device | 7 | - interrupts: interrupt for the device |
8 | - phy: A phandle to a phy node defining the PHY address (as the reg | 8 | - phy: see ethernet.txt file in the same directory. |
9 | property, a single integer). | ||
10 | - clocks: A phandle to the reference clock for this device | 9 | - clocks: A phandle to the reference clock for this device |
11 | 10 | ||
12 | Optional properties: | ||
13 | - (local-)mac-address: mac address to be used by this driver | ||
14 | |||
15 | Example: | 11 | Example: |
16 | 12 | ||
17 | emac: ethernet@01c0b000 { | 13 | emac: ethernet@01c0b000 { |
diff --git a/Documentation/devicetree/bindings/net/altera_tse.txt b/Documentation/devicetree/bindings/net/altera_tse.txt new file mode 100644 index 000000000000..a706297998e9 --- /dev/null +++ b/Documentation/devicetree/bindings/net/altera_tse.txt | |||
@@ -0,0 +1,114 @@ | |||
1 | * Altera Triple-Speed Ethernet MAC driver (TSE) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "altr,tse-1.0" for legacy SGDMA based TSE, and should | ||
5 | be "altr,tse-msgdma-1.0" for the preferred MSGDMA based TSE. | ||
6 | ALTR is supported for legacy device trees, but is deprecated. | ||
7 | altr should be used for all new designs. | ||
8 | - reg: Address and length of the register set for the device. It contains | ||
9 | the information of registers in the same order as described by reg-names | ||
10 | - reg-names: Should contain the reg names | ||
11 | "control_port": MAC configuration space region | ||
12 | "tx_csr": xDMA Tx dispatcher control and status space region | ||
13 | "tx_desc": MSGDMA Tx dispatcher descriptor space region | ||
14 | "rx_csr" : xDMA Rx dispatcher control and status space region | ||
15 | "rx_desc": MSGDMA Rx dispatcher descriptor space region | ||
16 | "rx_resp": MSGDMA Rx dispatcher response space region | ||
17 | "s1": SGDMA descriptor memory | ||
18 | - interrupts: Should contain the TSE interrupts and it's mode. | ||
19 | - interrupt-names: Should contain the interrupt names | ||
20 | "rx_irq": xDMA Rx dispatcher interrupt | ||
21 | "tx_irq": xDMA Tx dispatcher interrupt | ||
22 | - rx-fifo-depth: MAC receive FIFO buffer depth in bytes | ||
23 | - tx-fifo-depth: MAC transmit FIFO buffer depth in bytes | ||
24 | - phy-mode: See ethernet.txt in the same directory. | ||
25 | - phy-handle: See ethernet.txt in the same directory. | ||
26 | - phy-addr: See ethernet.txt in the same directory. A configuration should | ||
27 | include phy-handle or phy-addr. | ||
28 | - altr,has-supplementary-unicast: | ||
29 | If present, TSE supports additional unicast addresses. | ||
30 | Otherwise additional unicast addresses are not supported. | ||
31 | - altr,has-hash-multicast-filter: | ||
32 | If present, TSE supports a hash based multicast filter. | ||
33 | Otherwise, hash-based multicast filtering is not supported. | ||
34 | |||
35 | - mdio device tree subnode: When the TSE has a phy connected to its local | ||
36 | mdio, there must be device tree subnode with the following | ||
37 | required properties: | ||
38 | |||
39 | - compatible: Must be "altr,tse-mdio". | ||
40 | - #address-cells: Must be <1>. | ||
41 | - #size-cells: Must be <0>. | ||
42 | |||
43 | For each phy on the mdio bus, there must be a node with the following | ||
44 | fields: | ||
45 | |||
46 | - reg: phy id used to communicate to phy. | ||
47 | - device_type: Must be "ethernet-phy". | ||
48 | |||
49 | Optional properties: | ||
50 | - local-mac-address: See ethernet.txt in the same directory. | ||
51 | - max-frame-size: See ethernet.txt in the same directory. | ||
52 | |||
53 | Example: | ||
54 | |||
55 | tse_sub_0_eth_tse_0: ethernet@0x1,00000000 { | ||
56 | compatible = "altr,tse-msgdma-1.0"; | ||
57 | reg = <0x00000001 0x00000000 0x00000400>, | ||
58 | <0x00000001 0x00000460 0x00000020>, | ||
59 | <0x00000001 0x00000480 0x00000020>, | ||
60 | <0x00000001 0x000004A0 0x00000008>, | ||
61 | <0x00000001 0x00000400 0x00000020>, | ||
62 | <0x00000001 0x00000420 0x00000020>; | ||
63 | reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc"; | ||
64 | interrupt-parent = <&hps_0_arm_gic_0>; | ||
65 | interrupts = <0 41 4>, <0 40 4>; | ||
66 | interrupt-names = "rx_irq", "tx_irq"; | ||
67 | rx-fifo-depth = <2048>; | ||
68 | tx-fifo-depth = <2048>; | ||
69 | address-bits = <48>; | ||
70 | max-frame-size = <1500>; | ||
71 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
72 | phy-mode = "gmii"; | ||
73 | altr,has-supplementary-unicast; | ||
74 | altr,has-hash-multicast-filter; | ||
75 | phy-handle = <&phy0>; | ||
76 | mdio { | ||
77 | compatible = "altr,tse-mdio"; | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <0>; | ||
80 | phy0: ethernet-phy@0 { | ||
81 | reg = <0x0>; | ||
82 | device_type = "ethernet-phy"; | ||
83 | }; | ||
84 | |||
85 | phy1: ethernet-phy@1 { | ||
86 | reg = <0x1>; | ||
87 | device_type = "ethernet-phy"; | ||
88 | }; | ||
89 | |||
90 | }; | ||
91 | }; | ||
92 | |||
93 | tse_sub_1_eth_tse_0: ethernet@0x1,00001000 { | ||
94 | compatible = "altr,tse-msgdma-1.0"; | ||
95 | reg = <0x00000001 0x00001000 0x00000400>, | ||
96 | <0x00000001 0x00001460 0x00000020>, | ||
97 | <0x00000001 0x00001480 0x00000020>, | ||
98 | <0x00000001 0x000014A0 0x00000008>, | ||
99 | <0x00000001 0x00001400 0x00000020>, | ||
100 | <0x00000001 0x00001420 0x00000020>; | ||
101 | reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc"; | ||
102 | interrupt-parent = <&hps_0_arm_gic_0>; | ||
103 | interrupts = <0 43 4>, <0 42 4>; | ||
104 | interrupt-names = "rx_irq", "tx_irq"; | ||
105 | rx-fifo-depth = <2048>; | ||
106 | tx-fifo-depth = <2048>; | ||
107 | address-bits = <48>; | ||
108 | max-frame-size = <1500>; | ||
109 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
110 | phy-mode = "gmii"; | ||
111 | altr,has-supplementary-unicast; | ||
112 | altr,has-hash-multicast-filter; | ||
113 | phy-handle = <&phy1>; | ||
114 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt index bcbc3f009158..7fbb027218a1 100644 --- a/Documentation/devicetree/bindings/net/arc_emac.txt +++ b/Documentation/devicetree/bindings/net/arc_emac.txt | |||
@@ -6,19 +6,12 @@ Required properties: | |||
6 | - interrupts: Should contain the EMAC interrupts | 6 | - interrupts: Should contain the EMAC interrupts |
7 | - clock-frequency: CPU frequency. It is needed to calculate and set polling | 7 | - clock-frequency: CPU frequency. It is needed to calculate and set polling |
8 | period of EMAC. | 8 | period of EMAC. |
9 | - max-speed: Maximum supported data-rate in Mbit/s. In some HW configurations | 9 | - max-speed: see ethernet.txt file in the same directory. |
10 | bandwidth of external memory controller might be a limiting factor. That's why | 10 | - phy: see ethernet.txt file in the same directory. |
11 | it's required to specify which data-rate is supported on current SoC or FPGA. | ||
12 | For example if only 10 Mbit/s is supported (10BASE-T) set "10". If 100 Mbit/s is | ||
13 | supported (100BASE-TX) set "100". | ||
14 | - phy: PHY device attached to the EMAC via MDIO bus | ||
15 | 11 | ||
16 | Child nodes of the driver are the individual PHY devices connected to the | 12 | Child nodes of the driver are the individual PHY devices connected to the |
17 | MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. | 13 | MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. |
18 | 14 | ||
19 | Optional properties: | ||
20 | - mac-address: 6 bytes, mac address | ||
21 | |||
22 | Examples: | 15 | Examples: |
23 | 16 | ||
24 | ethernet@c0fc2000 { | 17 | ethernet@c0fc2000 { |
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt new file mode 100644 index 000000000000..f2febb94550e --- /dev/null +++ b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt | |||
@@ -0,0 +1,121 @@ | |||
1 | * Broadcom BCM7xxx Ethernet Controller (GENET) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2", | ||
5 | "brcm,genet-v3", "brcm,genet-v4". | ||
6 | - reg: address and length of the register set for the device | ||
7 | - interrupts: must be two cells, the first cell is the general purpose | ||
8 | interrupt line, while the second cell is the interrupt for the ring | ||
9 | RX and TX queues operating in ring mode | ||
10 | - phy-mode: see ethernet.txt file in the same directory | ||
11 | - #address-cells: should be 1 | ||
12 | - #size-cells: should be 1 | ||
13 | |||
14 | Optional properties: | ||
15 | - clocks: When provided, must be two phandles to the functional clocks nodes | ||
16 | of the GENET block. The first phandle is the main GENET clock used during | ||
17 | normal operation, while the second phandle is the Wake-on-LAN clock. | ||
18 | - clock-names: When provided, names of the functional clock phandles, first | ||
19 | name should be "enet" and second should be "enet-wol". | ||
20 | |||
21 | - phy-handle: See ethernet.txt file in the same directory; used to describe | ||
22 | configurations where a PHY (internal or external) is used. | ||
23 | |||
24 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or | ||
25 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is | ||
26 | voluntarily disabled, this property should be used to describe the "fixed link". | ||
27 | See Documentation/devicetree/bindings/net/fsl-tsec-phy.txt for information on | ||
28 | the property specifics | ||
29 | |||
30 | Required child nodes: | ||
31 | |||
32 | - mdio bus node: this node should always be present regarless of the PHY | ||
33 | configuration of the GENET instance | ||
34 | |||
35 | MDIO bus node required properties: | ||
36 | |||
37 | - compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2" | ||
38 | "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", the version has to match the | ||
39 | parent node compatible property (e.g: brcm,genet-v4 pairs with | ||
40 | brcm,genet-mdio-v4) | ||
41 | - reg: address and length relative to the parent node base register address | ||
42 | - #address-cells: address cell for MDIO bus addressing, should be 1 | ||
43 | - #size-cells: size of the cells for MDIO bus addressing, should be 0 | ||
44 | |||
45 | Ethernet PHY node properties: | ||
46 | |||
47 | See Documentation/devicetree/bindings/net/phy.txt for the list of required and | ||
48 | optional properties. | ||
49 | |||
50 | Internal Gigabit PHY example: | ||
51 | |||
52 | ethernet@f0b60000 { | ||
53 | phy-mode = "internal"; | ||
54 | phy-handle = <&phy1>; | ||
55 | mac-address = [ 00 10 18 36 23 1a ]; | ||
56 | compatible = "brcm,genet-v4"; | ||
57 | #address-cells = <0x1>; | ||
58 | #size-cells = <0x1>; | ||
59 | reg = <0xf0b60000 0xfc4c>; | ||
60 | interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>; | ||
61 | |||
62 | mdio@e14 { | ||
63 | compatible = "brcm,genet-mdio-v4"; | ||
64 | #address-cells = <0x1>; | ||
65 | #size-cells = <0x0>; | ||
66 | reg = <0xe14 0x8>; | ||
67 | |||
68 | phy1: ethernet-phy@1 { | ||
69 | max-speed = <1000>; | ||
70 | reg = <0x1>; | ||
71 | compatible = "brcm,28nm-gphy", "ethernet-phy-ieee802.3-c22"; | ||
72 | }; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | MoCA interface / MAC to MAC example: | ||
77 | |||
78 | ethernet@f0b80000 { | ||
79 | phy-mode = "moca"; | ||
80 | fixed-link = <1 0 1000 0 0>; | ||
81 | mac-address = [ 00 10 18 36 24 1a ]; | ||
82 | compatible = "brcm,genet-v4"; | ||
83 | #address-cells = <0x1>; | ||
84 | #size-cells = <0x1>; | ||
85 | reg = <0xf0b80000 0xfc4c>; | ||
86 | interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>; | ||
87 | |||
88 | mdio@e14 { | ||
89 | compatible = "brcm,genet-mdio-v4"; | ||
90 | #address-cells = <0x1>; | ||
91 | #size-cells = <0x0>; | ||
92 | reg = <0xe14 0x8>; | ||
93 | }; | ||
94 | }; | ||
95 | |||
96 | |||
97 | External MDIO-connected Gigabit PHY/switch: | ||
98 | |||
99 | ethernet@f0ba0000 { | ||
100 | phy-mode = "rgmii"; | ||
101 | phy-handle = <&phy0>; | ||
102 | mac-address = [ 00 10 18 36 26 1a ]; | ||
103 | compatible = "brcm,genet-v4"; | ||
104 | #address-cells = <0x1>; | ||
105 | #size-cells = <0x1>; | ||
106 | reg = <0xf0ba0000 0xfc4c>; | ||
107 | interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>; | ||
108 | |||
109 | mdio@0e14 { | ||
110 | compatible = "brcm,genet-mdio-v4"; | ||
111 | #address-cells = <0x1>; | ||
112 | #size-cells = <0x0>; | ||
113 | reg = <0xe14 0x8>; | ||
114 | |||
115 | phy0: ethernet-phy@0 { | ||
116 | max-speed = <1000>; | ||
117 | reg = <0x0>; | ||
118 | compatible = "brcm,bcm53125", "ethernet-phy-ieee802.3-c22"; | ||
119 | }; | ||
120 | }; | ||
121 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt index f2105a47ec87..b4a6d53fb01a 100644 --- a/Documentation/devicetree/bindings/net/can/sja1000.txt +++ b/Documentation/devicetree/bindings/net/can/sja1000.txt | |||
@@ -12,6 +12,10 @@ Required properties: | |||
12 | 12 | ||
13 | Optional properties: | 13 | Optional properties: |
14 | 14 | ||
15 | - reg-io-width : Specify the size (in bytes) of the IO accesses that | ||
16 | should be performed on the device. Valid value is 1, 2 or 4. | ||
17 | Default to 1 (8 bits). | ||
18 | |||
15 | - nxp,external-clock-frequency : Frequency of the external oscillator | 19 | - nxp,external-clock-frequency : Frequency of the external oscillator |
16 | clock in Hz. Note that the internal clock frequency used by the | 20 | clock in Hz. Note that the internal clock frequency used by the |
17 | SJA1000 is half of that value. If not specified, a default value | 21 | SJA1000 is half of that value. If not specified, a default value |
diff --git a/Documentation/devicetree/bindings/net/cavium-mix.txt b/Documentation/devicetree/bindings/net/cavium-mix.txt index 5da628db68bf..8d7c3096390f 100644 --- a/Documentation/devicetree/bindings/net/cavium-mix.txt +++ b/Documentation/devicetree/bindings/net/cavium-mix.txt | |||
@@ -18,12 +18,7 @@ Properties: | |||
18 | - interrupts: Two interrupt specifiers. The first is the MIX | 18 | - interrupts: Two interrupt specifiers. The first is the MIX |
19 | interrupt routing and the second the routing for the AGL interrupts. | 19 | interrupt routing and the second the routing for the AGL interrupts. |
20 | 20 | ||
21 | - mac-address: Optional, the MAC address to assign to the device. | 21 | - phy-handle: Optional, see ethernet.txt file in the same directory. |
22 | |||
23 | - local-mac-address: Optional, the MAC address to assign to the device | ||
24 | if mac-address is not specified. | ||
25 | |||
26 | - phy-handle: Optional, a phandle for the PHY device connected to this device. | ||
27 | 22 | ||
28 | Example: | 23 | Example: |
29 | ethernet@1070000100800 { | 24 | ethernet@1070000100800 { |
diff --git a/Documentation/devicetree/bindings/net/cavium-pip.txt b/Documentation/devicetree/bindings/net/cavium-pip.txt index d4c53ba04b3b..7dbd158810d2 100644 --- a/Documentation/devicetree/bindings/net/cavium-pip.txt +++ b/Documentation/devicetree/bindings/net/cavium-pip.txt | |||
@@ -35,12 +35,7 @@ Properties for PIP port which is a child the PIP interface: | |||
35 | 35 | ||
36 | - reg: The port number within the interface group. | 36 | - reg: The port number within the interface group. |
37 | 37 | ||
38 | - mac-address: Optional, the MAC address to assign to the device. | 38 | - phy-handle: Optional, see ethernet.txt file in the same directory. |
39 | |||
40 | - local-mac-address: Optional, the MAC address to assign to the device | ||
41 | if mac-address is not specified. | ||
42 | |||
43 | - phy-handle: Optional, a phandle for the PHY device connected to this device. | ||
44 | 39 | ||
45 | Example: | 40 | Example: |
46 | 41 | ||
diff --git a/Documentation/devicetree/bindings/net/cdns-emac.txt b/Documentation/devicetree/bindings/net/cdns-emac.txt index 09055c2495f0..abd67c13d344 100644 --- a/Documentation/devicetree/bindings/net/cdns-emac.txt +++ b/Documentation/devicetree/bindings/net/cdns-emac.txt | |||
@@ -6,11 +6,7 @@ Required properties: | |||
6 | or the generic form: "cdns,emac". | 6 | or the generic form: "cdns,emac". |
7 | - reg: Address and length of the register set for the device | 7 | - reg: Address and length of the register set for the device |
8 | - interrupts: Should contain macb interrupt | 8 | - interrupts: Should contain macb interrupt |
9 | - phy-mode: String, operation mode of the PHY interface. | 9 | - phy-mode: see ethernet.txt file in the same directory. |
10 | Supported values are: "mii", "rmii". | ||
11 | |||
12 | Optional properties: | ||
13 | - local-mac-address: 6 bytes, mac address | ||
14 | 10 | ||
15 | Examples: | 11 | Examples: |
16 | 12 | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index 05d660e4ac64..ae2b8b7f9c38 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -28,9 +28,8 @@ Optional properties: | |||
28 | Slave Properties: | 28 | Slave Properties: |
29 | Required properties: | 29 | Required properties: |
30 | - phy_id : Specifies slave phy id | 30 | - phy_id : Specifies slave phy id |
31 | - phy-mode : The interface between the SoC and the PHY (a string | 31 | - phy-mode : See ethernet.txt file in the same directory |
32 | that of_get_phy_mode() can understand) | 32 | - mac-address : See ethernet.txt file in the same directory |
33 | - mac-address : Specifies slave MAC address | ||
34 | 33 | ||
35 | Optional properties: | 34 | Optional properties: |
36 | - dual_emac_res_vlan : Specifies VID to be used to segregate the ports | 35 | - dual_emac_res_vlan : Specifies VID to be used to segregate the ports |
diff --git a/Documentation/devicetree/bindings/net/davicom-dm9000.txt b/Documentation/devicetree/bindings/net/davicom-dm9000.txt index 2d39c990e641..28767ed7c1bd 100644 --- a/Documentation/devicetree/bindings/net/davicom-dm9000.txt +++ b/Documentation/devicetree/bindings/net/davicom-dm9000.txt | |||
@@ -9,8 +9,6 @@ Required properties: | |||
9 | - interrupts : interrupt specifier specific to interrupt controller | 9 | - interrupts : interrupt specifier specific to interrupt controller |
10 | 10 | ||
11 | Optional properties: | 11 | Optional properties: |
12 | - local-mac-address : A bytestring of 6 bytes specifying Ethernet MAC address | ||
13 | to use (from firmware or bootloader) | ||
14 | - davicom,no-eeprom : Configuration EEPROM is not available | 12 | - davicom,no-eeprom : Configuration EEPROM is not available |
15 | - davicom,ext-phy : Use external PHY | 13 | - davicom,ext-phy : Use external PHY |
16 | 14 | ||
diff --git a/Documentation/devicetree/bindings/net/davinci_emac.txt b/Documentation/devicetree/bindings/net/davinci_emac.txt index 6e356d15154a..032808843f90 100644 --- a/Documentation/devicetree/bindings/net/davinci_emac.txt +++ b/Documentation/devicetree/bindings/net/davinci_emac.txt | |||
@@ -17,9 +17,8 @@ Required properties: | |||
17 | Miscellaneous Interrupt> | 17 | Miscellaneous Interrupt> |
18 | 18 | ||
19 | Optional properties: | 19 | Optional properties: |
20 | - phy-handle: Contains a phandle to an Ethernet PHY. | 20 | - phy-handle: See ethernet.txt file in the same directory. |
21 | If absent, davinci_emac driver defaults to 100/FULL. | 21 | If absent, davinci_emac driver defaults to 100/FULL. |
22 | - local-mac-address : 6 bytes, mac address | ||
23 | - ti,davinci-rmii-en: 1 byte, 1 means use RMII | 22 | - ti,davinci-rmii-en: 1 byte, 1 means use RMII |
24 | - ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM? | 23 | - ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM? |
25 | 24 | ||
diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt new file mode 100644 index 000000000000..9ecd43d8792c --- /dev/null +++ b/Documentation/devicetree/bindings/net/ethernet.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | The following properties are common to the Ethernet controllers: | ||
2 | |||
3 | - local-mac-address: array of 6 bytes, specifies the MAC address that was | ||
4 | assigned to the network device; | ||
5 | - mac-address: array of 6 bytes, specifies the MAC address that was last used by | ||
6 | the boot program; should be used in cases where the MAC address assigned to | ||
7 | the device by the boot program is different from the "local-mac-address" | ||
8 | property; | ||
9 | - max-speed: number, specifies maximum speed in Mbit/s supported by the device; | ||
10 | - max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than | ||
11 | the maximum frame size (there's contradiction in ePAPR). | ||
12 | - phy-mode: string, operation mode of the PHY interface; supported values are | ||
13 | "mii", "gmii", "sgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id", | ||
14 | "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto | ||
15 | standard property; | ||
16 | - phy-connection-type: the same as "phy-mode" property but described in ePAPR; | ||
17 | - phy-handle: phandle, specifies a reference to a node representing a PHY | ||
18 | device; this property is described in ePAPR and so preferred; | ||
19 | - phy: the same as "phy-handle" property, not recommended for new bindings. | ||
20 | - phy-device: the same as "phy-handle" property, not recommended for new | ||
21 | bindings. | ||
22 | |||
23 | Child nodes of the Ethernet controller are typically the individual PHY devices | ||
24 | connected via the MDIO bus (sometimes the MDIO bus controller is separate). | ||
25 | They are described in the phy.txt file in this same directory. | ||
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt index 845ff848d895..6bc84adb10c0 100644 --- a/Documentation/devicetree/bindings/net/fsl-fec.txt +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt | |||
@@ -4,12 +4,9 @@ Required properties: | |||
4 | - compatible : Should be "fsl,<soc>-fec" | 4 | - compatible : Should be "fsl,<soc>-fec" |
5 | - reg : Address and length of the register set for the device | 5 | - reg : Address and length of the register set for the device |
6 | - interrupts : Should contain fec interrupt | 6 | - interrupts : Should contain fec interrupt |
7 | - phy-mode : String, operation mode of the PHY interface. | 7 | - phy-mode : See ethernet.txt file in the same directory |
8 | Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii", | ||
9 | "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii". | ||
10 | 8 | ||
11 | Optional properties: | 9 | Optional properties: |
12 | - local-mac-address : 6 bytes, mac address | ||
13 | - phy-reset-gpios : Should specify the gpio for phy reset | 10 | - phy-reset-gpios : Should specify the gpio for phy reset |
14 | - phy-reset-duration : Reset duration in milliseconds. Should present | 11 | - phy-reset-duration : Reset duration in milliseconds. Should present |
15 | only if property "phy-reset-gpios" is available. Missing the property | 12 | only if property "phy-reset-gpios" is available. Missing the property |
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index d2ea4605d078..737cdef4f903 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | |||
@@ -38,22 +38,17 @@ Properties: | |||
38 | - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" | 38 | - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" |
39 | - compatible : Should be "gianfar" | 39 | - compatible : Should be "gianfar" |
40 | - reg : Offset and length of the register set for the device | 40 | - reg : Offset and length of the register set for the device |
41 | - local-mac-address : List of bytes representing the ethernet address of | ||
42 | this controller | ||
43 | - interrupts : For FEC devices, the first interrupt is the device's | 41 | - interrupts : For FEC devices, the first interrupt is the device's |
44 | interrupt. For TSEC and eTSEC devices, the first interrupt is | 42 | interrupt. For TSEC and eTSEC devices, the first interrupt is |
45 | transmit, the second is receive, and the third is error. | 43 | transmit, the second is receive, and the third is error. |
46 | - phy-handle : The phandle for the PHY connected to this ethernet | 44 | - phy-handle : See ethernet.txt file in the same directory. |
47 | controller. | ||
48 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, | 45 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, |
49 | but unique to the all specified fixed-links, b is duplex - 0 half, | 46 | but unique to the all specified fixed-links, b is duplex - 0 half, |
50 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no | 47 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no |
51 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. | 48 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. |
52 | - phy-connection-type : a string naming the controller/PHY interface type, | 49 | - phy-connection-type : See ethernet.txt file in the same directory. |
53 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | 50 | This property is only really needed if the connection is of type |
54 | "tbi", or "rtbi". This property is only really needed if the connection | 51 | "rgmii-id", as all other connection types are detected by hardware. |
55 | is of type "rgmii-id", as all other connection types are detected by | ||
56 | hardware. | ||
57 | - fsl,magic-packet : If present, indicates that the hardware supports | 52 | - fsl,magic-packet : If present, indicates that the hardware supports |
58 | waking up via magic packet. | 53 | waking up via magic packet. |
59 | - bd-stash : If present, indicates that the hardware supports stashing | 54 | - bd-stash : If present, indicates that the hardware supports stashing |
diff --git a/Documentation/devicetree/bindings/net/lpc-eth.txt b/Documentation/devicetree/bindings/net/lpc-eth.txt index 585021acd178..b92e927808b6 100644 --- a/Documentation/devicetree/bindings/net/lpc-eth.txt +++ b/Documentation/devicetree/bindings/net/lpc-eth.txt | |||
@@ -6,10 +6,9 @@ Required properties: | |||
6 | - interrupts: Should contain ethernet controller interrupt | 6 | - interrupts: Should contain ethernet controller interrupt |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - phy-mode: String, operation mode of the PHY interface. | 9 | - phy-mode: See ethernet.txt file in the same directory. If the property is |
10 | Supported values are: "mii", "rmii" (default) | 10 | absent, "rmii" is assumed. |
11 | - use-iram: Use LPC32xx internal SRAM (IRAM) for DMA buffering | 11 | - use-iram: Use LPC32xx internal SRAM (IRAM) for DMA buffering |
12 | - local-mac-address : 6 bytes, mac address | ||
13 | 12 | ||
14 | Example: | 13 | Example: |
15 | 14 | ||
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index 70af2ec12b09..aaa696414f57 100644 --- a/Documentation/devicetree/bindings/net/macb.txt +++ b/Documentation/devicetree/bindings/net/macb.txt | |||
@@ -8,16 +8,12 @@ Required properties: | |||
8 | the Cadence GEM, or the generic form: "cdns,gem". | 8 | the Cadence GEM, or the generic form: "cdns,gem". |
9 | - reg: Address and length of the register set for the device | 9 | - reg: Address and length of the register set for the device |
10 | - interrupts: Should contain macb interrupt | 10 | - interrupts: Should contain macb interrupt |
11 | - phy-mode: String, operation mode of the PHY interface. | 11 | - phy-mode: See ethernet.txt file in the same directory. |
12 | Supported values are: "mii", "rmii", "gmii", "rgmii". | ||
13 | - clock-names: Tuple listing input clock names. | 12 | - clock-names: Tuple listing input clock names. |
14 | Required elements: 'pclk', 'hclk' | 13 | Required elements: 'pclk', 'hclk' |
15 | Optional elements: 'tx_clk' | 14 | Optional elements: 'tx_clk' |
16 | - clocks: Phandles to input clocks. | 15 | - clocks: Phandles to input clocks. |
17 | 16 | ||
18 | Optional properties: | ||
19 | - local-mac-address: 6 bytes, mac address | ||
20 | |||
21 | Examples: | 17 | Examples: |
22 | 18 | ||
23 | macb0: ethernet@fffc4000 { | 19 | macb0: ethernet@fffc4000 { |
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt index 859a6fa7569c..750d577e8083 100644 --- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt +++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | |||
@@ -4,10 +4,8 @@ Required properties: | |||
4 | - compatible: should be "marvell,armada-370-neta". | 4 | - compatible: should be "marvell,armada-370-neta". |
5 | - reg: address and length of the register set for the device. | 5 | - reg: address and length of the register set for the device. |
6 | - interrupts: interrupt for the device | 6 | - interrupts: interrupt for the device |
7 | - phy: A phandle to a phy node defining the PHY address (as the reg | 7 | - phy: See ethernet.txt file in the same directory. |
8 | property, a single integer). | 8 | - phy-mode: See ethernet.txt file in the same directory |
9 | - phy-mode: The interface between the SoC and the PHY (a string that | ||
10 | of_get_phy_mode() can understand) | ||
11 | - clocks: a pointer to the reference clock for this device. | 9 | - clocks: a pointer to the reference clock for this device. |
12 | 10 | ||
13 | Example: | 11 | Example: |
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-net.txt b/Documentation/devicetree/bindings/net/marvell-orion-net.txt index c233b6114242..bce52b2ec55e 100644 --- a/Documentation/devicetree/bindings/net/marvell-orion-net.txt +++ b/Documentation/devicetree/bindings/net/marvell-orion-net.txt | |||
@@ -36,7 +36,7 @@ Required port properties: | |||
36 | "marvell,kirkwood-eth-port". | 36 | "marvell,kirkwood-eth-port". |
37 | - reg: port number relative to ethernet controller, shall be 0, 1, or 2. | 37 | - reg: port number relative to ethernet controller, shall be 0, 1, or 2. |
38 | - interrupts: port interrupt. | 38 | - interrupts: port interrupt. |
39 | - local-mac-address: 6 bytes MAC address. | 39 | - local-mac-address: See ethernet.txt file in the same directory. |
40 | 40 | ||
41 | Optional port properties: | 41 | Optional port properties: |
42 | - marvell,tx-queue-size: size of the transmit ring buffer. | 42 | - marvell,tx-queue-size: size of the transmit ring buffer. |
@@ -48,7 +48,7 @@ Optional port properties: | |||
48 | 48 | ||
49 | and | 49 | and |
50 | 50 | ||
51 | - phy-handle: phandle reference to ethernet PHY. | 51 | - phy-handle: See ethernet.txt file in the same directory. |
52 | 52 | ||
53 | or | 53 | or |
54 | 54 | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ks8851.txt b/Documentation/devicetree/bindings/net/micrel-ks8851.txt index 4fc392763611..d54d0cc79487 100644 --- a/Documentation/devicetree/bindings/net/micrel-ks8851.txt +++ b/Documentation/devicetree/bindings/net/micrel-ks8851.txt | |||
@@ -6,5 +6,4 @@ Required properties: | |||
6 | - interrupts : interrupt connection | 6 | - interrupts : interrupt connection |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - local-mac-address : Ethernet mac address to use | ||
10 | - vdd-supply: supply for Ethernet mac | 9 | - vdd-supply: supply for Ethernet mac |
diff --git a/Documentation/devicetree/bindings/net/micrel.txt b/Documentation/devicetree/bindings/net/micrel.txt new file mode 100644 index 000000000000..98a3e61f9ee8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/micrel.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | Micrel PHY properties. | ||
2 | |||
3 | These properties cover the base properties Micrel PHYs. | ||
4 | |||
5 | Optional properties: | ||
6 | |||
7 | - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs. | ||
8 | |||
9 | Configure the LED mode with single value. The list of PHYs and | ||
10 | the bits that are currently supported: | ||
11 | |||
12 | KSZ8001: register 0x1e, bits 15..14 | ||
13 | KSZ8041: register 0x1e, bits 15..14 | ||
14 | KSZ8021: register 0x1f, bits 5..4 | ||
15 | KSZ8031: register 0x1f, bits 5..4 | ||
16 | KSZ8051: register 0x1f, bits 5..4 | ||
17 | |||
18 | See the respective PHY datasheet for the mode values. | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt new file mode 100644 index 000000000000..8dd3ef7bc56b --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * Texas Instruments TRF7970A RFID/NFC/15693 Transceiver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "ti,trf7970a". | ||
5 | - spi-max-frequency: Maximum SPI frequency (<= 2000000). | ||
6 | - interrupt-parent: phandle of parent interrupt handler. | ||
7 | - interrupts: A single interrupt specifier. | ||
8 | - ti,enable-gpios: Two GPIO entries used for 'EN' and 'EN2' pins on the | ||
9 | TRF7970A. | ||
10 | - vin-supply: Regulator for supply voltage to VIN pin | ||
11 | |||
12 | Optional SoC Specific Properties: | ||
13 | - pinctrl-names: Contains only one value - "default". | ||
14 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
15 | |||
16 | Example (for ARM-based BeagleBone with TRF7970A on SPI1): | ||
17 | |||
18 | &spi1 { | ||
19 | status = "okay"; | ||
20 | |||
21 | nfc@0 { | ||
22 | compatible = "ti,trf7970a"; | ||
23 | reg = <0>; | ||
24 | pinctrl-names = "default"; | ||
25 | pinctrl-0 = <&trf7970a_default>; | ||
26 | spi-max-frequency = <2000000>; | ||
27 | interrupt-parent = <&gpio2>; | ||
28 | interrupts = <14 0>; | ||
29 | ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, | ||
30 | <&gpio2 5 GPIO_ACTIVE_LOW>; | ||
31 | vin-supply = <&ldo3_reg>; | ||
32 | status = "okay"; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt index 58307d0931c8..5b8c58903077 100644 --- a/Documentation/devicetree/bindings/net/phy.txt +++ b/Documentation/devicetree/bindings/net/phy.txt | |||
@@ -21,10 +21,18 @@ Optional Properties: | |||
21 | elements. | 21 | elements. |
22 | - max-speed: Maximum PHY supported speed (10, 100, 1000...) | 22 | - max-speed: Maximum PHY supported speed (10, 100, 1000...) |
23 | 23 | ||
24 | If the phy's identifier is known then the list may contain an entry | ||
25 | of the form: "ethernet-phy-idAAAA.BBBB" where | ||
26 | AAAA - The value of the 16 bit Phy Identifier 1 register as | ||
27 | 4 hex digits. This is the chip vendor OUI bits 3:18 | ||
28 | BBBB - The value of the 16 bit Phy Identifier 2 register as | ||
29 | 4 hex digits. This is the chip vendor OUI bits 19:24, | ||
30 | followed by 10 bits of a vendor specific ID. | ||
31 | |||
24 | Example: | 32 | Example: |
25 | 33 | ||
26 | ethernet-phy@0 { | 34 | ethernet-phy@0 { |
27 | compatible = "ethernet-phy-ieee802.3-c22"; | 35 | compatible = "ethernet-phy-id0141.0e90", "ethernet-phy-ieee802.3-c22"; |
28 | interrupt-parent = <40000>; | 36 | interrupt-parent = <40000>; |
29 | interrupts = <35 1>; | 37 | interrupts = <35 1>; |
30 | reg = <0>; | 38 | reg = <0>; |
diff --git a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file mode 100644 index 000000000000..989f6c95cfd5 --- /dev/null +++ b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | * Samsung 10G Ethernet driver (SXGBE) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "samsung,sxgbe-v2.0a" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
7 | that services interrupts for this device | ||
8 | - interrupts: Should contain the SXGBE interrupts | ||
9 | These interrupts are ordered by fixed and follows variable | ||
10 | trasmit DMA interrupts, receive DMA interrupts and lpi interrupt. | ||
11 | index 0 - this is fixed common interrupt of SXGBE and it is always | ||
12 | available. | ||
13 | index 1 to 25 - 8 variable trasmit interrupts, variable 16 receive interrupts | ||
14 | and 1 optional lpi interrupt. | ||
15 | - phy-mode: String, operation mode of the PHY interface. | ||
16 | Supported values are: "sgmii", "xgmii". | ||
17 | - samsung,pbl: Integer, Programmable Burst Length. | ||
18 | Supported values are 1, 2, 4, 8, 16, or 32. | ||
19 | - samsung,burst-map: Integer, Program the possible bursts supported by sxgbe | ||
20 | This is an interger and represents allowable DMA bursts when fixed burst. | ||
21 | Allowable range is 0x01-0x3F. When this field is set fixed burst is enabled. | ||
22 | When fixed length is needed for burst mode, it can be set within allowable | ||
23 | range. | ||
24 | |||
25 | Optional properties: | ||
26 | - mac-address: 6 bytes, mac address | ||
27 | - max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather | ||
28 | than the maximum frame size. | ||
29 | |||
30 | Example: | ||
31 | |||
32 | aliases { | ||
33 | ethernet0 = <&sxgbe0>; | ||
34 | }; | ||
35 | |||
36 | sxgbe0: ethernet@1a040000 { | ||
37 | compatible = "samsung,sxgbe-v2.0a"; | ||
38 | reg = <0 0x1a040000 0 0x10000>; | ||
39 | interrupt-parent = <&gic>; | ||
40 | interrupts = <0 209 4>, <0 185 4>, <0 186 4>, <0 187 4>, | ||
41 | <0 188 4>, <0 189 4>, <0 190 4>, <0 191 4>, | ||
42 | <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>, | ||
43 | <0 196 4>, <0 197 4>, <0 198 4>, <0 199 4>, | ||
44 | <0 200 4>, <0 201 4>, <0 202 4>, <0 203 4>, | ||
45 | <0 204 4>, <0 205 4>, <0 206 4>, <0 207 4>, | ||
46 | <0 208 4>, <0 210 4>; | ||
47 | samsung,pbl = <0x08> | ||
48 | samsung,burst-map = <0x20> | ||
49 | mac-address = [ 00 11 22 33 44 55 ]; /* Filled in by U-Boot */ | ||
50 | max-frame-size = <9000>; | ||
51 | phy-mode = "xgmii"; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt new file mode 100644 index 000000000000..e7106b50dbdc --- /dev/null +++ b/Documentation/devicetree/bindings/net/sh_eth.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | * Renesas Electronics SH EtherMAC | ||
2 | |||
3 | This file provides information on what the device node for the SH EtherMAC | ||
4 | interface contains. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "renesas,gether-r8a7740" if the device is a part of R8A7740 SoC. | ||
8 | "renesas,ether-r8a7778" if the device is a part of R8A7778 SoC. | ||
9 | "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC. | ||
10 | "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC. | ||
11 | "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC. | ||
12 | "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. | ||
13 | - reg: offset and length of (1) the E-DMAC/feLic register block (required), | ||
14 | (2) the TSU register block (optional). | ||
15 | - interrupts: interrupt specifier for the sole interrupt. | ||
16 | - phy-mode: see ethernet.txt file in the same directory. | ||
17 | - phy-handle: see ethernet.txt file in the same directory. | ||
18 | - #address-cells: number of address cells for the MDIO bus, must be equal to 1. | ||
19 | - #size-cells: number of size cells on the MDIO bus, must be equal to 0. | ||
20 | - clocks: clock phandle and specifier pair. | ||
21 | - pinctrl-0: phandle, referring to a default pin configuration node. | ||
22 | |||
23 | Optional properties: | ||
24 | - interrupt-parent: the phandle for the interrupt controller that services | ||
25 | interrupts for this device. | ||
26 | - pinctrl-names: pin configuration state name ("default"). | ||
27 | - renesas,no-ether-link: boolean, specify when a board does not provide a proper | ||
28 | Ether LINK signal. | ||
29 | - renesas,ether-link-active-low: boolean, specify when the Ether LINK signal is | ||
30 | active-low instead of normal active-high. | ||
31 | |||
32 | Example (Lager board): | ||
33 | |||
34 | ethernet@ee700000 { | ||
35 | compatible = "renesas,ether-r8a7790"; | ||
36 | reg = <0 0xee700000 0 0x400>; | ||
37 | interrupt-parent = <&gic>; | ||
38 | interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>; | ||
39 | clocks = <&mstp8_clks R8A7790_CLK_ETHER>; | ||
40 | phy-mode = "rmii"; | ||
41 | phy-handle = <&phy1>; | ||
42 | pinctrl-0 = <ðer_pins>; | ||
43 | pinctrl-names = "default"; | ||
44 | renesas,ether-link-active-low; | ||
45 | #address-cells = <1>; | ||
46 | #size-cells = <0>; | ||
47 | |||
48 | phy1: ethernet-phy@1 { | ||
49 | reg = <1>; | ||
50 | interrupt-parent = <&irqc0>; | ||
51 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
52 | pinctrl-0 = <&phy1_pins>; | ||
53 | pinctrl-names = "default"; | ||
54 | }; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt b/Documentation/devicetree/bindings/net/smsc-lan91c111.txt index 5a41a8658daa..0f8487b88822 100644 --- a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt +++ b/Documentation/devicetree/bindings/net/smsc-lan91c111.txt | |||
@@ -6,8 +6,7 @@ Required properties: | |||
6 | - interrupts : interrupt connection | 6 | - interrupts : interrupt connection |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - phy-device : phandle to Ethernet phy | 9 | - phy-device : see ethernet.txt file in the same directory |
10 | - local-mac-address : Ethernet mac address to use | ||
11 | - reg-io-width : Mask of sizes (in bytes) of the IO accesses that | 10 | - reg-io-width : Mask of sizes (in bytes) of the IO accesses that |
12 | are supported on the device. Valid value for SMSC LAN91c111 are | 11 | are supported on the device. Valid value for SMSC LAN91c111 are |
13 | 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning | 12 | 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning |
diff --git a/Documentation/devicetree/bindings/net/smsc911x.txt b/Documentation/devicetree/bindings/net/smsc911x.txt index adb5b5744ecd..3fed3c124411 100644 --- a/Documentation/devicetree/bindings/net/smsc911x.txt +++ b/Documentation/devicetree/bindings/net/smsc911x.txt | |||
@@ -6,9 +6,7 @@ Required properties: | |||
6 | - interrupts : Should contain SMSC LAN interrupt line | 6 | - interrupts : Should contain SMSC LAN interrupt line |
7 | - interrupt-parent : Should be the phandle for the interrupt controller | 7 | - interrupt-parent : Should be the phandle for the interrupt controller |
8 | that services interrupts for this device | 8 | that services interrupts for this device |
9 | - phy-mode : String, operation mode of the PHY interface. | 9 | - phy-mode : See ethernet.txt file in the same directory |
10 | Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii", | ||
11 | "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii". | ||
12 | 10 | ||
13 | Optional properties: | 11 | Optional properties: |
14 | - reg-shift : Specify the quantity to shift the register offsets by | 12 | - reg-shift : Specify the quantity to shift the register offsets by |
@@ -23,7 +21,6 @@ Optional properties: | |||
23 | external PHY | 21 | external PHY |
24 | - smsc,save-mac-address : Indicates that mac address needs to be saved | 22 | - smsc,save-mac-address : Indicates that mac address needs to be saved |
25 | before resetting the controller | 23 | before resetting the controller |
26 | - local-mac-address : 6 bytes, mac address | ||
27 | 24 | ||
28 | Examples: | 25 | Examples: |
29 | 26 | ||
diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt new file mode 100644 index 000000000000..636f0ac4e223 --- /dev/null +++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Altera SOCFPGA SoC DWMAC controller | ||
2 | |||
3 | This is a variant of the dwmac/stmmac driver an inherits all descriptions | ||
4 | present in Documentation/devicetree/bindings/net/stmmac.txt. | ||
5 | |||
6 | The device node has additional properties: | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should contain "altr,socfpga-stmmac" along with | ||
10 | "snps,dwmac" and any applicable more detailed | ||
11 | designware version numbers documented in stmmac.txt | ||
12 | - altr,sysmgr-syscon : Should be the phandle to the system manager node that | ||
13 | encompasses the glue register, the register offset, and the register shift. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | gmac0: ethernet@ff700000 { | ||
18 | compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; | ||
19 | altr,sysmgr-syscon = <&sysmgr 0x60 0>; | ||
20 | status = "disabled"; | ||
21 | reg = <0xff700000 0x2000>; | ||
22 | interrupts = <0 115 4>; | ||
23 | interrupt-names = "macirq"; | ||
24 | mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ | ||
25 | clocks = <&emac_0_clk>; | ||
26 | clocks-names = "stmmaceth"; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 9d92d42140f2..80c1fb8bfbb8 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -10,8 +10,7 @@ Required properties: | |||
10 | - interrupt-names: Should contain the interrupt names "macirq" | 10 | - interrupt-names: Should contain the interrupt names "macirq" |
11 | "eth_wake_irq" if this interrupt is supported in the "interrupts" | 11 | "eth_wake_irq" if this interrupt is supported in the "interrupts" |
12 | property | 12 | property |
13 | - phy-mode: String, operation mode of the PHY interface. | 13 | - phy-mode: See ethernet.txt file in the same directory. |
14 | Supported values are: "mii", "rmii", "gmii", "rgmii". | ||
15 | - snps,reset-gpio gpio number for phy reset. | 14 | - snps,reset-gpio gpio number for phy reset. |
16 | - snps,reset-active-low boolean flag to indicate if phy reset is active low. | 15 | - snps,reset-active-low boolean flag to indicate if phy reset is active low. |
17 | - snps,reset-delays-us is triplet of delays | 16 | - snps,reset-delays-us is triplet of delays |
@@ -28,12 +27,14 @@ Required properties: | |||
28 | ignored if force_thresh_dma_mode is set. | 27 | ignored if force_thresh_dma_mode is set. |
29 | 28 | ||
30 | Optional properties: | 29 | Optional properties: |
31 | - mac-address: 6 bytes, mac address | ||
32 | - resets: Should contain a phandle to the STMMAC reset signal, if any | 30 | - resets: Should contain a phandle to the STMMAC reset signal, if any |
33 | - reset-names: Should contain the reset signal name "stmmaceth", if a | 31 | - reset-names: Should contain the reset signal name "stmmaceth", if a |
34 | reset phandle is given | 32 | reset phandle is given |
35 | - max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather | 33 | - max-frame-size: See ethernet.txt file in the same directory |
36 | than the maximum frame size. | 34 | - clocks: If present, the first clock should be the GMAC main clock, |
35 | further clocks may be specified in derived bindings. | ||
36 | - clocks-names: One name for each entry in the clocks property, the | ||
37 | first one should be "stmmaceth". | ||
37 | 38 | ||
38 | Examples: | 39 | Examples: |
39 | 40 | ||
@@ -46,4 +47,6 @@ Examples: | |||
46 | mac-address = [000000000000]; /* Filled in by U-Boot */ | 47 | mac-address = [000000000000]; /* Filled in by U-Boot */ |
47 | max-frame-size = <3800>; | 48 | max-frame-size = <3800>; |
48 | phy-mode = "gmii"; | 49 | phy-mode = "gmii"; |
50 | clocks = <&clock>; | ||
51 | clock-names = "stmmaceth">; | ||
49 | }; | 52 | }; |
diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt new file mode 100644 index 000000000000..189ae5cad8f7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | * Texas Instruments wl1251 wireless lan controller | ||
2 | |||
3 | The wl1251 chip can be connected via SPI or via SDIO. This | ||
4 | document describes the binding for the SPI connected chip. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Should be "ti,wl1251" | ||
8 | - reg : Chip select address of device | ||
9 | - spi-max-frequency : Maximum SPI clocking speed of device in Hz | ||
10 | - interrupts : Should contain interrupt line | ||
11 | - interrupt-parent : Should be the phandle for the interrupt controller | ||
12 | that services interrupts for this device | ||
13 | - vio-supply : phandle to regulator providing VIO | ||
14 | - ti,power-gpio : GPIO connected to chip's PMEN pin | ||
15 | |||
16 | Optional properties: | ||
17 | - ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which | ||
18 | provides configuration data (calibration, MAC, ...) | ||
19 | - Please consult Documentation/devicetree/bindings/spi/spi-bus.txt | ||
20 | for optional SPI connection related properties, | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | &spi1 { | ||
25 | wl1251@0 { | ||
26 | compatible = "ti,wl1251"; | ||
27 | |||
28 | reg = <0>; | ||
29 | spi-max-frequency = <48000000>; | ||
30 | spi-cpol; | ||
31 | spi-cpha; | ||
32 | |||
33 | interrupt-parent = <&gpio2>; | ||
34 | interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */ | ||
35 | |||
36 | vio-supply = <&vio>; | ||
37 | ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */ | ||
38 | }; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt index 24cee06915c9..c300391e8d3e 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | |||
@@ -42,6 +42,10 @@ Required properties: | |||
42 | - 0xc2000000: prefetchable memory region | 42 | - 0xc2000000: prefetchable memory region |
43 | Please refer to the standard PCI bus binding document for a more detailed | 43 | Please refer to the standard PCI bus binding document for a more detailed |
44 | explanation. | 44 | explanation. |
45 | - #interrupt-cells: Size representation for interrupts (must be 1) | ||
46 | - interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties | ||
47 | Please refer to the standard PCI bus binding document for a more detailed | ||
48 | explanation. | ||
45 | - clocks: Must contain an entry for each entry in clock-names. | 49 | - clocks: Must contain an entry for each entry in clock-names. |
46 | See ../clocks/clock-bindings.txt for details. | 50 | See ../clocks/clock-bindings.txt for details. |
47 | - clock-names: Must include the following entries: | 51 | - clock-names: Must include the following entries: |
@@ -86,6 +90,10 @@ SoC DTSI: | |||
86 | 0 99 0x04>; /* MSI interrupt */ | 90 | 0 99 0x04>; /* MSI interrupt */ |
87 | interrupt-names = "intr", "msi"; | 91 | interrupt-names = "intr", "msi"; |
88 | 92 | ||
93 | #interrupt-cells = <1>; | ||
94 | interrupt-map-mask = <0 0 0 0>; | ||
95 | interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; | ||
96 | |||
89 | bus-range = <0x00 0xff>; | 97 | bus-range = <0x00 0xff>; |
90 | #address-cells = <3>; | 98 | #address-cells = <3>; |
91 | #size-cells = <2>; | 99 | #size-cells = <2>; |
diff --git a/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt b/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt new file mode 100644 index 000000000000..5f3a65a9dd88 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | * APM X-Gene 15Gbps Multi-purpose PHY nodes | ||
2 | |||
3 | PHY nodes are defined to describe on-chip 15Gbps Multi-purpose PHY. Each | ||
4 | PHY (pair of lanes) has its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Shall be "apm,xgene-phy". | ||
8 | - reg : PHY memory resource is the SDS PHY access resource. | ||
9 | - #phy-cells : Shall be 1 as it expects one argument for setting | ||
10 | the mode of the PHY. Possible values are 0 (SATA), | ||
11 | 1 (SGMII), 2 (PCIe), 3 (USB), and 4 (XFI). | ||
12 | |||
13 | Optional properties: | ||
14 | - status : Shall be "ok" if enabled or "disabled" if disabled. | ||
15 | Default is "ok". | ||
16 | - clocks : Reference to the clock entry. | ||
17 | - apm,tx-eye-tuning : Manual control to fine tune the capture of the serial | ||
18 | bit lines from the automatic calibrated position. | ||
19 | Two set of 3-tuple setting for each (up to 3) | ||
20 | supported link speed on the host. Range from 0 to | ||
21 | 127 in unit of one bit period. Default is 10. | ||
22 | - apm,tx-eye-direction : Eye tuning manual control direction. 0 means sample | ||
23 | data earlier than the nominal sampling point. 1 means | ||
24 | sample data later than the nominal sampling point. | ||
25 | Two set of 3-tuple setting for each (up to 3) | ||
26 | supported link speed on the host. Default is 0. | ||
27 | - apm,tx-boost-gain : Frequency boost AC (LSB 3-bit) and DC (2-bit) | ||
28 | gain control. Two set of 3-tuple setting for each | ||
29 | (up to 3) supported link speed on the host. Range is | ||
30 | between 0 to 31 in unit of dB. Default is 3. | ||
31 | - apm,tx-amplitude : Amplitude control. Two set of 3-tuple setting for | ||
32 | each (up to 3) supported link speed on the host. | ||
33 | Range is between 0 to 199500 in unit of uV. | ||
34 | Default is 199500 uV. | ||
35 | - apm,tx-pre-cursor1 : 1st pre-cursor emphasis taps control. Two set of | ||
36 | 3-tuple setting for each (up to 3) supported link | ||
37 | speed on the host. Range is 0 to 273000 in unit of | ||
38 | uV. Default is 0. | ||
39 | - apm,tx-pre-cursor2 : 2st pre-cursor emphasis taps control. Two set of | ||
40 | 3-tuple setting for each (up to 3) supported link | ||
41 | speed on the host. Range is 0 to 127400 in unit uV. | ||
42 | Default is 0x0. | ||
43 | - apm,tx-post-cursor : Post-cursor emphasis taps control. Two set of | ||
44 | 3-tuple setting for Gen1, Gen2, and Gen3. Range is | ||
45 | between 0 to 0x1f in unit of 18.2mV. Default is 0xf. | ||
46 | - apm,tx-speed : Tx operating speed. One set of 3-tuple for each | ||
47 | supported link speed on the host. | ||
48 | 0 = 1-2Gbps | ||
49 | 1 = 2-4Gbps (1st tuple default) | ||
50 | 2 = 4-8Gbps | ||
51 | 3 = 8-15Gbps (2nd tuple default) | ||
52 | 4 = 2.5-4Gbps | ||
53 | 5 = 4-5Gbps | ||
54 | 6 = 5-6Gbps | ||
55 | 7 = 6-16Gbps (3rd tuple default) | ||
56 | |||
57 | NOTE: PHY override parameters are board specific setting. | ||
58 | |||
59 | Example: | ||
60 | phy1: phy@1f21a000 { | ||
61 | compatible = "apm,xgene-phy"; | ||
62 | reg = <0x0 0x1f21a000 0x0 0x100>; | ||
63 | #phy-cells = <1>; | ||
64 | status = "disabled"; | ||
65 | }; | ||
66 | |||
67 | phy2: phy@1f22a000 { | ||
68 | compatible = "apm,xgene-phy"; | ||
69 | reg = <0x0 0x1f22a000 0x0 0x100>; | ||
70 | #phy-cells = <1>; | ||
71 | status = "ok"; | ||
72 | }; | ||
73 | |||
74 | phy3: phy@1f23a000 { | ||
75 | compatible = "apm,xgene-phy"; | ||
76 | reg = <0x0 0x1f23a000 0x0 0x100>; | ||
77 | #phy-cells = <1>; | ||
78 | status = "ok"; | ||
79 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index c0fccaa1671e..b422e38946d7 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
@@ -20,3 +20,97 @@ Required properties: | |||
20 | - compatible : should be "samsung,exynos5250-dp-video-phy"; | 20 | - compatible : should be "samsung,exynos5250-dp-video-phy"; |
21 | - reg : offset and length of the Display Port PHY register set; | 21 | - reg : offset and length of the Display Port PHY register set; |
22 | - #phy-cells : from the generic PHY bindings, must be 0; | 22 | - #phy-cells : from the generic PHY bindings, must be 0; |
23 | |||
24 | Samsung S5P/EXYNOS SoC series USB PHY | ||
25 | ------------------------------------------------- | ||
26 | |||
27 | Required properties: | ||
28 | - compatible : should be one of the listed compatibles: | ||
29 | - "samsung,exynos4210-usb2-phy" | ||
30 | - "samsung,exynos4x12-usb2-phy" | ||
31 | - "samsung,exynos5250-usb2-phy" | ||
32 | - reg : a list of registers used by phy driver | ||
33 | - first and obligatory is the location of phy modules registers | ||
34 | - samsung,sysreg-phandle - handle to syscon used to control the system registers | ||
35 | - samsung,pmureg-phandle - handle to syscon used to control PMU registers | ||
36 | - #phy-cells : from the generic phy bindings, must be 1; | ||
37 | - clocks and clock-names: | ||
38 | - the "phy" clock is required by the phy module, used as a gate | ||
39 | - the "ref" clock is used to get the rate of the clock provided to the | ||
40 | PHY module | ||
41 | |||
42 | The first phandle argument in the PHY specifier identifies the PHY, its | ||
43 | meaning is compatible dependent. For the currently supported SoCs (Exynos 4210 | ||
44 | and Exynos 4212) it is as follows: | ||
45 | 0 - USB device ("device"), | ||
46 | 1 - USB host ("host"), | ||
47 | 2 - HSIC0 ("hsic0"), | ||
48 | 3 - HSIC1 ("hsic1"), | ||
49 | |||
50 | Exynos 4210 and Exynos 4212 use mode switching and require that mode switch | ||
51 | register is supplied. | ||
52 | |||
53 | Example: | ||
54 | |||
55 | For Exynos 4412 (compatible with Exynos 4212): | ||
56 | |||
57 | usbphy: phy@125b0000 { | ||
58 | compatible = "samsung,exynos4x12-usb2-phy"; | ||
59 | reg = <0x125b0000 0x100>; | ||
60 | clocks = <&clock 305>, <&clock 2>; | ||
61 | clock-names = "phy", "ref"; | ||
62 | status = "okay"; | ||
63 | #phy-cells = <1>; | ||
64 | samsung,sysreg-phandle = <&sys_reg>; | ||
65 | samsung,pmureg-phandle = <&pmu_reg>; | ||
66 | }; | ||
67 | |||
68 | Then the PHY can be used in other nodes such as: | ||
69 | |||
70 | phy-consumer@12340000 { | ||
71 | phys = <&usbphy 2>; | ||
72 | phy-names = "phy"; | ||
73 | }; | ||
74 | |||
75 | Refer to DT bindings documentation of particular PHY consumer devices for more | ||
76 | information about required PHYs and the way of specification. | ||
77 | |||
78 | Samsung SATA PHY Controller | ||
79 | --------------------------- | ||
80 | |||
81 | SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. | ||
82 | Each SATA PHY controller should have its own node. | ||
83 | |||
84 | Required properties: | ||
85 | - compatible : compatible list, contains "samsung,exynos5250-sata-phy" | ||
86 | - reg : offset and length of the SATA PHY register set; | ||
87 | - #phy-cells : must be zero | ||
88 | - clocks : must be exactly one entry | ||
89 | - clock-names : must be "sata_phyctrl" | ||
90 | - samsung,exynos-sataphy-i2c-phandle : a phandle to the I2C device, no arguments | ||
91 | - samsung,syscon-phandle : a phandle to the PMU system controller, no arguments | ||
92 | |||
93 | Example: | ||
94 | sata_phy: sata-phy@12170000 { | ||
95 | compatible = "samsung,exynos5250-sata-phy"; | ||
96 | reg = <0x12170000 0x1ff>; | ||
97 | clocks = <&clock 287>; | ||
98 | clock-names = "sata_phyctrl"; | ||
99 | #phy-cells = <0>; | ||
100 | samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; | ||
101 | samsung,syscon-phandle = <&pmu_syscon>; | ||
102 | }; | ||
103 | |||
104 | Device-Tree bindings for sataphy i2c client driver | ||
105 | -------------------------------------------------- | ||
106 | |||
107 | Required properties: | ||
108 | compatible: Should be "samsung,exynos-sataphy-i2c" | ||
109 | - reg: I2C address of the sataphy i2c device. | ||
110 | |||
111 | Example: | ||
112 | |||
113 | sata_phy_i2c:sata-phy@38 { | ||
114 | compatible = "samsung,exynos-sataphy-i2c"; | ||
115 | reg = <0x38>; | ||
116 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt new file mode 100644 index 000000000000..a82361b62015 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Allwinner sun4i USB PHY | ||
2 | ----------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : should be one of "allwinner,sun4i-a10-usb-phy", | ||
6 | "allwinner,sun5i-a13-usb-phy" or "allwinner,sun7i-a20-usb-phy" | ||
7 | - reg : a list of offset + length pairs | ||
8 | - reg-names : "phy_ctrl", "pmu1" and for sun4i or sun7i "pmu2" | ||
9 | - #phy-cells : from the generic phy bindings, must be 1 | ||
10 | - clocks : phandle + clock specifier for the phy clock | ||
11 | - clock-names : "usb_phy" | ||
12 | - resets : a list of phandle + reset specifier pairs | ||
13 | - reset-names : "usb0_reset", "usb1_reset" and for sun4i or sun7i "usb2_reset" | ||
14 | |||
15 | Example: | ||
16 | usbphy: phy@0x01c13400 { | ||
17 | #phy-cells = <1>; | ||
18 | compatible = "allwinner,sun4i-a10-usb-phy"; | ||
19 | /* phy base regs, phy1 pmu reg, phy2 pmu reg */ | ||
20 | reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>; | ||
21 | reg-names = "phy_ctrl", "pmu1", "pmu2"; | ||
22 | clocks = <&usb_clk 8>; | ||
23 | clock-names = "usb_phy"; | ||
24 | resets = <&usb_clk 1>, <&usb_clk 2>; | ||
25 | reset-names = "usb1_reset", "usb2_reset"; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt new file mode 100644 index 000000000000..788fb0fa3762 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/ti-phy.txt | |||
@@ -0,0 +1,86 @@ | |||
1 | TI PHY: DT DOCUMENTATION FOR PHYs in TI PLATFORMs | ||
2 | |||
3 | OMAP CONTROL PHY | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be one of | ||
7 | "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4. | ||
8 | "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register | ||
9 | e.g. USB2_PHY on OMAP5. | ||
10 | "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control | ||
11 | e.g. USB3 PHY and SATA PHY on OMAP5. | ||
12 | "ti,control-phy-usb2-dra7" - if it has power down register like USB2 PHY on | ||
13 | DRA7 platform. | ||
14 | "ti,control-phy-usb2-am437" - if it has power down register like USB2 PHY on | ||
15 | AM437 platform. | ||
16 | - reg : Address and length of the register set for the device. It contains | ||
17 | the address of "otghs_control" for control-phy-otghs or "power" register | ||
18 | for other types. | ||
19 | - reg-names: should be "otghs_control" control-phy-otghs and "power" for | ||
20 | other types. | ||
21 | |||
22 | omap_control_usb: omap-control-usb@4a002300 { | ||
23 | compatible = "ti,control-phy-otghs"; | ||
24 | reg = <0x4a00233c 0x4>; | ||
25 | reg-names = "otghs_control"; | ||
26 | }; | ||
27 | |||
28 | OMAP USB2 PHY | ||
29 | |||
30 | Required properties: | ||
31 | - compatible: Should be "ti,omap-usb2" | ||
32 | - reg : Address and length of the register set for the device. | ||
33 | - #phy-cells: determine the number of cells that should be given in the | ||
34 | phandle while referencing this phy. | ||
35 | |||
36 | Optional properties: | ||
37 | - ctrl-module : phandle of the control module used by PHY driver to power on | ||
38 | the PHY. | ||
39 | |||
40 | This is usually a subnode of ocp2scp to which it is connected. | ||
41 | |||
42 | usb2phy@4a0ad080 { | ||
43 | compatible = "ti,omap-usb2"; | ||
44 | reg = <0x4a0ad080 0x58>; | ||
45 | ctrl-module = <&omap_control_usb>; | ||
46 | #phy-cells = <0>; | ||
47 | }; | ||
48 | |||
49 | TI PIPE3 PHY | ||
50 | |||
51 | Required properties: | ||
52 | - compatible: Should be "ti,phy-usb3" or "ti,phy-pipe3-sata". | ||
53 | "ti,omap-usb3" is deprecated. | ||
54 | - reg : Address and length of the register set for the device. | ||
55 | - reg-names: The names of the register addresses corresponding to the registers | ||
56 | filled in "reg". | ||
57 | - #phy-cells: determine the number of cells that should be given in the | ||
58 | phandle while referencing this phy. | ||
59 | - clocks: a list of phandles and clock-specifier pairs, one for each entry in | ||
60 | clock-names. | ||
61 | - clock-names: should include: | ||
62 | * "wkupclk" - wakeup clock. | ||
63 | * "sysclk" - system clock. | ||
64 | * "refclk" - reference clock. | ||
65 | |||
66 | Optional properties: | ||
67 | - ctrl-module : phandle of the control module used by PHY driver to power on | ||
68 | the PHY. | ||
69 | |||
70 | This is usually a subnode of ocp2scp to which it is connected. | ||
71 | |||
72 | usb3phy@4a084400 { | ||
73 | compatible = "ti,phy-usb3"; | ||
74 | reg = <0x4a084400 0x80>, | ||
75 | <0x4a084800 0x64>, | ||
76 | <0x4a084c00 0x40>; | ||
77 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; | ||
78 | ctrl-module = <&omap_control_usb>; | ||
79 | #phy-cells = <0>; | ||
80 | clocks = <&usb_phy_cm_clk32k>, | ||
81 | <&sys_clkin>, | ||
82 | <&usb_otg_ss_refclk960m>; | ||
83 | clock-names = "wkupclk", | ||
84 | "sysclk", | ||
85 | "refclk"; | ||
86 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt index 01ef408e205f..adda2a8d1d52 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt | |||
@@ -5,6 +5,7 @@ part and usage. | |||
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: "marvell,88f6710-pinctrl" | 7 | - compatible: "marvell,88f6710-pinctrl" |
8 | - reg: register specifier of MPP registers | ||
8 | 9 | ||
9 | Available mpp pins/groups and functions: | 10 | Available mpp pins/groups and functions: |
10 | Note: brackets (x) are not part of the mpp name for marvell,function and given | 11 | Note: brackets (x) are not part of the mpp name for marvell,function and given |
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt new file mode 100644 index 000000000000..7de0cda4a379 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | * Marvell Armada 375 SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,88f6720-pinctrl" | ||
8 | - reg: register specifier of MPP registers | ||
9 | |||
10 | Available mpp pins/groups and functions: | ||
11 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
12 | only for more detailed description in this document. | ||
13 | |||
14 | name pins functions | ||
15 | ================================================================================ | ||
16 | mpp0 0 gpio, dev(ad2), spi0(cs1), spi1(cs1) | ||
17 | mpp1 1 gpio, dev(ad3), spi0(mosi), spi1(mosi) | ||
18 | mpp2 2 gpio, dev(ad4), ptp(eventreq), led(c0), audio(sdi) | ||
19 | mpp3 3 gpio, dev(ad5), ptp(triggen), led(p3), audio(mclk) | ||
20 | mpp4 4 gpio, dev(ad6), spi0(miso), spi1(miso) | ||
21 | mpp5 5 gpio, dev(ad7), spi0(cs2), spi1(cs2) | ||
22 | mpp6 6 gpio, dev(ad0), led(p1), audio(rclk) | ||
23 | mpp7 7 gpio, dev(ad1), ptp(clk), led(p2), audio(extclk) | ||
24 | mpp8 8 gpio, dev (bootcs), spi0(cs0), spi1(cs0) | ||
25 | mpp9 9 gpio, nf(wen), spi0(sck), spi1(sck) | ||
26 | mpp10 10 gpio, nf(ren), dram(vttctrl), led(c1) | ||
27 | mpp11 11 gpio, dev(a0), led(c2), audio(sdo) | ||
28 | mpp12 12 gpio, dev(a1), audio(bclk) | ||
29 | mpp13 13 gpio, dev(readyn), pcie0(rstoutn), pcie1(rstoutn) | ||
30 | mpp14 14 gpio, i2c0(sda), uart1(txd) | ||
31 | mpp15 15 gpio, i2c0(sck), uart1(rxd) | ||
32 | mpp16 16 gpio, uart0(txd) | ||
33 | mpp17 17 gpio, uart0(rxd) | ||
34 | mpp18 18 gpio, tdm(intn) | ||
35 | mpp19 19 gpio, tdm(rstn) | ||
36 | mpp20 20 gpio, tdm(pclk) | ||
37 | mpp21 21 gpio, tdm(fsync) | ||
38 | mpp22 22 gpio, tdm(drx) | ||
39 | mpp23 23 gpio, tdm(dtx) | ||
40 | mpp24 24 gpio, led(p0), ge1(rxd0), sd(cmd), uart0(rts) | ||
41 | mpp25 25 gpio, led(p2), ge1(rxd1), sd(d0), uart0(cts) | ||
42 | mpp26 26 gpio, pcie0(clkreq), ge1(rxd2), sd(d2), uart1(rts) | ||
43 | mpp27 27 gpio, pcie1(clkreq), ge1(rxd3), sd(d1), uart1(cts) | ||
44 | mpp28 28 gpio, led(p3), ge1(txctl), sd(clk) | ||
45 | mpp29 29 gpio, pcie1(clkreq), ge1(rxclk), sd(d3) | ||
46 | mpp30 30 gpio, ge1(txd0), spi1(cs0) | ||
47 | mpp31 31 gpio, ge1(txd1), spi1(mosi) | ||
48 | mpp32 32 gpio, ge1(txd2), spi1(sck), ptp(triggen) | ||
49 | mpp33 33 gpio, ge1(txd3), spi1(miso) | ||
50 | mpp34 34 gpio, ge1(txclkout), spi1(sck) | ||
51 | mpp35 35 gpio, ge1(rxctl), spi1(cs1), spi0(cs2) | ||
52 | mpp36 36 gpio, pcie0(clkreq) | ||
53 | mpp37 37 gpio, pcie0(clkreq), tdm(intn), ge(mdc) | ||
54 | mpp38 38 gpio, pcie1(clkreq), ge(mdio) | ||
55 | mpp39 39 gpio, ref(clkout) | ||
56 | mpp40 40 gpio, uart1(txd) | ||
57 | mpp41 41 gpio, uart1(rxd) | ||
58 | mpp42 42 gpio, spi1(cs2), led(c0) | ||
59 | mpp43 43 gpio, sata0(prsnt), dram(vttctrl) | ||
60 | mpp44 44 gpio, sata0(prsnt) | ||
61 | mpp45 45 gpio, spi0(cs2), pcie0(rstoutn) | ||
62 | mpp46 46 gpio, led(p0), ge0(txd0), ge1(txd0) | ||
63 | mpp47 47 gpio, led(p1), ge0(txd1), ge1(txd1) | ||
64 | mpp48 48 gpio, led(p2), ge0(txd2), ge1(txd2) | ||
65 | mpp49 49 gpio, led(p3), ge0(txd3), ge1(txd3) | ||
66 | mpp50 50 gpio, led(c0), ge0(rxd0), ge1(rxd0) | ||
67 | mpp51 51 gpio, led(c1), ge0(rxd1), ge1(rxd1) | ||
68 | mpp52 52 gpio, led(c2), ge0(rxd2), ge1(rxd2) | ||
69 | mpp53 53 gpio, pcie1(rstoutn), ge0(rxd3), ge1(rxd3) | ||
70 | mpp54 54 gpio, pcie0(rstoutn), ge0(rxctl), ge1(rxctl) | ||
71 | mpp55 55 gpio, ge0(rxclk), ge1(rxclk) | ||
72 | mpp56 56 gpio, ge0(txclkout), ge1(txclkout) | ||
73 | mpp57 57 gpio, ge0(txctl), ge1(txctl) | ||
74 | mpp58 58 gpio, led(c0) | ||
75 | mpp59 59 gpio, led(c1) | ||
76 | mpp60 60 gpio, uart1(txd), led(c2) | ||
77 | mpp61 61 gpio, i2c1(sda), uart1(rxd), spi1(cs2), led(p0) | ||
78 | mpp62 62 gpio, i2c1(sck), led(p1) | ||
79 | mpp63 63 gpio, ptp(triggen), led(p2) | ||
80 | mpp64 64 gpio, dram(vttctrl), led(p3) | ||
81 | mpp65 65 gpio, sata1(prsnt) | ||
82 | mpp66 66 gpio, ptp(eventreq), spi1(cs3) | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt new file mode 100644 index 000000000000..b17c96849fc9 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | * Marvell Armada 380/385 SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,88f6810-pinctrl", "marvell,88f6820-pinctrl" or | ||
8 | "marvell,88f6828-pinctrl" depending on the specific variant of the | ||
9 | SoC being used. | ||
10 | - reg: register specifier of MPP registers | ||
11 | |||
12 | Available mpp pins/groups and functions: | ||
13 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
14 | only for more detailed description in this document. | ||
15 | |||
16 | name pins functions | ||
17 | ================================================================================ | ||
18 | mpp0 0 gpio, ua0(rxd) | ||
19 | mpp1 1 gpio, ua0(txd) | ||
20 | mpp2 2 gpio, i2c0(sck) | ||
21 | mpp3 3 gpio, i2c0(sda) | ||
22 | mpp4 4 gpio, ge(mdc), ua1(txd), ua0(rts) | ||
23 | mpp5 5 gpio, ge(mdio), ua1(rxd), ua0(cts) | ||
24 | mpp6 6 gpio, ge0(txclkout), ge0(crs), dev(cs3) | ||
25 | mpp7 7 gpio, ge0(txd0), dev(ad9) | ||
26 | mpp8 8 gpio, ge0(txd1), dev(ad10) | ||
27 | mpp9 9 gpio, ge0(txd2), dev(ad11) | ||
28 | mpp10 10 gpio, ge0(txd3), dev(ad12) | ||
29 | mpp11 11 gpio, ge0(txctl), dev(ad13) | ||
30 | mpp12 12 gpio, ge0(rxd0), pcie0(rstout), pcie1(rstout) [1], spi0(cs1), dev(ad14) | ||
31 | mpp13 13 gpio, ge0(rxd1), pcie0(clkreq), pcie1(clkreq) [1], spi0(cs2), dev(ad15) | ||
32 | mpp14 14 gpio, ge0(rxd2), ptp(clk), m(vtt_ctrl), spi0(cs3), dev(wen1) | ||
33 | mpp15 15 gpio, ge0(rxd3), ge(mdc slave), pcie0(rstout), spi0(mosi), pcie1(rstout) [1] | ||
34 | mpp16 16 gpio, ge0(rxctl), ge(mdio slave), m(decc_err), spi0(miso), pcie0(clkreq) | ||
35 | mpp17 17 gpio, ge0(rxclk), ptp(clk), ua1(rxd), spi0(sck), sata1(prsnt) | ||
36 | mpp18 18 gpio, ge0(rxerr), ptp(trig_gen), ua1(txd), spi0(cs0), pcie1(rstout) [1] | ||
37 | mpp19 19 gpio, ge0(col), ptp(event_req), pcie0(clkreq), sata1(prsnt), ua0(cts) | ||
38 | mpp20 20 gpio, ge0(txclk), ptp(clk), pcie1(rstout) [1], sata0(prsnt), ua0(rts) | ||
39 | mpp21 21 gpio, spi0(cs1), ge1(rxd0), sata0(prsnt), sd0(cmd), dev(bootcs) | ||
40 | mpp22 22 gpio, spi0(mosi), dev(ad0) | ||
41 | mpp23 23 gpio, spi0(sck), dev(ad2) | ||
42 | mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready) | ||
43 | mpp25 25 gpio, spi0(cs0), ua0(rts), ua1(txd), sd0(d5), dev(cs0) | ||
44 | mpp26 26 gpio, spi0(cs2), i2c1(sck), sd0(d6), dev(cs1) | ||
45 | mpp27 27 gpio, spi0(cs3), ge1(txclkout), i2c1(sda), sd0(d7), dev(cs2) | ||
46 | mpp28 28 gpio, ge1(txd0), sd0(clk), dev(ad5) | ||
47 | mpp29 29 gpio, ge1(txd1), dev(ale0) | ||
48 | mpp30 30 gpio, ge1(txd2), dev(oen) | ||
49 | mpp31 31 gpio, ge1(txd3), dev(ale1) | ||
50 | mpp32 32 gpio, ge1(txctl), dev(wen0) | ||
51 | mpp33 33 gpio, m(decc_err), dev(ad3) | ||
52 | mpp34 34 gpio, dev(ad1) | ||
53 | mpp35 35 gpio, ref(clk_out1), dev(a1) | ||
54 | mpp36 36 gpio, ptp(trig_gen), dev(a0) | ||
55 | mpp37 37 gpio, ptp(clk), ge1(rxclk), sd0(d3), dev(ad8) | ||
56 | mpp38 38 gpio, ptp(event_req), ge1(rxd1), ref(clk_out0), sd0(d0), dev(ad4) | ||
57 | mpp39 39 gpio, i2c1(sck), ge1(rxd2), ua0(cts), sd0(d1), dev(a2) | ||
58 | mpp40 40 gpio, i2c1(sda), ge1(rxd3), ua0(rts), sd0(d2), dev(ad6) | ||
59 | mpp41 41 gpio, ua1(rxd), ge1(rxctl), ua0(cts), spi1(cs3), dev(burst/last) | ||
60 | mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7) | ||
61 | mpp43 43 gpio, pcie0(clkreq), m(vtt_ctrl), m(decc_err), pcie0(rstout), dev(clkout) | ||
62 | mpp44 44 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [3], pcie0(rstout) | ||
63 | mpp45 45 gpio, ref(clk_out0), pcie0(rstout), pcie1(rstout) [1], pcie2(rstout), pcie3(rstout) | ||
64 | mpp46 46 gpio, ref(clk_out1), pcie0(rstout), pcie1(rstout) [1], pcie2(rstout), pcie3(rstout) | ||
65 | mpp47 47 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], spi1(cs2), sata3(prsnt) [2] | ||
66 | mpp48 48 gpio, sata0(prsnt), m(vtt_ctrl), tdm2c(pclk), audio(mclk), sd0(d4) | ||
67 | mpp49 49 gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm2c(fsync), audio(lrclk), sd0(d5) | ||
68 | mpp50 50 gpio, pcie0(rstout), pcie1(rstout) [1], tdm2c(drx), audio(extclk), sd0(cmd) | ||
69 | mpp51 51 gpio, tdm2c(dtx), audio(sdo), m(decc_err) | ||
70 | mpp52 52 gpio, pcie0(rstout), pcie1(rstout) [1], tdm2c(intn), audio(sdi), sd0(d6) | ||
71 | mpp53 53 gpio, sata1(prsnt), sata0(prsnt), tdm2c(rstn), audio(bclk), sd0(d7) | ||
72 | mpp54 54 gpio, sata0(prsnt), sata1(prsnt), pcie0(rstout), pcie1(rstout) [1], sd0(d3) | ||
73 | mpp55 55 gpio, ua1(cts), ge(mdio), pcie1(clkreq) [1], spi1(cs1), sd0(d0) | ||
74 | mpp56 56 gpio, ua1(rts), ge(mdc), m(decc_err), spi1(mosi) | ||
75 | mpp57 57 gpio, spi1(sck), sd0(clk) | ||
76 | mpp58 58 gpio, pcie1(clkreq) [1], i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1) | ||
77 | mpp59 59 gpio, pcie0(rstout), i2c1(sda), pcie1(rstout) [1], spi1(cs0), sd0(d2) | ||
78 | |||
79 | [1]: only available on 88F6820 and 88F6828 | ||
80 | [2]: only available on 88F6828 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt index bfa0a2e5e0cb..373dbccd7ab0 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt | |||
@@ -6,6 +6,7 @@ part and usage. | |||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: "marvell,mv78230-pinctrl", "marvell,mv78260-pinctrl", | 7 | - compatible: "marvell,mv78230-pinctrl", "marvell,mv78260-pinctrl", |
8 | "marvell,mv78460-pinctrl" | 8 | "marvell,mv78460-pinctrl" |
9 | - reg: register specifier of MPP registers | ||
9 | 10 | ||
10 | This driver supports all Armada XP variants, i.e. mv78230, mv78260, and mv78460. | 11 | This driver supports all Armada XP variants, i.e. mv78230, mv78260, and mv78460. |
11 | 12 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt index 50ec3512a292..cf52477cc7ee 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt | |||
@@ -6,6 +6,7 @@ part and usage. | |||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: "marvell,dove-pinctrl" | 7 | - compatible: "marvell,dove-pinctrl" |
8 | - clocks: (optional) phandle of pdma clock | 8 | - clocks: (optional) phandle of pdma clock |
9 | - reg: register specifiers of MPP, MPP4, and PMU MPP registers | ||
9 | 10 | ||
10 | Available mpp pins/groups and functions: | 11 | Available mpp pins/groups and functions: |
11 | Note: brackets (x) are not part of the mpp name for marvell,function and given | 12 | Note: brackets (x) are not part of the mpp name for marvell,function and given |
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt index 95daf6335c37..730444a9a4de 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt | |||
@@ -8,6 +8,7 @@ Required properties: | |||
8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", | 8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", |
9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" | 9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" |
10 | "marvell,98dx4122-pinctrl" | 10 | "marvell,98dx4122-pinctrl" |
11 | - reg: register specifier of MPP registers | ||
11 | 12 | ||
12 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. | 13 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. |
13 | It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs. | 14 | It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs. |
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt index 0a26c3aa4e6d..0c09f4eb2af0 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt | |||
@@ -37,7 +37,7 @@ uart1: serial@12100 { | |||
37 | 37 | ||
38 | pinctrl: pinctrl@d0200 { | 38 | pinctrl: pinctrl@d0200 { |
39 | compatible = "marvell,dove-pinctrl"; | 39 | compatible = "marvell,dove-pinctrl"; |
40 | reg = <0xd0200 0x20>; | 40 | reg = <0xd0200 0x14>, <0xd0440 0x04>, <0xd802c 0x08>; |
41 | 41 | ||
42 | pmx_uart1_sw: pmx-uart1-sw { | 42 | pmx_uart1_sw: pmx-uart1-sw { |
43 | marvell,pins = "mpp_uart1"; | 43 | marvell,pins = "mpp_uart1"; |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt index bc0dfdfdb148..66dcaa9efd74 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -63,6 +63,13 @@ Optional properties: | |||
63 | /* input, enable bits, disable bits, mask */ | 63 | /* input, enable bits, disable bits, mask */ |
64 | pinctrl-single,input-schmitt-enable = <0x30 0x40 0 0x70>; | 64 | pinctrl-single,input-schmitt-enable = <0x30 0x40 0 0x70>; |
65 | 65 | ||
66 | - pinctrl-single,low-power-mode : array of value that are used to configure | ||
67 | low power mode of this pin. For some silicons, the low power mode will | ||
68 | control the output of the pin when the pad including the pin enter low | ||
69 | power mode. | ||
70 | /* low power mode value, mask */ | ||
71 | pinctrl-single,low-power-mode = <0x288 0x388>; | ||
72 | |||
66 | - pinctrl-single,gpio-range : list of value that are used to configure a GPIO | 73 | - pinctrl-single,gpio-range : list of value that are used to configure a GPIO |
67 | range. They're value of subnode phandle, pin base in pinctrl device, pin | 74 | range. They're value of subnode phandle, pin base in pinctrl device, pin |
68 | number in this range, GPIO function value of this GPIO range. | 75 | number in this range, GPIO function value of this GPIO range. |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt index 05bf82a07dfd..4bd5be0e5e7d 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt | |||
@@ -11,18 +11,68 @@ Pull Up (PU) are driven by the related PIO block. | |||
11 | ST pinctrl driver controls PIO multiplexing block and also interacts with | 11 | ST pinctrl driver controls PIO multiplexing block and also interacts with |
12 | gpio driver to configure a pin. | 12 | gpio driver to configure a pin. |
13 | 13 | ||
14 | Required properties: (PIO multiplexing block) | 14 | GPIO bank can have one of the two possible types of interrupt-wirings. |
15 | |||
16 | First type is via irqmux, single interrupt is used by multiple gpio banks. This | ||
17 | reduces number of overall interrupts numbers required. All these banks belong to | ||
18 | a single pincontroller. | ||
19 | _________ | ||
20 | | |----> [gpio-bank (n) ] | ||
21 | | |----> [gpio-bank (n + 1)] | ||
22 | [irqN]-- | irq-mux |----> [gpio-bank (n + 2)] | ||
23 | | |----> [gpio-bank (... )] | ||
24 | |_________|----> [gpio-bank (n + 7)] | ||
25 | |||
26 | Second type has a dedicated interrupt per gpio bank. | ||
27 | |||
28 | [irqN]----> [gpio-bank (n)] | ||
29 | |||
30 | |||
31 | Pin controller node: | ||
32 | Required properties: | ||
15 | - compatible : should be "st,<SOC>-<pio-block>-pinctrl" | 33 | - compatible : should be "st,<SOC>-<pio-block>-pinctrl" |
16 | like st,stih415-sbc-pinctrl, st,stih415-front-pinctrl and so on. | 34 | like st,stih415-sbc-pinctrl, st,stih415-front-pinctrl and so on. |
17 | - gpio-controller : Indicates this device is a GPIO controller | 35 | - st,syscfg : Should be a phandle of the syscfg node. |
18 | - #gpio-cells : Should be one. The first cell is the pin number. | ||
19 | - st,retime-pin-mask : Should be mask to specify which pins can be retimed. | 36 | - st,retime-pin-mask : Should be mask to specify which pins can be retimed. |
20 | If the property is not present, it is assumed that all the pins in the | 37 | If the property is not present, it is assumed that all the pins in the |
21 | bank are capable of retiming. Retiming is mainly used to improve the | 38 | bank are capable of retiming. Retiming is mainly used to improve the |
22 | IO timing margins of external synchronous interfaces. | 39 | IO timing margins of external synchronous interfaces. |
23 | - st,bank-name : Should be a name string for this bank as | 40 | - ranges : defines mapping between pin controller node (parent) to gpio-bank |
24 | specified in datasheet. | 41 | node (children). |
25 | - st,syscfg : Should be a phandle of the syscfg node. | 42 | |
43 | Optional properties: | ||
44 | - interrupts : Interrupt number of the irqmux. If the interrupt is shared | ||
45 | with other gpio banks via irqmux. | ||
46 | a irqline and gpio banks. | ||
47 | - reg : irqmux memory resource. If irqmux is present. | ||
48 | - reg-names : irqmux resource should be named as "irqmux". | ||
49 | |||
50 | GPIO controller/bank node. | ||
51 | Required properties: | ||
52 | - gpio-controller : Indicates this device is a GPIO controller | ||
53 | - #gpio-cells : Should be one. The first cell is the pin number. | ||
54 | - st,bank-name : Should be a name string for this bank as specified in | ||
55 | datasheet. | ||
56 | |||
57 | Optional properties: | ||
58 | - interrupts : Interrupt number for this gpio bank. If there is a dedicated | ||
59 | interrupt wired up for this gpio bank. | ||
60 | |||
61 | - interrupt-controller : Indicates this device is a interrupt controller. GPIO | ||
62 | bank can be an interrupt controller iff one of the interrupt type either via | ||
63 | irqmux or a dedicated interrupt per bank is specified. | ||
64 | |||
65 | - #interrupt-cells: the value of this property should be 2. | ||
66 | - First Cell: represents the external gpio interrupt number local to the | ||
67 | gpio interrupt space of the controller. | ||
68 | - Second Cell: flags to identify the type of the interrupt | ||
69 | - 1 = rising edge triggered | ||
70 | - 2 = falling edge triggered | ||
71 | - 3 = rising and falling edge triggered | ||
72 | - 4 = high level triggered | ||
73 | - 8 = low level triggered | ||
74 | for related macros look in: | ||
75 | include/dt-bindings/interrupt-controller/irq.h | ||
26 | 76 | ||
27 | Example: | 77 | Example: |
28 | pin-controller-sbc { | 78 | pin-controller-sbc { |
@@ -30,10 +80,17 @@ Example: | |||
30 | #size-cells = <1>; | 80 | #size-cells = <1>; |
31 | compatible = "st,stih415-sbc-pinctrl"; | 81 | compatible = "st,stih415-sbc-pinctrl"; |
32 | st,syscfg = <&syscfg_sbc>; | 82 | st,syscfg = <&syscfg_sbc>; |
83 | reg = <0xfe61f080 0x4>; | ||
84 | reg-names = "irqmux"; | ||
85 | interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; | ||
86 | interrupts-names = "irqmux"; | ||
33 | ranges = <0 0xfe610000 0x5000>; | 87 | ranges = <0 0xfe610000 0x5000>; |
88 | |||
34 | PIO0: gpio@fe610000 { | 89 | PIO0: gpio@fe610000 { |
35 | gpio-controller; | 90 | gpio-controller; |
36 | #gpio-cells = <1>; | 91 | #gpio-cells = <1>; |
92 | interrupt-controller; | ||
93 | #interrupt-cells = <2>; | ||
37 | reg = <0 0x100>; | 94 | reg = <0 0x100>; |
38 | st,bank-name = "PIO0"; | 95 | st,bank-name = "PIO0"; |
39 | }; | 96 | }; |
@@ -105,6 +162,10 @@ pin-controller { | |||
105 | 162 | ||
106 | sdhci0:sdhci@fe810000{ | 163 | sdhci0:sdhci@fe810000{ |
107 | ... | 164 | ... |
165 | interrupt-parent = <&PIO3>; | ||
166 | #interrupt-cells = <2>; | ||
167 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */ | ||
168 | interrupts-names = "card-detect"; | ||
108 | pinctrl-names = "default"; | 169 | pinctrl-names = "default"; |
109 | pinctrl-0 = <&pinctrl_mmc>; | 170 | pinctrl-0 = <&pinctrl_mmc>; |
110 | }; | 171 | }; |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt index 4c352be5dd61..9fb89e3f61ea 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Qualcomm MSM8974 TLMM block | 1 | Qualcomm MSM8974 TLMM block |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: "qcom,msm8x74-pinctrl" | 4 | - compatible: "qcom,msm8974-pinctrl" |
5 | - reg: Should be the base address and length of the TLMM block. | 5 | - reg: Should be the base address and length of the TLMM block. |
6 | - interrupts: Should be the parent IRQ of the TLMM block. | 6 | - interrupts: Should be the parent IRQ of the TLMM block. |
7 | - interrupt-controller: Marks the device node as an interrupt controller. | 7 | - interrupt-controller: Marks the device node as an interrupt controller. |
@@ -42,14 +42,14 @@ Non-empty subnodes must specify the 'pins' property. | |||
42 | Note that not all properties are valid for all pins. | 42 | Note that not all properties are valid for all pins. |
43 | 43 | ||
44 | 44 | ||
45 | Valid values for qcom,pins are: | 45 | Valid values for pins are: |
46 | gpio0-gpio145 | 46 | gpio0-gpio145 |
47 | Supports mux, bias and drive-strength | 47 | Supports mux, bias and drive-strength |
48 | 48 | ||
49 | sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data | 49 | sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data |
50 | Supports bias and drive-strength | 50 | Supports bias and drive-strength |
51 | 51 | ||
52 | Valid values for qcom,function are: | 52 | Valid values for function are: |
53 | blsp_i2c2, blsp_i2c6, blsp_i2c11, blsp_spi1, blsp_uart2, blsp_uart8, slimbus | 53 | blsp_i2c2, blsp_i2c6, blsp_i2c11, blsp_spi1, blsp_uart2, blsp_uart8, slimbus |
54 | 54 | ||
55 | (Note that this is not yet the complete list of functions) | 55 | (Note that this is not yet the complete list of functions) |
@@ -73,18 +73,18 @@ Example: | |||
73 | 73 | ||
74 | uart2_default: uart2_default { | 74 | uart2_default: uart2_default { |
75 | mux { | 75 | mux { |
76 | qcom,pins = "gpio4", "gpio5"; | 76 | pins = "gpio4", "gpio5"; |
77 | qcom,function = "blsp_uart2"; | 77 | function = "blsp_uart2"; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | tx { | 80 | tx { |
81 | qcom,pins = "gpio4"; | 81 | pins = "gpio4"; |
82 | drive-strength = <4>; | 82 | drive-strength = <4>; |
83 | bias-disable; | 83 | bias-disable; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | rx { | 86 | rx { |
87 | qcom,pins = "gpio5"; | 87 | pins = "gpio5"; |
88 | drive-strength = <2>; | 88 | drive-strength = <2>; |
89 | bias-pull-up; | 89 | bias-pull-up; |
90 | }; | 90 | }; |
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index 257677de3e6b..2b32783ba821 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -16,6 +16,7 @@ Required Properties: | |||
16 | - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. | 16 | - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. |
17 | - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. | 17 | - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. |
18 | - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. | 18 | - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. |
19 | - "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller. | ||
19 | - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. | 20 | - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. |
20 | 21 | ||
21 | - reg: Base address of the pin controller hardware module and length of | 22 | - reg: Base address of the pin controller hardware module and length of |
diff --git a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt index 0347d8350d94..af25e77c0e0c 100644 --- a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt +++ b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt | |||
@@ -6,8 +6,11 @@ Orion5x SoCs. Sending the character 'A', at 19200 baud, tells the | |||
6 | microcontroller to turn the power off. This driver adds a handler to | 6 | microcontroller to turn the power off. This driver adds a handler to |
7 | pm_power_off which is called to turn the power off. | 7 | pm_power_off which is called to turn the power off. |
8 | 8 | ||
9 | Synology NAS devices use a similar scheme, but a different baud rate, | ||
10 | 9600, and a different character, '1'. | ||
11 | |||
9 | Required Properties: | 12 | Required Properties: |
10 | - compatible: Should be "qnap,power-off" | 13 | - compatible: Should be "qnap,power-off" or "synology,power-off" |
11 | 14 | ||
12 | - reg: Address and length of the register set for UART1 | 15 | - reg: Address and length of the register set for UART1 |
13 | - clocks: tclk clock | 16 | - clocks: tclk clock |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt b/Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt new file mode 100644 index 000000000000..c41b2187eaa8 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Freescale L2 Cache Controller | ||
2 | |||
3 | L2 cache is present in Freescale's QorIQ and QorIQ Qonverge platforms. | ||
4 | The cache bindings explained below are ePAPR compliant | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible : Should include "fsl,chip-l2-cache-controller" and "cache" | ||
9 | where chip is the processor (bsc9132, npc8572 etc.) | ||
10 | - reg : Address and size of L2 cache controller registers | ||
11 | - cache-size : Size of the entire L2 cache | ||
12 | - interrupts : Error interrupt of L2 controller | ||
13 | - cache-line-size : Size of L2 cache lines | ||
14 | |||
15 | Example: | ||
16 | |||
17 | L2: l2-cache-controller@20000 { | ||
18 | compatible = "fsl,bsc9132-l2-cache-controller", "cache"; | ||
19 | reg = <0x20000 0x1000>; | ||
20 | cache-line-size = <32>; // 32 bytes | ||
21 | cache-size = <0x40000>; // L2,256K | ||
22 | interrupts = <16 2 1 0>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt b/Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt new file mode 100644 index 000000000000..f87856faf1ab --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Freescale DDR memory controller | ||
2 | |||
3 | Properties: | ||
4 | |||
5 | - compatible : Should include "fsl,chip-memory-controller" where | ||
6 | chip is the processor (bsc9132, mpc8572 etc.), or | ||
7 | "fsl,qoriq-memory-controller". | ||
8 | - reg : Address and size of DDR controller registers | ||
9 | - interrupts : Error interrupt of DDR controller | ||
10 | |||
11 | Example 1: | ||
12 | |||
13 | memory-controller@2000 { | ||
14 | compatible = "fsl,bsc9132-memory-controller"; | ||
15 | reg = <0x2000 0x1000>; | ||
16 | interrupts = <16 2 1 8>; | ||
17 | }; | ||
18 | |||
19 | |||
20 | Example 2: | ||
21 | |||
22 | ddr1: memory-controller@8000 { | ||
23 | compatible = "fsl,qoriq-memory-controller-v4.7", | ||
24 | "fsl,qoriq-memory-controller"; | ||
25 | reg = <0x8000 0x1000>; | ||
26 | interrupts = <16 2 1 23>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/cirrus,clps711x-pwm.txt b/Documentation/devicetree/bindings/pwm/cirrus,clps711x-pwm.txt new file mode 100644 index 000000000000..a183db48f910 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/cirrus,clps711x-pwm.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Cirris Logic CLPS711X PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Shall contain "cirrus,clps711x-pwm". | ||
5 | - reg: Physical base address and length of the controller's registers. | ||
6 | - clocks: phandle + clock specifier pair of the PWM reference clock. | ||
7 | - #pwm-cells: Should be 1. The cell specifies the index of the channel. | ||
8 | |||
9 | Example: | ||
10 | pwm: pwm@80000400 { | ||
11 | compatible = "cirrus,ep7312-pwm", | ||
12 | "cirrus,clps711x-pwm"; | ||
13 | reg = <0x80000400 0x4>; | ||
14 | clocks = <&clks 8>; | ||
15 | #pwm-cells = <1>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt b/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt new file mode 100644 index 000000000000..0bda229a6171 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | Freescale FlexTimer Module (FTM) PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,vf610-ftm-pwm". | ||
5 | - reg: Physical base address and length of the controller's registers | ||
6 | - #pwm-cells: Should be 3. See pwm.txt in this directory for a description of | ||
7 | the cells format. | ||
8 | - clock-names: Should include the following module clock source entries: | ||
9 | "ftm_sys" (module clock, also can be used as counter clock), | ||
10 | "ftm_ext" (external counter clock), | ||
11 | "ftm_fix" (fixed counter clock), | ||
12 | "ftm_cnt_clk_en" (external and fixed counter clock enable/disable). | ||
13 | - clocks: Must contain a phandle and clock specifier for each entry in | ||
14 | clock-names, please see clock/clock-bindings.txt for details of the property | ||
15 | values. | ||
16 | - pinctrl-names: Must contain a "default" entry. | ||
17 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. | ||
18 | See pinctrl/pinctrl-bindings.txt for details of the property values. | ||
19 | |||
20 | |||
21 | Example: | ||
22 | |||
23 | pwm0: pwm@40038000 { | ||
24 | compatible = "fsl,vf610-ftm-pwm"; | ||
25 | reg = <0x40038000 0x1000>; | ||
26 | #pwm-cells = <3>; | ||
27 | clock-names = "ftm_sys", "ftm_ext", | ||
28 | "ftm_fix", "ftm_cnt_clk_en"; | ||
29 | clocks = <&clks VF610_CLK_FTM0>, | ||
30 | <&clks VF610_CLK_FTM0_EXT_SEL>, | ||
31 | <&clks VF610_CLK_FTM0_FIX_SEL>, | ||
32 | <&clks VF610_CLK_FTM0_EXT_FIX_EN>; | ||
33 | pinctrl-names = "default"; | ||
34 | pinctrl-0 = <&pinctrl_pwm0_1>; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt index 63c659800c03..e5cac1e0ca8a 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt | |||
@@ -8,8 +8,12 @@ Required properties: | |||
8 | Optional properties: | 8 | Optional properties: |
9 | - enable-gpio : GPIO to use to enable/disable the regulator. | 9 | - enable-gpio : GPIO to use to enable/disable the regulator. |
10 | - gpios : GPIO group used to control voltage. | 10 | - gpios : GPIO group used to control voltage. |
11 | - gpios-states : gpios pin's initial states array. 0: LOW, 1: HIGH. | ||
12 | defualt is LOW if nothing is specified. | ||
11 | - startup-delay-us : Startup time in microseconds. | 13 | - startup-delay-us : Startup time in microseconds. |
12 | - enable-active-high : Polarity of GPIO is active high (default is low). | 14 | - enable-active-high : Polarity of GPIO is active high (default is low). |
15 | - regulator-type : Specifies what is being regulated, must be either | ||
16 | "voltage" or "current", defaults to current. | ||
13 | 17 | ||
14 | Any property defined as part of the core regulator binding defined in | 18 | Any property defined as part of the core regulator binding defined in |
15 | regulator.txt can also be used. | 19 | regulator.txt can also be used. |
diff --git a/Documentation/devicetree/bindings/regulator/pfuze100.txt b/Documentation/devicetree/bindings/regulator/pfuze100.txt index fc989b2e8057..34ef5d16d0f1 100644 --- a/Documentation/devicetree/bindings/regulator/pfuze100.txt +++ b/Documentation/devicetree/bindings/regulator/pfuze100.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | PFUZE100 family of regulators | 1 | PFUZE100 family of regulators |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: "fsl,pfuze100" | 4 | - compatible: "fsl,pfuze100" or "fsl,pfuze200" |
5 | - reg: I2C slave address | 5 | - reg: I2C slave address |
6 | 6 | ||
7 | Required child node: | 7 | Required child node: |
@@ -10,11 +10,14 @@ Required child node: | |||
10 | Documentation/devicetree/bindings/regulator/regulator.txt. | 10 | Documentation/devicetree/bindings/regulator/regulator.txt. |
11 | 11 | ||
12 | The valid names for regulators are: | 12 | The valid names for regulators are: |
13 | --PFUZE100 | ||
13 | sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6 | 14 | sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6 |
15 | --PFUZE200 | ||
16 | sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6 | ||
14 | 17 | ||
15 | Each regulator is defined using the standard binding for regulators. | 18 | Each regulator is defined using the standard binding for regulators. |
16 | 19 | ||
17 | Example: | 20 | Example 1: PFUZE100 |
18 | 21 | ||
19 | pmic: pfuze100@08 { | 22 | pmic: pfuze100@08 { |
20 | compatible = "fsl,pfuze100"; | 23 | compatible = "fsl,pfuze100"; |
@@ -113,3 +116,92 @@ Example: | |||
113 | }; | 116 | }; |
114 | }; | 117 | }; |
115 | }; | 118 | }; |
119 | |||
120 | |||
121 | Example 2: PFUZE200 | ||
122 | |||
123 | pmic: pfuze200@08 { | ||
124 | compatible = "fsl,pfuze200"; | ||
125 | reg = <0x08>; | ||
126 | |||
127 | regulators { | ||
128 | sw1a_reg: sw1ab { | ||
129 | regulator-min-microvolt = <300000>; | ||
130 | regulator-max-microvolt = <1875000>; | ||
131 | regulator-boot-on; | ||
132 | regulator-always-on; | ||
133 | regulator-ramp-delay = <6250>; | ||
134 | }; | ||
135 | |||
136 | sw2_reg: sw2 { | ||
137 | regulator-min-microvolt = <800000>; | ||
138 | regulator-max-microvolt = <3300000>; | ||
139 | regulator-boot-on; | ||
140 | regulator-always-on; | ||
141 | }; | ||
142 | |||
143 | sw3a_reg: sw3a { | ||
144 | regulator-min-microvolt = <400000>; | ||
145 | regulator-max-microvolt = <1975000>; | ||
146 | regulator-boot-on; | ||
147 | regulator-always-on; | ||
148 | }; | ||
149 | |||
150 | sw3b_reg: sw3b { | ||
151 | regulator-min-microvolt = <400000>; | ||
152 | regulator-max-microvolt = <1975000>; | ||
153 | regulator-boot-on; | ||
154 | regulator-always-on; | ||
155 | }; | ||
156 | |||
157 | swbst_reg: swbst { | ||
158 | regulator-min-microvolt = <5000000>; | ||
159 | regulator-max-microvolt = <5150000>; | ||
160 | }; | ||
161 | |||
162 | snvs_reg: vsnvs { | ||
163 | regulator-min-microvolt = <1000000>; | ||
164 | regulator-max-microvolt = <3000000>; | ||
165 | regulator-boot-on; | ||
166 | regulator-always-on; | ||
167 | }; | ||
168 | |||
169 | vref_reg: vrefddr { | ||
170 | regulator-boot-on; | ||
171 | regulator-always-on; | ||
172 | }; | ||
173 | |||
174 | vgen1_reg: vgen1 { | ||
175 | regulator-min-microvolt = <800000>; | ||
176 | regulator-max-microvolt = <1550000>; | ||
177 | }; | ||
178 | |||
179 | vgen2_reg: vgen2 { | ||
180 | regulator-min-microvolt = <800000>; | ||
181 | regulator-max-microvolt = <1550000>; | ||
182 | }; | ||
183 | |||
184 | vgen3_reg: vgen3 { | ||
185 | regulator-min-microvolt = <1800000>; | ||
186 | regulator-max-microvolt = <3300000>; | ||
187 | }; | ||
188 | |||
189 | vgen4_reg: vgen4 { | ||
190 | regulator-min-microvolt = <1800000>; | ||
191 | regulator-max-microvolt = <3300000>; | ||
192 | regulator-always-on; | ||
193 | }; | ||
194 | |||
195 | vgen5_reg: vgen5 { | ||
196 | regulator-min-microvolt = <1800000>; | ||
197 | regulator-max-microvolt = <3300000>; | ||
198 | regulator-always-on; | ||
199 | }; | ||
200 | |||
201 | vgen6_reg: vgen6 { | ||
202 | regulator-min-microvolt = <1800000>; | ||
203 | regulator-max-microvolt = <3300000>; | ||
204 | regulator-always-on; | ||
205 | }; | ||
206 | }; | ||
207 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt index fc6b38f035bd..d290988ed975 100644 --- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt | |||
@@ -69,13 +69,16 @@ sub-node should be of the format as listed below. | |||
69 | }; | 69 | }; |
70 | }; | 70 | }; |
71 | The above regulator entries are defined in regulator bindings documentation | 71 | The above regulator entries are defined in regulator bindings documentation |
72 | except op_mode description. | 72 | except these properties: |
73 | - op_mode: describes the different operating modes of the LDO's with | 73 | - op_mode: describes the different operating modes of the LDO's with |
74 | power mode change in SOC. The different possible values are, | 74 | power mode change in SOC. The different possible values are, |
75 | 0 - always off mode | 75 | 0 - always off mode |
76 | 1 - on in normal mode | 76 | 1 - on in normal mode |
77 | 2 - low power mode | 77 | 2 - low power mode |
78 | 3 - suspend mode | 78 | 3 - suspend mode |
79 | - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one | ||
80 | GPIO controlling this regulator (enable/disable); This is | ||
81 | valid only for buck9. | ||
79 | 82 | ||
80 | The following are the names of the regulators that the s5m8767 pmic block | 83 | The following are the names of the regulators that the s5m8767 pmic block |
81 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number | 84 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number |
@@ -148,5 +151,13 @@ Example: | |||
148 | regulator-always-on; | 151 | regulator-always-on; |
149 | regulator-boot-on; | 152 | regulator-boot-on; |
150 | }; | 153 | }; |
154 | |||
155 | vemmc_reg: BUCK9 { | ||
156 | regulator-name = "VMEM_VDD_2.8V"; | ||
157 | regulator-min-microvolt = <2800000>; | ||
158 | regulator-max-microvolt = <2800000>; | ||
159 | op_mode = <3>; /* Standby Mode */ | ||
160 | s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>; | ||
161 | }; | ||
151 | }; | 162 | }; |
152 | }; | 163 | }; |
diff --git a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt index 2e57a33e9029..c58db75f959e 100644 --- a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt | |||
@@ -4,10 +4,14 @@ Required Properties: | |||
4 | - compatible: Should be one of: | 4 | - compatible: Should be one of: |
5 | - "ti,abb-v1" for older SoCs like OMAP3 | 5 | - "ti,abb-v1" for older SoCs like OMAP3 |
6 | - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5 | 6 | - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5 |
7 | - "ti,abb-v3" for a generic definition where setup and control registers are | ||
8 | provided (example: DRA7) | ||
7 | - reg: Address and length of the register set for the device. It contains | 9 | - reg: Address and length of the register set for the device. It contains |
8 | the information of registers in the same order as described by reg-names | 10 | the information of registers in the same order as described by reg-names |
9 | - reg-names: Should contain the reg names | 11 | - reg-names: Should contain the reg names |
10 | - "base-address" - contains base address of ABB module | 12 | - "base-address" - contains base address of ABB module (ti,abb-v1,ti,abb-v2) |
13 | - "control-address" - contains control register address of ABB module (ti,abb-v3) | ||
14 | - "setup-address" - contains setup register address of ABB module (ti,abb-v3) | ||
11 | - "int-address" - contains address of interrupt register for ABB module | 15 | - "int-address" - contains address of interrupt register for ABB module |
12 | (also see Optional properties) | 16 | (also see Optional properties) |
13 | - #address-cell: should be 0 | 17 | - #address-cell: should be 0 |
diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt new file mode 100644 index 000000000000..3da0ebdba8d9 --- /dev/null +++ b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt | |||
@@ -0,0 +1,133 @@ | |||
1 | *** Reserved memory regions *** | ||
2 | |||
3 | Reserved memory is specified as a node under the /reserved-memory node. | ||
4 | The operating system shall exclude reserved memory from normal usage | ||
5 | one can create child nodes describing particular reserved (excluded from | ||
6 | normal use) memory regions. Such memory regions are usually designed for | ||
7 | the special usage by various device drivers. | ||
8 | |||
9 | Parameters for each memory region can be encoded into the device tree | ||
10 | with the following nodes: | ||
11 | |||
12 | /reserved-memory node | ||
13 | --------------------- | ||
14 | #address-cells, #size-cells (required) - standard definition | ||
15 | - Should use the same values as the root node | ||
16 | ranges (required) - standard definition | ||
17 | - Should be empty | ||
18 | |||
19 | /reserved-memory/ child nodes | ||
20 | ----------------------------- | ||
21 | Each child of the reserved-memory node specifies one or more regions of | ||
22 | reserved memory. Each child node may either use a 'reg' property to | ||
23 | specify a specific range of reserved memory, or a 'size' property with | ||
24 | optional constraints to request a dynamically allocated block of memory. | ||
25 | |||
26 | Following the generic-names recommended practice, node names should | ||
27 | reflect the purpose of the node (ie. "framebuffer" or "dma-pool"). Unit | ||
28 | address (@<address>) should be appended to the name if the node is a | ||
29 | static allocation. | ||
30 | |||
31 | Properties: | ||
32 | Requires either a) or b) below. | ||
33 | a) static allocation | ||
34 | reg (required) - standard definition | ||
35 | b) dynamic allocation | ||
36 | size (required) - length based on parent's #size-cells | ||
37 | - Size in bytes of memory to reserve. | ||
38 | alignment (optional) - length based on parent's #size-cells | ||
39 | - Address boundary for alignment of allocation. | ||
40 | alloc-ranges (optional) - prop-encoded-array (address, length pairs). | ||
41 | - Specifies regions of memory that are | ||
42 | acceptable to allocate from. | ||
43 | |||
44 | If both reg and size are present, then the reg property takes precedence | ||
45 | and size is ignored. | ||
46 | |||
47 | Additional properties: | ||
48 | compatible (optional) - standard definition | ||
49 | - may contain the following strings: | ||
50 | - shared-dma-pool: This indicates a region of memory meant to be | ||
51 | used as a shared pool of DMA buffers for a set of devices. It can | ||
52 | be used by an operating system to instanciate the necessary pool | ||
53 | management subsystem if necessary. | ||
54 | - vendor specific string in the form <vendor>,[<device>-]<usage> | ||
55 | no-map (optional) - empty property | ||
56 | - Indicates the operating system must not create a virtual mapping | ||
57 | of the region as part of its standard mapping of system memory, | ||
58 | nor permit speculative access to it under any circumstances other | ||
59 | than under the control of the device driver using the region. | ||
60 | reusable (optional) - empty property | ||
61 | - The operating system can use the memory in this region with the | ||
62 | limitation that the device driver(s) owning the region need to be | ||
63 | able to reclaim it back. Typically that means that the operating | ||
64 | system can use that region to store volatile or cached data that | ||
65 | can be otherwise regenerated or migrated elsewhere. | ||
66 | |||
67 | Linux implementation note: | ||
68 | - If a "linux,cma-default" property is present, then Linux will use the | ||
69 | region for the default pool of the contiguous memory allocator. | ||
70 | |||
71 | Device node references to reserved memory | ||
72 | ----------------------------------------- | ||
73 | Regions in the /reserved-memory node may be referenced by other device | ||
74 | nodes by adding a memory-region property to the device node. | ||
75 | |||
76 | memory-region (optional) - phandle, specifier pairs to children of /reserved-memory | ||
77 | |||
78 | Example | ||
79 | ------- | ||
80 | This example defines 3 contiguous regions are defined for Linux kernel: | ||
81 | one default of all device drivers (named linux,cma@72000000 and 64MiB in size), | ||
82 | one dedicated to the framebuffer device (named framebuffer@78000000, 8MiB), and | ||
83 | one for multimedia processing (named multimedia-memory@77000000, 64MiB). | ||
84 | |||
85 | / { | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <1>; | ||
88 | |||
89 | memory { | ||
90 | reg = <0x40000000 0x40000000>; | ||
91 | }; | ||
92 | |||
93 | reserved-memory { | ||
94 | #address-cells = <1>; | ||
95 | #size-cells = <1>; | ||
96 | ranges; | ||
97 | |||
98 | /* global autoconfigured region for contiguous allocations */ | ||
99 | linux,cma { | ||
100 | compatible = "shared-dma-pool"; | ||
101 | reusable; | ||
102 | size = <0x4000000>; | ||
103 | alignment = <0x2000>; | ||
104 | linux,cma-default; | ||
105 | }; | ||
106 | |||
107 | display_reserved: framebuffer@78000000 { | ||
108 | reg = <0x78000000 0x800000>; | ||
109 | }; | ||
110 | |||
111 | multimedia_reserved: multimedia@77000000 { | ||
112 | compatible = "acme,multimedia-memory"; | ||
113 | reg = <0x77000000 0x4000000>; | ||
114 | }; | ||
115 | }; | ||
116 | |||
117 | /* ... */ | ||
118 | |||
119 | fb0: video@12300000 { | ||
120 | memory-region = <&display_reserved>; | ||
121 | /* ... */ | ||
122 | }; | ||
123 | |||
124 | scaler: scaler@12500000 { | ||
125 | memory-region = <&multimedia_reserved>; | ||
126 | /* ... */ | ||
127 | }; | ||
128 | |||
129 | codec: codec@12600000 { | ||
130 | memory-region = <&multimedia_reserved>; | ||
131 | /* ... */ | ||
132 | }; | ||
133 | }; | ||
diff --git a/Documentation/devicetree/bindings/reset/sirf,rstc.txt b/Documentation/devicetree/bindings/reset/sirf,rstc.txt new file mode 100644 index 000000000000..0505de742d30 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/sirf,rstc.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | CSR SiRFSoC Reset Controller | ||
2 | ====================================== | ||
3 | |||
4 | Please also refer to reset.txt in this directory for common reset | ||
5 | controller binding usage. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: Should be "sirf,prima2-rstc" or "sirf,marco-rstc" | ||
9 | - reg: should be register base and length as documented in the | ||
10 | datasheet | ||
11 | - #reset-cells: 1, see below | ||
12 | |||
13 | example: | ||
14 | |||
15 | rstc: reset-controller@88010000 { | ||
16 | compatible = "sirf,prima2-rstc"; | ||
17 | reg = <0x88010000 0x1000>; | ||
18 | #reset-cells = <1>; | ||
19 | }; | ||
20 | |||
21 | Specifying reset lines connected to IP modules | ||
22 | ============================================== | ||
23 | |||
24 | The reset controller(rstc) manages various reset sources. This module provides | ||
25 | reset signals for most blocks in system. Those device nodes should specify the | ||
26 | reset line on the rstc in their resets property, containing a phandle to the | ||
27 | rstc device node and a RESET_INDEX specifying which module to reset, as described | ||
28 | in reset.txt. | ||
29 | |||
30 | For SiRFSoC, RESET_INDEX is just reset_bit defined in SW_RST0 and SW_RST1 registers. | ||
31 | For modules whose rest_bit is in SW_RST0, its RESET_INDEX is 0~31. For modules whose | ||
32 | rest_bit is in SW_RST1, its RESET_INDEX is 32~63. | ||
33 | |||
34 | example: | ||
35 | |||
36 | vpp@90020000 { | ||
37 | compatible = "sirf,prima2-vpp"; | ||
38 | reg = <0x90020000 0x10000>; | ||
39 | interrupts = <31>; | ||
40 | clocks = <&clks 35>; | ||
41 | resets = <&rstc 6>; | ||
42 | }; | ||
diff --git a/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt new file mode 100644 index 000000000000..5ab26b7e9d35 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | STMicroelectronics STi family Sysconfig Peripheral Powerdown Reset Controller | ||
2 | ============================================================================= | ||
3 | |||
4 | This binding describes a reset controller device that is used to enable and | ||
5 | disable on-chip peripheral controllers such as USB and SATA, using | ||
6 | "powerdown" control bits found in the STi family SoC system configuration | ||
7 | registers. These have been grouped together into a single reset controller | ||
8 | device for convenience. | ||
9 | |||
10 | The actual action taken when powerdown is asserted is hardware dependent. | ||
11 | However, when asserted it may not be possible to access the hardware's | ||
12 | registers and after an assert/deassert sequence the hardware's previous state | ||
13 | may no longer be valid. | ||
14 | |||
15 | Please refer to reset.txt in this directory for common reset | ||
16 | controller binding usage. | ||
17 | |||
18 | Required properties: | ||
19 | - compatible: Should be "st,<chip>-powerdown" | ||
20 | ex: "st,stih415-powerdown", "st,stih416-powerdown" | ||
21 | - #reset-cells: 1, see below | ||
22 | |||
23 | example: | ||
24 | |||
25 | powerdown: powerdown-controller { | ||
26 | #reset-cells = <1>; | ||
27 | compatible = "st,stih415-powerdown"; | ||
28 | }; | ||
29 | |||
30 | |||
31 | Specifying powerdown control of devices | ||
32 | ======================================= | ||
33 | |||
34 | Device nodes should specify the reset channel required in their "resets" | ||
35 | property, containing a phandle to the powerdown device node and an | ||
36 | index specifying which channel to use, as described in reset.txt | ||
37 | |||
38 | example: | ||
39 | |||
40 | usb1: usb@fe200000 { | ||
41 | resets = <&powerdown STIH41X_USB1_POWERDOWN>; | ||
42 | }; | ||
43 | |||
44 | Macro definitions for the supported reset channels can be found in: | ||
45 | |||
46 | include/dt-bindings/reset-controller/stih415-resets.h | ||
47 | include/dt-bindings/reset-controller/stih416-resets.h | ||
diff --git a/Documentation/devicetree/bindings/reset/st,sti-softreset.txt b/Documentation/devicetree/bindings/reset/st,sti-softreset.txt new file mode 100644 index 000000000000..a8d3d3c25ca2 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/st,sti-softreset.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | STMicroelectronics STi family Sysconfig Peripheral SoftReset Controller | ||
2 | ============================================================================= | ||
3 | |||
4 | This binding describes a reset controller device that is used to enable and | ||
5 | disable on-chip peripheral controllers such as USB and SATA, using | ||
6 | "softreset" control bits found in the STi family SoC system configuration | ||
7 | registers. | ||
8 | |||
9 | The actual action taken when softreset is asserted is hardware dependent. | ||
10 | However, when asserted it may not be possible to access the hardware's | ||
11 | registers and after an assert/deassert sequence the hardware's previous state | ||
12 | may no longer be valid. | ||
13 | |||
14 | Please refer to reset.txt in this directory for common reset | ||
15 | controller binding usage. | ||
16 | |||
17 | Required properties: | ||
18 | - compatible: Should be "st,<chip>-softreset" example: | ||
19 | "st,stih415-softreset" or "st,stih416-softreset"; | ||
20 | - #reset-cells: 1, see below | ||
21 | |||
22 | example: | ||
23 | |||
24 | softreset: softreset-controller { | ||
25 | #reset-cells = <1>; | ||
26 | compatible = "st,stih415-softreset"; | ||
27 | }; | ||
28 | |||
29 | |||
30 | Specifying softreset control of devices | ||
31 | ======================================= | ||
32 | |||
33 | Device nodes should specify the reset channel required in their "resets" | ||
34 | property, containing a phandle to the softreset device node and an | ||
35 | index specifying which channel to use, as described in reset.txt | ||
36 | |||
37 | example: | ||
38 | |||
39 | ethernet0{ | ||
40 | resets = <&softreset STIH415_ETH0_SOFTRESET>; | ||
41 | }; | ||
42 | |||
43 | Macro definitions for the supported reset channels can be found in: | ||
44 | |||
45 | include/dt-bindings/reset-controller/stih415-resets.h | ||
46 | include/dt-bindings/reset-controller/stih416-resets.h | ||
diff --git a/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt b/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt index 7cb9dbf34878..6983aad376c3 100644 --- a/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt | |||
@@ -3,7 +3,7 @@ | |||
3 | RTC controller for the Allwinner A10/A20 | 3 | RTC controller for the Allwinner A10/A20 |
4 | 4 | ||
5 | Required properties: | 5 | Required properties: |
6 | - compatible : Should be "allwinner,sun4i-rtc" or "allwinner,sun7i-a20-rtc" | 6 | - compatible : Should be "allwinner,sun4i-a10-rtc" or "allwinner,sun7i-a20-rtc" |
7 | - reg: physical base address of the controller and length of memory mapped | 7 | - reg: physical base address of the controller and length of memory mapped |
8 | region. | 8 | region. |
9 | - interrupts: IRQ line for the RTC. | 9 | - interrupts: IRQ line for the RTC. |
@@ -11,7 +11,7 @@ Required properties: | |||
11 | Example: | 11 | Example: |
12 | 12 | ||
13 | rtc: rtc@01c20d00 { | 13 | rtc: rtc@01c20d00 { |
14 | compatible = "allwinner,sun4i-rtc"; | 14 | compatible = "allwinner,sun4i-a10-rtc"; |
15 | reg = <0x01c20d00 0x20>; | 15 | reg = <0x01c20d00 0x20>; |
16 | interrupts = <24>; | 16 | interrupts = <24>; |
17 | }; | 17 | }; |
diff --git a/Documentation/devicetree/bindings/serial/atmel-usart.txt b/Documentation/devicetree/bindings/serial/atmel-usart.txt index 9c5d19ac935c..17c1042b2df8 100644 --- a/Documentation/devicetree/bindings/serial/atmel-usart.txt +++ b/Documentation/devicetree/bindings/serial/atmel-usart.txt | |||
@@ -13,6 +13,8 @@ Required properties: | |||
13 | Optional properties: | 13 | Optional properties: |
14 | - atmel,use-dma-rx: use of PDC or DMA for receiving data | 14 | - atmel,use-dma-rx: use of PDC or DMA for receiving data |
15 | - atmel,use-dma-tx: use of PDC or DMA for transmitting data | 15 | - atmel,use-dma-tx: use of PDC or DMA for transmitting data |
16 | - rts-gpios: specify a GPIO for RTS line. It will use specified PIO instead of the peripheral | ||
17 | function pin for the USART RTS feature. If unsure, don't specify this property. | ||
16 | - add dma bindings for dma transfer: | 18 | - add dma bindings for dma transfer: |
17 | - dmas: DMA specifier, consisting of a phandle to DMA controller node, | 19 | - dmas: DMA specifier, consisting of a phandle to DMA controller node, |
18 | memory peripheral interface and USART DMA channel ID, FIFO configuration. | 20 | memory peripheral interface and USART DMA channel ID, FIFO configuration. |
@@ -33,6 +35,7 @@ Example: | |||
33 | clock-names = "usart"; | 35 | clock-names = "usart"; |
34 | atmel,use-dma-rx; | 36 | atmel,use-dma-rx; |
35 | atmel,use-dma-tx; | 37 | atmel,use-dma-tx; |
38 | rts-gpios = <&pioD 15 0>; | ||
36 | }; | 39 | }; |
37 | 40 | ||
38 | - use DMA: | 41 | - use DMA: |
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt index 8e080b893b49..1984bdfbd545 100644 --- a/Documentation/devicetree/bindings/serial/efm32-uart.txt +++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt | |||
@@ -6,7 +6,7 @@ Required properties: | |||
6 | - interrupts : Should contain uart interrupt | 6 | - interrupts : Should contain uart interrupt |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - location : Decides the location of the USART I/O pins. | 9 | - efm32,location : Decides the location of the USART I/O pins. |
10 | Allowed range : [0 .. 5] | 10 | Allowed range : [0 .. 5] |
11 | Default: 0 | 11 | Default: 0 |
12 | 12 | ||
@@ -16,5 +16,5 @@ uart@0x4000c400 { | |||
16 | compatible = "efm32,uart"; | 16 | compatible = "efm32,uart"; |
17 | reg = <0x4000c400 0x400>; | 17 | reg = <0x4000c400 0x400>; |
18 | interrupts = <15>; | 18 | interrupts = <15>; |
19 | location = <0>; | 19 | efm32,location = <0>; |
20 | }; | 20 | }; |
diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt index 6fd1dd1638dd..a1d1205d8185 100644 --- a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt +++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt | |||
@@ -4,11 +4,24 @@ Required properties: | |||
4 | - compatible : Should be "fsl,<soc>-lpuart" | 4 | - compatible : Should be "fsl,<soc>-lpuart" |
5 | - reg : Address and length of the register set for the device | 5 | - reg : Address and length of the register set for the device |
6 | - interrupts : Should contain uart interrupt | 6 | - interrupts : Should contain uart interrupt |
7 | - clocks : phandle + clock specifier pairs, one for each entry in clock-names | ||
8 | - clock-names : should contain: "ipg" - the uart clock | ||
9 | |||
10 | Optional properties: | ||
11 | - dmas: A list of two dma specifiers, one for each entry in dma-names. | ||
12 | - dma-names: should contain "tx" and "rx". | ||
13 | |||
14 | Note: Optional properties for DMA support. Write them both or both not. | ||
7 | 15 | ||
8 | Example: | 16 | Example: |
9 | 17 | ||
10 | uart0: serial@40027000 { | 18 | uart0: serial@40027000 { |
11 | compatible = "fsl,vf610-lpuart"; | 19 | compatible = "fsl,vf610-lpuart"; |
12 | reg = <0x40027000 0x1000>; | 20 | reg = <0x40027000 0x1000>; |
13 | interrupts = <0 61 0x00>; | 21 | interrupts = <0 61 0x00>; |
14 | }; | 22 | clocks = <&clks VF610_CLK_UART0>; |
23 | clock-names = "ipg"; | ||
24 | dmas = <&edma0 0 2>, | ||
25 | <&edma0 0 3>; | ||
26 | dma-names = "rx","tx"; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/maxim,max310x.txt b/Documentation/devicetree/bindings/serial/maxim,max310x.txt new file mode 100644 index 000000000000..83a919c241b0 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/maxim,max310x.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | * Maxim MAX310X advanced Universal Asynchronous Receiver-Transmitter (UART) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be one of the following: | ||
5 | - "maxim,max3107" for Maxim MAX3107, | ||
6 | - "maxim,max3108" for Maxim MAX3108, | ||
7 | - "maxim,max3109" for Maxim MAX3109, | ||
8 | - "maxim,max14830" for Maxim MAX14830. | ||
9 | - reg: SPI chip select number. | ||
10 | - interrupt-parent: The phandle for the interrupt controller that | ||
11 | services interrupts for this IC. | ||
12 | - interrupts: Specifies the interrupt source of the parent interrupt | ||
13 | controller. The format of the interrupt specifier depends on the | ||
14 | parent interrupt controller. | ||
15 | - clocks: phandle to the IC source clock. | ||
16 | - clock-names: Should be "xtal" if clock is an external crystal or | ||
17 | "osc" if an external clock source is used. | ||
18 | |||
19 | Optional properties: | ||
20 | - gpio-controller: Marks the device node as a GPIO controller. | ||
21 | - #gpio-cells: Should be two. The first cell is the GPIO number and | ||
22 | the second cell is used to specify the GPIO polarity: | ||
23 | 0 = active high, | ||
24 | 1 = active low. | ||
25 | |||
26 | Example: | ||
27 | max14830: max14830@0 { | ||
28 | compatible = "maxim,max14830"; | ||
29 | reg = <0>; | ||
30 | clocks = <&clk20m>; | ||
31 | clock-names = "osc"; | ||
32 | interrupt-parent = <&gpio3>; | ||
33 | interrupts = <7 IRQ_TYPE_EDGE_FALLING>; | ||
34 | gpio-controller; | ||
35 | #gpio-cells = <2>; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index f372cf29068d..53e6c175db6c 100644 --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | |||
@@ -37,7 +37,7 @@ Example: | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | scifa0: serial@e6c40000 { | 39 | scifa0: serial@e6c40000 { |
40 | compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic"; | 40 | compatible = "renesas,scifa-r8a7790", "renesas,scifa"; |
41 | reg = <0 0xe6c40000 0 64>; | 41 | reg = <0 0xe6c40000 0 64>; |
42 | interrupt-parent = <&gic>; | 42 | interrupt-parent = <&gic>; |
43 | interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; | 43 | interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; |
diff --git a/Documentation/devicetree/bindings/sound/armada-370db-audio.txt b/Documentation/devicetree/bindings/sound/armada-370db-audio.txt new file mode 100644 index 000000000000..bf984d238620 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/armada-370db-audio.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Device Tree bindings for the Armada 370 DB audio | ||
2 | ================================================ | ||
3 | |||
4 | These Device Tree bindings are used to describe the audio complex | ||
5 | found on the Armada 370 DB platform. | ||
6 | |||
7 | Mandatory properties: | ||
8 | |||
9 | * compatible: must be "marvell,a370db-audio" | ||
10 | |||
11 | * marvell,audio-controller: a phandle that points to the audio | ||
12 | controller of the Armada 370 SoC. | ||
13 | |||
14 | * marvell,audio-codec: a set of three phandles that points to: | ||
15 | |||
16 | 1/ the analog audio codec connected to the Armada 370 SoC | ||
17 | 2/ the S/PDIF transceiver | ||
18 | 3/ the S/PDIF receiver | ||
19 | |||
20 | Example: | ||
21 | |||
22 | sound { | ||
23 | compatible = "marvell,a370db-audio"; | ||
24 | marvell,audio-controller = <&audio_controller>; | ||
25 | marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>; | ||
26 | status = "okay"; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/cs42xx8.txt b/Documentation/devicetree/bindings/sound/cs42xx8.txt new file mode 100644 index 000000000000..f631fbca6284 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cs42xx8.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | CS42448/CS42888 audio CODEC | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888" | ||
6 | |||
7 | - reg : the I2C address of the device for I2C | ||
8 | |||
9 | - clocks : a list of phandles + clock-specifiers, one for each entry in | ||
10 | clock-names | ||
11 | |||
12 | - clock-names : must contain "mclk" | ||
13 | |||
14 | - VA-supply, VD-supply, VLS-supply, VLC-supply: power supplies for the device, | ||
15 | as covered in Documentation/devicetree/bindings/regulator/regulator.txt | ||
16 | |||
17 | Example: | ||
18 | |||
19 | codec: cs42888@48 { | ||
20 | compatible = "cirrus,cs42888"; | ||
21 | reg = <0x48>; | ||
22 | clocks = <&codec_mclk 0>; | ||
23 | clock-names = "mclk"; | ||
24 | VA-supply = <®_audio>; | ||
25 | VD-supply = <®_audio>; | ||
26 | VLS-supply = <®_audio>; | ||
27 | VLC-supply = <®_audio>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/da9055.txt b/Documentation/devicetree/bindings/sound/da9055.txt new file mode 100644 index 000000000000..ed1b7cc6f249 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/da9055.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Dialog DA9055 Audio CODEC | ||
2 | |||
3 | DA9055 provides Audio CODEC support (I2C only). | ||
4 | |||
5 | The Audio CODEC device in DA9055 has it's own I2C address which is configurable, | ||
6 | so the device is instantiated separately from the PMIC (MFD) device. | ||
7 | |||
8 | For details on accompanying PMIC I2C device, see the following: | ||
9 | Documentation/devicetree/bindings/mfd/da9055.txt | ||
10 | |||
11 | Required properties: | ||
12 | |||
13 | - compatible: "dlg,da9055-codec" | ||
14 | - reg: Specifies the I2C slave address | ||
15 | |||
16 | |||
17 | Example: | ||
18 | |||
19 | codec: da9055-codec@1a { | ||
20 | compatible = "dlg,da9055-codec"; | ||
21 | reg = <0x1a>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt index 865178d5cdf3..963e100514c2 100644 --- a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +++ b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt | |||
@@ -5,12 +5,19 @@ Required properties: | |||
5 | - ti,model : The user-visible name of this sound complex. | 5 | - ti,model : The user-visible name of this sound complex. |
6 | - ti,audio-codec : The phandle of the TLV320AIC3x audio codec | 6 | - ti,audio-codec : The phandle of the TLV320AIC3x audio codec |
7 | - ti,mcasp-controller : The phandle of the McASP controller | 7 | - ti,mcasp-controller : The phandle of the McASP controller |
8 | - ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec | ||
9 | - ti,audio-routing : A list of the connections between audio components. | 8 | - ti,audio-routing : A list of the connections between audio components. |
10 | Each entry is a pair of strings, the first being the connection's sink, | 9 | Each entry is a pair of strings, the first being the connection's sink, |
11 | the second being the connection's source. Valid names for sources and | 10 | the second being the connection's source. Valid names for sources and |
12 | sinks are the codec's pins, and the jacks on the board: | 11 | sinks are the codec's pins, and the jacks on the board: |
13 | 12 | ||
13 | Optional properties: | ||
14 | - ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec. | ||
15 | - clocks : Reference to the master clock | ||
16 | - clock-names : The clock should be named "mclk" | ||
17 | - Either codec-clock-rate or the codec-clock reference has to be defined. If | ||
18 | the both are defined the driver attempts to set referenced clock to the | ||
19 | defined rate and takes the rate from the clock reference. | ||
20 | |||
14 | Board connectors: | 21 | Board connectors: |
15 | 22 | ||
16 | * Headphone Jack | 23 | * Headphone Jack |
diff --git a/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt new file mode 100644 index 000000000000..0d7985c864af --- /dev/null +++ b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Audio complex for Eukrea boards with tlv320aic23 codec. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "eukrea,asoc-tlv320" | ||
5 | - eukrea,model : The user-visible name of this sound complex. | ||
6 | - ssi-controller : The phandle of the SSI controller. | ||
7 | - fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX). | ||
8 | - fsl,mux-ext-port : The external port of the i.MX audio muxer. | ||
9 | |||
10 | Note: The AUDMUX port numbering should start at 1, which is consistent with | ||
11 | hardware manual. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | sound { | ||
16 | compatible = "eukrea,asoc-tlv320"; | ||
17 | eukrea,model = "imx51-eukrea-tlv320aic23"; | ||
18 | ssi-controller = <&ssi2>; | ||
19 | fsl,mux-int-port = <2>; | ||
20 | fsl,mux-ext-port = <3>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/fsl,esai.txt b/Documentation/devicetree/bindings/sound/fsl,esai.txt index d7b99fa637b5..aeb8c4a0b88d 100644 --- a/Documentation/devicetree/bindings/sound/fsl,esai.txt +++ b/Documentation/devicetree/bindings/sound/fsl,esai.txt | |||
@@ -34,6 +34,10 @@ Required properties: | |||
34 | that ESAI would work in the synchronous mode, which means all the settings | 34 | that ESAI would work in the synchronous mode, which means all the settings |
35 | for Receiving would be duplicated from Transmition related registers. | 35 | for Receiving would be duplicated from Transmition related registers. |
36 | 36 | ||
37 | - big-endian : If this property is absent, the native endian mode will | ||
38 | be in use as default, or the big endian mode will be in use for all the | ||
39 | device registers. | ||
40 | |||
37 | Example: | 41 | Example: |
38 | 42 | ||
39 | esai: esai@02024000 { | 43 | esai: esai@02024000 { |
@@ -46,5 +50,6 @@ esai: esai@02024000 { | |||
46 | dma-names = "rx", "tx"; | 50 | dma-names = "rx", "tx"; |
47 | fsl,fifo-depth = <128>; | 51 | fsl,fifo-depth = <128>; |
48 | fsl,esai-synchronous; | 52 | fsl,esai-synchronous; |
53 | big-endian; | ||
49 | status = "disabled"; | 54 | status = "disabled"; |
50 | }; | 55 | }; |
diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.txt b/Documentation/devicetree/bindings/sound/fsl,spdif.txt index f2ae335670f5..3e9e82c8eab3 100644 --- a/Documentation/devicetree/bindings/sound/fsl,spdif.txt +++ b/Documentation/devicetree/bindings/sound/fsl,spdif.txt | |||
@@ -29,6 +29,10 @@ Required properties: | |||
29 | can also be referred to TxClk_Source | 29 | can also be referred to TxClk_Source |
30 | bit of register SPDIF_STC. | 30 | bit of register SPDIF_STC. |
31 | 31 | ||
32 | - big-endian : If this property is absent, the native endian mode will | ||
33 | be in use as default, or the big endian mode will be in use for all the | ||
34 | device registers. | ||
35 | |||
32 | Example: | 36 | Example: |
33 | 37 | ||
34 | spdif: spdif@02004000 { | 38 | spdif: spdif@02004000 { |
@@ -50,5 +54,6 @@ spdif: spdif@02004000 { | |||
50 | "rxtx5", "rxtx6", | 54 | "rxtx5", "rxtx6", |
51 | "rxtx7"; | 55 | "rxtx7"; |
52 | 56 | ||
57 | big-endian; | ||
53 | status = "okay"; | 58 | status = "okay"; |
54 | }; | 59 | }; |
diff --git a/Documentation/devicetree/bindings/sound/mvebu-audio.txt b/Documentation/devicetree/bindings/sound/mvebu-audio.txt index f0062c5871b4..cb8c07c81ce4 100644 --- a/Documentation/devicetree/bindings/sound/mvebu-audio.txt +++ b/Documentation/devicetree/bindings/sound/mvebu-audio.txt | |||
@@ -5,6 +5,7 @@ Required properties: | |||
5 | - compatible: | 5 | - compatible: |
6 | "marvell,kirkwood-audio" for Kirkwood platforms | 6 | "marvell,kirkwood-audio" for Kirkwood platforms |
7 | "marvell,dove-audio" for Dove platforms | 7 | "marvell,dove-audio" for Dove platforms |
8 | "marvell,armada370-audio" for Armada 370 platforms | ||
8 | 9 | ||
9 | - reg: physical base address of the controller and length of memory mapped | 10 | - reg: physical base address of the controller and length of memory mapped |
10 | region. | 11 | region. |
diff --git a/Documentation/devicetree/bindings/sound/pcm512x.txt b/Documentation/devicetree/bindings/sound/pcm512x.txt new file mode 100644 index 000000000000..faff75e64573 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/pcm512x.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | PCM512x audio CODECs | ||
2 | |||
3 | These devices support both I2C and SPI (configured with pin strapping | ||
4 | on the board). | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : One of "ti,pcm5121" or "ti,pcm5122" | ||
9 | |||
10 | - reg : the I2C address of the device for I2C, the chip select | ||
11 | number for SPI. | ||
12 | |||
13 | - AVDD-supply, DVDD-supply, and CPVDD-supply : power supplies for the | ||
14 | device, as covered in bindings/regulator/regulator.txt | ||
15 | |||
16 | Optional properties: | ||
17 | |||
18 | - clocks : A clock specifier for the clock connected as SCLK. If this | ||
19 | is absent the device will be configured to clock from BCLK. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | pcm5122: pcm5122@4c { | ||
24 | compatible = "ti,pcm5122"; | ||
25 | reg = <0x4c>; | ||
26 | |||
27 | AVDD-supply = <®_3v3_analog>; | ||
28 | DVDD-supply = <®_1v8>; | ||
29 | CPVDD-supply = <®_3v3>; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt new file mode 100644 index 000000000000..a44e9179faf5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt | |||
@@ -0,0 +1,105 @@ | |||
1 | Renesas R-Car sound | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "renesas,rcar_sound-gen1" if generation1 | ||
5 | "renesas,rcar_sound-gen2" if generation2 | ||
6 | - reg : Should contain the register physical address. | ||
7 | required register is | ||
8 | SRU/ADG/SSI if generation1 | ||
9 | SRU/ADG/SSIU/SSI if generation2 | ||
10 | - rcar_sound,ssi : Should contain SSI feature. | ||
11 | The number of SSI subnode should be same as HW. | ||
12 | see below for detail. | ||
13 | - rcar_sound,src : Should contain SRC feature. | ||
14 | The number of SRC subnode should be same as HW. | ||
15 | see below for detail. | ||
16 | - rcar_sound,dai : DAI contents. | ||
17 | The number of DAI subnode should be same as HW. | ||
18 | see below for detail. | ||
19 | |||
20 | SSI subnode properties: | ||
21 | - interrupts : Should contain SSI interrupt for PIO transfer | ||
22 | - shared-pin : if shared clock pin | ||
23 | |||
24 | SRC subnode properties: | ||
25 | no properties at this point | ||
26 | |||
27 | DAI subnode properties: | ||
28 | - playback : list of playback modules | ||
29 | - capture : list of capture modules | ||
30 | |||
31 | Example: | ||
32 | |||
33 | rcar_sound: rcar_sound@0xffd90000 { | ||
34 | #sound-dai-cells = <1>; | ||
35 | compatible = "renesas,rcar_sound-gen2"; | ||
36 | reg = <0 0xec500000 0 0x1000>, /* SCU */ | ||
37 | <0 0xec5a0000 0 0x100>, /* ADG */ | ||
38 | <0 0xec540000 0 0x1000>, /* SSIU */ | ||
39 | <0 0xec541000 0 0x1280>; /* SSI */ | ||
40 | |||
41 | rcar_sound,src { | ||
42 | src0: src@0 { }; | ||
43 | src1: src@1 { }; | ||
44 | src2: src@2 { }; | ||
45 | src3: src@3 { }; | ||
46 | src4: src@4 { }; | ||
47 | src5: src@5 { }; | ||
48 | src6: src@6 { }; | ||
49 | src7: src@7 { }; | ||
50 | src8: src@8 { }; | ||
51 | src9: src@9 { }; | ||
52 | }; | ||
53 | |||
54 | rcar_sound,ssi { | ||
55 | ssi0: ssi@0 { | ||
56 | interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; | ||
57 | }; | ||
58 | ssi1: ssi@1 { | ||
59 | interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; | ||
60 | }; | ||
61 | ssi2: ssi@2 { | ||
62 | interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; | ||
63 | }; | ||
64 | ssi3: ssi@3 { | ||
65 | interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; | ||
66 | }; | ||
67 | ssi4: ssi@4 { | ||
68 | interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; | ||
69 | }; | ||
70 | ssi5: ssi@5 { | ||
71 | interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; | ||
72 | }; | ||
73 | ssi6: ssi@6 { | ||
74 | interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; | ||
75 | }; | ||
76 | ssi7: ssi@7 { | ||
77 | interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; | ||
78 | }; | ||
79 | ssi8: ssi@8 { | ||
80 | interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; | ||
81 | }; | ||
82 | ssi9: ssi@9 { | ||
83 | interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | rcar_sound,dai { | ||
88 | dai0 { | ||
89 | playback = <&ssi5 &src5>; | ||
90 | capture = <&ssi6>; | ||
91 | }; | ||
92 | dai1 { | ||
93 | playback = <&ssi3>; | ||
94 | }; | ||
95 | dai2 { | ||
96 | capture = <&ssi4>; | ||
97 | }; | ||
98 | dai3 { | ||
99 | playback = <&ssi7>; | ||
100 | }; | ||
101 | dai4 { | ||
102 | capture = <&ssi8>; | ||
103 | }; | ||
104 | }; | ||
105 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt index 19c84df5fffa..131aa2ad7f1a 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-card.txt | |||
@@ -8,16 +8,26 @@ Required properties: | |||
8 | 8 | ||
9 | Optional properties: | 9 | Optional properties: |
10 | 10 | ||
11 | - simple-audio-card,name : User specified audio sound card name, one string | ||
12 | property. | ||
11 | - simple-audio-card,format : CPU/CODEC common audio format. | 13 | - simple-audio-card,format : CPU/CODEC common audio format. |
12 | "i2s", "right_j", "left_j" , "dsp_a" | 14 | "i2s", "right_j", "left_j" , "dsp_a" |
13 | "dsp_b", "ac97", "pdm", "msb", "lsb" | 15 | "dsp_b", "ac97", "pdm", "msb", "lsb" |
16 | - simple-audio-card,widgets : Please refer to widgets.txt. | ||
14 | - simple-audio-card,routing : A list of the connections between audio components. | 17 | - simple-audio-card,routing : A list of the connections between audio components. |
15 | Each entry is a pair of strings, the first being the | 18 | Each entry is a pair of strings, the first being the |
16 | connection's sink, the second being the connection's | 19 | connection's sink, the second being the connection's |
17 | source. | 20 | source. |
21 | - dai-tdm-slot-num : Please refer to tdm-slot.txt. | ||
22 | - dai-tdm-slot-width : Please refer to tdm-slot.txt. | ||
18 | 23 | ||
19 | Required subnodes: | 24 | Required subnodes: |
20 | 25 | ||
26 | - simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes | ||
27 | This container may be omitted when the | ||
28 | card has only one DAI link. | ||
29 | See the examples. | ||
30 | |||
21 | - simple-audio-card,cpu : CPU sub-node | 31 | - simple-audio-card,cpu : CPU sub-node |
22 | - simple-audio-card,codec : CODEC sub-node | 32 | - simple-audio-card,codec : CODEC sub-node |
23 | 33 | ||
@@ -38,15 +48,29 @@ Optional CPU/CODEC subnodes properties: | |||
38 | clock node (= common clock), or "system-clock-frequency" | 48 | clock node (= common clock), or "system-clock-frequency" |
39 | (if system doens't support common clock) | 49 | (if system doens't support common clock) |
40 | 50 | ||
41 | Example: | 51 | Note: |
52 | * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and | ||
53 | 'frame-inversion', the simple card will use the settings of CODEC for both | ||
54 | CPU and CODEC sides as we need to keep the settings identical for both ends | ||
55 | of the link. | ||
56 | |||
57 | Example 1 - single DAI link: | ||
42 | 58 | ||
43 | sound { | 59 | sound { |
44 | compatible = "simple-audio-card"; | 60 | compatible = "simple-audio-card"; |
61 | simple-audio-card,name = "VF610-Tower-Sound-Card"; | ||
45 | simple-audio-card,format = "left_j"; | 62 | simple-audio-card,format = "left_j"; |
63 | simple-audio-card,widgets = | ||
64 | "Microphone", "Microphone Jack", | ||
65 | "Headphone", "Headphone Jack", | ||
66 | "Speaker", "External Speaker"; | ||
46 | simple-audio-card,routing = | 67 | simple-audio-card,routing = |
47 | "MIC_IN", "Mic Jack", | 68 | "MIC_IN", "Microphone Jack", |
48 | "Headphone Jack", "HP_OUT", | 69 | "Headphone Jack", "HP_OUT", |
49 | "Ext Spk", "LINE_OUT"; | 70 | "External Speaker", "LINE_OUT"; |
71 | |||
72 | dai-tdm-slot-num = <2>; | ||
73 | dai-tdm-slot-width = <8>; | ||
50 | 74 | ||
51 | simple-audio-card,cpu { | 75 | simple-audio-card,cpu { |
52 | sound-dai = <&sh_fsi2 0>; | 76 | sound-dai = <&sh_fsi2 0>; |
@@ -75,3 +99,38 @@ sh_fsi2: sh_fsi2@ec230000 { | |||
75 | interrupt-parent = <&gic>; | 99 | interrupt-parent = <&gic>; |
76 | interrupts = <0 146 0x4>; | 100 | interrupts = <0 146 0x4>; |
77 | }; | 101 | }; |
102 | |||
103 | Example 2 - many DAI links: | ||
104 | |||
105 | sound { | ||
106 | compatible = "simple-audio-card"; | ||
107 | simple-audio-card,name = "Cubox Audio"; | ||
108 | simple-audio-card,format = "i2s"; | ||
109 | |||
110 | simple-audio-card,dai-link@0 { /* I2S - HDMI */ | ||
111 | simple-audio-card,cpu { | ||
112 | sound-dai = <&audio1 0>; | ||
113 | }; | ||
114 | simple-audio-card,codec { | ||
115 | sound-dai = <&tda998x 0>; | ||
116 | }; | ||
117 | }; | ||
118 | |||
119 | simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ | ||
120 | simple-audio-card,cpu { | ||
121 | sound-dai = <&audio1 1>; | ||
122 | }; | ||
123 | simple-audio-card,codec { | ||
124 | sound-dai = <&tda998x 1>; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ | ||
129 | simple-audio-card,cpu { | ||
130 | sound-dai = <&audio1 1>; | ||
131 | }; | ||
132 | simple-audio-card,codec { | ||
133 | sound-dai = <&spdif_codec>; | ||
134 | }; | ||
135 | }; | ||
136 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/sirf-audio-codec.txt b/Documentation/devicetree/bindings/sound/sirf-audio-codec.txt new file mode 100644 index 000000000000..062f5ec36f9b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sirf-audio-codec.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | SiRF internal audio CODEC | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : "sirf,atlas6-audio-codec" or "sirf,prima2-audio-codec" | ||
6 | |||
7 | - reg : the register address of the device. | ||
8 | |||
9 | - clocks: the clock of SiRF internal audio codec | ||
10 | |||
11 | Example: | ||
12 | |||
13 | audiocodec: audiocodec@b0040000 { | ||
14 | compatible = "sirf,atlas6-audio-codec"; | ||
15 | reg = <0xb0040000 0x10000>; | ||
16 | clocks = <&clks 27>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/sirf-audio-port.txt b/Documentation/devicetree/bindings/sound/sirf-audio-port.txt new file mode 100644 index 000000000000..1f66de3c8f00 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sirf-audio-port.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | * SiRF SoC audio port | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "sirf,audio-port" | ||
5 | - reg: Base address and size entries: | ||
6 | - dmas: List of DMA controller phandle and DMA request line ordered pairs. | ||
7 | - dma-names: Identifier string for each DMA request line in the dmas property. | ||
8 | These strings correspond 1:1 with the ordered pairs in dmas. | ||
9 | |||
10 | One of the DMA channels will be responsible for transmission (should be | ||
11 | named "tx") and one for reception (should be named "rx"). | ||
12 | |||
13 | Example: | ||
14 | |||
15 | audioport: audioport@b0040000 { | ||
16 | compatible = "sirf,audio-port"; | ||
17 | reg = <0xb0040000 0x10000>; | ||
18 | dmas = <&dmac1 3>, <&dmac1 8>; | ||
19 | dma-names = "rx", "tx"; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/sirf-audio.txt b/Documentation/devicetree/bindings/sound/sirf-audio.txt new file mode 100644 index 000000000000..c88882ca3704 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sirf-audio.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | * SiRF atlas6 and prima2 internal audio codec and port based audio setups | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "sirf,sirf-audio-card" | ||
5 | - sirf,audio-platform: phandle for the platform node | ||
6 | - sirf,audio-codec: phandle for the SiRF internal codec node | ||
7 | |||
8 | Optional properties: | ||
9 | - hp-pa-gpios: Need to be present if the board need control external | ||
10 | headphone amplifier. | ||
11 | - spk-pa-gpios: Need to be present if the board need control external | ||
12 | speaker amplifier. | ||
13 | - hp-switch-gpios: Need to be present if the board capable to detect jack | ||
14 | insertion, removal. | ||
15 | |||
16 | Available audio endpoints for the audio-routing table: | ||
17 | |||
18 | Board connectors: | ||
19 | * Headset Stereophone | ||
20 | * Ext Spk | ||
21 | * Line In | ||
22 | * Mic | ||
23 | |||
24 | SiRF internal audio codec pins: | ||
25 | * HPOUTL | ||
26 | * HPOUTR | ||
27 | * SPKOUT | ||
28 | * Ext Mic | ||
29 | * Mic Bias | ||
30 | |||
31 | Example: | ||
32 | |||
33 | sound { | ||
34 | compatible = "sirf,sirf-audio-card"; | ||
35 | sirf,audio-codec = <&audiocodec>; | ||
36 | sirf,audio-platform = <&audioport>; | ||
37 | hp-pa-gpios = <&gpio 44 0>; | ||
38 | spk-pa-gpios = <&gpio 46 0>; | ||
39 | hp-switch-gpios = <&gpio 45 0>; | ||
40 | }; | ||
41 | |||
diff --git a/Documentation/devicetree/bindings/sound/tdm-slot.txt b/Documentation/devicetree/bindings/sound/tdm-slot.txt new file mode 100644 index 000000000000..6a2c84247f91 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tdm-slot.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | TDM slot: | ||
2 | |||
3 | This specifies audio DAI's TDM slot. | ||
4 | |||
5 | TDM slot properties: | ||
6 | dai-tdm-slot-num : Number of slots in use. | ||
7 | dai-tdm-slot-width : Width in bits for each slot. | ||
8 | |||
9 | For instance: | ||
10 | dai-tdm-slot-num = <2>; | ||
11 | dai-tdm-slot-width = <8>; | ||
12 | |||
13 | And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() | ||
14 | to specify a explicit mapping of the channels and the slots. If it's absent | ||
15 | the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the | ||
16 | tx and rx masks. | ||
17 | |||
18 | For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit | ||
19 | for an active slot as default, and the default active bits are at the LSB of | ||
20 | the masks. | ||
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt new file mode 100644 index 000000000000..74c66dee3e14 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | |||
@@ -0,0 +1,61 @@ | |||
1 | Texas Instruments - tlv320aic31xx Codec module | ||
2 | |||
3 | The tlv320aic31xx serial control bus communicates through I2C protocols | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible - "string" - One of: | ||
8 | "ti,tlv320aic310x" - Generic TLV320AIC31xx with mono speaker amp | ||
9 | "ti,tlv320aic311x" - Generic TLV320AIC31xx with stereo speaker amp | ||
10 | "ti,tlv320aic3100" - TLV320AIC3100 (mono speaker amp, no MiniDSP) | ||
11 | "ti,tlv320aic3110" - TLV320AIC3110 (stereo speaker amp, no MiniDSP) | ||
12 | "ti,tlv320aic3120" - TLV320AIC3120 (mono speaker amp, MiniDSP) | ||
13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) | ||
14 | |||
15 | - reg - <int> - I2C slave address | ||
16 | |||
17 | |||
18 | Optional properties: | ||
19 | |||
20 | - gpio-reset - gpio pin number used for codec reset | ||
21 | - ai31xx-micbias-vg - MicBias Voltage setting | ||
22 | 1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V | ||
23 | 2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V | ||
24 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD | ||
25 | If this node is not mentioned or if the value is unknown, then | ||
26 | micbias is set to 2.0V. | ||
27 | - HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
28 | DVDD-supply : power supplies for the device as covered in | ||
29 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
30 | |||
31 | CODEC output pins: | ||
32 | * HPL | ||
33 | * HPR | ||
34 | * SPL, devices with stereo speaker amp | ||
35 | * SPR, devices with stereo speaker amp | ||
36 | * SPK, devices with mono speaker amp | ||
37 | * MICBIAS | ||
38 | |||
39 | CODEC input pins: | ||
40 | * MIC1LP | ||
41 | * MIC1RP | ||
42 | * MIC1LM | ||
43 | |||
44 | The pins can be used in referring sound node's audio-routing property. | ||
45 | |||
46 | Example: | ||
47 | #include <dt-bindings/sound/tlv320aic31xx-micbias.h> | ||
48 | |||
49 | tlv320aic31xx: tlv320aic31xx@18 { | ||
50 | compatible = "ti,tlv320aic311x"; | ||
51 | reg = <0x18>; | ||
52 | |||
53 | ai31xx-micbias-vg = <MICBIAS_OFF>; | ||
54 | |||
55 | HPVDD-supply = <®ulator>; | ||
56 | SPRVDD-supply = <®ulator>; | ||
57 | SPLVDD-supply = <®ulator>; | ||
58 | AVDD-supply = <®ulator>; | ||
59 | IOVDD-supply = <®ulator>; | ||
60 | DVDD-supply = <®ulator>; | ||
61 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic32x4.txt b/Documentation/devicetree/bindings/sound/tlv320aic32x4.txt new file mode 100644 index 000000000000..5e2741af27be --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tlv320aic32x4.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | Texas Instruments - tlv320aic32x4 Codec module | ||
2 | |||
3 | The tlv320aic32x4 serial control bus communicates through I2C protocols | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "ti,tlv320aic32x4" | ||
7 | - reg: I2C slave address | ||
8 | - supply-*: Required supply regulators are: | ||
9 | "iov" - digital IO power supply | ||
10 | "ldoin" - LDO power supply | ||
11 | "dv" - Digital core power supply | ||
12 | "av" - Analog core power supply | ||
13 | If you supply ldoin, dv and av are optional. Otherwise they are required | ||
14 | See regulator/regulator.txt for more information about the detailed binding | ||
15 | format. | ||
16 | |||
17 | Optional properties: | ||
18 | - reset-gpios: Reset-GPIO phandle with args as described in gpio/gpio.txt | ||
19 | - clocks/clock-names: Clock named 'mclk' for the master clock of the codec. | ||
20 | See clock/clock-bindings.txt for information about the detailed format. | ||
21 | |||
22 | |||
23 | Example: | ||
24 | |||
25 | codec: tlv320aic32x4@18 { | ||
26 | compatible = "ti,tlv320aic32x4"; | ||
27 | reg = <0x18>; | ||
28 | clocks = <&clks 201>; | ||
29 | clock-names = "mclk"; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt index 9d8ea14db490..5e6040c2c2e9 100644 --- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt +++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt | |||
@@ -6,7 +6,6 @@ Required properties: | |||
6 | 6 | ||
7 | - compatible - "string" - One of: | 7 | - compatible - "string" - One of: |
8 | "ti,tlv320aic3x" - Generic TLV320AIC3x device | 8 | "ti,tlv320aic3x" - Generic TLV320AIC3x device |
9 | "ti,tlv320aic32x4" - TLV320AIC32x4 | ||
10 | "ti,tlv320aic33" - TLV320AIC33 | 9 | "ti,tlv320aic33" - TLV320AIC33 |
11 | "ti,tlv320aic3007" - TLV320AIC3007 | 10 | "ti,tlv320aic3007" - TLV320AIC3007 |
12 | "ti,tlv320aic3106" - TLV320AIC3106 | 11 | "ti,tlv320aic3106" - TLV320AIC3106 |
diff --git a/Documentation/devicetree/bindings/sound/widgets.txt b/Documentation/devicetree/bindings/sound/widgets.txt new file mode 100644 index 000000000000..b6de5ba3b2de --- /dev/null +++ b/Documentation/devicetree/bindings/sound/widgets.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Widgets: | ||
2 | |||
3 | This mainly specifies audio off-codec DAPM widgets. | ||
4 | |||
5 | Each entry is a pair of strings in DT: | ||
6 | |||
7 | "template-wname", "user-supplied-wname" | ||
8 | |||
9 | The "template-wname" being the template widget name and currently includes: | ||
10 | "Microphone", "Line", "Headphone" and "Speaker". | ||
11 | |||
12 | The "user-supplied-wname" being the user specified widget name. | ||
13 | |||
14 | For instance: | ||
15 | simple-audio-widgets = | ||
16 | "Microphone", "Microphone Jack", | ||
17 | "Line", "Line In Jack", | ||
18 | "Line", "Line Out Jack", | ||
19 | "Headphone", "Headphone Jack", | ||
20 | "Speaker", "Speaker External"; | ||
diff --git a/Documentation/devicetree/bindings/spi/efm32-spi.txt b/Documentation/devicetree/bindings/spi/efm32-spi.txt index a590ca51be75..8f081c96a4fa 100644 --- a/Documentation/devicetree/bindings/spi/efm32-spi.txt +++ b/Documentation/devicetree/bindings/spi/efm32-spi.txt | |||
@@ -3,24 +3,24 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - #address-cells: see spi-bus.txt | 4 | - #address-cells: see spi-bus.txt |
5 | - #size-cells: see spi-bus.txt | 5 | - #size-cells: see spi-bus.txt |
6 | - compatible: should be "efm32,spi" | 6 | - compatible: should be "energymicro,efm32-spi" |
7 | - reg: Offset and length of the register set for the controller | 7 | - reg: Offset and length of the register set for the controller |
8 | - interrupts: pair specifying rx and tx irq | 8 | - interrupts: pair specifying rx and tx irq |
9 | - clocks: phandle to the spi clock | 9 | - clocks: phandle to the spi clock |
10 | - cs-gpios: see spi-bus.txt | 10 | - cs-gpios: see spi-bus.txt |
11 | - location: Value to write to the ROUTE register's LOCATION bitfield to configure the pinmux for the device, see datasheet for values. | 11 | - efm32,location: Value to write to the ROUTE register's LOCATION bitfield to configure the pinmux for the device, see datasheet for values. |
12 | 12 | ||
13 | Example: | 13 | Example: |
14 | 14 | ||
15 | spi1: spi@0x4000c400 { /* USART1 */ | 15 | spi1: spi@0x4000c400 { /* USART1 */ |
16 | #address-cells = <1>; | 16 | #address-cells = <1>; |
17 | #size-cells = <0>; | 17 | #size-cells = <0>; |
18 | compatible = "efm32,spi"; | 18 | compatible = "energymicro,efm32-spi"; |
19 | reg = <0x4000c400 0x400>; | 19 | reg = <0x4000c400 0x400>; |
20 | interrupts = <15 16>; | 20 | interrupts = <15 16>; |
21 | clocks = <&cmu 20>; | 21 | clocks = <&cmu 20>; |
22 | cs-gpios = <&gpio 51 1>; // D3 | 22 | cs-gpios = <&gpio 51 1>; // D3 |
23 | location = <1>; | 23 | efm32,location = <1>; |
24 | status = "ok"; | 24 | status = "ok"; |
25 | 25 | ||
26 | ks8851@0 { | 26 | ks8851@0 { |
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt new file mode 100644 index 000000000000..b82a268f1bd4 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt | |||
@@ -0,0 +1,85 @@ | |||
1 | Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI) | ||
2 | |||
3 | The QUP core is an AHB slave that provides a common data path (an output FIFO | ||
4 | and an input FIFO) for serial peripheral interface (SPI) mini-core. | ||
5 | |||
6 | SPI in master mode supports up to 50MHz, up to four chip selects, programmable | ||
7 | data path from 4 bits to 32 bits and numerous protocol variants. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible: Should contain "qcom,spi-qup-v2.1.1" or "qcom,spi-qup-v2.2.1" | ||
11 | - reg: Should contain base register location and length | ||
12 | - interrupts: Interrupt number used by this controller | ||
13 | |||
14 | - clocks: Should contain the core clock and the AHB clock. | ||
15 | - clock-names: Should be "core" for the core clock and "iface" for the | ||
16 | AHB clock. | ||
17 | |||
18 | - #address-cells: Number of cells required to define a chip select | ||
19 | address on the SPI bus. Should be set to 1. | ||
20 | - #size-cells: Should be zero. | ||
21 | |||
22 | Optional properties: | ||
23 | - spi-max-frequency: Specifies maximum SPI clock frequency, | ||
24 | Units - Hz. Definition as per | ||
25 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
26 | |||
27 | SPI slave nodes must be children of the SPI master node and can contain | ||
28 | properties described in Documentation/devicetree/bindings/spi/spi-bus.txt | ||
29 | |||
30 | Example: | ||
31 | |||
32 | spi_8: spi@f9964000 { /* BLSP2 QUP2 */ | ||
33 | |||
34 | compatible = "qcom,spi-qup-v2"; | ||
35 | #address-cells = <1>; | ||
36 | #size-cells = <0>; | ||
37 | reg = <0xf9964000 0x1000>; | ||
38 | interrupts = <0 102 0>; | ||
39 | spi-max-frequency = <19200000>; | ||
40 | |||
41 | clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; | ||
42 | clock-names = "core", "iface"; | ||
43 | |||
44 | pinctrl-names = "default"; | ||
45 | pinctrl-0 = <&spi8_default>; | ||
46 | |||
47 | device@0 { | ||
48 | compatible = "arm,pl022-dummy"; | ||
49 | #address-cells = <1>; | ||
50 | #size-cells = <1>; | ||
51 | reg = <0>; /* Chip select 0 */ | ||
52 | spi-max-frequency = <19200000>; | ||
53 | spi-cpol; | ||
54 | }; | ||
55 | |||
56 | device@1 { | ||
57 | compatible = "arm,pl022-dummy"; | ||
58 | #address-cells = <1>; | ||
59 | #size-cells = <1>; | ||
60 | reg = <1>; /* Chip select 1 */ | ||
61 | spi-max-frequency = <9600000>; | ||
62 | spi-cpha; | ||
63 | }; | ||
64 | |||
65 | device@2 { | ||
66 | compatible = "arm,pl022-dummy"; | ||
67 | #address-cells = <1>; | ||
68 | #size-cells = <1>; | ||
69 | reg = <2>; /* Chip select 2 */ | ||
70 | spi-max-frequency = <19200000>; | ||
71 | spi-cpol; | ||
72 | spi-cpha; | ||
73 | }; | ||
74 | |||
75 | device@3 { | ||
76 | compatible = "arm,pl022-dummy"; | ||
77 | #address-cells = <1>; | ||
78 | #size-cells = <1>; | ||
79 | reg = <3>; /* Chip select 3 */ | ||
80 | spi-max-frequency = <19200000>; | ||
81 | spi-cpol; | ||
82 | spi-cpha; | ||
83 | spi-cs-high; | ||
84 | }; | ||
85 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/sh-hspi.txt b/Documentation/devicetree/bindings/spi/sh-hspi.txt index 30b57b1c8a13..319bad4af875 100644 --- a/Documentation/devicetree/bindings/spi/sh-hspi.txt +++ b/Documentation/devicetree/bindings/spi/sh-hspi.txt | |||
@@ -1,7 +1,29 @@ | |||
1 | Renesas HSPI. | 1 | Renesas HSPI. |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "renesas,hspi" | 4 | - compatible : "renesas,hspi-<soctype>", "renesas,hspi" as fallback. |
5 | - reg : Offset and length of the register set for the device | 5 | Examples with soctypes are: |
6 | - interrupts : interrupt line used by HSPI | 6 | - "renesas,hspi-r8a7778" (R-Car M1) |
7 | - "renesas,hspi-r8a7779" (R-Car H1) | ||
8 | - reg : Offset and length of the register set for the device | ||
9 | - interrupt-parent : The phandle for the interrupt controller that | ||
10 | services interrupts for this device | ||
11 | - interrupts : Interrupt specifier | ||
12 | - #address-cells : Must be <1> | ||
13 | - #size-cells : Must be <0> | ||
14 | |||
15 | Pinctrl properties might be needed, too. See | ||
16 | Documentation/devicetree/bindings/pinctrl/renesas,*. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | hspi0: spi@fffc7000 { | ||
21 | compatible = "renesas,hspi-r8a7778", "renesas,hspi"; | ||
22 | reg = <0xfffc7000 0x18>; | ||
23 | interrupt-parent = <&gic>; | ||
24 | interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | status = "disabled"; | ||
28 | }; | ||
7 | 29 | ||
diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt index e6222106ca36..f24baf3b6cc1 100644 --- a/Documentation/devicetree/bindings/spi/sh-msiof.txt +++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt | |||
@@ -1,12 +1,40 @@ | |||
1 | Renesas MSIOF spi controller | 1 | Renesas MSIOF spi controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "renesas,sh-msiof" for SuperH or | 4 | - compatible : "renesas,msiof-<soctype>" for SoCs, |
5 | "renesas,sh-mobile-msiof" for SH Mobile series | 5 | "renesas,sh-msiof" for SuperH, or |
6 | - reg : Offset and length of the register set for the device | 6 | "renesas,sh-mobile-msiof" for SH Mobile series. |
7 | - interrupts : interrupt line used by MSIOF | 7 | Examples with soctypes are: |
8 | "renesas,msiof-r8a7790" (R-Car H2) | ||
9 | "renesas,msiof-r8a7791" (R-Car M2) | ||
10 | - reg : Offset and length of the register set for the device | ||
11 | - interrupt-parent : The phandle for the interrupt controller that | ||
12 | services interrupts for this device | ||
13 | - interrupts : Interrupt specifier | ||
14 | - #address-cells : Must be <1> | ||
15 | - #size-cells : Must be <0> | ||
8 | 16 | ||
9 | Optional properties: | 17 | Optional properties: |
10 | - num-cs : total number of chip-selects | 18 | - clocks : Must contain a reference to the functional clock. |
11 | - renesas,tx-fifo-size : Overrides the default tx fifo size given in words | 19 | - num-cs : Total number of chip-selects (default is 1) |
12 | - renesas,rx-fifo-size : Overrides the default rx fifo size given in words | 20 | |
21 | Optional properties, deprecated for soctype-specific bindings: | ||
22 | - renesas,tx-fifo-size : Overrides the default tx fifo size given in words | ||
23 | (default is 64) | ||
24 | - renesas,rx-fifo-size : Overrides the default rx fifo size given in words | ||
25 | (default is 64, or 256 on R-Car H2 and M2) | ||
26 | |||
27 | Pinctrl properties might be needed, too. See | ||
28 | Documentation/devicetree/bindings/pinctrl/renesas,*. | ||
29 | |||
30 | Example: | ||
31 | |||
32 | msiof0: spi@e6e20000 { | ||
33 | compatible = "renesas,msiof-r8a7791"; | ||
34 | reg = <0 0xe6e20000 0 0x0064>; | ||
35 | interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; | ||
36 | clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>; | ||
37 | #address-cells = <1>; | ||
38 | #size-cells = <0>; | ||
39 | status = "disabled"; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt index a1fb3035a42b..5376de40f10b 100644 --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | - pinctrl-names: must contain a "default" entry. | 10 | - pinctrl-names: must contain a "default" entry. |
11 | - spi-num-chipselects : the number of the chipselect signals. | 11 | - spi-num-chipselects : the number of the chipselect signals. |
12 | - bus-num : the slave chip chipselect signal number. | 12 | - bus-num : the slave chip chipselect signal number. |
13 | - big-endian : if DSPI modudle is big endian, the bool will be set in node. | ||
13 | Example: | 14 | Example: |
14 | 15 | ||
15 | dspi0@4002c000 { | 16 | dspi0@4002c000 { |
@@ -24,6 +25,7 @@ dspi0@4002c000 { | |||
24 | bus-num = <0>; | 25 | bus-num = <0>; |
25 | pinctrl-names = "default"; | 26 | pinctrl-names = "default"; |
26 | pinctrl-0 = <&pinctrl_dspi0_1>; | 27 | pinctrl-0 = <&pinctrl_dspi0_1>; |
28 | big-endian; | ||
27 | status = "okay"; | 29 | status = "okay"; |
28 | 30 | ||
29 | sflash: at26df081a@0 { | 31 | sflash: at26df081a@0 { |
diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt new file mode 100644 index 000000000000..d57d82a74054 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt | |||
@@ -0,0 +1,61 @@ | |||
1 | Device tree configuration for Renesas RSPI/QSPI driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : For Renesas Serial Peripheral Interface on legacy SH: | ||
5 | "renesas,rspi-<soctype>", "renesas,rspi" as fallback. | ||
6 | For Renesas Serial Peripheral Interface on RZ/A1H: | ||
7 | "renesas,rspi-<soctype>", "renesas,rspi-rz" as fallback. | ||
8 | For Quad Serial Peripheral Interface on R-Car Gen2: | ||
9 | "renesas,qspi-<soctype>", "renesas,qspi" as fallback. | ||
10 | Examples with soctypes are: | ||
11 | - "renesas,rspi-sh7757" (SH) | ||
12 | - "renesas,rspi-r7s72100" (RZ/A1H) | ||
13 | - "renesas,qspi-r8a7790" (R-Car H2) | ||
14 | - "renesas,qspi-r8a7791" (R-Car M2) | ||
15 | - reg : Address start and address range size of the device | ||
16 | - interrupts : A list of interrupt-specifiers, one for each entry in | ||
17 | interrupt-names. | ||
18 | If interrupt-names is not present, an interrupt specifier | ||
19 | for a single muxed interrupt. | ||
20 | - interrupt-names : A list of interrupt names. Should contain (if present): | ||
21 | - "error" for SPEI, | ||
22 | - "rx" for SPRI, | ||
23 | - "tx" to SPTI, | ||
24 | - "mux" for a single muxed interrupt. | ||
25 | - interrupt-parent : The phandle for the interrupt controller that | ||
26 | services interrupts for this device. | ||
27 | - num-cs : Number of chip selects. Some RSPI cores have more than 1. | ||
28 | - #address-cells : Must be <1> | ||
29 | - #size-cells : Must be <0> | ||
30 | |||
31 | Optional properties: | ||
32 | - clocks : Must contain a reference to the functional clock. | ||
33 | |||
34 | Pinctrl properties might be needed, too. See | ||
35 | Documentation/devicetree/bindings/pinctrl/renesas,*. | ||
36 | |||
37 | Examples: | ||
38 | |||
39 | spi0: spi@e800c800 { | ||
40 | compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; | ||
41 | reg = <0xe800c800 0x24>; | ||
42 | interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, | ||
43 | <0 239 IRQ_TYPE_LEVEL_HIGH>, | ||
44 | <0 240 IRQ_TYPE_LEVEL_HIGH>; | ||
45 | interrupt-names = "error", "rx", "tx"; | ||
46 | interrupt-parent = <&gic>; | ||
47 | num-cs = <1>; | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <0>; | ||
50 | }; | ||
51 | |||
52 | spi: spi@e6b10000 { | ||
53 | compatible = "renesas,qspi-r8a7791", "renesas,qspi"; | ||
54 | reg = <0 0xe6b10000 0 0x2c>; | ||
55 | interrupt-parent = <&gic>; | ||
56 | interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; | ||
57 | clocks = <&mstp9_clks R8A7791_CLK_QSPI_MOD>; | ||
58 | num-cs = <1>; | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <0>; | ||
61 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-sun4i.txt b/Documentation/devicetree/bindings/spi/spi-sun4i.txt new file mode 100644 index 000000000000..de827f5a301e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-sun4i.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Allwinner A10 SPI controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "allwinner,sun4-a10-spi". | ||
5 | - reg: Should contain register location and length. | ||
6 | - interrupts: Should contain interrupt. | ||
7 | - clocks: phandle to the clocks feeding the SPI controller. Two are | ||
8 | needed: | ||
9 | - "ahb": the gated AHB parent clock | ||
10 | - "mod": the parent module clock | ||
11 | - clock-names: Must contain the clock names described just above | ||
12 | |||
13 | Example: | ||
14 | |||
15 | spi1: spi@01c06000 { | ||
16 | compatible = "allwinner,sun4i-a10-spi"; | ||
17 | reg = <0x01c06000 0x1000>; | ||
18 | interrupts = <11>; | ||
19 | clocks = <&ahb_gates 21>, <&spi1_clk>; | ||
20 | clock-names = "ahb", "mod"; | ||
21 | status = "disabled"; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-sun6i.txt b/Documentation/devicetree/bindings/spi/spi-sun6i.txt new file mode 100644 index 000000000000..21de73db6a05 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-sun6i.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Allwinner A31 SPI controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "allwinner,sun6i-a31-spi". | ||
5 | - reg: Should contain register location and length. | ||
6 | - interrupts: Should contain interrupt. | ||
7 | - clocks: phandle to the clocks feeding the SPI controller. Two are | ||
8 | needed: | ||
9 | - "ahb": the gated AHB parent clock | ||
10 | - "mod": the parent module clock | ||
11 | - clock-names: Must contain the clock names described just above | ||
12 | - resets: phandle to the reset controller asserting this device in | ||
13 | reset | ||
14 | |||
15 | Example: | ||
16 | |||
17 | spi1: spi@01c69000 { | ||
18 | compatible = "allwinner,sun6i-a31-spi"; | ||
19 | reg = <0x01c69000 0x1000>; | ||
20 | interrupts = <0 66 4>; | ||
21 | clocks = <&ahb1_gates 21>, <&spi1_clk>; | ||
22 | clock-names = "ahb", "mod"; | ||
23 | resets = <&ahb1_rst 21>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-xtensa-xtfpga.txt b/Documentation/devicetree/bindings/spi/spi-xtensa-xtfpga.txt new file mode 100644 index 000000000000..b6ebe2bc7041 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-xtensa-xtfpga.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Cadence Xtensa XTFPGA platform SPI controller. | ||
2 | |||
3 | This simple SPI master controller is built into xtfpga bitstreams and is used | ||
4 | to control daughterboard audio codec. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be "cdns,xtfpga-spi". | ||
8 | - reg: physical base address of the controller and length of memory mapped | ||
9 | region. | ||
diff --git a/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt b/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt new file mode 100644 index 000000000000..715d0998af8e --- /dev/null +++ b/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt | |||
@@ -0,0 +1,61 @@ | |||
1 | Qualcomm SPMI Controller (PMIC Arbiter) | ||
2 | |||
3 | The SPMI PMIC Arbiter is found on the Snapdragon 800 Series. It is an SPMI | ||
4 | controller with wrapping arbitration logic to allow for multiple on-chip | ||
5 | devices to control a single SPMI master. | ||
6 | |||
7 | The PMIC Arbiter can also act as an interrupt controller, providing interrupts | ||
8 | to slave devices. | ||
9 | |||
10 | See spmi.txt for the generic SPMI controller binding requirements for child | ||
11 | nodes. | ||
12 | |||
13 | See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for | ||
14 | generic interrupt controller binding documentation. | ||
15 | |||
16 | Required properties: | ||
17 | - compatible : should be "qcom,spmi-pmic-arb". | ||
18 | - reg-names : must contain: | ||
19 | "core" - core registers | ||
20 | "intr" - interrupt controller registers | ||
21 | "cnfg" - configuration registers | ||
22 | - reg : address + size pairs describing the PMIC arb register sets; order must | ||
23 | correspond with the order of entries in reg-names | ||
24 | - #address-cells : must be set to 2 | ||
25 | - #size-cells : must be set to 0 | ||
26 | - qcom,ee : indicates the active Execution Environment identifier (0-5) | ||
27 | - qcom,channel : which of the PMIC Arb provided channels to use for accesses (0-5) | ||
28 | - interrupts : interrupt list for the PMIC Arb controller, must contain a | ||
29 | single interrupt entry for the peripheral interrupt | ||
30 | - interrupt-names : corresponding interrupt names for the interrupts | ||
31 | listed in the 'interrupts' property, must contain: | ||
32 | "periph_irq" - summary interrupt for PMIC peripherals | ||
33 | - interrupt-controller : boolean indicator that the PMIC arbiter is an interrupt controller | ||
34 | - #interrupt-cells : must be set to 4. Interrupts are specified as a 4-tuple: | ||
35 | cell 1: slave ID for the requested interrupt (0-15) | ||
36 | cell 2: peripheral ID for requested interrupt (0-255) | ||
37 | cell 3: the requested peripheral interrupt (0-7) | ||
38 | cell 4: interrupt flags indicating level-sense information, as defined in | ||
39 | dt-bindings/interrupt-controller/irq.h | ||
40 | |||
41 | Example: | ||
42 | |||
43 | spmi { | ||
44 | compatible = "qcom,spmi-pmic-arb"; | ||
45 | reg-names = "core", "intr", "cnfg"; | ||
46 | reg = <0xfc4cf000 0x1000>, | ||
47 | <0xfc4cb000 0x1000>, | ||
48 | <0xfc4ca000 0x1000>; | ||
49 | |||
50 | interrupt-names = "periph_irq"; | ||
51 | interrupts = <0 190 0>; | ||
52 | |||
53 | qcom,ee = <0>; | ||
54 | qcom,channel = <0>; | ||
55 | |||
56 | #address-cells = <2>; | ||
57 | #size-cells = <0>; | ||
58 | |||
59 | interrupt-controller; | ||
60 | #interrupt-cells = <4>; | ||
61 | }; | ||
diff --git a/Documentation/devicetree/bindings/spmi/spmi.txt b/Documentation/devicetree/bindings/spmi/spmi.txt new file mode 100644 index 000000000000..462a42fb3a1e --- /dev/null +++ b/Documentation/devicetree/bindings/spmi/spmi.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | System Power Management Interface (SPMI) Controller | ||
2 | |||
3 | This document defines a generic set of bindings for use by SPMI controllers. A | ||
4 | controller is modelled in device tree as a node with zero or more child nodes, | ||
5 | each representing a unique slave on the bus. | ||
6 | |||
7 | Required properties: | ||
8 | - #address-cells : must be set to 2 | ||
9 | - #size-cells : must be set to 0 | ||
10 | |||
11 | Child nodes: | ||
12 | |||
13 | An SPMI controller node can contain zero or more child nodes representing slave | ||
14 | devices on the bus. Child 'reg' properties are specified as an address, type | ||
15 | pair. The address must be in the range 0-15 (4 bits). The type must be one of | ||
16 | SPMI_USID (0) or SPMI_GSID (1) for Unique Slave ID or Group Slave ID respectively. | ||
17 | These are the identifiers "statically assigned by the system integrator", as | ||
18 | per the SPMI spec. | ||
19 | |||
20 | Each child node must have one and only one 'reg' entry of type SPMI_USID. | ||
21 | |||
22 | #include <dt-bindings/spmi/spmi.h> | ||
23 | |||
24 | spmi@.. { | ||
25 | compatible = "..."; | ||
26 | reg = <...>; | ||
27 | |||
28 | #address-cells = <2>; | ||
29 | #size-cells <0>; | ||
30 | |||
31 | child@0 { | ||
32 | compatible = "..."; | ||
33 | reg = <0 SPMI_USID>; | ||
34 | }; | ||
35 | |||
36 | child@7 { | ||
37 | compatible = "..."; | ||
38 | reg = <7 SPMI_USID | ||
39 | 3 SPMI_GSID>; | ||
40 | }; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d4925a57..3be5ce7a9654 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | |||
@@ -1,3 +1,22 @@ | |||
1 | Freescale i.MX DRM master device | ||
2 | ================================ | ||
3 | |||
4 | The freescale i.MX DRM master device is a virtual device needed to list all | ||
5 | IPU or other display interface nodes that comprise the graphics subsystem. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: Should be "fsl,imx-display-subsystem" | ||
9 | - ports: Should contain a list of phandles pointing to display interface ports | ||
10 | of IPU devices | ||
11 | |||
12 | example: | ||
13 | |||
14 | display-subsystem { | ||
15 | compatible = "fsl,display-subsystem"; | ||
16 | ports = <&ipu_di0>; | ||
17 | }; | ||
18 | |||
19 | |||
1 | Freescale i.MX IPUv3 | 20 | Freescale i.MX IPUv3 |
2 | ==================== | 21 | ==================== |
3 | 22 | ||
@@ -7,18 +26,31 @@ Required properties: | |||
7 | datasheet | 26 | datasheet |
8 | - interrupts: Should contain sync interrupt and error interrupt, | 27 | - interrupts: Should contain sync interrupt and error interrupt, |
9 | in this order. | 28 | in this order. |
10 | - #crtc-cells: 1, See below | ||
11 | - resets: phandle pointing to the system reset controller and | 29 | - resets: phandle pointing to the system reset controller and |
12 | reset line index, see reset/fsl,imx-src.txt for details | 30 | reset line index, see reset/fsl,imx-src.txt for details |
31 | Optional properties: | ||
32 | - port@[0-3]: Port nodes with endpoint definitions as defined in | ||
33 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
34 | Ports 0 and 1 should correspond to CSI0 and CSI1, | ||
35 | ports 2 and 3 should correspond to DI0 and DI1, respectively. | ||
13 | 36 | ||
14 | example: | 37 | example: |
15 | 38 | ||
16 | ipu: ipu@18000000 { | 39 | ipu: ipu@18000000 { |
17 | #crtc-cells = <1>; | 40 | #address-cells = <1>; |
41 | #size-cells = <0>; | ||
18 | compatible = "fsl,imx53-ipu"; | 42 | compatible = "fsl,imx53-ipu"; |
19 | reg = <0x18000000 0x080000000>; | 43 | reg = <0x18000000 0x080000000>; |
20 | interrupts = <11 10>; | 44 | interrupts = <11 10>; |
21 | resets = <&src 2>; | 45 | resets = <&src 2>; |
46 | |||
47 | ipu_di0: port@2 { | ||
48 | reg = <2>; | ||
49 | |||
50 | ipu_di0_disp0: endpoint { | ||
51 | remote-endpoint = <&display_in>; | ||
52 | }; | ||
53 | }; | ||
22 | }; | 54 | }; |
23 | 55 | ||
24 | Parallel display support | 56 | Parallel display support |
@@ -26,19 +58,25 @@ Parallel display support | |||
26 | 58 | ||
27 | Required properties: | 59 | Required properties: |
28 | - compatible: Should be "fsl,imx-parallel-display" | 60 | - compatible: Should be "fsl,imx-parallel-display" |
29 | - crtc: the crtc this display is connected to, see below | ||
30 | Optional properties: | 61 | Optional properties: |
31 | - interface_pix_fmt: How this display is connected to the | 62 | - interface_pix_fmt: How this display is connected to the |
32 | crtc. Currently supported types: "rgb24", "rgb565", "bgr666" | 63 | display interface. Currently supported types: "rgb24", "rgb565", "bgr666" |
33 | - edid: verbatim EDID data block describing attached display. | 64 | - edid: verbatim EDID data block describing attached display. |
34 | - ddc: phandle describing the i2c bus handling the display data | 65 | - ddc: phandle describing the i2c bus handling the display data |
35 | channel | 66 | channel |
67 | - port: A port node with endpoint definitions as defined in | ||
68 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
36 | 69 | ||
37 | example: | 70 | example: |
38 | 71 | ||
39 | display@di0 { | 72 | display@di0 { |
40 | compatible = "fsl,imx-parallel-display"; | 73 | compatible = "fsl,imx-parallel-display"; |
41 | edid = [edid-data]; | 74 | edid = [edid-data]; |
42 | crtc = <&ipu 0>; | ||
43 | interface-pix-fmt = "rgb24"; | 75 | interface-pix-fmt = "rgb24"; |
76 | |||
77 | port { | ||
78 | display_in: endpoint { | ||
79 | remote-endpoint = <&ipu_di0_disp0>; | ||
80 | }; | ||
81 | }; | ||
44 | }; | 82 | }; |
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt b/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt new file mode 100644 index 000000000000..1b756cf9afb0 --- /dev/null +++ b/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | Device-Tree bindings for HDMI Transmitter | ||
2 | |||
3 | HDMI Transmitter | ||
4 | ================ | ||
5 | |||
6 | The HDMI Transmitter is a Synopsys DesignWare HDMI 1.4 TX controller IP | ||
7 | with accompanying PHY IP. | ||
8 | |||
9 | Required properties: | ||
10 | - #address-cells : should be <1> | ||
11 | - #size-cells : should be <0> | ||
12 | - compatible : should be "fsl,imx6q-hdmi" or "fsl,imx6dl-hdmi". | ||
13 | - gpr : should be <&gpr>. | ||
14 | The phandle points to the iomuxc-gpr region containing the HDMI | ||
15 | multiplexer control register. | ||
16 | - clocks, clock-names : phandles to the HDMI iahb and isrf clocks, as described | ||
17 | in Documentation/devicetree/bindings/clock/clock-bindings.txt and | ||
18 | Documentation/devicetree/bindings/clock/imx6q-clock.txt. | ||
19 | - port@[0-4]: Up to four port nodes with endpoint definitions as defined in | ||
20 | Documentation/devicetree/bindings/media/video-interfaces.txt, | ||
21 | corresponding to the four inputs to the HDMI multiplexer. | ||
22 | |||
23 | Optional properties: | ||
24 | - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
25 | |||
26 | example: | ||
27 | |||
28 | gpr: iomuxc-gpr@020e0000 { | ||
29 | /* ... */ | ||
30 | }; | ||
31 | |||
32 | hdmi: hdmi@0120000 { | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | compatible = "fsl,imx6q-hdmi"; | ||
36 | reg = <0x00120000 0x9000>; | ||
37 | interrupts = <0 115 0x04>; | ||
38 | gpr = <&gpr>; | ||
39 | clocks = <&clks 123>, <&clks 124>; | ||
40 | clock-names = "iahb", "isfr"; | ||
41 | ddc-i2c-bus = <&i2c2>; | ||
42 | |||
43 | port@0 { | ||
44 | reg = <0>; | ||
45 | |||
46 | hdmi_mux_0: endpoint { | ||
47 | remote-endpoint = <&ipu1_di0_hdmi>; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | port@1 { | ||
52 | reg = <1>; | ||
53 | |||
54 | hdmi_mux_1: endpoint { | ||
55 | remote-endpoint = <&ipu1_di1_hdmi>; | ||
56 | }; | ||
57 | }; | ||
58 | }; | ||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt index ed9377811ee2..578a1fca366e 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt | |||
@@ -50,12 +50,14 @@ have a look at Documentation/devicetree/bindings/video/display-timing.txt. | |||
50 | 50 | ||
51 | Required properties: | 51 | Required properties: |
52 | - reg : should be <0> or <1> | 52 | - reg : should be <0> or <1> |
53 | - crtcs : a list of phandles with index pointing to the IPU display interfaces | ||
54 | that can be used as video source for this channel. | ||
55 | - fsl,data-mapping : should be "spwg" or "jeida" | 53 | - fsl,data-mapping : should be "spwg" or "jeida" |
56 | This describes how the color bits are laid out in the | 54 | This describes how the color bits are laid out in the |
57 | serialized LVDS signal. | 55 | serialized LVDS signal. |
58 | - fsl,data-width : should be <18> or <24> | 56 | - fsl,data-width : should be <18> or <24> |
57 | - port: A port node with endpoint definitions as defined in | ||
58 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
59 | On i.MX6, there should be four ports (port@[0-3]) that correspond | ||
60 | to the four LVDS multiplexer inputs. | ||
59 | 61 | ||
60 | example: | 62 | example: |
61 | 63 | ||
@@ -77,23 +79,33 @@ ldb: ldb@53fa8008 { | |||
77 | 79 | ||
78 | lvds-channel@0 { | 80 | lvds-channel@0 { |
79 | reg = <0>; | 81 | reg = <0>; |
80 | crtcs = <&ipu 0>; | ||
81 | fsl,data-mapping = "spwg"; | 82 | fsl,data-mapping = "spwg"; |
82 | fsl,data-width = <24>; | 83 | fsl,data-width = <24>; |
83 | 84 | ||
84 | display-timings { | 85 | display-timings { |
85 | /* ... */ | 86 | /* ... */ |
86 | }; | 87 | }; |
88 | |||
89 | port { | ||
90 | lvds0_in: endpoint { | ||
91 | remote-endpoint = <&ipu_di0_lvds0>; | ||
92 | }; | ||
93 | }; | ||
87 | }; | 94 | }; |
88 | 95 | ||
89 | lvds-channel@1 { | 96 | lvds-channel@1 { |
90 | reg = <1>; | 97 | reg = <1>; |
91 | crtcs = <&ipu 1>; | ||
92 | fsl,data-mapping = "spwg"; | 98 | fsl,data-mapping = "spwg"; |
93 | fsl,data-width = <24>; | 99 | fsl,data-width = <24>; |
94 | 100 | ||
95 | display-timings { | 101 | display-timings { |
96 | /* ... */ | 102 | /* ... */ |
97 | }; | 103 | }; |
104 | |||
105 | port { | ||
106 | lvds1_in: endpoint { | ||
107 | remote-endpoint = <&ipu_di1_lvds1>; | ||
108 | }; | ||
109 | }; | ||
98 | }; | 110 | }; |
99 | }; | 111 | }; |
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt index 48aeb7884ed3..5c2e23574ca0 100644 --- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | |||
@@ -2,7 +2,7 @@ Allwinner A1X SoCs Timer Controller | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : should be "allwinner,sun4i-timer" | 5 | - compatible : should be "allwinner,sun4i-a10-timer" |
6 | - reg : Specifies base physical address and size of the registers. | 6 | - reg : Specifies base physical address and size of the registers. |
7 | - interrupts : The interrupt of the first timer | 7 | - interrupts : The interrupt of the first timer |
8 | - clocks: phandle to the source clock (usually a 24 MHz fixed clock) | 8 | - clocks: phandle to the source clock (usually a 24 MHz fixed clock) |
@@ -10,7 +10,7 @@ Required properties: | |||
10 | Example: | 10 | Example: |
11 | 11 | ||
12 | timer { | 12 | timer { |
13 | compatible = "allwinner,sun4i-timer"; | 13 | compatible = "allwinner,sun4i-a10-timer"; |
14 | reg = <0x01c20c00 0x400>; | 14 | reg = <0x01c20c00 0x400>; |
15 | interrupts = <22>; | 15 | interrupts = <22>; |
16 | clocks = <&osc>; | 16 | clocks = <&osc>; |
diff --git a/Documentation/devicetree/bindings/timer/ti,keystone-timer.txt b/Documentation/devicetree/bindings/timer/ti,keystone-timer.txt new file mode 100644 index 000000000000..5fbe361252b4 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/ti,keystone-timer.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Device tree bindings for Texas instruments Keystone timer | ||
2 | |||
3 | This document provides bindings for the 64-bit timer in the KeyStone | ||
4 | architecture devices. The timer can be configured as a general-purpose 64-bit | ||
5 | timer, dual general-purpose 32-bit timers. When configured as dual 32-bit | ||
6 | timers, each half can operate in conjunction (chain mode) or independently | ||
7 | (unchained mode) of each other. | ||
8 | |||
9 | It is global timer is a free running up-counter and can generate interrupt | ||
10 | when the counter reaches preset counter values. | ||
11 | |||
12 | Documentation: | ||
13 | http://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf | ||
14 | |||
15 | Required properties: | ||
16 | |||
17 | - compatible : should be "ti,keystone-timer". | ||
18 | - reg : specifies base physical address and count of the registers. | ||
19 | - interrupts : interrupt generated by the timer. | ||
20 | - clocks : the clock feeding the timer clock. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | timer@22f0000 { | ||
25 | compatible = "ti,keystone-timer"; | ||
26 | reg = <0x022f0000 0x80>; | ||
27 | interrupts = <GIC_SPI 110 IRQ_TYPE_EDGE_RISING>; | ||
28 | clocks = <&clktimer15>; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt index 55f51af08bc7..bc2222ca3f2a 100644 --- a/Documentation/devicetree/bindings/usb/atmel-usb.txt +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt | |||
@@ -57,8 +57,8 @@ Required properties: | |||
57 | - ep childnode: To specify the number of endpoints and their properties. | 57 | - ep childnode: To specify the number of endpoints and their properties. |
58 | 58 | ||
59 | Optional properties: | 59 | Optional properties: |
60 | - atmel,vbus-gpio: If present, specifies a gpio that needs to be | 60 | - atmel,vbus-gpio: If present, specifies a gpio that allows to detect whether |
61 | activated for the bus to be powered. | 61 | vbus is present (USB is connected). |
62 | 62 | ||
63 | Required child node properties: | 63 | Required child node properties: |
64 | - name: Name of the endpoint. | 64 | - name: Name of the endpoint. |
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt index b4b5b7906c88..a6a32cb7f777 100644 --- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | |||
@@ -18,6 +18,7 @@ Optional properties: | |||
18 | - vbus-supply: regulator for vbus | 18 | - vbus-supply: regulator for vbus |
19 | - disable-over-current: disable over current detect | 19 | - disable-over-current: disable over current detect |
20 | - external-vbus-divider: enables off-chip resistor divider for Vbus | 20 | - external-vbus-divider: enables off-chip resistor divider for Vbus |
21 | - maximum-speed: limit the maximum connection speed to "full-speed". | ||
21 | 22 | ||
22 | Examples: | 23 | Examples: |
23 | usb@02184000 { /* USB OTG */ | 24 | usb@02184000 { /* USB OTG */ |
@@ -28,4 +29,5 @@ usb@02184000 { /* USB OTG */ | |||
28 | fsl,usbmisc = <&usbmisc 0>; | 29 | fsl,usbmisc = <&usbmisc 0>; |
29 | disable-over-current; | 30 | disable-over-current; |
30 | external-vbus-divider; | 31 | external-vbus-divider; |
32 | maximum-speed = "full-speed"; | ||
31 | }; | 33 | }; |
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt new file mode 100644 index 000000000000..abbcb2aea38c --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * LSI Zevio USB OTG Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "lsi,zevio-usb" | ||
5 | - reg: Should contain registers location and length | ||
6 | - interrupts: Should contain controller interrupt | ||
7 | |||
8 | Optional properties: | ||
9 | - vbus-supply: regulator for vbus | ||
10 | |||
11 | Examples: | ||
12 | usb0: usb@b0000000 { | ||
13 | reg = <0xb0000000 0x1000>; | ||
14 | compatible = "lsi,zevio-usb"; | ||
15 | interrupts = <8>; | ||
16 | vbus-supply = <&vbus_reg>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index e807635f9e1c..471366d6a129 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt | |||
@@ -6,11 +6,13 @@ Required properties: | |||
6 | - compatible: must be "snps,dwc3" | 6 | - compatible: must be "snps,dwc3" |
7 | - reg : Address and length of the register set for the device | 7 | - reg : Address and length of the register set for the device |
8 | - interrupts: Interrupts used by the dwc3 controller. | 8 | - interrupts: Interrupts used by the dwc3 controller. |
9 | |||
10 | Optional properties: | ||
9 | - usb-phy : array of phandle for the PHY device. The first element | 11 | - usb-phy : array of phandle for the PHY device. The first element |
10 | in the array is expected to be a handle to the USB2/HS PHY and | 12 | in the array is expected to be a handle to the USB2/HS PHY and |
11 | the second element is expected to be a handle to the USB3/SS PHY | 13 | the second element is expected to be a handle to the USB3/SS PHY |
12 | 14 | - phys: from the *Generic PHY* bindings | |
13 | Optional properties: | 15 | - phy-names: from the *Generic PHY* bindings |
14 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. | 16 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. |
15 | 17 | ||
16 | This is usually a subnode to DWC3 glue to which it is connected. | 18 | This is usually a subnode to DWC3 glue to which it is connected. |
diff --git a/Documentation/devicetree/bindings/usb/ehci-omap.txt b/Documentation/devicetree/bindings/usb/ehci-omap.txt index 485a9a1efa7a..3dc231c832b0 100644 --- a/Documentation/devicetree/bindings/usb/ehci-omap.txt +++ b/Documentation/devicetree/bindings/usb/ehci-omap.txt | |||
@@ -21,7 +21,7 @@ Documentation/devicetree/bindings/mfd/omap-usb-host.txt | |||
21 | Example for OMAP4: | 21 | Example for OMAP4: |
22 | 22 | ||
23 | usbhsehci: ehci@4a064c00 { | 23 | usbhsehci: ehci@4a064c00 { |
24 | compatible = "ti,ehci-omap", "usb-ehci"; | 24 | compatible = "ti,ehci-omap"; |
25 | reg = <0x4a064c00 0x400>; | 25 | reg = <0x4a064c00 0x400>; |
26 | interrupts = <0 77 0x4>; | 26 | interrupts = <0 77 0x4>; |
27 | }; | 27 | }; |
diff --git a/Documentation/devicetree/bindings/usb/fsl-usb.txt b/Documentation/devicetree/bindings/usb/fsl-usb.txt index bd5723f0b67e..4779c029b675 100644 --- a/Documentation/devicetree/bindings/usb/fsl-usb.txt +++ b/Documentation/devicetree/bindings/usb/fsl-usb.txt | |||
@@ -8,7 +8,9 @@ and additions : | |||
8 | Required properties : | 8 | Required properties : |
9 | - compatible : Should be "fsl-usb2-mph" for multi port host USB | 9 | - compatible : Should be "fsl-usb2-mph" for multi port host USB |
10 | controllers, or "fsl-usb2-dr" for dual role USB controllers | 10 | controllers, or "fsl-usb2-dr" for dual role USB controllers |
11 | or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121 | 11 | or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121. |
12 | Wherever applicable, the IP version of the USB controller should | ||
13 | also be mentioned (for eg. fsl-usb2-dr-v2.2 for bsc9132). | ||
12 | - phy_type : For multi port host USB controllers, should be one of | 14 | - phy_type : For multi port host USB controllers, should be one of |
13 | "ulpi", or "serial". For dual role USB controllers, should be | 15 | "ulpi", or "serial". For dual role USB controllers, should be |
14 | one of "ulpi", "utmi", "utmi_wide", or "serial". | 16 | one of "ulpi", "utmi", "utmi_wide", or "serial". |
diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/usb/mxs-phy.txt index 5835b27146ea..cef181a9d8bd 100644 --- a/Documentation/devicetree/bindings/usb/mxs-phy.txt +++ b/Documentation/devicetree/bindings/usb/mxs-phy.txt | |||
@@ -1,13 +1,19 @@ | |||
1 | * Freescale MXS USB Phy Device | 1 | * Freescale MXS USB Phy Device |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "fsl,imx23-usbphy" | 4 | - compatible: should contain: |
5 | * "fsl,imx23-usbphy" for imx23 and imx28 | ||
6 | * "fsl,imx6q-usbphy" for imx6dq and imx6dl | ||
7 | * "fsl,imx6sl-usbphy" for imx6sl | ||
8 | "fsl,imx23-usbphy" is still a fallback for other strings | ||
5 | - reg: Should contain registers location and length | 9 | - reg: Should contain registers location and length |
6 | - interrupts: Should contain phy interrupt | 10 | - interrupts: Should contain phy interrupt |
11 | - fsl,anatop: phandle for anatop register, it is only for imx6 SoC series | ||
7 | 12 | ||
8 | Example: | 13 | Example: |
9 | usbphy1: usbphy@020c9000 { | 14 | usbphy1: usbphy@020c9000 { |
10 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | 15 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; |
11 | reg = <0x020c9000 0x1000>; | 16 | reg = <0x020c9000 0x1000>; |
12 | interrupts = <0 44 0x04>; | 17 | interrupts = <0 44 0x04>; |
18 | fsl,anatop = <&anatop>; | ||
13 | }; | 19 | }; |
diff --git a/Documentation/devicetree/bindings/usb/ohci-omap3.txt b/Documentation/devicetree/bindings/usb/ohci-omap3.txt index 14ab42812a8e..ce8c47cff6d0 100644 --- a/Documentation/devicetree/bindings/usb/ohci-omap3.txt +++ b/Documentation/devicetree/bindings/usb/ohci-omap3.txt | |||
@@ -9,7 +9,7 @@ Required properties: | |||
9 | Example for OMAP4: | 9 | Example for OMAP4: |
10 | 10 | ||
11 | usbhsohci: ohci@4a064800 { | 11 | usbhsohci: ohci@4a064800 { |
12 | compatible = "ti,ohci-omap3", "usb-ohci"; | 12 | compatible = "ti,ohci-omap3"; |
13 | reg = <0x4a064800 0x400>; | 13 | reg = <0x4a064800 0x400>; |
14 | interrupts = <0 76 0x4>; | 14 | interrupts = <0 76 0x4>; |
15 | }; | 15 | }; |
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt index c495135115cb..38b2faec4199 100644 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt | |||
@@ -76,27 +76,3 @@ omap_dwc3 { | |||
76 | ranges; | 76 | ranges; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | OMAP CONTROL USB | ||
80 | |||
81 | Required properties: | ||
82 | - compatible: Should be one of | ||
83 | "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4. | ||
84 | "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register | ||
85 | e.g. USB2_PHY on OMAP5. | ||
86 | "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control | ||
87 | e.g. USB3 PHY and SATA PHY on OMAP5. | ||
88 | "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on | ||
89 | DRA7 platform. | ||
90 | "ti,control-phy-am437usb2" - if it has power down register like USB2 PHY on | ||
91 | AM437 platform. | ||
92 | - reg : Address and length of the register set for the device. It contains | ||
93 | the address of "otghs_control" for control-phy-otghs or "power" register | ||
94 | for other types. | ||
95 | - reg-names: should be "otghs_control" control-phy-otghs and "power" for | ||
96 | other types. | ||
97 | |||
98 | omap_control_usb: omap-control-usb@4a002300 { | ||
99 | compatible = "ti,control-phy-otghs"; | ||
100 | reg = <0x4a00233c 0x4>; | ||
101 | reg-names = "otghs_control"; | ||
102 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt index fa18612f757b..ff151ec084c4 100644 --- a/Documentation/devicetree/bindings/usb/usb-ehci.txt +++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt | |||
@@ -1,19 +1,20 @@ | |||
1 | USB EHCI controllers | 1 | USB EHCI controllers |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : should be "usb-ehci". | 4 | - compatible : should be "generic-ehci". |
5 | - reg : should contain at least address and length of the standard EHCI | 5 | - reg : should contain at least address and length of the standard EHCI |
6 | register set for the device. Optional platform-dependent registers | 6 | register set for the device. Optional platform-dependent registers |
7 | (debug-port or other) can be also specified here, but only after | 7 | (debug-port or other) can be also specified here, but only after |
8 | definition of standard EHCI registers. | 8 | definition of standard EHCI registers. |
9 | - interrupts : one EHCI interrupt should be described here. | 9 | - interrupts : one EHCI interrupt should be described here. |
10 | If device registers are implemented in big endian mode, the device | 10 | |
11 | node should have "big-endian-regs" property. | 11 | Optional properties: |
12 | If controller implementation operates with big endian descriptors, | 12 | - big-endian-regs : boolean, set this for hcds with big-endian registers |
13 | "big-endian-desc" property should be specified. | 13 | - big-endian-desc : boolean, set this for hcds with big-endian descriptors |
14 | If both big endian registers and descriptors are used by the controller | 14 | - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc |
15 | implementation, "big-endian" property can be specified instead of having | 15 | - clocks : a list of phandle + clock specifier pairs |
16 | both "big-endian-regs" and "big-endian-desc". | 16 | - phys : phandle + phy specifier pair |
17 | - phy-names : "usb" | ||
17 | 18 | ||
18 | Example (Sequoia 440EPx): | 19 | Example (Sequoia 440EPx): |
19 | ehci@e0000300 { | 20 | ehci@e0000300 { |
@@ -23,3 +24,13 @@ Example (Sequoia 440EPx): | |||
23 | reg = <0 e0000300 90 0 e0000390 70>; | 24 | reg = <0 e0000300 90 0 e0000390 70>; |
24 | big-endian; | 25 | big-endian; |
25 | }; | 26 | }; |
27 | |||
28 | Example (Allwinner sun4i A10 SoC): | ||
29 | ehci0: usb@01c14000 { | ||
30 | compatible = "allwinner,sun4i-a10-ehci", "generic-ehci"; | ||
31 | reg = <0x01c14000 0x100>; | ||
32 | interrupts = <39>; | ||
33 | clocks = <&ahb_gates 1>; | ||
34 | phys = <&usbphy 1>; | ||
35 | phy-names = "usb"; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt new file mode 100644 index 000000000000..45f67d91e888 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | USB OHCI controllers | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "generic-ohci" | ||
5 | - reg : ohci controller register range (address and length) | ||
6 | - interrupts : ohci controller interrupt | ||
7 | |||
8 | Optional properties: | ||
9 | - big-endian-regs : boolean, set this for hcds with big-endian registers | ||
10 | - big-endian-desc : boolean, set this for hcds with big-endian descriptors | ||
11 | - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc | ||
12 | - clocks : a list of phandle + clock specifier pairs | ||
13 | - phys : phandle + phy specifier pair | ||
14 | - phy-names : "usb" | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ohci0: usb@01c14400 { | ||
19 | compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; | ||
20 | reg = <0x01c14400 0x100>; | ||
21 | interrupts = <64>; | ||
22 | clocks = <&usb_clk 6>, <&ahb_gates 2>; | ||
23 | phys = <&usbphy 1>; | ||
24 | phy-names = "usb"; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt deleted file mode 100644 index c0245c888982..000000000000 --- a/Documentation/devicetree/bindings/usb/usb-phy.txt +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | USB PHY | ||
2 | |||
3 | OMAP USB2 PHY | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "ti,omap-usb2" | ||
7 | - reg : Address and length of the register set for the device. | ||
8 | - #phy-cells: determine the number of cells that should be given in the | ||
9 | phandle while referencing this phy. | ||
10 | |||
11 | Optional properties: | ||
12 | - ctrl-module : phandle of the control module used by PHY driver to power on | ||
13 | the PHY. | ||
14 | |||
15 | This is usually a subnode of ocp2scp to which it is connected. | ||
16 | |||
17 | usb2phy@4a0ad080 { | ||
18 | compatible = "ti,omap-usb2"; | ||
19 | reg = <0x4a0ad080 0x58>; | ||
20 | ctrl-module = <&omap_control_usb>; | ||
21 | #phy-cells = <0>; | ||
22 | }; | ||
23 | |||
24 | OMAP USB3 PHY | ||
25 | |||
26 | Required properties: | ||
27 | - compatible: Should be "ti,omap-usb3" | ||
28 | - reg : Address and length of the register set for the device. | ||
29 | - reg-names: The names of the register addresses corresponding to the registers | ||
30 | filled in "reg". | ||
31 | - #phy-cells: determine the number of cells that should be given in the | ||
32 | phandle while referencing this phy. | ||
33 | |||
34 | Optional properties: | ||
35 | - ctrl-module : phandle of the control module used by PHY driver to power on | ||
36 | the PHY. | ||
37 | |||
38 | This is usually a subnode of ocp2scp to which it is connected. | ||
39 | |||
40 | usb3phy@4a084400 { | ||
41 | compatible = "ti,omap-usb3"; | ||
42 | reg = <0x4a084400 0x80>, | ||
43 | <0x4a084800 0x64>, | ||
44 | <0x4a084c00 0x40>; | ||
45 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; | ||
46 | ctrl-module = <&omap_control_usb>; | ||
47 | #phy-cells = <0>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/platform-uhci.txt b/Documentation/devicetree/bindings/usb/usb-uhci.txt index a4fb0719d157..298133416c97 100644 --- a/Documentation/devicetree/bindings/usb/platform-uhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-uhci.txt | |||
@@ -2,14 +2,14 @@ Generic Platform UHCI Controller | |||
2 | ----------------------------------------------------- | 2 | ----------------------------------------------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible : "platform-uhci" | 5 | - compatible : "generic-uhci" (deprecated: "platform-uhci") |
6 | - reg : Should contain 1 register ranges(address and length) | 6 | - reg : Should contain 1 register ranges(address and length) |
7 | - interrupts : UHCI controller interrupt | 7 | - interrupts : UHCI controller interrupt |
8 | 8 | ||
9 | Example: | 9 | Example: |
10 | 10 | ||
11 | uhci@d8007b00 { | 11 | uhci@d8007b00 { |
12 | compatible = "platform-uhci"; | 12 | compatible = "generic-uhci"; |
13 | reg = <0xd8007b00 0x200>; | 13 | reg = <0xd8007b00 0x200>; |
14 | interrupts = <43>; | 14 | interrupts = <43>; |
15 | }; | 15 | }; |
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt index 5752df0e17a2..90f8f607d125 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt | |||
@@ -1,14 +1,14 @@ | |||
1 | USB xHCI controllers | 1 | USB xHCI controllers |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: should be "xhci-platform". | 4 | - compatible: should be "generic-xhci" (deprecated: "xhci-platform"). |
5 | - reg: should contain address and length of the standard XHCI | 5 | - reg: should contain address and length of the standard XHCI |
6 | register set for the device. | 6 | register set for the device. |
7 | - interrupts: one XHCI interrupt should be described here. | 7 | - interrupts: one XHCI interrupt should be described here. |
8 | 8 | ||
9 | Example: | 9 | Example: |
10 | usb@f0931000 { | 10 | usb@f0931000 { |
11 | compatible = "xhci-platform"; | 11 | compatible = "generic-xhci"; |
12 | reg = <0xf0931000 0x8c8>; | 12 | reg = <0xf0931000 0x8c8>; |
13 | interrupts = <0x0 0x4e 0x0>; | 13 | interrupts = <0x0 0x4e 0x0>; |
14 | }; | 14 | }; |
diff --git a/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt deleted file mode 100644 index 17b3ad1d97e7..000000000000 --- a/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | VIA/Wondermedia VT8500 EHCI Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-ehci" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : ehci controller interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | ehci@d8007900 { | ||
12 | compatible = "via,vt8500-ehci"; | ||
13 | reg = <0xd8007900 0x200>; | ||
14 | interrupts = <43>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt deleted file mode 100644 index 5fb8fd6e250c..000000000000 --- a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". | ||
5 | - reg: Address range of the ehci registers. size should be 0x200 | ||
6 | - interrupts: Should contain the ehci interrupt. | ||
7 | |||
8 | usb: ehci@D8007100 { | ||
9 | compatible = "wm,prizm-ehci", "usb-ehci"; | ||
10 | reg = <0xD8007100 0x200>; | ||
11 | interrupts = <1>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 40ce2df0e0e9..0f01c9bf19c8 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -3,6 +3,7 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order. | |||
3 | This isn't an exhaustive list, but you should add new prefixes to it before | 3 | This isn't an exhaustive list, but you should add new prefixes to it before |
4 | using them to avoid name-space collisions. | 4 | using them to avoid name-space collisions. |
5 | 5 | ||
6 | abilis Abilis Systems | ||
6 | active-semi Active-Semi International Inc | 7 | active-semi Active-Semi International Inc |
7 | ad Avionic Design GmbH | 8 | ad Avionic Design GmbH |
8 | adi Analog Devices, Inc. | 9 | adi Analog Devices, Inc. |
@@ -11,14 +12,17 @@ ak Asahi Kasei Corp. | |||
11 | allwinner Allwinner Technology Co., Ltd. | 12 | allwinner Allwinner Technology Co., Ltd. |
12 | altr Altera Corp. | 13 | altr Altera Corp. |
13 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) | 14 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) |
15 | amd Advanced Micro Devices (AMD), Inc. | ||
14 | amstaos AMS-Taos Inc. | 16 | amstaos AMS-Taos Inc. |
15 | apm Applied Micro Circuits Corporation (APM) | 17 | apm Applied Micro Circuits Corporation (APM) |
16 | arm ARM Ltd. | 18 | arm ARM Ltd. |
19 | armadeus ARMadeus Systems SARL | ||
17 | atmel Atmel Corporation | 20 | atmel Atmel Corporation |
18 | auo AU Optronics Corporation | 21 | auo AU Optronics Corporation |
19 | avago Avago Technologies | 22 | avago Avago Technologies |
20 | bosch Bosch Sensortec GmbH | 23 | bosch Bosch Sensortec GmbH |
21 | brcm Broadcom Corporation | 24 | brcm Broadcom Corporation |
25 | calxeda Calxeda | ||
22 | capella Capella Microsystems, Inc | 26 | capella Capella Microsystems, Inc |
23 | cavium Cavium, Inc. | 27 | cavium Cavium, Inc. |
24 | cdns Cadence Design Systems Inc. | 28 | cdns Cadence Design Systems Inc. |
@@ -26,18 +30,24 @@ chrp Common Hardware Reference Platform | |||
26 | chunghwa Chunghwa Picture Tubes Ltd. | 30 | chunghwa Chunghwa Picture Tubes Ltd. |
27 | cirrus Cirrus Logic, Inc. | 31 | cirrus Cirrus Logic, Inc. |
28 | cortina Cortina Systems, Inc. | 32 | cortina Cortina Systems, Inc. |
33 | crystalfontz Crystalfontz America, Inc. | ||
29 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) | 34 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) |
30 | davicom DAVICOM Semiconductor, Inc. | 35 | davicom DAVICOM Semiconductor, Inc. |
36 | dlink D-Link Systems, Inc. | ||
31 | denx Denx Software Engineering | 37 | denx Denx Software Engineering |
38 | dmo Data Modul AG | ||
32 | edt Emerging Display Technologies | 39 | edt Emerging Display Technologies |
33 | emmicro EM Microelectronic | 40 | emmicro EM Microelectronic |
34 | epfl Ecole Polytechnique Fédérale de Lausanne | 41 | epfl Ecole Polytechnique Fédérale de Lausanne |
35 | epson Seiko Epson Corp. | 42 | epson Seiko Epson Corp. |
36 | est ESTeem Wireless Modems | 43 | est ESTeem Wireless Modems |
44 | eukrea Eukréa Electromatique | ||
37 | fsl Freescale Semiconductor | 45 | fsl Freescale Semiconductor |
38 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 46 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
39 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 47 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
48 | globalscale Globalscale Technologies, Inc. | ||
40 | gmt Global Mixed-mode Technology, Inc. | 49 | gmt Global Mixed-mode Technology, Inc. |
50 | google Google, Inc. | ||
41 | gumstix Gumstix, Inc. | 51 | gumstix Gumstix, Inc. |
42 | haoyu Haoyu Microelectronic Co. Ltd. | 52 | haoyu Haoyu Microelectronic Co. Ltd. |
43 | hisilicon Hisilicon Limited. | 53 | hisilicon Hisilicon Limited. |
@@ -46,9 +56,12 @@ hp Hewlett Packard | |||
46 | ibm International Business Machines (IBM) | 56 | ibm International Business Machines (IBM) |
47 | idt Integrated Device Technologies, Inc. | 57 | idt Integrated Device Technologies, Inc. |
48 | img Imagination Technologies Ltd. | 58 | img Imagination Technologies Ltd. |
59 | intel Intel Corporation | ||
49 | intercontrol Inter Control Group | 60 | intercontrol Inter Control Group |
50 | isl Intersil | 61 | isl Intersil |
51 | karo Ka-Ro electronics GmbH | 62 | karo Ka-Ro electronics GmbH |
63 | lacie LaCie | ||
64 | lantiq Lantiq Semiconductor | ||
52 | lg LG Corporation | 65 | lg LG Corporation |
53 | linux Linux-specific binding | 66 | linux Linux-specific binding |
54 | lsi LSI Corp. (LSI Logic) | 67 | lsi LSI Corp. (LSI Logic) |
@@ -56,22 +69,28 @@ marvell Marvell Technology Group Ltd. | |||
56 | maxim Maxim Integrated Products | 69 | maxim Maxim Integrated Products |
57 | microchip Microchip Technology Inc. | 70 | microchip Microchip Technology Inc. |
58 | mosaixtech Mosaix Technologies, Inc. | 71 | mosaixtech Mosaix Technologies, Inc. |
72 | moxa Moxa | ||
59 | national National Semiconductor | 73 | national National Semiconductor |
60 | neonode Neonode Inc. | 74 | neonode Neonode Inc. |
75 | netgear NETGEAR | ||
61 | nintendo Nintendo | 76 | nintendo Nintendo |
77 | nokia Nokia | ||
62 | nvidia NVIDIA | 78 | nvidia NVIDIA |
63 | nxp NXP Semiconductors | 79 | nxp NXP Semiconductors |
64 | onnn ON Semiconductor Corp. | 80 | onnn ON Semiconductor Corp. |
81 | opencores OpenCores.org | ||
65 | panasonic Panasonic Corporation | 82 | panasonic Panasonic Corporation |
66 | phytec PHYTEC Messtechnik GmbH | 83 | phytec PHYTEC Messtechnik GmbH |
67 | picochip Picochip Ltd | 84 | picochip Picochip Ltd |
68 | powervr PowerVR (deprecated, use img) | 85 | powervr PowerVR (deprecated, use img) |
69 | qca Qualcomm Atheros, Inc. | 86 | qca Qualcomm Atheros, Inc. |
70 | qcom Qualcomm Technologies, Inc | 87 | qcom Qualcomm Technologies, Inc |
88 | qnap QNAP Systems, Inc. | ||
71 | ralink Mediatek/Ralink Technology Corp. | 89 | ralink Mediatek/Ralink Technology Corp. |
72 | ramtron Ramtron International | 90 | ramtron Ramtron International |
73 | realtek Realtek Semiconductor Corp. | 91 | realtek Realtek Semiconductor Corp. |
74 | renesas Renesas Electronics Corporation | 92 | renesas Renesas Electronics Corporation |
93 | ricoh Ricoh Co. Ltd. | ||
75 | rockchip Fuzhou Rockchip Electronics Co., Ltd | 94 | rockchip Fuzhou Rockchip Electronics Co., Ltd |
76 | samsung Samsung Semiconductor | 95 | samsung Samsung Semiconductor |
77 | sbs Smart Battery System | 96 | sbs Smart Battery System |
@@ -79,19 +98,24 @@ schindler Schindler | |||
79 | sil Silicon Image | 98 | sil Silicon Image |
80 | silabs Silicon Laboratories | 99 | silabs Silicon Laboratories |
81 | simtek | 100 | simtek |
101 | sii Seiko Instruments, Inc. | ||
82 | sirf SiRF Technology, Inc. | 102 | sirf SiRF Technology, Inc. |
103 | smsc Standard Microsystems Corporation | ||
83 | snps Synopsys, Inc. | 104 | snps Synopsys, Inc. |
84 | spansion Spansion Inc. | 105 | spansion Spansion Inc. |
85 | st STMicroelectronics | 106 | st STMicroelectronics |
86 | ste ST-Ericsson | 107 | ste ST-Ericsson |
87 | stericsson ST-Ericsson | 108 | stericsson ST-Ericsson |
109 | synology Synology, Inc. | ||
88 | ti Texas Instruments | 110 | ti Texas Instruments |
89 | tlm Trusted Logic Mobility | 111 | tlm Trusted Logic Mobility |
90 | toshiba Toshiba Corporation | 112 | toshiba Toshiba Corporation |
91 | toumaz Toumaz | 113 | toumaz Toumaz |
92 | v3 V3 Semiconductor | 114 | v3 V3 Semiconductor |
93 | via VIA Technologies, Inc. | 115 | via VIA Technologies, Inc. |
116 | voipac Voipac Technologies s.r.o. | ||
94 | winbond Winbond Electronics corp. | 117 | winbond Winbond Electronics corp. |
95 | wlf Wolfson Microelectronics | 118 | wlf Wolfson Microelectronics |
96 | wm Wondermedia Technologies, Inc. | 119 | wm Wondermedia Technologies, Inc. |
120 | xes Extreme Engineering Solutions (X-ES) | ||
97 | xlnx Xilinx | 121 | xlnx Xilinx |
diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/video/analog-tv-connector.txt new file mode 100644 index 000000000000..0218fcdc1299 --- /dev/null +++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Analog TV Connector | ||
2 | =================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "composite-connector" or "svideo-connector" | ||
6 | |||
7 | Optional properties: | ||
8 | - label: a symbolic name for the connector | ||
9 | |||
10 | Required nodes: | ||
11 | - Video port for TV input | ||
12 | |||
13 | Example | ||
14 | ------- | ||
15 | |||
16 | tv: connector { | ||
17 | compatible = "composite-connector"; | ||
18 | label = "tv"; | ||
19 | |||
20 | port { | ||
21 | tv_connector_in: endpoint { | ||
22 | remote-endpoint = <&venc_out>; | ||
23 | }; | ||
24 | }; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/video/dvi-connector.txt new file mode 100644 index 000000000000..fc53f7c60bc6 --- /dev/null +++ b/Documentation/devicetree/bindings/video/dvi-connector.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | DVI Connector | ||
2 | ============== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "dvi-connector" | ||
6 | |||
7 | Optional properties: | ||
8 | - label: a symbolic name for the connector | ||
9 | - ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC | ||
10 | - analog: the connector has DVI analog pins | ||
11 | - digital: the connector has DVI digital pins | ||
12 | - dual-link: the connector has pins for DVI dual-link | ||
13 | |||
14 | Required nodes: | ||
15 | - Video port for DVI input | ||
16 | |||
17 | Note: One (or both) of 'analog' or 'digital' must be set. | ||
18 | |||
19 | Example | ||
20 | ------- | ||
21 | |||
22 | dvi0: connector@0 { | ||
23 | compatible = "dvi-connector"; | ||
24 | label = "dvi"; | ||
25 | |||
26 | digital; | ||
27 | |||
28 | ddc-i2c-bus = <&i2c3>; | ||
29 | |||
30 | port { | ||
31 | dvi_connector_in: endpoint { | ||
32 | remote-endpoint = <&tfp410_out>; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt index 46da08db186a..0329f60d431e 100644 --- a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt +++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt | |||
@@ -15,8 +15,12 @@ Required nodes: | |||
15 | - fsl,pcr: LCDC PCR value | 15 | - fsl,pcr: LCDC PCR value |
16 | 16 | ||
17 | Optional properties: | 17 | Optional properties: |
18 | - lcd-supply: Regulator for LCD supply voltage. | ||
18 | - fsl,dmacr: DMA Control Register value. This is optional. By default, the | 19 | - fsl,dmacr: DMA Control Register value. This is optional. By default, the |
19 | register is not modified as recommended by the datasheet. | 20 | register is not modified as recommended by the datasheet. |
21 | - fsl,lpccr: Contrast Control Register value. This property provides the | ||
22 | default value for the contrast control register. | ||
23 | If that property is ommited, the register is zeroed. | ||
20 | - fsl,lscr1: LCDC Sharp Configuration Register value. | 24 | - fsl,lscr1: LCDC Sharp Configuration Register value. |
21 | 25 | ||
22 | Example: | 26 | Example: |
diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt new file mode 100644 index 000000000000..ccccc19e2573 --- /dev/null +++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | HDMI Connector | ||
2 | ============== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "hdmi-connector" | ||
6 | - type: the HDMI connector type: "a", "b", "c", "d" or "e" | ||
7 | |||
8 | Optional properties: | ||
9 | - label: a symbolic name for the connector | ||
10 | |||
11 | Required nodes: | ||
12 | - Video port for HDMI input | ||
13 | |||
14 | Example | ||
15 | ------- | ||
16 | |||
17 | hdmi0: connector@1 { | ||
18 | compatible = "hdmi-connector"; | ||
19 | label = "hdmi"; | ||
20 | |||
21 | type = "a"; | ||
22 | |||
23 | port { | ||
24 | hdmi_connector_in: endpoint { | ||
25 | remote-endpoint = <&tpd12s015_out>; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt new file mode 100644 index 000000000000..dce48eb9db57 --- /dev/null +++ b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | Generic MIPI DSI Command Mode Panel | ||
2 | =================================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "panel-dsi-cm" | ||
6 | |||
7 | Optional properties: | ||
8 | - label: a symbolic name for the panel | ||
9 | - reset-gpios: panel reset gpio | ||
10 | - te-gpios: panel TE gpio | ||
11 | |||
12 | Required nodes: | ||
13 | - Video port for DSI input | ||
14 | |||
15 | Example | ||
16 | ------- | ||
17 | |||
18 | lcd0: display { | ||
19 | compatible = "tpo,taal", "panel-dsi-cm"; | ||
20 | label = "lcd0"; | ||
21 | |||
22 | reset-gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; | ||
23 | |||
24 | port { | ||
25 | lcd0_in: endpoint { | ||
26 | remote-endpoint = <&dsi1_out_ep>; | ||
27 | }; | ||
28 | }; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt new file mode 100644 index 000000000000..e12333280749 --- /dev/null +++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | Sony ACX565AKM SDI Panel | ||
2 | ======================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "sony,acx565akm" | ||
6 | |||
7 | Optional properties: | ||
8 | - label: a symbolic name for the panel | ||
9 | - reset-gpios: panel reset gpio | ||
10 | |||
11 | Required nodes: | ||
12 | - Video port for SDI input | ||
13 | |||
14 | Example | ||
15 | ------- | ||
16 | |||
17 | acx565akm@2 { | ||
18 | compatible = "sony,acx565akm"; | ||
19 | spi-max-frequency = <6000000>; | ||
20 | reg = <2>; | ||
21 | |||
22 | label = "lcd"; | ||
23 | reset-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ | ||
24 | |||
25 | port { | ||
26 | lcd_in: endpoint { | ||
27 | remote-endpoint = <&sdi_out>; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/video/ti,omap-dss.txt new file mode 100644 index 000000000000..d5f1a3fe3109 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt | |||
@@ -0,0 +1,211 @@ | |||
1 | Texas Instruments OMAP Display Subsystem | ||
2 | ======================================== | ||
3 | |||
4 | Generic Description | ||
5 | ------------------- | ||
6 | |||
7 | This document is a generic description of the OMAP Display Subsystem bindings. | ||
8 | Binding details for each OMAP SoC version are described in respective binding | ||
9 | documentation. | ||
10 | |||
11 | The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and | ||
12 | a number of encoder modules. All DSS versions contain DSS Core and DISPC, but | ||
13 | the encoder modules vary. | ||
14 | |||
15 | The DSS Core is the parent of the other DSS modules, and manages clock routing, | ||
16 | integration to the SoC, etc. | ||
17 | |||
18 | DISPC is the display controller, which reads pixels from the memory and outputs | ||
19 | a RGB pixel stream to encoders. | ||
20 | |||
21 | The encoder modules encode the received RGB pixel stream to a video output like | ||
22 | HDMI, MIPI DPI, etc. | ||
23 | |||
24 | Video Ports | ||
25 | ----------- | ||
26 | |||
27 | The DSS Core and the encoders have video port outputs. The structure of the | ||
28 | video ports is described in Documentation/devicetree/bindings/video/video- | ||
29 | ports.txt, and the properties for the ports and endpoints for each encoder are | ||
30 | described in the SoC's DSS binding documentation. | ||
31 | |||
32 | The video ports are used to describe the connections to external hardware, like | ||
33 | panels or external encoders. | ||
34 | |||
35 | Aliases | ||
36 | ------- | ||
37 | |||
38 | The board dts file may define aliases for displays to assign "displayX" style | ||
39 | name for each display. If no aliases are defined, a semi-random number is used | ||
40 | for the display. | ||
41 | |||
42 | Example | ||
43 | ------- | ||
44 | |||
45 | A shortened example of the DSS description for OMAP4, with non-relevant parts | ||
46 | removed, defined in omap4.dtsi: | ||
47 | |||
48 | dss: dss@58000000 { | ||
49 | compatible = "ti,omap4-dss"; | ||
50 | reg = <0x58000000 0x80>; | ||
51 | status = "disabled"; | ||
52 | ti,hwmods = "dss_core"; | ||
53 | clocks = <&dss_dss_clk>; | ||
54 | clock-names = "fck"; | ||
55 | #address-cells = <1>; | ||
56 | #size-cells = <1>; | ||
57 | ranges; | ||
58 | |||
59 | dispc@58001000 { | ||
60 | compatible = "ti,omap4-dispc"; | ||
61 | reg = <0x58001000 0x1000>; | ||
62 | interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; | ||
63 | ti,hwmods = "dss_dispc"; | ||
64 | clocks = <&dss_dss_clk>; | ||
65 | clock-names = "fck"; | ||
66 | }; | ||
67 | |||
68 | hdmi: encoder@58006000 { | ||
69 | compatible = "ti,omap4-hdmi"; | ||
70 | reg = <0x58006000 0x200>, | ||
71 | <0x58006200 0x100>, | ||
72 | <0x58006300 0x100>, | ||
73 | <0x58006400 0x1000>; | ||
74 | reg-names = "wp", "pll", "phy", "core"; | ||
75 | interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; | ||
76 | status = "disabled"; | ||
77 | ti,hwmods = "dss_hdmi"; | ||
78 | clocks = <&dss_48mhz_clk>, <&dss_sys_clk>; | ||
79 | clock-names = "fck", "sys_clk"; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | A shortened example of the board description for OMAP4 Panda board, defined in | ||
84 | omap4-panda.dts. | ||
85 | |||
86 | The Panda board has a DVI and a HDMI connector, and the board contains a TFP410 | ||
87 | chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection & level | ||
88 | shifter). The video pipelines for the connectors are formed as follows: | ||
89 | |||
90 | DSS Core --(MIPI DPI)--> TFP410 --(DVI)--> DVI Connector | ||
91 | OMAP HDMI --(HDMI)--> TPD12S015 --(HDMI)--> HDMI Connector | ||
92 | |||
93 | / { | ||
94 | aliases { | ||
95 | display0 = &dvi0; | ||
96 | display1 = &hdmi0; | ||
97 | }; | ||
98 | |||
99 | tfp410: encoder@0 { | ||
100 | compatible = "ti,tfp410"; | ||
101 | gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; /* 0, power-down */ | ||
102 | |||
103 | pinctrl-names = "default"; | ||
104 | pinctrl-0 = <&tfp410_pins>; | ||
105 | |||
106 | ports { | ||
107 | #address-cells = <1>; | ||
108 | #size-cells = <0>; | ||
109 | |||
110 | port@0 { | ||
111 | reg = <0>; | ||
112 | |||
113 | tfp410_in: endpoint@0 { | ||
114 | remote-endpoint = <&dpi_out>; | ||
115 | }; | ||
116 | }; | ||
117 | |||
118 | port@1 { | ||
119 | reg = <1>; | ||
120 | |||
121 | tfp410_out: endpoint@0 { | ||
122 | remote-endpoint = <&dvi_connector_in>; | ||
123 | }; | ||
124 | }; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | dvi0: connector@0 { | ||
129 | compatible = "dvi-connector"; | ||
130 | label = "dvi"; | ||
131 | |||
132 | i2c-bus = <&i2c3>; | ||
133 | |||
134 | port { | ||
135 | dvi_connector_in: endpoint { | ||
136 | remote-endpoint = <&tfp410_out>; | ||
137 | }; | ||
138 | }; | ||
139 | }; | ||
140 | |||
141 | tpd12s015: encoder@1 { | ||
142 | compatible = "ti,tpd12s015"; | ||
143 | |||
144 | pinctrl-names = "default"; | ||
145 | pinctrl-0 = <&tpd12s015_pins>; | ||
146 | |||
147 | gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ | ||
148 | <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ | ||
149 | <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ | ||
150 | |||
151 | ports { | ||
152 | #address-cells = <1>; | ||
153 | #size-cells = <0>; | ||
154 | |||
155 | port@0 { | ||
156 | reg = <0>; | ||
157 | |||
158 | tpd12s015_in: endpoint@0 { | ||
159 | remote-endpoint = <&hdmi_out>; | ||
160 | }; | ||
161 | }; | ||
162 | |||
163 | port@1 { | ||
164 | reg = <1>; | ||
165 | |||
166 | tpd12s015_out: endpoint@0 { | ||
167 | remote-endpoint = <&hdmi_connector_in>; | ||
168 | }; | ||
169 | }; | ||
170 | }; | ||
171 | }; | ||
172 | |||
173 | hdmi0: connector@1 { | ||
174 | compatible = "hdmi-connector"; | ||
175 | label = "hdmi"; | ||
176 | |||
177 | port { | ||
178 | hdmi_connector_in: endpoint { | ||
179 | remote-endpoint = <&tpd12s015_out>; | ||
180 | }; | ||
181 | }; | ||
182 | }; | ||
183 | }; | ||
184 | |||
185 | &dss { | ||
186 | status = "ok"; | ||
187 | |||
188 | pinctrl-names = "default"; | ||
189 | pinctrl-0 = <&dss_dpi_pins>; | ||
190 | |||
191 | port { | ||
192 | dpi_out: endpoint { | ||
193 | remote-endpoint = <&tfp410_in>; | ||
194 | data-lines = <24>; | ||
195 | }; | ||
196 | }; | ||
197 | }; | ||
198 | |||
199 | &hdmi { | ||
200 | status = "ok"; | ||
201 | vdda-supply = <&vdac>; | ||
202 | |||
203 | pinctrl-names = "default"; | ||
204 | pinctrl-0 = <&dss_hdmi_pins>; | ||
205 | |||
206 | port { | ||
207 | hdmi_out: endpoint { | ||
208 | remote-endpoint = <&tpd12s015_in>; | ||
209 | }; | ||
210 | }; | ||
211 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt new file mode 100644 index 000000000000..fa8bb2ed1170 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | Texas Instruments OMAP2 Display Subsystem | ||
2 | ========================================= | ||
3 | |||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | ||
5 | description about OMAP Display Subsystem bindings. | ||
6 | |||
7 | DSS Core | ||
8 | -------- | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "ti,omap2-dss" | ||
12 | - reg: address and length of the register space | ||
13 | - ti,hwmods: "dss_core" | ||
14 | |||
15 | Optional nodes: | ||
16 | - Video port for DPI output | ||
17 | |||
18 | DPI Endpoint required properties: | ||
19 | - data-lines: number of lines used | ||
20 | |||
21 | |||
22 | DISPC | ||
23 | ----- | ||
24 | |||
25 | Required properties: | ||
26 | - compatible: "ti,omap2-dispc" | ||
27 | - reg: address and length of the register space | ||
28 | - ti,hwmods: "dss_dispc" | ||
29 | - interrupts: the DISPC interrupt | ||
30 | |||
31 | |||
32 | RFBI | ||
33 | ---- | ||
34 | |||
35 | Required properties: | ||
36 | - compatible: "ti,omap2-rfbi" | ||
37 | - reg: address and length of the register space | ||
38 | - ti,hwmods: "dss_rfbi" | ||
39 | |||
40 | |||
41 | VENC | ||
42 | ---- | ||
43 | |||
44 | Required properties: | ||
45 | - compatible: "ti,omap2-venc" | ||
46 | - reg: address and length of the register space | ||
47 | - ti,hwmods: "dss_venc" | ||
48 | - vdda-supply: power supply for DAC | ||
49 | |||
50 | VENC Endpoint required properties: | ||
51 | |||
52 | Required properties: | ||
53 | - ti,invert-polarity: invert the polarity of the video signal | ||
54 | - ti,channels: 1 for composite, 2 for s-video | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt new file mode 100644 index 000000000000..0023fa4b1328 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt | |||
@@ -0,0 +1,83 @@ | |||
1 | Texas Instruments OMAP3 Display Subsystem | ||
2 | ========================================= | ||
3 | |||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | ||
5 | description about OMAP Display Subsystem bindings. | ||
6 | |||
7 | DSS Core | ||
8 | -------- | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "ti,omap3-dss" | ||
12 | - reg: address and length of the register space | ||
13 | - ti,hwmods: "dss_core" | ||
14 | - clocks: handle to fclk | ||
15 | - clock-names: "fck" | ||
16 | |||
17 | Optional nodes: | ||
18 | - Video ports: | ||
19 | - Port 0: DPI output | ||
20 | - Port 1: SDI output | ||
21 | |||
22 | DPI Endpoint required properties: | ||
23 | - data-lines: number of lines used | ||
24 | |||
25 | SDI Endpoint required properties: | ||
26 | - datapairs: number of datapairs used | ||
27 | |||
28 | |||
29 | DISPC | ||
30 | ----- | ||
31 | |||
32 | Required properties: | ||
33 | - compatible: "ti,omap3-dispc" | ||
34 | - reg: address and length of the register space | ||
35 | - ti,hwmods: "dss_dispc" | ||
36 | - interrupts: the DISPC interrupt | ||
37 | - clocks: handle to fclk | ||
38 | - clock-names: "fck" | ||
39 | |||
40 | |||
41 | RFBI | ||
42 | ---- | ||
43 | |||
44 | Required properties: | ||
45 | - compatible: "ti,omap3-rfbi" | ||
46 | - reg: address and length of the register space | ||
47 | - ti,hwmods: "dss_rfbi" | ||
48 | - clocks: handles to fclk and iclk | ||
49 | - clock-names: "fck", "ick" | ||
50 | |||
51 | |||
52 | VENC | ||
53 | ---- | ||
54 | |||
55 | Required properties: | ||
56 | - compatible: "ti,omap3-venc" | ||
57 | - reg: address and length of the register space | ||
58 | - ti,hwmods: "dss_venc" | ||
59 | - vdda-supply: power supply for DAC | ||
60 | - clocks: handle to fclk | ||
61 | - clock-names: "fck" | ||
62 | |||
63 | VENC Endpoint required properties: | ||
64 | - ti,invert-polarity: invert the polarity of the video signal | ||
65 | - ti,channels: 1 for composite, 2 for s-video | ||
66 | |||
67 | |||
68 | DSI | ||
69 | --- | ||
70 | |||
71 | Required properties: | ||
72 | - compatible: "ti,omap3-dsi" | ||
73 | - reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll' | ||
74 | - reg-names: "proto", "phy", "pll" | ||
75 | - interrupts: the DSI interrupt line | ||
76 | - ti,hwmods: "dss_dsi1" | ||
77 | - vdd-supply: power supply for DSI | ||
78 | - clocks: handles to fclk and pll clock | ||
79 | - clock-names: "fck", "sys_clk" | ||
80 | |||
81 | DSI Endpoint required properties: | ||
82 | - lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-, | ||
83 | DATA1+, DATA1-, ... | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt new file mode 100644 index 000000000000..f85d6fcfa705 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt | |||
@@ -0,0 +1,111 @@ | |||
1 | Texas Instruments OMAP4 Display Subsystem | ||
2 | ========================================= | ||
3 | |||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | ||
5 | description about OMAP Display Subsystem bindings. | ||
6 | |||
7 | DSS Core | ||
8 | -------- | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "ti,omap4-dss" | ||
12 | - reg: address and length of the register space | ||
13 | - ti,hwmods: "dss_core" | ||
14 | - clocks: handle to fclk | ||
15 | - clock-names: "fck" | ||
16 | |||
17 | Required nodes: | ||
18 | - DISPC | ||
19 | |||
20 | Optional nodes: | ||
21 | - DSS Submodules: RFBI, VENC, DSI, HDMI | ||
22 | - Video port for DPI output | ||
23 | |||
24 | DPI Endpoint required properties: | ||
25 | - data-lines: number of lines used | ||
26 | |||
27 | |||
28 | DISPC | ||
29 | ----- | ||
30 | |||
31 | Required properties: | ||
32 | - compatible: "ti,omap4-dispc" | ||
33 | - reg: address and length of the register space | ||
34 | - ti,hwmods: "dss_dispc" | ||
35 | - interrupts: the DISPC interrupt | ||
36 | - clocks: handle to fclk | ||
37 | - clock-names: "fck" | ||
38 | |||
39 | |||
40 | RFBI | ||
41 | ---- | ||
42 | |||
43 | Required properties: | ||
44 | - compatible: "ti,omap4-rfbi" | ||
45 | - reg: address and length of the register space | ||
46 | - ti,hwmods: "dss_rfbi" | ||
47 | - clocks: handles to fclk and iclk | ||
48 | - clock-names: "fck", "ick" | ||
49 | |||
50 | Optional nodes: | ||
51 | - Video port for RFBI output | ||
52 | - RFBI controlled peripherals | ||
53 | |||
54 | |||
55 | VENC | ||
56 | ---- | ||
57 | |||
58 | Required properties: | ||
59 | - compatible: "ti,omap4-venc" | ||
60 | - reg: address and length of the register space | ||
61 | - ti,hwmods: "dss_venc" | ||
62 | - vdda-supply: power supply for DAC | ||
63 | - clocks: handle to fclk | ||
64 | - clock-names: "fck" | ||
65 | |||
66 | Optional nodes: | ||
67 | - Video port for VENC output | ||
68 | |||
69 | VENC Endpoint required properties: | ||
70 | - ti,invert-polarity: invert the polarity of the video signal | ||
71 | - ti,channels: 1 for composite, 2 for s-video | ||
72 | |||
73 | |||
74 | DSI | ||
75 | --- | ||
76 | |||
77 | Required properties: | ||
78 | - compatible: "ti,omap4-dsi" | ||
79 | - reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll' | ||
80 | - reg-names: "proto", "phy", "pll" | ||
81 | - interrupts: the DSI interrupt line | ||
82 | - ti,hwmods: "dss_dsi1" or "dss_dsi2" | ||
83 | - vdd-supply: power supply for DSI | ||
84 | - clocks: handles to fclk and pll clock | ||
85 | - clock-names: "fck", "sys_clk" | ||
86 | |||
87 | Optional nodes: | ||
88 | - Video port for DSI output | ||
89 | - DSI controlled peripherals | ||
90 | |||
91 | DSI Endpoint required properties: | ||
92 | - lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-, | ||
93 | DATA1+, DATA1-, ... | ||
94 | |||
95 | |||
96 | HDMI | ||
97 | ---- | ||
98 | |||
99 | Required properties: | ||
100 | - compatible: "ti,omap4-hdmi" | ||
101 | - reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy', | ||
102 | 'core' | ||
103 | - reg-names: "wp", "pll", "phy", "core" | ||
104 | - interrupts: the HDMI interrupt line | ||
105 | - ti,hwmods: "dss_hdmi" | ||
106 | - vdda-supply: vdda power supply | ||
107 | - clocks: handles to fclk and pll clock | ||
108 | - clock-names: "fck", "sys_clk" | ||
109 | |||
110 | Optional nodes: | ||
111 | - Video port for HDMI output | ||
diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt new file mode 100644 index 000000000000..2cbe32a3d0bb --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | TFP410 DPI to DVI encoder | ||
2 | ========================= | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "ti,tfp410" | ||
6 | |||
7 | Optional properties: | ||
8 | - powerdown-gpios: power-down gpio | ||
9 | |||
10 | Required nodes: | ||
11 | - Video port 0 for DPI input | ||
12 | - Video port 1 for DVI output | ||
13 | |||
14 | Example | ||
15 | ------- | ||
16 | |||
17 | tfp410: encoder@0 { | ||
18 | compatible = "ti,tfp410"; | ||
19 | powerdown-gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>; | ||
20 | |||
21 | ports { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | |||
25 | port@0 { | ||
26 | reg = <0>; | ||
27 | |||
28 | tfp410_in: endpoint@0 { | ||
29 | remote-endpoint = <&dpi_out>; | ||
30 | }; | ||
31 | }; | ||
32 | |||
33 | port@1 { | ||
34 | reg = <1>; | ||
35 | |||
36 | tfp410_out: endpoint@0 { | ||
37 | remote-endpoint = <&dvi_connector_in>; | ||
38 | }; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt new file mode 100644 index 000000000000..26e6d32e3f20 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | TPD12S015 HDMI level shifter and ESD protection chip | ||
2 | ==================================================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "ti,tpd12s015" | ||
6 | |||
7 | Optional properties: | ||
8 | - gpios: CT CP HPD, LS OE and HPD gpios | ||
9 | |||
10 | Required nodes: | ||
11 | - Video port 0 for HDMI input | ||
12 | - Video port 1 for HDMI output | ||
13 | |||
14 | Example | ||
15 | ------- | ||
16 | |||
17 | tpd12s015: encoder@1 { | ||
18 | compatible = "ti,tpd12s015"; | ||
19 | |||
20 | gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ | ||
21 | <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ | ||
22 | <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ | ||
23 | |||
24 | ports { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | port@0 { | ||
29 | reg = <0>; | ||
30 | |||
31 | tpd12s015_in: endpoint@0 { | ||
32 | remote-endpoint = <&hdmi_out>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | port@1 { | ||
37 | reg = <1>; | ||
38 | |||
39 | tpd12s015_out: endpoint@0 { | ||
40 | remote-endpoint = <&hdmi_connector_in>; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt index 5dc8d30061ce..de11eb4c121f 100644 --- a/Documentation/devicetree/bindings/watchdog/marvel.txt +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt | |||
@@ -3,17 +3,24 @@ | |||
3 | Required Properties: | 3 | Required Properties: |
4 | 4 | ||
5 | - Compatibility : "marvell,orion-wdt" | 5 | - Compatibility : "marvell,orion-wdt" |
6 | - reg : Address of the timer registers | 6 | "marvell,armada-370-wdt" |
7 | "marvell,armada-xp-wdt" | ||
8 | |||
9 | - reg : Should contain two entries: first one with the | ||
10 | timer control address, second one with the | ||
11 | rstout enable address. | ||
7 | 12 | ||
8 | Optional properties: | 13 | Optional properties: |
9 | 14 | ||
15 | - interrupts : Contains the IRQ for watchdog expiration | ||
10 | - timeout-sec : Contains the watchdog timeout in seconds | 16 | - timeout-sec : Contains the watchdog timeout in seconds |
11 | 17 | ||
12 | Example: | 18 | Example: |
13 | 19 | ||
14 | wdt@20300 { | 20 | wdt@20300 { |
15 | compatible = "marvell,orion-wdt"; | 21 | compatible = "marvell,orion-wdt"; |
16 | reg = <0x20300 0x28>; | 22 | reg = <0x20300 0x28>, <0x20108 0x4>; |
23 | interrupts = <3>; | ||
17 | timeout-sec = <10>; | 24 | timeout-sec = <10>; |
18 | status = "okay"; | 25 | status = "okay"; |
19 | }; | 26 | }; |
diff --git a/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt b/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt new file mode 100644 index 000000000000..6d63782a7378 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Xilinx AXI/PLB soft-core watchdog Device Tree Bindings | ||
2 | --------------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : Should be "xlnx,xps-timebase-wdt-1.00.a" or | ||
6 | "xlnx,xps-timebase-wdt-1.01.a". | ||
7 | - reg : Physical base address and size | ||
8 | |||
9 | Optional properties: | ||
10 | - clock-frequency : Frequency of clock in Hz | ||
11 | - xlnx,wdt-enable-once : 0 - Watchdog can be restarted | ||
12 | 1 - Watchdog can be enabled just once | ||
13 | - xlnx,wdt-interval : Watchdog timeout interval in 2^<val> clock cycles, | ||
14 | <val> is integer from 8 to 31. | ||
15 | |||
16 | Example: | ||
17 | axi-timebase-wdt@40100000 { | ||
18 | clock-frequency = <50000000>; | ||
19 | compatible = "xlnx,xps-timebase-wdt-1.00.a"; | ||
20 | reg = <0x40100000 0x10000>; | ||
21 | xlnx,wdt-enable-once = <0x0>; | ||
22 | xlnx,wdt-interval = <0x1b>; | ||
23 | } ; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt index e39cb266c8f4..b8f75c51453a 100644 --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | |||
@@ -2,13 +2,13 @@ Allwinner SoCs Watchdog timer | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : should be "allwinner,<soc-family>-wdt", the currently supported | 5 | - compatible : should be either "allwinner,sun4i-a10-wdt" or |
6 | SoC families being sun4i and sun6i | 6 | "allwinner,sun6i-a31-wdt" |
7 | - reg : Specifies base physical address and size of the registers. | 7 | - reg : Specifies base physical address and size of the registers. |
8 | 8 | ||
9 | Example: | 9 | Example: |
10 | 10 | ||
11 | wdt: watchdog@01c20c90 { | 11 | wdt: watchdog@01c20c90 { |
12 | compatible = "allwinner,sun4i-wdt"; | 12 | compatible = "allwinner,sun4i-a10-wdt"; |
13 | reg = <0x01c20c90 0x10>; | 13 | reg = <0x01c20c90 0x10>; |
14 | }; | 14 | }; |
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index 5d5ee4c13fa6..d91b8be80b66 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -28,8 +28,8 @@ use IO::Handle; | |||
28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", | 28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", |
29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", | 29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", |
30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", | 30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", |
31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "it9137", | 31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv", |
32 | "drxk_pctv", "drxk_terratec_htc_stick", "sms1xxx_hcw"); | 32 | "drxk_terratec_htc_stick", "sms1xxx_hcw"); |
33 | 33 | ||
34 | # Check args | 34 | # Check args |
35 | syntax() if (scalar(@ARGV) != 1); | 35 | syntax() if (scalar(@ARGV) != 1); |
@@ -727,24 +727,6 @@ sub it9135 { | |||
727 | "$fwfile1 $fwfile2" | 727 | "$fwfile1 $fwfile2" |
728 | } | 728 | } |
729 | 729 | ||
730 | sub it9137 { | ||
731 | my $url = "http://kworld.server261.com/kworld/CD/ITE_TiVme/V1.00/"; | ||
732 | my $zipfile = "Driver_V10.323.1.0412.100412.zip"; | ||
733 | my $hash = "79b597dc648698ed6820845c0c9d0d37"; | ||
734 | my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0); | ||
735 | my $drvfile = "Driver_V10.323.1.0412.100412/Data/x86/IT9135BDA.sys"; | ||
736 | my $fwfile = "dvb-usb-it9137-01.fw"; | ||
737 | |||
738 | checkstandard(); | ||
739 | |||
740 | wgetfile($zipfile, $url . $zipfile); | ||
741 | verify($zipfile, $hash); | ||
742 | unzip($zipfile, $tmpdir); | ||
743 | extract("$tmpdir/$drvfile", 69632, 5731, "$fwfile"); | ||
744 | |||
745 | "$fwfile" | ||
746 | } | ||
747 | |||
748 | sub tda10071 { | 730 | sub tda10071 { |
749 | my $sourcefile = "PCTV_460e_reference.zip"; | 731 | my $sourcefile = "PCTV_460e_reference.zip"; |
750 | my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/"; | 732 | my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/"; |
diff --git a/Documentation/dvb/it9137.txt b/Documentation/dvb/it9137.txt deleted file mode 100644 index 9e6726eead90..000000000000 --- a/Documentation/dvb/it9137.txt +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | To extract firmware for Kworld UB499-2T (id 1b80:e409) you need to copy the | ||
2 | following file(s) to this directory. | ||
3 | |||
4 | IT9135BDA.sys Dated Mon 22 Mar 2010 02:20:08 GMT | ||
5 | |||
6 | extract using dd | ||
7 | dd if=IT9135BDA.sys ibs=1 skip=69632 count=5731 of=dvb-usb-it9137-01.fw | ||
8 | |||
9 | copy to default firmware location. | ||
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 56c7e936430f..cb4c2cefd45a 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -6,7 +6,7 @@ Written by Doug Thompson <dougthompson@xmission.com> | |||
6 | 7 Dec 2005 | 6 | 7 Dec 2005 |
7 | 17 Jul 2007 Updated | 7 | 17 Jul 2007 Updated |
8 | 8 | ||
9 | (c) Mauro Carvalho Chehab <mchehab@redhat.com> | 9 | (c) Mauro Carvalho Chehab |
10 | 05 Aug 2009 Nehalem interface | 10 | 05 Aug 2009 Nehalem interface |
11 | 11 | ||
12 | EDAC is maintained and written by: | 12 | EDAC is maintained and written by: |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 5b0c083d7c0e..efca5c1bbb10 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -47,6 +47,8 @@ prototypes: | |||
47 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); | 47 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); |
48 | int (*rename) (struct inode *, struct dentry *, | 48 | int (*rename) (struct inode *, struct dentry *, |
49 | struct inode *, struct dentry *); | 49 | struct inode *, struct dentry *); |
50 | int (*rename2) (struct inode *, struct dentry *, | ||
51 | struct inode *, struct dentry *, unsigned int); | ||
50 | int (*readlink) (struct dentry *, char __user *,int); | 52 | int (*readlink) (struct dentry *, char __user *,int); |
51 | void * (*follow_link) (struct dentry *, struct nameidata *); | 53 | void * (*follow_link) (struct dentry *, struct nameidata *); |
52 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 54 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
@@ -78,6 +80,7 @@ mkdir: yes | |||
78 | unlink: yes (both) | 80 | unlink: yes (both) |
79 | rmdir: yes (both) (see below) | 81 | rmdir: yes (both) (see below) |
80 | rename: yes (all) (see below) | 82 | rename: yes (all) (see below) |
83 | rename2: yes (all) (see below) | ||
81 | readlink: no | 84 | readlink: no |
82 | follow_link: no | 85 | follow_link: no |
83 | put_link: no | 86 | put_link: no |
@@ -96,7 +99,8 @@ tmpfile: no | |||
96 | 99 | ||
97 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 100 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
98 | victim. | 101 | victim. |
99 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 102 | cross-directory ->rename() and rename2() has (per-superblock) |
103 | ->s_vfs_rename_sem. | ||
100 | 104 | ||
101 | See Documentation/filesystems/directory-locking for more detailed discussion | 105 | See Documentation/filesystems/directory-locking for more detailed discussion |
102 | of the locking scheme for directory operations. | 106 | of the locking scheme for directory operations. |
@@ -525,6 +529,7 @@ locking rules: | |||
525 | open: yes | 529 | open: yes |
526 | close: yes | 530 | close: yes |
527 | fault: yes can return with page locked | 531 | fault: yes can return with page locked |
532 | map_pages: yes | ||
528 | page_mkwrite: yes can return with page locked | 533 | page_mkwrite: yes can return with page locked |
529 | access: yes | 534 | access: yes |
530 | 535 | ||
@@ -536,6 +541,15 @@ the page, then ensure it is not already truncated (the page lock will block | |||
536 | subsequent truncate), and then return with VM_FAULT_LOCKED, and the page | 541 | subsequent truncate), and then return with VM_FAULT_LOCKED, and the page |
537 | locked. The VM will unlock the page. | 542 | locked. The VM will unlock the page. |
538 | 543 | ||
544 | ->map_pages() is called when VM asks to map easy accessible pages. | ||
545 | Filesystem should find and map pages associated with offsets from "pgoff" | ||
546 | till "max_pgoff". ->map_pages() is called with page table locked and must | ||
547 | not block. If it's not possible to reach a page without blocking, | ||
548 | filesystem should skip it. Filesystem should use do_set_pte() to setup | ||
549 | page table entry. Pointer to entry associated with offset "pgoff" is | ||
550 | passed in "pte" field in vm_fault structure. Pointers to entries for other | ||
551 | offsets should be calculated relative to "pte". | ||
552 | |||
539 | ->page_mkwrite() is called when a previously read-only pte is | 553 | ->page_mkwrite() is called when a previously read-only pte is |
540 | about to become writeable. The filesystem again must ensure that there are | 554 | about to become writeable. The filesystem again must ensure that there are |
541 | no truncate/invalidate races, and then return with the page locked. If | 555 | no truncate/invalidate races, and then return with the page locked. If |
diff --git a/Documentation/filesystems/affs.txt b/Documentation/filesystems/affs.txt index 81ac488e3758..71b63c2b9841 100644 --- a/Documentation/filesystems/affs.txt +++ b/Documentation/filesystems/affs.txt | |||
@@ -49,6 +49,10 @@ mode=mode Sets the mode flags to the given (octal) value, regardless | |||
49 | This is useful since most of the plain AmigaOS files | 49 | This is useful since most of the plain AmigaOS files |
50 | will map to 600. | 50 | will map to 600. |
51 | 51 | ||
52 | nofilenametruncate | ||
53 | The file system will return an error when filename exceeds | ||
54 | standard maximum filename length (30 characters). | ||
55 | |||
52 | reserved=num Sets the number of reserved blocks at the start of the | 56 | reserved=num Sets the number of reserved blocks at the start of the |
53 | partition to num. You should never need this option. | 57 | partition to num. You should never need this option. |
54 | Default is 2. | 58 | Default is 2. |
@@ -181,9 +185,8 @@ tested, though several hundred MB have been read and written using | |||
181 | this fs. For a most up-to-date list of bugs please consult | 185 | this fs. For a most up-to-date list of bugs please consult |
182 | fs/affs/Changes. | 186 | fs/affs/Changes. |
183 | 187 | ||
184 | Filenames are truncated to 30 characters without warning (this | 188 | By default, filenames are truncated to 30 characters without warning. |
185 | can be changed by setting the compile-time option AFFS_NO_TRUNCATE | 189 | 'nofilenametruncate' mount option can change that behavior. |
186 | in include/linux/amigaffs.h). | ||
187 | 190 | ||
188 | Case is ignored by the affs in filename matching, but Linux shells | 191 | Case is ignored by the affs in filename matching, but Linux shells |
189 | do care about the case. Example (with /wb being an affs mounted fs): | 192 | do care about the case. Example (with /wb being an affs mounted fs): |
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt index 4c95935cbcf4..aff22113a986 100644 --- a/Documentation/filesystems/autofs4-mount-control.txt +++ b/Documentation/filesystems/autofs4-mount-control.txt | |||
@@ -255,7 +255,7 @@ AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT | |||
255 | 255 | ||
256 | Obtain and release a file descriptor for an autofs managed mount point | 256 | Obtain and release a file descriptor for an autofs managed mount point |
257 | path. The open call requires an initialized struct autofs_dev_ioctl with | 257 | path. The open call requires an initialized struct autofs_dev_ioctl with |
258 | the the path field set and the size field adjusted appropriately as well | 258 | the path field set and the size field adjusted appropriately as well |
259 | as the arg1 field set to the device number of the autofs mount. The | 259 | as the arg1 field set to the device number of the autofs mount. The |
260 | device number can be obtained from the mount options shown in | 260 | device number can be obtained from the mount options shown in |
261 | /proc/mounts. The close call requires an initialized struct | 261 | /proc/mounts. The close call requires an initialized struct |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index b8d284975f0f..25311e113e75 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -122,6 +122,10 @@ disable_ext_identify Disable the extension list configured by mkfs, so f2fs | |||
122 | inline_xattr Enable the inline xattrs feature. | 122 | inline_xattr Enable the inline xattrs feature. |
123 | inline_data Enable the inline data feature: New created small(<~3.4k) | 123 | inline_data Enable the inline data feature: New created small(<~3.4k) |
124 | files can be written into inode block. | 124 | files can be written into inode block. |
125 | flush_merge Merge concurrent cache_flush commands as much as possible | ||
126 | to eliminate redundant command issues. If the underlying | ||
127 | device handles the cache_flush command relatively slowly, | ||
128 | recommend to enable this option. | ||
125 | 129 | ||
126 | ================================================================================ | 130 | ================================================================================ |
127 | DEBUGFS ENTRIES | 131 | DEBUGFS ENTRIES |
@@ -169,9 +173,11 @@ Files in /sys/fs/f2fs/<devname> | |||
169 | 173 | ||
170 | reclaim_segments This parameter controls the number of prefree | 174 | reclaim_segments This parameter controls the number of prefree |
171 | segments to be reclaimed. If the number of prefree | 175 | segments to be reclaimed. If the number of prefree |
172 | segments is larger than this number, f2fs tries to | 176 | segments is larger than the number of segments |
173 | conduct checkpoint to reclaim the prefree segments | 177 | in the proportion to the percentage over total |
174 | to free segments. By default, 100 segments, 200MB. | 178 | volume size, f2fs tries to conduct checkpoint to |
179 | reclaim the prefree segments to free segments. | ||
180 | By default, 5% over total # of segments. | ||
175 | 181 | ||
176 | max_small_discards This parameter controls the number of discard | 182 | max_small_discards This parameter controls the number of discard |
177 | commands that consist small blocks less than 2MB. | 183 | commands that consist small blocks less than 2MB. |
@@ -195,6 +201,17 @@ Files in /sys/fs/f2fs/<devname> | |||
195 | cleaning operations. The default value is 4096 | 201 | cleaning operations. The default value is 4096 |
196 | which covers 8GB block address range. | 202 | which covers 8GB block address range. |
197 | 203 | ||
204 | dir_level This parameter controls the directory level to | ||
205 | support large directory. If a directory has a | ||
206 | number of files, it can reduce the file lookup | ||
207 | latency by increasing this dir_level value. | ||
208 | Otherwise, it needs to decrease this value to | ||
209 | reduce the space overhead. The default value is 0. | ||
210 | |||
211 | ram_thresh This parameter controls the memory footprint used | ||
212 | by free nids and cached nat entries. By default, | ||
213 | 10 is set, which indicates 10 MB / 1 GB RAM. | ||
214 | |||
198 | ================================================================================ | 215 | ================================================================================ |
199 | USAGE | 216 | USAGE |
200 | ================================================================================ | 217 | ================================================================================ |
@@ -444,9 +461,11 @@ The number of blocks and buckets are determined by, | |||
444 | # of blocks in level #n = | | 461 | # of blocks in level #n = | |
445 | `- 4, Otherwise | 462 | `- 4, Otherwise |
446 | 463 | ||
447 | ,- 2^n, if n < MAX_DIR_HASH_DEPTH / 2, | 464 | ,- 2^ (n + dir_level), |
465 | | if n < MAX_DIR_HASH_DEPTH / 2, | ||
448 | # of buckets in level #n = | | 466 | # of buckets in level #n = | |
449 | `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), Otherwise | 467 | `- 2^((MAX_DIR_HASH_DEPTH / 2 + dir_level) - 1), |
468 | Otherwise | ||
450 | 469 | ||
451 | When F2FS finds a file name in a directory, at first a hash value of the file | 470 | When F2FS finds a file name in a directory, at first a hash value of the file |
452 | name is calculated. Then, F2FS scans the hash table in level #0 to find the | 471 | name is calculated. Then, F2FS scans the hash table in level #0 to find the |
diff --git a/Documentation/filesystems/hfsplus.txt b/Documentation/filesystems/hfsplus.txt index af1628a1061c..59f7569fc9ed 100644 --- a/Documentation/filesystems/hfsplus.txt +++ b/Documentation/filesystems/hfsplus.txt | |||
@@ -56,4 +56,4 @@ References | |||
56 | 56 | ||
57 | kernel source: <file:fs/hfsplus> | 57 | kernel source: <file:fs/hfsplus> |
58 | 58 | ||
59 | Apple Technote 1150 http://developer.apple.com/technotes/tn/tn1150.html | 59 | Apple Technote 1150 https://developer.apple.com/legacy/library/technotes/tn/tn1150.html |
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt index 06887d46ccf2..41c3d332acc9 100644 --- a/Documentation/filesystems/nilfs2.txt +++ b/Documentation/filesystems/nilfs2.txt | |||
@@ -25,9 +25,8 @@ available from the following download page. At least "mkfs.nilfs2", | |||
25 | cleaner or garbage collector) are required. Details on the tools are | 25 | cleaner or garbage collector) are required. Details on the tools are |
26 | described in the man pages included in the package. | 26 | described in the man pages included in the package. |
27 | 27 | ||
28 | Project web page: http://www.nilfs.org/en/ | 28 | Project web page: http://nilfs.sourceforge.net/ |
29 | Download page: http://www.nilfs.org/en/download.html | 29 | Download page: http://nilfs.sourceforge.net/en/download.html |
30 | Git tree web page: http://www.nilfs.org/git/ | ||
31 | List info: http://vger.kernel.org/vger-lists.html#linux-nilfs | 30 | List info: http://vger.kernel.org/vger-lists.html#linux-nilfs |
32 | 31 | ||
33 | Caveats | 32 | Caveats |
@@ -111,6 +110,13 @@ Table of NILFS2 specific ioctls | |||
111 | nilfs_resize utilities and by nilfs_cleanerd | 110 | nilfs_resize utilities and by nilfs_cleanerd |
112 | daemon. | 111 | daemon. |
113 | 112 | ||
113 | NILFS_IOCTL_SET_SUINFO Modify segment usage info of requested | ||
114 | segments. This ioctl is used by | ||
115 | nilfs_cleanerd daemon to skip unnecessary | ||
116 | cleaning operation of segments and reduce | ||
117 | performance penalty or wear of flash device | ||
118 | due to redundant move of in-use blocks. | ||
119 | |||
114 | NILFS_IOCTL_GET_SUSTAT Return segment usage statistics. This ioctl | 120 | NILFS_IOCTL_GET_SUSTAT Return segment usage statistics. This ioctl |
115 | is used in lssu, nilfs_resize utilities and | 121 | is used in lssu, nilfs_resize utilities and |
116 | by nilfs_cleanerd daemon. | 122 | by nilfs_cleanerd daemon. |
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index 791af8dac065..61947facfc07 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt | |||
@@ -455,8 +455,6 @@ not have this problem with odd numbers of sectors. | |||
455 | ChangeLog | 455 | ChangeLog |
456 | ========= | 456 | ========= |
457 | 457 | ||
458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. | ||
459 | |||
460 | 2.1.30: | 458 | 2.1.30: |
461 | - Fix writev() (it kept writing the first segment over and over again | 459 | - Fix writev() (it kept writing the first segment over and over again |
462 | instead of moving onto subsequent segments). | 460 | instead of moving onto subsequent segments). |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index fe2b7ae6f962..0f3a1390bf00 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -295,9 +295,9 @@ in the beginning of ->setattr unconditionally. | |||
295 | ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should | 295 | ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should |
296 | be used instead. It gets called whenever the inode is evicted, whether it has | 296 | be used instead. It gets called whenever the inode is evicted, whether it has |
297 | remaining links or not. Caller does *not* evict the pagecache or inode-associated | 297 | remaining links or not. Caller does *not* evict the pagecache or inode-associated |
298 | metadata buffers; getting rid of those is responsibility of method, as it had | 298 | metadata buffers; the method has to use truncate_inode_pages_final() to get rid |
299 | been for ->delete_inode(). Caller makes sure async writeback cannot be running | 299 | of those. Caller makes sure async writeback cannot be running for the inode while |
300 | for the inode while (or after) ->evict_inode() is called. | 300 | (or after) ->evict_inode() is called. |
301 | 301 | ||
302 | ->drop_inode() returns int now; it's called on final iput() with | 302 | ->drop_inode() returns int now; it's called on final iput() with |
303 | inode->i_lock held and it returns true if filesystems wants the inode to be | 303 | inode->i_lock held and it returns true if filesystems wants the inode to be |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index f00bee144add..8b9cd8eb3f91 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1648,18 +1648,21 @@ pids, so one need to either stop or freeze processes being inspected | |||
1648 | if precise results are needed. | 1648 | if precise results are needed. |
1649 | 1649 | ||
1650 | 1650 | ||
1651 | 3.7 /proc/<pid>/fdinfo/<fd> - Information about opened file | 1651 | 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file |
1652 | --------------------------------------------------------------- | 1652 | --------------------------------------------------------------- |
1653 | This file provides information associated with an opened file. The regular | 1653 | This file provides information associated with an opened file. The regular |
1654 | files have at least two fields -- 'pos' and 'flags'. The 'pos' represents | 1654 | files have at least three fields -- 'pos', 'flags' and mnt_id. The 'pos' |
1655 | the current offset of the opened file in decimal form [see lseek(2) for | 1655 | represents the current offset of the opened file in decimal form [see lseek(2) |
1656 | details] and 'flags' denotes the octal O_xxx mask the file has been | 1656 | for details], 'flags' denotes the octal O_xxx mask the file has been |
1657 | created with [see open(2) for details]. | 1657 | created with [see open(2) for details] and 'mnt_id' represents mount ID of |
1658 | the file system containing the opened file [see 3.5 /proc/<pid>/mountinfo | ||
1659 | for details]. | ||
1658 | 1660 | ||
1659 | A typical output is | 1661 | A typical output is |
1660 | 1662 | ||
1661 | pos: 0 | 1663 | pos: 0 |
1662 | flags: 0100002 | 1664 | flags: 0100002 |
1665 | mnt_id: 19 | ||
1663 | 1666 | ||
1664 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags | 1667 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags |
1665 | pair provide additional information particular to the objects they represent. | 1668 | pair provide additional information particular to the objects they represent. |
@@ -1668,6 +1671,7 @@ pair provide additional information particular to the objects they represent. | |||
1668 | ~~~~~~~~~~~~~ | 1671 | ~~~~~~~~~~~~~ |
1669 | pos: 0 | 1672 | pos: 0 |
1670 | flags: 04002 | 1673 | flags: 04002 |
1674 | mnt_id: 9 | ||
1671 | eventfd-count: 5a | 1675 | eventfd-count: 5a |
1672 | 1676 | ||
1673 | where 'eventfd-count' is hex value of a counter. | 1677 | where 'eventfd-count' is hex value of a counter. |
@@ -1676,6 +1680,7 @@ pair provide additional information particular to the objects they represent. | |||
1676 | ~~~~~~~~~~~~~~ | 1680 | ~~~~~~~~~~~~~~ |
1677 | pos: 0 | 1681 | pos: 0 |
1678 | flags: 04002 | 1682 | flags: 04002 |
1683 | mnt_id: 9 | ||
1679 | sigmask: 0000000000000200 | 1684 | sigmask: 0000000000000200 |
1680 | 1685 | ||
1681 | where 'sigmask' is hex value of the signal mask associated | 1686 | where 'sigmask' is hex value of the signal mask associated |
@@ -1685,6 +1690,7 @@ pair provide additional information particular to the objects they represent. | |||
1685 | ~~~~~~~~~~~ | 1690 | ~~~~~~~~~~~ |
1686 | pos: 0 | 1691 | pos: 0 |
1687 | flags: 02 | 1692 | flags: 02 |
1693 | mnt_id: 9 | ||
1688 | tfd: 5 events: 1d data: ffffffffffffffff | 1694 | tfd: 5 events: 1d data: ffffffffffffffff |
1689 | 1695 | ||
1690 | where 'tfd' is a target file descriptor number in decimal form, | 1696 | where 'tfd' is a target file descriptor number in decimal form, |
@@ -1718,6 +1724,7 @@ pair provide additional information particular to the objects they represent. | |||
1718 | 1724 | ||
1719 | pos: 0 | 1725 | pos: 0 |
1720 | flags: 02 | 1726 | flags: 02 |
1727 | mnt_id: 9 | ||
1721 | fanotify flags:10 event-flags:0 | 1728 | fanotify flags:10 event-flags:0 |
1722 | fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003 | 1729 | fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003 |
1723 | fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4 | 1730 | fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4 |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index c53784c119c8..94eb86287bcb 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -347,6 +347,8 @@ struct inode_operations { | |||
347 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); | 347 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); |
348 | int (*rename) (struct inode *, struct dentry *, | 348 | int (*rename) (struct inode *, struct dentry *, |
349 | struct inode *, struct dentry *); | 349 | struct inode *, struct dentry *); |
350 | int (*rename2) (struct inode *, struct dentry *, | ||
351 | struct inode *, struct dentry *, unsigned int); | ||
350 | int (*readlink) (struct dentry *, char __user *,int); | 352 | int (*readlink) (struct dentry *, char __user *,int); |
351 | void * (*follow_link) (struct dentry *, struct nameidata *); | 353 | void * (*follow_link) (struct dentry *, struct nameidata *); |
352 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 354 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
@@ -414,6 +416,20 @@ otherwise noted. | |||
414 | rename: called by the rename(2) system call to rename the object to | 416 | rename: called by the rename(2) system call to rename the object to |
415 | have the parent and name given by the second inode and dentry. | 417 | have the parent and name given by the second inode and dentry. |
416 | 418 | ||
419 | rename2: this has an additional flags argument compared to rename. | ||
420 | If no flags are supported by the filesystem then this method | ||
421 | need not be implemented. If some flags are supported then the | ||
422 | filesystem must return -EINVAL for any unsupported or unknown | ||
423 | flags. Currently the following flags are implemented: | ||
424 | (1) RENAME_NOREPLACE: this flag indicates that if the target | ||
425 | of the rename exists the rename should fail with -EEXIST | ||
426 | instead of replacing the target. The VFS already checks for | ||
427 | existence, so for local filesystems the RENAME_NOREPLACE | ||
428 | implementation is equivalent to plain rename. | ||
429 | (2) RENAME_EXCHANGE: exchange source and target. Both must | ||
430 | exist; this is checked by the VFS. Unlike plain rename, | ||
431 | source and target may be of different type. | ||
432 | |||
417 | readlink: called by the readlink(2) system call. Only required if | 433 | readlink: called by the readlink(2) system call. Only required if |
418 | you want to support reading symbolic links | 434 | you want to support reading symbolic links |
419 | 435 | ||
diff --git a/Documentation/fmc/fmc-write-eeprom.txt b/Documentation/fmc/fmc-write-eeprom.txt index 44a3bc678bf0..e0a9712156aa 100644 --- a/Documentation/fmc/fmc-write-eeprom.txt +++ b/Documentation/fmc/fmc-write-eeprom.txt | |||
@@ -9,7 +9,12 @@ Overwriting the EEPROM is not something you should do daily, and it is | |||
9 | expected to only happen during manufacturing. For this reason, the | 9 | expected to only happen during manufacturing. For this reason, the |
10 | module makes it unlikely for the random user to change a working EEPROM. | 10 | module makes it unlikely for the random user to change a working EEPROM. |
11 | 11 | ||
12 | The module takes the following measures: | 12 | However, since the EEPROM may include application-specific information |
13 | other than the identification, later versions of this packages added | ||
14 | write-support through sysfs. See *note Accessing the EEPROM::. | ||
15 | |||
16 | To avoid damaging the EEPROM content, the module takes the following | ||
17 | measures: | ||
13 | 18 | ||
14 | * It accepts a `file=' argument (within /lib/firmware) and if no | 19 | * It accepts a `file=' argument (within /lib/firmware) and if no |
15 | such argument is received, it doesn't write anything to EEPROM | 20 | such argument is received, it doesn't write anything to EEPROM |
@@ -70,56 +75,24 @@ first time. | |||
70 | [ 132.899872] fake-fmc: Product name: FmcDelay1ns4cha | 75 | [ 132.899872] fake-fmc: Product name: FmcDelay1ns4cha |
71 | 76 | ||
72 | 77 | ||
73 | Writing to the EEPROM | 78 | Accessing the EEPROM |
74 | ===================== | 79 | ===================== |
75 | 80 | ||
76 | Once you have created a binary file for your EEPROM, you can write it | 81 | The bus creates a sysfs binary file called eeprom for each mezzanine it |
77 | to the storage medium using the fmc-write-eeprom (See *note | 82 | knows about: |
78 | fmc-write-eeprom::, while relying on a carrier driver. The procedure | 83 | |
79 | here shown here uses the SPEC driver | 84 | spusa.root# cd /sys/bus/fmc/devices; ls -l */eeprom |
80 | (`http://www.ohwr.org/projects/spec-sw'). | 85 | -r--r--r-- 1 root root 8192 Feb 21 12:30 FmcAdc100m14b4cha-0800/eeprom |
81 | 86 | -r--r--r-- 1 root root 8192 Feb 21 12:30 FmcDelay1ns4cha-0200/eeprom | |
82 | The example assumes no driver is already loaded (actually, I unloaded | 87 | -r--r--r-- 1 root root 8192 Feb 21 12:30 FmcDio5cha-0400/eeprom |
83 | them by hand as everything loads automatically at boot time after you | 88 | |
84 | installed the modules), and shows kernel messages together with | 89 | Everybody can read the files and the superuser can also modify it, but |
85 | commands. Here the prompt is spusa.root# and two SPEC cards are plugged | 90 | the operation may on the carrier driver, if the carrier is unable to |
86 | in the system. | 91 | access the I2C bus. For example, the spec driver can access the bus |
87 | 92 | only with its golden gateware: after a mezzanine driver reprogrammed | |
88 | spusa.root# insmod fmc.ko | 93 | the FPGA with a custom circuit, the carrier is unable to access the |
89 | spusa.root# insmod spec.ko | 94 | EEPROM and returns ENOTSUPP. |
90 | [13972.382818] spec 0000:02:00.0: probe for device 0002:0000 | 95 | |
91 | [13972.392773] spec 0000:02:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes | 96 | An alternative way to write the EEPROM is the mezzanine driver |
92 | [13972.591388] spec 0000:02:00.0: FPGA programming successful | 97 | fmc-write-eeprom (See *note fmc-write-eeprom::), but the procedure is |
93 | [13972.883011] spec 0000:02:00.0: EEPROM has no FRU information | 98 | more complex. |
94 | [13972.888719] spec 0000:02:00.0: No device_id filled, using index | ||
95 | [13972.894676] spec 0000:02:00.0: No mezzanine_name found | ||
96 | [13972.899863] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init | ||
97 | [13972.906578] spec 0000:04:00.0: probe for device 0004:0000 | ||
98 | [13972.916509] spec 0000:04:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes | ||
99 | [13973.115096] spec 0000:04:00.0: FPGA programming successful | ||
100 | [13973.401798] spec 0000:04:00.0: EEPROM has no FRU information | ||
101 | [13973.407474] spec 0000:04:00.0: No device_id filled, using index | ||
102 | [13973.413417] spec 0000:04:00.0: No mezzanine_name found | ||
103 | [13973.418600] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init | ||
104 | spusa.root# ls /sys/bus/fmc/devices | ||
105 | fmc-0000 fmc-0001 | ||
106 | spusa.root# insmod fmc-write-eeprom.ko busid=0x0200 file=fdelay-eeprom.bin | ||
107 | [14103.966259] spec 0000:02:00.0: Matching an generic driver (no ID) | ||
108 | [14103.975519] spec 0000:02:00.0: programming 6155 bytes | ||
109 | [14126.373762] spec 0000:02:00.0: write_eeprom: success | ||
110 | [14126.378770] spec 0000:04:00.0: Matching an generic driver (no ID) | ||
111 | [14126.384903] spec 0000:04:00.0: fmc_write_eeprom: no filename given: not programming | ||
112 | [14126.392600] fmc_write_eeprom: probe of fmc-0001 failed with error -2 | ||
113 | |||
114 | Reading back the EEPROM | ||
115 | ======================= | ||
116 | |||
117 | In order to read back the binary content of the EEPROM of your | ||
118 | mezzanine device, the bus creates a read-only sysfs file called eeprom | ||
119 | for each mezzanine it knows about: | ||
120 | |||
121 | spusa.root# cd /sys/bus/fmc/devices; ls -l */eeprom | ||
122 | -r--r--r-- 1 root root 8192 Apr 9 16:53 FmcDelay1ns4cha-f001/eeprom | ||
123 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f002/eeprom | ||
124 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f003/eeprom | ||
125 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fmc-f004/eeprom | ||
diff --git a/Documentation/futex-requeue-pi.txt b/Documentation/futex-requeue-pi.txt index 9dc1ff4fd536..31b16610c416 100644 --- a/Documentation/futex-requeue-pi.txt +++ b/Documentation/futex-requeue-pi.txt | |||
@@ -67,7 +67,7 @@ pthread_cond_wait_pi(cond, mutex) | |||
67 | lock(cond->__data.__lock); | 67 | lock(cond->__data.__lock); |
68 | } while(...) | 68 | } while(...) |
69 | unlock(cond->__data.__lock); | 69 | unlock(cond->__data.__lock); |
70 | /* the kernel acquired the the mutex for us */ | 70 | /* the kernel acquired the mutex for us */ |
71 | } | 71 | } |
72 | 72 | ||
73 | pthread_cond_broadcast_pi(cond) | 73 | pthread_cond_broadcast_pi(cond) |
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index e42f77d8d4ca..09854fe59307 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt | |||
@@ -154,6 +154,7 @@ raw line value: | |||
154 | void gpiod_set_raw_value(struct gpio_desc *desc, int value) | 154 | void gpiod_set_raw_value(struct gpio_desc *desc, int value) |
155 | int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc) | 155 | int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc) |
156 | void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value) | 156 | void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value) |
157 | int gpiod_direction_output_raw(struct gpio_desc *desc, int value) | ||
157 | 158 | ||
158 | The active-low state of a GPIO can also be queried using the following call: | 159 | The active-low state of a GPIO can also be queried using the following call: |
159 | 160 | ||
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt index 9da0bfa74781..f73cc7b5dc85 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/gpio/driver.txt | |||
@@ -62,6 +62,37 @@ Any debugfs dump method should normally ignore signals which haven't been | |||
62 | requested as GPIOs. They can use gpiochip_is_requested(), which returns either | 62 | requested as GPIOs. They can use gpiochip_is_requested(), which returns either |
63 | NULL or the label associated with that GPIO when it was requested. | 63 | NULL or the label associated with that GPIO when it was requested. |
64 | 64 | ||
65 | |||
66 | GPIO drivers providing IRQs | ||
67 | --------------------------- | ||
68 | It is custom that GPIO drivers (GPIO chips) are also providing interrupts, | ||
69 | most often cascaded off a parent interrupt controller, and in some special | ||
70 | cases the GPIO logic is melded with a SoC's primary interrupt controller. | ||
71 | |||
72 | The IRQ portions of the GPIO block are implemented using an irqchip, using | ||
73 | the header <linux/irq.h>. So basically such a driver is utilizing two sub- | ||
74 | systems simultaneously: gpio and irq. | ||
75 | |||
76 | It is legal for any IRQ consumer to request an IRQ from any irqchip no matter | ||
77 | if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and | ||
78 | irq_chip are orthogonal, and offering their services independent of each | ||
79 | other. | ||
80 | |||
81 | gpiod_to_irq() is just a convenience function to figure out the IRQ for a | ||
82 | certain GPIO line and should not be relied upon to have been called before | ||
83 | the IRQ is used. | ||
84 | |||
85 | So always prepare the hardware and make it ready for action in respective | ||
86 | callbacks from the GPIO and irqchip APIs. Do not rely on gpiod_to_irq() having | ||
87 | been called first. | ||
88 | |||
89 | This orthogonality leads to ambiguities that we need to solve: if there is | ||
90 | competition inside the subsystem which side is using the resource (a certain | ||
91 | GPIO line and register for example) it needs to deny certain operations and | ||
92 | keep track of usage inside of the gpiolib subsystem. This is why the API | ||
93 | below exists. | ||
94 | |||
95 | |||
65 | Locking IRQ usage | 96 | Locking IRQ usage |
66 | ----------------- | 97 | ----------------- |
67 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested | 98 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested |
@@ -73,3 +104,7 @@ This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock | |||
73 | is released: | 104 | is released: |
74 | 105 | ||
75 | void gpiod_unlock_as_irq(struct gpio_desc *desc) | 106 | void gpiod_unlock_as_irq(struct gpio_desc *desc) |
107 | |||
108 | When implementing an irqchip inside a GPIO driver, these two functions should | ||
109 | typically be called in the .startup() and .shutdown() callbacks from the | ||
110 | irqchip. | ||
diff --git a/Documentation/hid/hid-transport.txt b/Documentation/hid/hid-transport.txt new file mode 100644 index 000000000000..3dcba9fd4a3a --- /dev/null +++ b/Documentation/hid/hid-transport.txt | |||
@@ -0,0 +1,317 @@ | |||
1 | HID I/O Transport Drivers | ||
2 | =========================== | ||
3 | |||
4 | The HID subsystem is independent of the underlying transport driver. Initially, | ||
5 | only USB was supported, but other specifications adopted the HID design and | ||
6 | provided new transport drivers. The kernel includes at least support for USB, | ||
7 | Bluetooth, I2C and user-space I/O drivers. | ||
8 | |||
9 | 1) HID Bus | ||
10 | ========== | ||
11 | |||
12 | The HID subsystem is designed as a bus. Any I/O subsystem may provide HID | ||
13 | devices and register them with the HID bus. HID core then loads generic device | ||
14 | drivers on top of it. The transport drivers are responsible of raw data | ||
15 | transport and device setup/management. HID core is responsible of | ||
16 | report-parsing, report interpretation and the user-space API. Device specifics | ||
17 | and quirks are handled by all layers depending on the quirk. | ||
18 | |||
19 | +-----------+ +-----------+ +-----------+ +-----------+ | ||
20 | | Device #1 | | Device #i | | Device #j | | Device #k | | ||
21 | +-----------+ +-----------+ +-----------+ +-----------+ | ||
22 | \\ // \\ // | ||
23 | +------------+ +------------+ | ||
24 | | I/O Driver | | I/O Driver | | ||
25 | +------------+ +------------+ | ||
26 | || || | ||
27 | +------------------+ +------------------+ | ||
28 | | Transport Driver | | Transport Driver | | ||
29 | +------------------+ +------------------+ | ||
30 | \___ ___/ | ||
31 | \ / | ||
32 | +----------------+ | ||
33 | | HID Core | | ||
34 | +----------------+ | ||
35 | / | | \ | ||
36 | / | | \ | ||
37 | ____________/ | | \_________________ | ||
38 | / | | \ | ||
39 | / | | \ | ||
40 | +----------------+ +-----------+ +------------------+ +------------------+ | ||
41 | | Generic Driver | | MT Driver | | Custom Driver #1 | | Custom Driver #2 | | ||
42 | +----------------+ +-----------+ +------------------+ +------------------+ | ||
43 | |||
44 | Example Drivers: | ||
45 | I/O: USB, I2C, Bluetooth-l2cap | ||
46 | Transport: USB-HID, I2C-HID, BT-HIDP | ||
47 | |||
48 | Everything below "HID Core" is simplified in this graph as it is only of | ||
49 | interest to HID device drivers. Transport drivers do not need to know the | ||
50 | specifics. | ||
51 | |||
52 | 1.1) Device Setup | ||
53 | ----------------- | ||
54 | |||
55 | I/O drivers normally provide hotplug detection or device enumeration APIs to the | ||
56 | transport drivers. Transport drivers use this to find any suitable HID device. | ||
57 | They allocate HID device objects and register them with HID core. Transport | ||
58 | drivers are not required to register themselves with HID core. HID core is never | ||
59 | aware of which transport drivers are available and is not interested in it. It | ||
60 | is only interested in devices. | ||
61 | |||
62 | Transport drivers attach a constant "struct hid_ll_driver" object with each | ||
63 | device. Once a device is registered with HID core, the callbacks provided via | ||
64 | this struct are used by HID core to communicate with the device. | ||
65 | |||
66 | Transport drivers are responsible of detecting device failures and unplugging. | ||
67 | HID core will operate a device as long as it is registered regardless of any | ||
68 | device failures. Once transport drivers detect unplug or failure events, they | ||
69 | must unregister the device from HID core and HID core will stop using the | ||
70 | provided callbacks. | ||
71 | |||
72 | 1.2) Transport Driver Requirements | ||
73 | ---------------------------------- | ||
74 | |||
75 | The terms "asynchronous" and "synchronous" in this document describe the | ||
76 | transmission behavior regarding acknowledgements. An asynchronous channel must | ||
77 | not perform any synchronous operations like waiting for acknowledgements or | ||
78 | verifications. Generally, HID calls operating on asynchronous channels must be | ||
79 | running in atomic-context just fine. | ||
80 | On the other hand, synchronous channels can be implemented by the transport | ||
81 | driver in whatever way they like. They might just be the same as asynchronous | ||
82 | channels, but they can also provide acknowledgement reports, automatic | ||
83 | retransmission on failure, etc. in a blocking manner. If such functionality is | ||
84 | required on asynchronous channels, a transport-driver must implement that via | ||
85 | its own worker threads. | ||
86 | |||
87 | HID core requires transport drivers to follow a given design. A Transport | ||
88 | driver must provide two bi-directional I/O channels to each HID device. These | ||
89 | channels must not necessarily be bi-directional in the hardware itself. A | ||
90 | transport driver might just provide 4 uni-directional channels. Or it might | ||
91 | multiplex all four on a single physical channel. However, in this document we | ||
92 | will describe them as two bi-directional channels as they have several | ||
93 | properties in common. | ||
94 | |||
95 | - Interrupt Channel (intr): The intr channel is used for asynchronous data | ||
96 | reports. No management commands or data acknowledgements are sent on this | ||
97 | channel. Any unrequested incoming or outgoing data report must be sent on | ||
98 | this channel and is never acknowledged by the remote side. Devices usually | ||
99 | send their input events on this channel. Outgoing events are normally | ||
100 | not send via intr, except if high throughput is required. | ||
101 | - Control Channel (ctrl): The ctrl channel is used for synchronous requests and | ||
102 | device management. Unrequested data input events must not be sent on this | ||
103 | channel and are normally ignored. Instead, devices only send management | ||
104 | events or answers to host requests on this channel. | ||
105 | The control-channel is used for direct blocking queries to the device | ||
106 | independent of any events on the intr-channel. | ||
107 | Outgoing reports are usually sent on the ctrl channel via synchronous | ||
108 | SET_REPORT requests. | ||
109 | |||
110 | Communication between devices and HID core is mostly done via HID reports. A | ||
111 | report can be of one of three types: | ||
112 | |||
113 | - INPUT Report: Input reports provide data from device to host. This | ||
114 | data may include button events, axis events, battery status or more. This | ||
115 | data is generated by the device and sent to the host with or without | ||
116 | requiring explicit requests. Devices can choose to send data continuously or | ||
117 | only on change. | ||
118 | - OUTPUT Report: Output reports change device states. They are sent from host | ||
119 | to device and may include LED requests, rumble requests or more. Output | ||
120 | reports are never sent from device to host, but a host can retrieve their | ||
121 | current state. | ||
122 | Hosts may choose to send output reports either continuously or only on | ||
123 | change. | ||
124 | - FEATURE Report: Feature reports are used for specific static device features | ||
125 | and never reported spontaneously. A host can read and/or write them to access | ||
126 | data like battery-state or device-settings. | ||
127 | Feature reports are never sent without requests. A host must explicitly set | ||
128 | or retrieve a feature report. This also means, feature reports are never sent | ||
129 | on the intr channel as this channel is asynchronous. | ||
130 | |||
131 | INPUT and OUTPUT reports can be sent as pure data reports on the intr channel. | ||
132 | For INPUT reports this is the usual operational mode. But for OUTPUT reports, | ||
133 | this is rarely done as OUTPUT reports are normally quite scarce. But devices are | ||
134 | free to make excessive use of asynchronous OUTPUT reports (for instance, custom | ||
135 | HID audio speakers make great use of it). | ||
136 | |||
137 | Plain reports must not be sent on the ctrl channel, though. Instead, the ctrl | ||
138 | channel provides synchronous GET/SET_REPORT requests. Plain reports are only | ||
139 | allowed on the intr channel and are the only means of data there. | ||
140 | |||
141 | - GET_REPORT: A GET_REPORT request has a report ID as payload and is sent | ||
142 | from host to device. The device must answer with a data report for the | ||
143 | requested report ID on the ctrl channel as a synchronous acknowledgement. | ||
144 | Only one GET_REPORT request can be pending for each device. This restriction | ||
145 | is enforced by HID core as several transport drivers don't allow multiple | ||
146 | simultaneous GET_REPORT requests. | ||
147 | Note that data reports which are sent as answer to a GET_REPORT request are | ||
148 | not handled as generic device events. That is, if a device does not operate | ||
149 | in continuous data reporting mode, an answer to GET_REPORT does not replace | ||
150 | the raw data report on the intr channel on state change. | ||
151 | GET_REPORT is only used by custom HID device drivers to query device state. | ||
152 | Normally, HID core caches any device state so this request is not necessary | ||
153 | on devices that follow the HID specs except during device initialization to | ||
154 | retrieve the current state. | ||
155 | GET_REPORT requests can be sent for any of the 3 report types and shall | ||
156 | return the current report state of the device. However, OUTPUT reports as | ||
157 | payload may be blocked by the underlying transport driver if the | ||
158 | specification does not allow them. | ||
159 | - SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is | ||
160 | sent from host to device and a device must update it's current report state | ||
161 | according to the given data. Any of the 3 report types can be used. However, | ||
162 | INPUT reports as payload might be blocked by the underlying transport driver | ||
163 | if the specification does not allow them. | ||
164 | A device must answer with a synchronous acknowledgement. However, HID core | ||
165 | does not require transport drivers to forward this acknowledgement to HID | ||
166 | core. | ||
167 | Same as for GET_REPORT, only one SET_REPORT can be pending at a time. This | ||
168 | restriction is enforced by HID core as some transport drivers do not support | ||
169 | multiple synchronous SET_REPORT requests. | ||
170 | |||
171 | Other ctrl-channel requests are supported by USB-HID but are not available | ||
172 | (or deprecated) in most other transport level specifications: | ||
173 | |||
174 | - GET/SET_IDLE: Only used by USB-HID and I2C-HID. | ||
175 | - GET/SET_PROTOCOL: Not used by HID core. | ||
176 | - RESET: Used by I2C-HID, not hooked up in HID core. | ||
177 | - SET_POWER: Used by I2C-HID, not hooked up in HID core. | ||
178 | |||
179 | 2) HID API | ||
180 | ========== | ||
181 | |||
182 | 2.1) Initialization | ||
183 | ------------------- | ||
184 | |||
185 | Transport drivers normally use the following procedure to register a new device | ||
186 | with HID core: | ||
187 | |||
188 | struct hid_device *hid; | ||
189 | int ret; | ||
190 | |||
191 | hid = hid_allocate_device(); | ||
192 | if (IS_ERR(hid)) { | ||
193 | ret = PTR_ERR(hid); | ||
194 | goto err_<...>; | ||
195 | } | ||
196 | |||
197 | strlcpy(hid->name, <device-name-src>, 127); | ||
198 | strlcpy(hid->phys, <device-phys-src>, 63); | ||
199 | strlcpy(hid->uniq, <device-uniq-src>, 63); | ||
200 | |||
201 | hid->ll_driver = &custom_ll_driver; | ||
202 | hid->bus = <device-bus>; | ||
203 | hid->vendor = <device-vendor>; | ||
204 | hid->product = <device-product>; | ||
205 | hid->version = <device-version>; | ||
206 | hid->country = <device-country>; | ||
207 | hid->dev.parent = <pointer-to-parent-device>; | ||
208 | hid->driver_data = <transport-driver-data-field>; | ||
209 | |||
210 | ret = hid_add_device(hid); | ||
211 | if (ret) | ||
212 | goto err_<...>; | ||
213 | |||
214 | Once hid_add_device() is entered, HID core might use the callbacks provided in | ||
215 | "custom_ll_driver". Note that fields like "country" can be ignored by underlying | ||
216 | transport-drivers if not supported. | ||
217 | |||
218 | To unregister a device, use: | ||
219 | |||
220 | hid_destroy_device(hid); | ||
221 | |||
222 | Once hid_destroy_device() returns, HID core will no longer make use of any | ||
223 | driver callbacks. | ||
224 | |||
225 | 2.2) hid_ll_driver operations | ||
226 | ----------------------------- | ||
227 | |||
228 | The available HID callbacks are: | ||
229 | - int (*start) (struct hid_device *hdev) | ||
230 | Called from HID device drivers once they want to use the device. Transport | ||
231 | drivers can choose to setup their device in this callback. However, normally | ||
232 | devices are already set up before transport drivers register them to HID core | ||
233 | so this is mostly only used by USB-HID. | ||
234 | |||
235 | - void (*stop) (struct hid_device *hdev) | ||
236 | Called from HID device drivers once they are done with a device. Transport | ||
237 | drivers can free any buffers and deinitialize the device. But note that | ||
238 | ->start() might be called again if another HID device driver is loaded on the | ||
239 | device. | ||
240 | Transport drivers are free to ignore it and deinitialize devices after they | ||
241 | destroyed them via hid_destroy_device(). | ||
242 | |||
243 | - int (*open) (struct hid_device *hdev) | ||
244 | Called from HID device drivers once they are interested in data reports. | ||
245 | Usually, while user-space didn't open any input API/etc., device drivers are | ||
246 | not interested in device data and transport drivers can put devices asleep. | ||
247 | However, once ->open() is called, transport drivers must be ready for I/O. | ||
248 | ->open() calls are nested for each client that opens the HID device. | ||
249 | |||
250 | - void (*close) (struct hid_device *hdev) | ||
251 | Called from HID device drivers after ->open() was called but they are no | ||
252 | longer interested in device reports. (Usually if user-space closed any input | ||
253 | devices of the driver). | ||
254 | Transport drivers can put devices asleep and terminate any I/O of all | ||
255 | ->open() calls have been followed by a ->close() call. However, ->start() may | ||
256 | be called again if the device driver is interested in input reports again. | ||
257 | |||
258 | - int (*parse) (struct hid_device *hdev) | ||
259 | Called once during device setup after ->start() has been called. Transport | ||
260 | drivers must read the HID report-descriptor from the device and tell HID core | ||
261 | about it via hid_parse_report(). | ||
262 | |||
263 | - int (*power) (struct hid_device *hdev, int level) | ||
264 | Called by HID core to give PM hints to transport drivers. Usually this is | ||
265 | analogical to the ->open() and ->close() hints and redundant. | ||
266 | |||
267 | - void (*request) (struct hid_device *hdev, struct hid_report *report, | ||
268 | int reqtype) | ||
269 | Send an HID request on the ctrl channel. "report" contains the report that | ||
270 | should be sent and "reqtype" the request type. Request-type can be | ||
271 | HID_REQ_SET_REPORT or HID_REQ_GET_REPORT. | ||
272 | This callback is optional. If not provided, HID core will assemble a raw | ||
273 | report following the HID specs and send it via the ->raw_request() callback. | ||
274 | The transport driver is free to implement this asynchronously. | ||
275 | |||
276 | - int (*wait) (struct hid_device *hdev) | ||
277 | Used by HID core before calling ->request() again. A transport driver can use | ||
278 | it to wait for any pending requests to complete if only one request is | ||
279 | allowed at a time. | ||
280 | |||
281 | - int (*raw_request) (struct hid_device *hdev, unsigned char reportnum, | ||
282 | __u8 *buf, size_t count, unsigned char rtype, | ||
283 | int reqtype) | ||
284 | Same as ->request() but provides the report as raw buffer. This request shall | ||
285 | be synchronous. A transport driver must not use ->wait() to complete such | ||
286 | requests. This request is mandatory and hid core will reject the device if | ||
287 | it is missing. | ||
288 | |||
289 | - int (*output_report) (struct hid_device *hdev, __u8 *buf, size_t len) | ||
290 | Send raw output report via intr channel. Used by some HID device drivers | ||
291 | which require high throughput for outgoing requests on the intr channel. This | ||
292 | must not cause SET_REPORT calls! This must be implemented as asynchronous | ||
293 | output report on the intr channel! | ||
294 | |||
295 | - int (*idle) (struct hid_device *hdev, int report, int idle, int reqtype) | ||
296 | Perform SET/GET_IDLE request. Only used by USB-HID, do not implement! | ||
297 | |||
298 | 2.3) Data Path | ||
299 | -------------- | ||
300 | |||
301 | Transport drivers are responsible of reading data from I/O devices. They must | ||
302 | handle any I/O-related state-tracking themselves. HID core does not implement | ||
303 | protocol handshakes or other management commands which can be required by the | ||
304 | given HID transport specification. | ||
305 | |||
306 | Every raw data packet read from a device must be fed into HID core via | ||
307 | hid_input_report(). You must specify the channel-type (intr or ctrl) and report | ||
308 | type (input/output/feature). Under normal conditions, only input reports are | ||
309 | provided via this API. | ||
310 | |||
311 | Responses to GET_REPORT requests via ->request() must also be provided via this | ||
312 | API. Responses to ->raw_request() are synchronous and must be intercepted by the | ||
313 | transport driver and not passed to hid_input_report(). | ||
314 | Acknowledgements to SET_REPORT requests are not of interest to HID core. | ||
315 | |||
316 | ---------------------------------------------------- | ||
317 | Written 2013, David Herrmann <dh.herrmann@gmail.com> | ||
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt index dc35a2b75eee..ee6593608c8e 100644 --- a/Documentation/hid/uhid.txt +++ b/Documentation/hid/uhid.txt | |||
@@ -93,6 +93,11 @@ the request was handled successfully. | |||
93 | event to the kernel. The payload is of type struct uhid_create_req and | 93 | event to the kernel. The payload is of type struct uhid_create_req and |
94 | contains information about your device. You can start I/O now. | 94 | contains information about your device. You can start I/O now. |
95 | 95 | ||
96 | UHID_CREATE2: | ||
97 | Same as UHID_CREATE, but the HID report descriptor data (rd_data) is an array | ||
98 | inside struct uhid_create2_req, instead of a pointer to a separate array. | ||
99 | Enables use from languages that don't support pointers, e.g. Python. | ||
100 | |||
96 | UHID_DESTROY: | 101 | UHID_DESTROY: |
97 | This destroys the internal HID device. No further I/O will be accepted. There | 102 | This destroys the internal HID device. No further I/O will be accepted. There |
98 | may still be pending messages that you can receive with read() but no further | 103 | may still be pending messages that you can receive with read() but no further |
@@ -105,6 +110,12 @@ the request was handled successfully. | |||
105 | contains a data-payload. This is the raw data that you read from your device. | 110 | contains a data-payload. This is the raw data that you read from your device. |
106 | The kernel will parse the HID reports and react on it. | 111 | The kernel will parse the HID reports and react on it. |
107 | 112 | ||
113 | UHID_INPUT2: | ||
114 | Same as UHID_INPUT, but the data array is the last field of uhid_input2_req. | ||
115 | Enables userspace to write only the required bytes to kernel (ev.type + | ||
116 | ev.u.input2.size + the part of the data array that matters), instead of | ||
117 | the entire struct uhid_input2_req. | ||
118 | |||
108 | UHID_FEATURE_ANSWER: | 119 | UHID_FEATURE_ANSWER: |
109 | If you receive a UHID_FEATURE request you must answer with this request. You | 120 | If you receive a UHID_FEATURE request you must answer with this request. You |
110 | must copy the "id" field from the request into the answer. Set the "err" field | 121 | must copy the "id" field from the request into the answer. Set the "err" field |
diff --git a/Documentation/hwmon/adc128d818 b/Documentation/hwmon/adc128d818 new file mode 100644 index 000000000000..39c95004dabc --- /dev/null +++ b/Documentation/hwmon/adc128d818 | |||
@@ -0,0 +1,47 @@ | |||
1 | Kernel driver adc128d818 | ||
2 | ======================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Texas Instruments ADC818D818 | ||
6 | Prefix: 'adc818d818' | ||
7 | Addresses scanned: I2C 0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f | ||
8 | Datasheet: Publicly available at the TI website | ||
9 | http://www.ti.com/ | ||
10 | |||
11 | Author: Guenter Roeck | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | This driver implements support for the Texas Instruments ADC128D818. | ||
17 | It is described as 'ADC System Monitor with Temperature Sensor'. | ||
18 | |||
19 | The ADC128D818 implements one temperature sensor and seven voltage sensors. | ||
20 | |||
21 | Temperatures are measured in degrees Celsius. There is one set of limits. | ||
22 | When the HOT Temperature Limit is crossed, this will cause an alarm that will | ||
23 | be reasserted until the temperature drops below the HOT Hysteresis. | ||
24 | Measurements are guaranteed between -55 and +125 degrees. The temperature | ||
25 | measurement has a resolution of 0.5 degrees; the limits have a resolution | ||
26 | of 1 degree. | ||
27 | |||
28 | Voltage sensors (also known as IN sensors) report their values in volts. | ||
29 | An alarm is triggered if the voltage has crossed a programmable minimum | ||
30 | or maximum limit. Note that minimum in this case always means 'closest to | ||
31 | zero'; this is important for negative voltage measurements. All voltage | ||
32 | inputs can measure voltages between 0 and 2.55 volts, with a resolution | ||
33 | of 0.625 mV. | ||
34 | |||
35 | If an alarm triggers, it will remain triggered until the hardware register | ||
36 | is read at least once. This means that the cause for the alarm may | ||
37 | already have disappeared by the time the alarm is read. The driver | ||
38 | caches the alarm status for each sensor until it is at least reported | ||
39 | once, to ensure that alarms are reported to user space. | ||
40 | |||
41 | The ADC128D818 only updates its values approximately once per second; | ||
42 | reading it more often will do no harm, but will return 'old' values. | ||
43 | |||
44 | In addition to the scanned address list, the chip can also be configured for | ||
45 | addresses 0x35 to 0x37. Those addresses are not scanned. You have to instantiate | ||
46 | the driver explicitly if the chip is configured for any of those addresses in | ||
47 | your system. | ||
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 0c1635082c99..fe80e9adebfa 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -2,7 +2,7 @@ Kernel driver it87 | |||
2 | ================== | 2 | ================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * IT8603E | 5 | * IT8603E/IT8623E |
6 | Prefix: 'it8603' | 6 | Prefix: 'it8603' |
7 | Addresses scanned: from Super I/O config space (8 I/O ports) | 7 | Addresses scanned: from Super I/O config space (8 I/O ports) |
8 | Datasheet: Not publicly available | 8 | Datasheet: Not publicly available |
@@ -94,9 +94,9 @@ motherboard models. | |||
94 | Description | 94 | Description |
95 | ----------- | 95 | ----------- |
96 | 96 | ||
97 | This driver implements support for the IT8603E, IT8705F, IT8712F, IT8716F, | 97 | This driver implements support for the IT8603E, IT8623E, IT8705F, IT8712F, |
98 | IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, IT8772E, | 98 | IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, |
99 | IT8782F, IT8783E/F, and SiS950 chips. | 99 | IT8772E, IT8782F, IT8783E/F, and SiS950 chips. |
100 | 100 | ||
101 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, | 101 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, |
102 | joysticks and other miscellaneous stuff. For hardware monitoring, they | 102 | joysticks and other miscellaneous stuff. For hardware monitoring, they |
@@ -133,7 +133,7 @@ to userspace applications. | |||
133 | The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F, | 133 | The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F, |
134 | until a datasheet becomes available (hopefully.) | 134 | until a datasheet becomes available (hopefully.) |
135 | 135 | ||
136 | The IT8603E is a custom design, hardware monitoring part is similar to | 136 | The IT8603E/IT8623E is a custom design, hardware monitoring part is similar to |
137 | IT8728F. It only supports 16-bit fan mode, the full speed mode of the | 137 | IT8728F. It only supports 16-bit fan mode, the full speed mode of the |
138 | fan is not supported (value 0 of pwmX_enable). | 138 | fan is not supported (value 0 of pwmX_enable). |
139 | 139 | ||
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp index 4dfdc8f83633..ee6d30ec1522 100644 --- a/Documentation/hwmon/k10temp +++ b/Documentation/hwmon/k10temp | |||
@@ -11,8 +11,8 @@ Supported chips: | |||
11 | Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) | 11 | Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) |
12 | * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) | 12 | * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) |
13 | * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) | 13 | * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) |
14 | * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity" | 14 | * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity", "Kaveri" |
15 | * AMD Family 16h processors: "Kabini" | 15 | * AMD Family 16h processors: "Kabini", "Mullins" |
16 | 16 | ||
17 | Prefix: 'k10temp' | 17 | Prefix: 'k10temp' |
18 | Addresses scanned: PCI space | 18 | Addresses scanned: PCI space |
@@ -46,7 +46,7 @@ Description | |||
46 | ----------- | 46 | ----------- |
47 | 47 | ||
48 | This driver permits reading of the internal temperature sensor of AMD | 48 | This driver permits reading of the internal temperature sensor of AMD |
49 | Family 10h/11h/12h/14h/15h processors. | 49 | Family 10h/11h/12h/14h/15h/16h processors. |
50 | 50 | ||
51 | All these processors have a sensor, but on those for Socket F or AM2+, | 51 | All these processors have a sensor, but on those for Socket F or AM2+, |
52 | the sensor may return inconsistent values (erratum 319). The driver | 52 | the sensor may return inconsistent values (erratum 319). The driver |
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245 index cbd8aeab7124..77eaf2812d25 100644 --- a/Documentation/hwmon/lm95245 +++ b/Documentation/hwmon/lm95245 | |||
@@ -24,8 +24,12 @@ is given within a range of -127 to +127.875 degrees. Remote temperatures are | |||
24 | given within a range of -127 to +255 degrees. Resolution depends on | 24 | given within a range of -127 to +255 degrees. Resolution depends on |
25 | temperature input and range. | 25 | temperature input and range. |
26 | 26 | ||
27 | Each sensor has its own critical limit, but the hysteresis is common to all | 27 | Each sensor has its own critical limit. Additionally, there is a relative |
28 | two channels. | 28 | hysteresis value common to both critical limits. To make life easier to |
29 | user-space applications, two absolute values are exported, one for each | ||
30 | channel, but these values are of course linked. Only the local hysteresis | ||
31 | can be set from user-space, and the same delta applies to the remote | ||
32 | hysteresis. | ||
29 | 33 | ||
30 | The lm95245 driver can change its update interval to a fixed set of values. | 34 | The lm95245 driver can change its update interval to a fixed set of values. |
31 | It will round up to the next selectable interval. See the datasheet for exact | 35 | It will round up to the next selectable interval. See the datasheet for exact |
diff --git a/Documentation/hwmon/ltc2945 b/Documentation/hwmon/ltc2945 new file mode 100644 index 000000000000..f8d0f7f19adb --- /dev/null +++ b/Documentation/hwmon/ltc2945 | |||
@@ -0,0 +1,84 @@ | |||
1 | Kernel driver ltc2945 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Linear Technology LTC2945 | ||
6 | Prefix: 'ltc2945' | ||
7 | Addresses scanned: - | ||
8 | Datasheet: | ||
9 | http://cds.linear.com/docs/en/datasheet/2945fa.pdf | ||
10 | |||
11 | Author: Guenter Roeck <linux@roeck-us.net> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The LTC2945 is a rail-to-rail system monitor that measures current, voltage, | ||
18 | and power consumption. | ||
19 | |||
20 | |||
21 | Usage Notes | ||
22 | ----------- | ||
23 | |||
24 | This driver does not probe for LTC2945 devices, since there is no register | ||
25 | which can be safely used to identify the chip. You will have to instantiate | ||
26 | the devices explicitly. | ||
27 | |||
28 | Example: the following will load the driver for an LTC2945 at address 0x10 | ||
29 | on I2C bus #1: | ||
30 | $ modprobe ltc2945 | ||
31 | $ echo ltc2945 0x10 > /sys/bus/i2c/devices/i2c-1/new_device | ||
32 | |||
33 | |||
34 | Sysfs entries | ||
35 | ------------- | ||
36 | |||
37 | Voltage readings provided by this driver are reported as obtained from the ADC | ||
38 | registers. If a set of voltage divider resistors is installed, calculate the | ||
39 | real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the | ||
40 | value of the divider resistor against the measured voltage and R2 is the value | ||
41 | of the divider resistor against Ground. | ||
42 | |||
43 | Current reading provided by this driver is reported as obtained from the ADC | ||
44 | Current Sense register. The reported value assumes that a 1 mOhm sense resistor | ||
45 | is installed. If a different sense resistor is installed, calculate the real | ||
46 | current by dividing the reported value by the sense resistor value in mOhm. | ||
47 | |||
48 | in1_input VIN voltage (mV). Voltage is measured either at | ||
49 | SENSE+ or VDD pin depending on chip configuration. | ||
50 | in1_min Undervoltage threshold | ||
51 | in1_max Overvoltage threshold | ||
52 | in1_lowest Lowest measured voltage | ||
53 | in1_highest Highest measured voltage | ||
54 | in1_reset_history Write 1 to reset in1 history | ||
55 | in1_min_alarm Undervoltage alarm | ||
56 | in1_max_alarm Overvoltage alarm | ||
57 | |||
58 | in2_input ADIN voltage (mV) | ||
59 | in2_min Undervoltage threshold | ||
60 | in2_max Overvoltage threshold | ||
61 | in2_lowest Lowest measured voltage | ||
62 | in2_highest Highest measured voltage | ||
63 | in2_reset_history Write 1 to reset in2 history | ||
64 | in2_min_alarm Undervoltage alarm | ||
65 | in2_max_alarm Overvoltage alarm | ||
66 | |||
67 | curr1_input SENSE current (mA) | ||
68 | curr1_min Undercurrent threshold | ||
69 | curr1_max Overcurrent threshold | ||
70 | curr1_lowest Lowest measured current | ||
71 | curr1_highest Highest measured current | ||
72 | curr1_reset_history Write 1 to reset curr1 history | ||
73 | curr1_min_alarm Undercurrent alarm | ||
74 | curr1_max_alarm Overcurrent alarm | ||
75 | |||
76 | power1_input Power (in uW). Power is calculated based on SENSE+/VDD | ||
77 | voltage or ADIN voltage depending on chip configuration. | ||
78 | power1_min Low lower threshold | ||
79 | power1_max High power threshold | ||
80 | power1_input_lowest Historical minimum power use | ||
81 | power1_input_highest Historical maximum power use | ||
82 | power1_reset_history Write 1 to reset power1 history | ||
83 | power1_min_alarm Low power alarm | ||
84 | power1_max_alarm High power alarm | ||
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978 index a0546fc42273..686c078bb0e0 100644 --- a/Documentation/hwmon/ltc2978 +++ b/Documentation/hwmon/ltc2978 | |||
@@ -23,6 +23,10 @@ Supported chips: | |||
23 | Prefix: 'ltc3883' | 23 | Prefix: 'ltc3883' |
24 | Addresses scanned: - | 24 | Addresses scanned: - |
25 | Datasheet: http://www.linear.com/product/ltc3883 | 25 | Datasheet: http://www.linear.com/product/ltc3883 |
26 | * Linear Technology LTM4676 | ||
27 | Prefix: 'ltm4676' | ||
28 | Addresses scanned: - | ||
29 | Datasheet: http://www.linear.com/product/ltm4676 | ||
26 | 30 | ||
27 | Author: Guenter Roeck <linux@roeck-us.net> | 31 | Author: Guenter Roeck <linux@roeck-us.net> |
28 | 32 | ||
@@ -33,7 +37,8 @@ Description | |||
33 | LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply | 37 | LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply |
34 | monitor. LTC2977 is a pin compatible replacement for LTC2978. LTC3880 is a dual | 38 | monitor. LTC2977 is a pin compatible replacement for LTC2978. LTC3880 is a dual |
35 | output poly-phase step-down DC/DC controller. LTC3883 is a single phase | 39 | output poly-phase step-down DC/DC controller. LTC3883 is a single phase |
36 | step-down DC/DC controller. | 40 | step-down DC/DC controller. LTM4676 is a dual 13A or single 26A uModule |
41 | regulator. | ||
37 | 42 | ||
38 | 43 | ||
39 | Usage Notes | 44 | Usage Notes |
@@ -75,7 +80,7 @@ in[N]_label "vout[1-8]". | |||
75 | LTC2974: N=2-5 | 80 | LTC2974: N=2-5 |
76 | LTC2977: N=2-9 | 81 | LTC2977: N=2-9 |
77 | LTC2978: N=2-9 | 82 | LTC2978: N=2-9 |
78 | LTC3880: N=2-3 | 83 | LTC3880, LTM4676: N=2-3 |
79 | LTC3883: N=2 | 84 | LTC3883: N=2 |
80 | in[N]_input Measured output voltage. | 85 | in[N]_input Measured output voltage. |
81 | in[N]_min Minimum output voltage. | 86 | in[N]_min Minimum output voltage. |
@@ -95,7 +100,7 @@ temp[N]_input Measured temperature. | |||
95 | and temp5 reports the chip temperature. | 100 | and temp5 reports the chip temperature. |
96 | On LTC2977 and LTC2978, only one temperature measurement | 101 | On LTC2977 and LTC2978, only one temperature measurement |
97 | is supported and reports the chip temperature. | 102 | is supported and reports the chip temperature. |
98 | On LTC3880, temp1 and temp2 report external | 103 | On LTC3880 and LTM4676, temp1 and temp2 report external |
99 | temperatures, and temp3 reports the chip temperature. | 104 | temperatures, and temp3 reports the chip temperature. |
100 | On LTC3883, temp1 reports an external temperature, | 105 | On LTC3883, temp1 reports an external temperature, |
101 | and temp2 reports the chip temperature. | 106 | and temp2 reports the chip temperature. |
@@ -123,11 +128,11 @@ power[N]_label "pout[1-4]". | |||
123 | LTC2974: N=1-4 | 128 | LTC2974: N=1-4 |
124 | LTC2977: Not supported | 129 | LTC2977: Not supported |
125 | LTC2978: Not supported | 130 | LTC2978: Not supported |
126 | LTC3880: N=1-2 | 131 | LTC3880, LTM4676: N=1-2 |
127 | LTC3883: N=2 | 132 | LTC3883: N=2 |
128 | power[N]_input Measured output power. | 133 | power[N]_input Measured output power. |
129 | 134 | ||
130 | curr1_label "iin". LTC3880 and LTC3883 only. | 135 | curr1_label "iin". LTC3880, LTC3883, and LTM4676 only. |
131 | curr1_input Measured input current. | 136 | curr1_input Measured input current. |
132 | curr1_max Maximum input current. | 137 | curr1_max Maximum input current. |
133 | curr1_max_alarm Input current high alarm. | 138 | curr1_max_alarm Input current high alarm. |
@@ -138,7 +143,7 @@ curr[N]_label "iout[1-4]". | |||
138 | LTC2974: N=1-4 | 143 | LTC2974: N=1-4 |
139 | LTC2977: not supported | 144 | LTC2977: not supported |
140 | LTC2978: not supported | 145 | LTC2978: not supported |
141 | LTC3880: N=2-3 | 146 | LTC3880, LTM4676: N=2-3 |
142 | LTC3883: N=2 | 147 | LTC3883: N=2 |
143 | curr[N]_input Measured output current. | 148 | curr[N]_input Measured output current. |
144 | curr[N]_max Maximum output current. | 149 | curr[N]_max Maximum output current. |
diff --git a/Documentation/hwmon/ltc4260 b/Documentation/hwmon/ltc4260 new file mode 100644 index 000000000000..c4ff4ad998b2 --- /dev/null +++ b/Documentation/hwmon/ltc4260 | |||
@@ -0,0 +1,56 @@ | |||
1 | Kernel driver ltc4260 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Linear Technology LTC4260 | ||
6 | Prefix: 'ltc4260' | ||
7 | Addresses scanned: - | ||
8 | Datasheet: | ||
9 | http://cds.linear.com/docs/en/datasheet/4260fc.pdf | ||
10 | |||
11 | Author: Guenter Roeck <linux@roeck-us.net> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The LTC4260 Hot Swap controller allows a board to be safely inserted | ||
18 | and removed from a live backplane. | ||
19 | |||
20 | |||
21 | Usage Notes | ||
22 | ----------- | ||
23 | |||
24 | This driver does not probe for LTC4260 devices, since there is no register | ||
25 | which can be safely used to identify the chip. You will have to instantiate | ||
26 | the devices explicitly. | ||
27 | |||
28 | Example: the following will load the driver for an LTC4260 at address 0x10 | ||
29 | on I2C bus #1: | ||
30 | $ modprobe ltc4260 | ||
31 | $ echo ltc4260 0x10 > /sys/bus/i2c/devices/i2c-1/new_device | ||
32 | |||
33 | |||
34 | Sysfs entries | ||
35 | ------------- | ||
36 | |||
37 | Voltage readings provided by this driver are reported as obtained from the ADC | ||
38 | registers. If a set of voltage divider resistors is installed, calculate the | ||
39 | real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the | ||
40 | value of the divider resistor against the measured voltage and R2 is the value | ||
41 | of the divider resistor against Ground. | ||
42 | |||
43 | Current reading provided by this driver is reported as obtained from the ADC | ||
44 | Current Sense register. The reported value assumes that a 1 mOhm sense resistor | ||
45 | is installed. If a different sense resistor is installed, calculate the real | ||
46 | current by dividing the reported value by the sense resistor value in mOhm. | ||
47 | |||
48 | in1_input SOURCE voltage (mV) | ||
49 | in1_min_alarm Undervoltage alarm | ||
50 | in1_max_alarm Overvoltage alarm | ||
51 | |||
52 | in2_input ADIN voltage (mV) | ||
53 | in2_alarm Power bad alarm | ||
54 | |||
55 | curr1_input SENSE current (mA) | ||
56 | curr1_alarm SENSE overcurrent alarm | ||
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index de139b18184a..7b4f59c09ee2 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -372,7 +372,7 @@ simple scheme, which is compatible with earlier usage, is: | |||
372 | 372 | ||
373 | Rationale: We have no information about the orientation of the touching | 373 | Rationale: We have no information about the orientation of the touching |
374 | ellipse, so approximate it with an inscribed circle instead. The tool | 374 | ellipse, so approximate it with an inscribed circle instead. The tool |
375 | ellipse should align with the the vector (T - C), so the diameter must | 375 | ellipse should align with the vector (T - C), so the diameter must |
376 | increase with distance(T, C). Finally, assume that the touch diameter is | 376 | increase with distance(T, C). Finally, assume that the touch diameter is |
377 | equal to the tool thickness, and we arrive at the formulas above. | 377 | equal to the tool thickness, and we arrive at the formulas above. |
378 | 378 | ||
diff --git a/Documentation/irqflags-tracing.txt b/Documentation/irqflags-tracing.txt index 67aa71e73035..f6da05670e16 100644 --- a/Documentation/irqflags-tracing.txt +++ b/Documentation/irqflags-tracing.txt | |||
@@ -22,13 +22,6 @@ rather straightforward and risk-free manner. | |||
22 | Architectures that want to support this need to do a couple of | 22 | Architectures that want to support this need to do a couple of |
23 | code-organizational changes first: | 23 | code-organizational changes first: |
24 | 24 | ||
25 | - move their irq-flags manipulation code from their asm/system.h header | ||
26 | to asm/irqflags.h | ||
27 | |||
28 | - rename local_irq_disable()/etc to raw_local_irq_disable()/etc. so that | ||
29 | the linux/irqflags.h code can inject callbacks and can construct the | ||
30 | real local_irq_disable()/etc APIs. | ||
31 | |||
32 | - add and enable TRACE_IRQFLAGS_SUPPORT in their arch level Kconfig file | 25 | - add and enable TRACE_IRQFLAGS_SUPPORT in their arch level Kconfig file |
33 | 26 | ||
34 | and then a couple of functional changes are needed as well to implement | 27 | and then a couple of functional changes are needed as well to implement |
diff --git a/Documentation/ja_JP/SubmittingPatches b/Documentation/ja_JP/SubmittingPatches index 97f78dd0c085..5d6ae639bfa0 100644 --- a/Documentation/ja_JP/SubmittingPatches +++ b/Documentation/ja_JP/SubmittingPatches | |||
@@ -98,11 +98,6 @@ dontdiff ファイルには Linux カーネルのビルドプロセスの過程 | |||
98 | Quilt: | 98 | Quilt: |
99 | http://savannah.nongnu.org/projects/quilt | 99 | http://savannah.nongnu.org/projects/quilt |
100 | 100 | ||
101 | Andrew Morton's patch scripts: | ||
102 | http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz | ||
103 | このリンクの先のスクリプトの代わりとして、quilt がパッチマネジメント | ||
104 | ツールとして推奨されています(上のリンクを見てください)。 | ||
105 | |||
106 | 2) パッチに対する説明 | 101 | 2) パッチに対する説明 |
107 | 102 | ||
108 | パッチの中の変更点に対する技術的な詳細について説明してください。 | 103 | パッチの中の変更点に対する技術的な詳細について説明してください。 |
@@ -695,7 +690,7 @@ gcc においては、マクロと同じくらい軽いです。 | |||
695 | ---------------------- | 690 | ---------------------- |
696 | 691 | ||
697 | Andrew Morton, "The perfect patch" (tpp). | 692 | Andrew Morton, "The perfect patch" (tpp). |
698 | <http://userweb.kernel.org/~akpm/stuff/tpp.txt> | 693 | <http://www.ozlabs.org/~akpm/stuff/tpp.txt> |
699 | 694 | ||
700 | Jeff Garzik, "Linux kernel patch submission format". | 695 | Jeff Garzik, "Linux kernel patch submission format". |
701 | <http://linux.yyz.us/patch-format.html> | 696 | <http://linux.yyz.us/patch-format.html> |
@@ -707,7 +702,7 @@ Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". | |||
707 | <http://www.kroah.com/log/2006/01/11/> | 702 | <http://www.kroah.com/log/2006/01/11/> |
708 | 703 | ||
709 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! | 704 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! |
710 | <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> | 705 | <https://lkml.org/lkml/2005/7/11/336> |
711 | 706 | ||
712 | Kernel Documentation/CodingStyle: | 707 | Kernel Documentation/CodingStyle: |
713 | <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle> | 708 | <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle> |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index c420676c6fe3..350f733bf2c7 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -157,6 +157,10 @@ applicable everywhere (see syntax). | |||
157 | to the build environment (if this is desired, it can be done via | 157 | to the build environment (if this is desired, it can be done via |
158 | another symbol). | 158 | another symbol). |
159 | 159 | ||
160 | - "allnoconfig_y" | ||
161 | This declares the symbol as one that should have the value y when | ||
162 | using "allnoconfig". Used for symbols that hide other symbols. | ||
163 | |||
160 | Menu dependencies | 164 | Menu dependencies |
161 | ----------------- | 165 | ----------------- |
162 | 166 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 7116fda7077f..b6c67d592be5 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -229,8 +229,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
229 | use by PCI | 229 | use by PCI |
230 | Format: <irq>,<irq>... | 230 | Format: <irq>,<irq>... |
231 | 231 | ||
232 | acpi_no_auto_serialize [HW,ACPI] | ||
233 | Disable auto-serialization of AML methods | ||
234 | AML control methods that contain the opcodes to create | ||
235 | named objects will be marked as "Serialized" by the | ||
236 | auto-serialization feature. | ||
237 | This feature is enabled by default. | ||
238 | This option allows to turn off the feature. | ||
239 | |||
232 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT | 240 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT |
233 | 241 | ||
242 | acpica_no_return_repair [HW, ACPI] | ||
243 | Disable AML predefined validation mechanism | ||
244 | This mechanism can repair the evaluation result to make | ||
245 | the return objects more ACPI specification compliant. | ||
246 | This option is useful for developers to identify the | ||
247 | root cause of an AML interpreter issue when the issue | ||
248 | has something to do with the repair mechanism. | ||
249 | |||
234 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | 250 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS |
235 | Format: To spoof as Windows 98: ="Microsoft Windows" | 251 | Format: To spoof as Windows 98: ="Microsoft Windows" |
236 | 252 | ||
@@ -298,8 +314,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
298 | acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode | 314 | acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode |
299 | Format: { level | edge | high | low } | 315 | Format: { level | edge | high | low } |
300 | 316 | ||
301 | acpi_serialize [HW,ACPI] force serialization of AML methods | ||
302 | |||
303 | acpi_skip_timer_override [HW,ACPI] | 317 | acpi_skip_timer_override [HW,ACPI] |
304 | Recognize and ignore IRQ0/pin2 Interrupt Override. | 318 | Recognize and ignore IRQ0/pin2 Interrupt Override. |
305 | For broken nForce2 BIOS resulting in XT-PIC timer. | 319 | For broken nForce2 BIOS resulting in XT-PIC timer. |
@@ -870,6 +884,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
870 | Enable debug messages at boot time. See | 884 | Enable debug messages at boot time. See |
871 | Documentation/dynamic-debug-howto.txt for details. | 885 | Documentation/dynamic-debug-howto.txt for details. |
872 | 886 | ||
887 | early_ioremap_debug [KNL] | ||
888 | Enable debug messages in early_ioremap support. This | ||
889 | is useful for tracking down temporary early mappings | ||
890 | which are not unmapped. | ||
891 | |||
873 | earlycon= [KNL] Output early console device and options. | 892 | earlycon= [KNL] Output early console device and options. |
874 | uart[8250],io,<addr>[,options] | 893 | uart[8250],io,<addr>[,options] |
875 | uart[8250],mmio,<addr>[,options] | 894 | uart[8250],mmio,<addr>[,options] |
@@ -1011,6 +1030,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1011 | parameter will force ia64_sal_cache_flush to call | 1030 | parameter will force ia64_sal_cache_flush to call |
1012 | ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. | 1031 | ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. |
1013 | 1032 | ||
1033 | forcepae [X86-32] | ||
1034 | Forcefully enable Physical Address Extension (PAE). | ||
1035 | Many Pentium M systems disable PAE but may have a | ||
1036 | functionally usable PAE implementation. | ||
1037 | Warning: use of this parameter will taint the kernel | ||
1038 | and may cause unknown problems. | ||
1039 | |||
1014 | ftrace=[tracer] | 1040 | ftrace=[tracer] |
1015 | [FTRACE] will set and start the specified tracer | 1041 | [FTRACE] will set and start the specified tracer |
1016 | as early as possible in order to facilitate early | 1042 | as early as possible in order to facilitate early |
@@ -2053,8 +2079,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2053 | IOAPICs that may be present in the system. | 2079 | IOAPICs that may be present in the system. |
2054 | 2080 | ||
2055 | nokaslr [X86] | 2081 | nokaslr [X86] |
2056 | Disable kernel base offset ASLR (Address Space | 2082 | Disable kernel and module base offset ASLR (Address |
2057 | Layout Randomization) if built into the kernel. | 2083 | Space Layout Randomization) if built into the kernel. |
2058 | 2084 | ||
2059 | noautogroup Disable scheduler automatic task group creation. | 2085 | noautogroup Disable scheduler automatic task group creation. |
2060 | 2086 | ||
@@ -3409,14 +3435,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3409 | of CONFIG_HIGHPTE. | 3435 | of CONFIG_HIGHPTE. |
3410 | 3436 | ||
3411 | vdso= [X86,SH] | 3437 | vdso= [X86,SH] |
3412 | vdso=2: enable compat VDSO (default with COMPAT_VDSO) | 3438 | On X86_32, this is an alias for vdso32=. Otherwise: |
3413 | vdso=1: enable VDSO (default) | 3439 | |
3440 | vdso=1: enable VDSO (the default) | ||
3414 | vdso=0: disable VDSO mapping | 3441 | vdso=0: disable VDSO mapping |
3415 | 3442 | ||
3416 | vdso32= [X86] | 3443 | vdso32= [X86] Control the 32-bit vDSO |
3417 | vdso32=2: enable compat VDSO (default with COMPAT_VDSO) | 3444 | vdso32=1: enable 32-bit VDSO |
3418 | vdso32=1: enable 32-bit VDSO (default) | 3445 | vdso32=0 or vdso32=2: disable 32-bit VDSO |
3419 | vdso32=0: disable 32-bit VDSO mapping | 3446 | |
3447 | See the help text for CONFIG_COMPAT_VDSO for more | ||
3448 | details. If CONFIG_COMPAT_VDSO is set, the default is | ||
3449 | vdso32=0; otherwise, the default is vdso32=1. | ||
3450 | |||
3451 | For compatibility with older kernels, vdso32=2 is an | ||
3452 | alias for vdso32=0. | ||
3453 | |||
3454 | Try vdso32=0 if you encounter an error that says: | ||
3455 | dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed! | ||
3420 | 3456 | ||
3421 | vector= [IA-64,SMP] | 3457 | vector= [IA-64,SMP] |
3422 | vector=percpu: enable percpu vector domain | 3458 | vector=percpu: enable percpu vector domain |
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt index 827104fb9364..f3cd299fcc41 100644 --- a/Documentation/kernel-per-CPU-kthreads.txt +++ b/Documentation/kernel-per-CPU-kthreads.txt | |||
@@ -162,7 +162,18 @@ Purpose: Execute workqueue requests | |||
162 | To reduce its OS jitter, do any of the following: | 162 | To reduce its OS jitter, do any of the following: |
163 | 1. Run your workload at a real-time priority, which will allow | 163 | 1. Run your workload at a real-time priority, which will allow |
164 | preempting the kworker daemons. | 164 | preempting the kworker daemons. |
165 | 2. Do any of the following needed to avoid jitter that your | 165 | 2. A given workqueue can be made visible in the sysfs filesystem |
166 | by passing the WQ_SYSFS to that workqueue's alloc_workqueue(). | ||
167 | Such a workqueue can be confined to a given subset of the | ||
168 | CPUs using the /sys/devices/virtual/workqueue/*/cpumask sysfs | ||
169 | files. The set of WQ_SYSFS workqueues can be displayed using | ||
170 | "ls sys/devices/virtual/workqueue". That said, the workqueues | ||
171 | maintainer would like to caution people against indiscriminately | ||
172 | sprinkling WQ_SYSFS across all the workqueues. The reason for | ||
173 | caution is that it is easy to add WQ_SYSFS, but because sysfs is | ||
174 | part of the formal user/kernel API, it can be nearly impossible | ||
175 | to remove it, even if its addition was a mistake. | ||
176 | 3. Do any of the following needed to avoid jitter that your | ||
166 | application cannot tolerate: | 177 | application cannot tolerate: |
167 | a. Build your kernel with CONFIG_SLUB=y rather than | 178 | a. Build your kernel with CONFIG_SLUB=y rather than |
168 | CONFIG_SLAB=y, thus avoiding the slab allocator's periodic | 179 | CONFIG_SLAB=y, thus avoiding the slab allocator's periodic |
diff --git a/Documentation/kmemcheck.txt b/Documentation/kmemcheck.txt index 9398a501fdb9..a41bdebbe87b 100644 --- a/Documentation/kmemcheck.txt +++ b/Documentation/kmemcheck.txt | |||
@@ -541,7 +541,7 @@ initialized. This is the beginning of the struct: | |||
541 | 92 } _sifields; | 541 | 92 } _sifields; |
542 | 93 } siginfo_t; | 542 | 93 } siginfo_t; |
543 | 543 | ||
544 | On 64-bit, the int is 4 bytes long, so it must the the union member that has | 544 | On 64-bit, the int is 4 bytes long, so it must the union member that has |
545 | not been initialized. We can verify this using gdb: | 545 | not been initialized. We can verify this using gdb: |
546 | 546 | ||
547 | $ gdb vmlinux | 547 | $ gdb vmlinux |
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index b6e39739a36d..a7563ec4ea7b 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt | |||
@@ -11,9 +11,7 @@ with the difference that the orphan objects are not freed but only | |||
11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the | 11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the |
12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in | 12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in |
13 | user-space applications. | 13 | user-space applications. |
14 | 14 | Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze, ppc, mips, s390, metag and tile. | |
15 | Please check DEBUG_KMEMLEAK dependencies in lib/Kconfig.debug for supported | ||
16 | architectures. | ||
17 | 15 | ||
18 | Usage | 16 | Usage |
19 | ----- | 17 | ----- |
@@ -53,7 +51,8 @@ Memory scanning parameters can be modified at run-time by writing to the | |||
53 | (default 600, 0 to stop the automatic scanning) | 51 | (default 600, 0 to stop the automatic scanning) |
54 | scan - trigger a memory scan | 52 | scan - trigger a memory scan |
55 | clear - clear list of current memory leak suspects, done by | 53 | clear - clear list of current memory leak suspects, done by |
56 | marking all current reported unreferenced objects grey | 54 | marking all current reported unreferenced objects grey, |
55 | or free all kmemleak objects if kmemleak has been disabled. | ||
57 | dump=<addr> - dump information about the object found at <addr> | 56 | dump=<addr> - dump information about the object found at <addr> |
58 | 57 | ||
59 | Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on | 58 | Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on |
@@ -68,7 +67,7 @@ Basic Algorithm | |||
68 | 67 | ||
69 | The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and | 68 | The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and |
70 | friends are traced and the pointers, together with additional | 69 | friends are traced and the pointers, together with additional |
71 | information like size and stack trace, are stored in a prio search tree. | 70 | information like size and stack trace, are stored in a rbtree. |
72 | The corresponding freeing function calls are tracked and the pointers | 71 | The corresponding freeing function calls are tracked and the pointers |
73 | removed from the kmemleak data structures. | 72 | removed from the kmemleak data structures. |
74 | 73 | ||
@@ -84,7 +83,7 @@ The scanning algorithm steps: | |||
84 | 1. mark all objects as white (remaining white objects will later be | 83 | 1. mark all objects as white (remaining white objects will later be |
85 | considered orphan) | 84 | considered orphan) |
86 | 2. scan the memory starting with the data section and stacks, checking | 85 | 2. scan the memory starting with the data section and stacks, checking |
87 | the values against the addresses stored in the prio search tree. If | 86 | the values against the addresses stored in the rbtree. If |
88 | a pointer to a white object is found, the object is added to the | 87 | a pointer to a white object is found, the object is added to the |
89 | gray list | 88 | gray list |
90 | 3. scan the gray objects for matching addresses (some white objects | 89 | 3. scan the gray objects for matching addresses (some white objects |
@@ -120,6 +119,18 @@ Then as usual to get your report with: | |||
120 | 119 | ||
121 | # cat /sys/kernel/debug/kmemleak | 120 | # cat /sys/kernel/debug/kmemleak |
122 | 121 | ||
122 | Freeing kmemleak internal objects | ||
123 | --------------------------------- | ||
124 | |||
125 | To allow access to previosuly found memory leaks after kmemleak has been | ||
126 | disabled by the user or due to an fatal error, internal kmemleak objects | ||
127 | won't be freed when kmemleak is disabled, and those objects may occupy | ||
128 | a large part of physical memory. | ||
129 | |||
130 | In this situation, you may reclaim memory with: | ||
131 | |||
132 | # echo clear > /sys/kernel/debug/kmemleak | ||
133 | |||
123 | Kmemleak API | 134 | Kmemleak API |
124 | ------------ | 135 | ------------ |
125 | 136 | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 102dc19c4119..556f951f8626 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -608,26 +608,30 @@ as follows: | |||
608 | b = p; /* BUG: Compiler can reorder!!! */ | 608 | b = p; /* BUG: Compiler can reorder!!! */ |
609 | do_something(); | 609 | do_something(); |
610 | 610 | ||
611 | The solution is again ACCESS_ONCE(), which preserves the ordering between | 611 | The solution is again ACCESS_ONCE() and barrier(), which preserves the |
612 | the load from variable 'a' and the store to variable 'b': | 612 | ordering between the load from variable 'a' and the store to variable 'b': |
613 | 613 | ||
614 | q = ACCESS_ONCE(a); | 614 | q = ACCESS_ONCE(a); |
615 | if (q) { | 615 | if (q) { |
616 | barrier(); | ||
616 | ACCESS_ONCE(b) = p; | 617 | ACCESS_ONCE(b) = p; |
617 | do_something(); | 618 | do_something(); |
618 | } else { | 619 | } else { |
620 | barrier(); | ||
619 | ACCESS_ONCE(b) = p; | 621 | ACCESS_ONCE(b) = p; |
620 | do_something_else(); | 622 | do_something_else(); |
621 | } | 623 | } |
622 | 624 | ||
623 | You could also use barrier() to prevent the compiler from moving | 625 | The initial ACCESS_ONCE() is required to prevent the compiler from |
624 | the stores to variable 'b', but barrier() would not prevent the | 626 | proving the value of 'a', and the pair of barrier() invocations are |
625 | compiler from proving to itself that a==1 always, so ACCESS_ONCE() | 627 | required to prevent the compiler from pulling the two identical stores |
626 | is also needed. | 628 | to 'b' out from the legs of the "if" statement. |
627 | 629 | ||
628 | It is important to note that control dependencies absolutely require a | 630 | It is important to note that control dependencies absolutely require a |
629 | a conditional. For example, the following "optimized" version of | 631 | a conditional. For example, the following "optimized" version of |
630 | the above example breaks ordering: | 632 | the above example breaks ordering, which is why the barrier() invocations |
633 | are absolutely required if you have identical stores in both legs of | ||
634 | the "if" statement: | ||
631 | 635 | ||
632 | q = ACCESS_ONCE(a); | 636 | q = ACCESS_ONCE(a); |
633 | ACCESS_ONCE(b) = p; /* BUG: No ordering vs. load from a!!! */ | 637 | ACCESS_ONCE(b) = p; /* BUG: No ordering vs. load from a!!! */ |
@@ -643,9 +647,11 @@ It is of course legal for the prior load to be part of the conditional, | |||
643 | for example, as follows: | 647 | for example, as follows: |
644 | 648 | ||
645 | if (ACCESS_ONCE(a) > 0) { | 649 | if (ACCESS_ONCE(a) > 0) { |
650 | barrier(); | ||
646 | ACCESS_ONCE(b) = q / 2; | 651 | ACCESS_ONCE(b) = q / 2; |
647 | do_something(); | 652 | do_something(); |
648 | } else { | 653 | } else { |
654 | barrier(); | ||
649 | ACCESS_ONCE(b) = q / 3; | 655 | ACCESS_ONCE(b) = q / 3; |
650 | do_something_else(); | 656 | do_something_else(); |
651 | } | 657 | } |
@@ -659,9 +665,11 @@ the needed conditional. For example: | |||
659 | 665 | ||
660 | q = ACCESS_ONCE(a); | 666 | q = ACCESS_ONCE(a); |
661 | if (q % MAX) { | 667 | if (q % MAX) { |
668 | barrier(); | ||
662 | ACCESS_ONCE(b) = p; | 669 | ACCESS_ONCE(b) = p; |
663 | do_something(); | 670 | do_something(); |
664 | } else { | 671 | } else { |
672 | barrier(); | ||
665 | ACCESS_ONCE(b) = p; | 673 | ACCESS_ONCE(b) = p; |
666 | do_something_else(); | 674 | do_something_else(); |
667 | } | 675 | } |
@@ -723,8 +731,13 @@ In summary: | |||
723 | use smb_rmb(), smp_wmb(), or, in the case of prior stores and | 731 | use smb_rmb(), smp_wmb(), or, in the case of prior stores and |
724 | later loads, smp_mb(). | 732 | later loads, smp_mb(). |
725 | 733 | ||
734 | (*) If both legs of the "if" statement begin with identical stores | ||
735 | to the same variable, a barrier() statement is required at the | ||
736 | beginning of each leg of the "if" statement. | ||
737 | |||
726 | (*) Control dependencies require at least one run-time conditional | 738 | (*) Control dependencies require at least one run-time conditional |
727 | between the prior load and the subsequent store. If the compiler | 739 | between the prior load and the subsequent store, and this |
740 | conditional must involve the prior load. If the compiler | ||
728 | is able to optimize the conditional away, it will have also | 741 | is able to optimize the conditional away, it will have also |
729 | optimized away the ordering. Careful use of ACCESS_ONCE() can | 742 | optimized away the ordering. Careful use of ACCESS_ONCE() can |
730 | help to preserve the needed conditional. | 743 | help to preserve the needed conditional. |
@@ -1249,6 +1262,23 @@ The ACCESS_ONCE() function can prevent any number of optimizations that, | |||
1249 | while perfectly safe in single-threaded code, can be fatal in concurrent | 1262 | while perfectly safe in single-threaded code, can be fatal in concurrent |
1250 | code. Here are some examples of these sorts of optimizations: | 1263 | code. Here are some examples of these sorts of optimizations: |
1251 | 1264 | ||
1265 | (*) The compiler is within its rights to reorder loads and stores | ||
1266 | to the same variable, and in some cases, the CPU is within its | ||
1267 | rights to reorder loads to the same variable. This means that | ||
1268 | the following code: | ||
1269 | |||
1270 | a[0] = x; | ||
1271 | a[1] = x; | ||
1272 | |||
1273 | Might result in an older value of x stored in a[1] than in a[0]. | ||
1274 | Prevent both the compiler and the CPU from doing this as follows: | ||
1275 | |||
1276 | a[0] = ACCESS_ONCE(x); | ||
1277 | a[1] = ACCESS_ONCE(x); | ||
1278 | |||
1279 | In short, ACCESS_ONCE() provides cache coherence for accesses from | ||
1280 | multiple CPUs to a single variable. | ||
1281 | |||
1252 | (*) The compiler is within its rights to merge successive loads from | 1282 | (*) The compiler is within its rights to merge successive loads from |
1253 | the same variable. Such merging can cause the compiler to "optimize" | 1283 | the same variable. Such merging can cause the compiler to "optimize" |
1254 | the following code: | 1284 | the following code: |
@@ -1371,7 +1401,7 @@ code. Here are some examples of these sorts of optimizations: | |||
1371 | process_message(msg); | 1401 | process_message(msg); |
1372 | } | 1402 | } |
1373 | 1403 | ||
1374 | There is nothing to prevent the the compiler from transforming | 1404 | There is nothing to prevent the compiler from transforming |
1375 | process_level() to the following, in fact, this might well be a | 1405 | process_level() to the following, in fact, this might well be a |
1376 | win for single-threaded code: | 1406 | win for single-threaded code: |
1377 | 1407 | ||
@@ -1644,12 +1674,12 @@ for each construct. These operations all imply certain barriers: | |||
1644 | Memory operations issued after the ACQUIRE will be completed after the | 1674 | Memory operations issued after the ACQUIRE will be completed after the |
1645 | ACQUIRE operation has completed. | 1675 | ACQUIRE operation has completed. |
1646 | 1676 | ||
1647 | Memory operations issued before the ACQUIRE may be completed after the | 1677 | Memory operations issued before the ACQUIRE may be completed after |
1648 | ACQUIRE operation has completed. An smp_mb__before_spinlock(), combined | 1678 | the ACQUIRE operation has completed. An smp_mb__before_spinlock(), |
1649 | with a following ACQUIRE, orders prior loads against subsequent stores and | 1679 | combined with a following ACQUIRE, orders prior loads against |
1650 | stores and prior stores against subsequent stores. Note that this is | 1680 | subsequent loads and stores and also orders prior stores against |
1651 | weaker than smp_mb()! The smp_mb__before_spinlock() primitive is free on | 1681 | subsequent stores. Note that this is weaker than smp_mb()! The |
1652 | many architectures. | 1682 | smp_mb__before_spinlock() primitive is free on many architectures. |
1653 | 1683 | ||
1654 | (2) RELEASE operation implication: | 1684 | (2) RELEASE operation implication: |
1655 | 1685 | ||
@@ -1694,24 +1724,21 @@ may occur as: | |||
1694 | 1724 | ||
1695 | ACQUIRE M, STORE *B, STORE *A, RELEASE M | 1725 | ACQUIRE M, STORE *B, STORE *A, RELEASE M |
1696 | 1726 | ||
1697 | This same reordering can of course occur if the lock's ACQUIRE and RELEASE are | 1727 | When the ACQUIRE and RELEASE are a lock acquisition and release, |
1698 | to the same lock variable, but only from the perspective of another CPU not | 1728 | respectively, this same reordering can occur if the lock's ACQUIRE and |
1699 | holding that lock. | 1729 | RELEASE are to the same lock variable, but only from the perspective of |
1700 | 1730 | another CPU not holding that lock. In short, a ACQUIRE followed by an | |
1701 | In short, a RELEASE followed by an ACQUIRE may -not- be assumed to be a full | 1731 | RELEASE may -not- be assumed to be a full memory barrier. |
1702 | memory barrier because it is possible for a preceding RELEASE to pass a | 1732 | |
1703 | later ACQUIRE from the viewpoint of the CPU, but not from the viewpoint | 1733 | Similarly, the reverse case of a RELEASE followed by an ACQUIRE does not |
1704 | of the compiler. Note that deadlocks cannot be introduced by this | 1734 | imply a full memory barrier. If it is necessary for a RELEASE-ACQUIRE |
1705 | interchange because if such a deadlock threatened, the RELEASE would | 1735 | pair to produce a full barrier, the ACQUIRE can be followed by an |
1706 | simply complete. | 1736 | smp_mb__after_unlock_lock() invocation. This will produce a full barrier |
1707 | 1737 | if either (a) the RELEASE and the ACQUIRE are executed by the same | |
1708 | If it is necessary for a RELEASE-ACQUIRE pair to produce a full barrier, the | 1738 | CPU or task, or (b) the RELEASE and ACQUIRE act on the same variable. |
1709 | ACQUIRE can be followed by an smp_mb__after_unlock_lock() invocation. This | 1739 | The smp_mb__after_unlock_lock() primitive is free on many architectures. |
1710 | will produce a full barrier if either (a) the RELEASE and the ACQUIRE are | 1740 | Without smp_mb__after_unlock_lock(), the CPU's execution of the critical |
1711 | executed by the same CPU or task, or (b) the RELEASE and ACQUIRE act on the | 1741 | sections corresponding to the RELEASE and the ACQUIRE can cross, so that: |
1712 | same variable. The smp_mb__after_unlock_lock() primitive is free on many | ||
1713 | architectures. Without smp_mb__after_unlock_lock(), the critical sections | ||
1714 | corresponding to the RELEASE and the ACQUIRE can cross: | ||
1715 | 1742 | ||
1716 | *A = a; | 1743 | *A = a; |
1717 | RELEASE M | 1744 | RELEASE M |
@@ -1722,7 +1749,36 @@ could occur as: | |||
1722 | 1749 | ||
1723 | ACQUIRE N, STORE *B, STORE *A, RELEASE M | 1750 | ACQUIRE N, STORE *B, STORE *A, RELEASE M |
1724 | 1751 | ||
1725 | With smp_mb__after_unlock_lock(), they cannot, so that: | 1752 | It might appear that this reordering could introduce a deadlock. |
1753 | However, this cannot happen because if such a deadlock threatened, | ||
1754 | the RELEASE would simply complete, thereby avoiding the deadlock. | ||
1755 | |||
1756 | Why does this work? | ||
1757 | |||
1758 | One key point is that we are only talking about the CPU doing | ||
1759 | the reordering, not the compiler. If the compiler (or, for | ||
1760 | that matter, the developer) switched the operations, deadlock | ||
1761 | -could- occur. | ||
1762 | |||
1763 | But suppose the CPU reordered the operations. In this case, | ||
1764 | the unlock precedes the lock in the assembly code. The CPU | ||
1765 | simply elected to try executing the later lock operation first. | ||
1766 | If there is a deadlock, this lock operation will simply spin (or | ||
1767 | try to sleep, but more on that later). The CPU will eventually | ||
1768 | execute the unlock operation (which preceded the lock operation | ||
1769 | in the assembly code), which will unravel the potential deadlock, | ||
1770 | allowing the lock operation to succeed. | ||
1771 | |||
1772 | But what if the lock is a sleeplock? In that case, the code will | ||
1773 | try to enter the scheduler, where it will eventually encounter | ||
1774 | a memory barrier, which will force the earlier unlock operation | ||
1775 | to complete, again unraveling the deadlock. There might be | ||
1776 | a sleep-unlock race, but the locking primitive needs to resolve | ||
1777 | such races properly in any case. | ||
1778 | |||
1779 | With smp_mb__after_unlock_lock(), the two critical sections cannot overlap. | ||
1780 | For example, with the following code, the store to *A will always be | ||
1781 | seen by other CPUs before the store to *B: | ||
1726 | 1782 | ||
1727 | *A = a; | 1783 | *A = a; |
1728 | RELEASE M | 1784 | RELEASE M |
@@ -1730,13 +1786,18 @@ With smp_mb__after_unlock_lock(), they cannot, so that: | |||
1730 | smp_mb__after_unlock_lock(); | 1786 | smp_mb__after_unlock_lock(); |
1731 | *B = b; | 1787 | *B = b; |
1732 | 1788 | ||
1733 | will always occur as either of the following: | 1789 | The operations will always occur in one of the following orders: |
1734 | 1790 | ||
1735 | STORE *A, RELEASE, ACQUIRE, STORE *B | 1791 | STORE *A, RELEASE, ACQUIRE, smp_mb__after_unlock_lock(), STORE *B |
1736 | STORE *A, ACQUIRE, RELEASE, STORE *B | 1792 | STORE *A, ACQUIRE, RELEASE, smp_mb__after_unlock_lock(), STORE *B |
1793 | ACQUIRE, STORE *A, RELEASE, smp_mb__after_unlock_lock(), STORE *B | ||
1737 | 1794 | ||
1738 | If the RELEASE and ACQUIRE were instead both operating on the same lock | 1795 | If the RELEASE and ACQUIRE were instead both operating on the same lock |
1739 | variable, only the first of these two alternatives can occur. | 1796 | variable, only the first of these alternatives can occur. In addition, |
1797 | the more strongly ordered systems may rule out some of the above orders. | ||
1798 | But in any case, as noted earlier, the smp_mb__after_unlock_lock() | ||
1799 | ensures that the store to *A will always be seen as happening before | ||
1800 | the store to *B. | ||
1740 | 1801 | ||
1741 | Locks and semaphores may not provide any guarantee of ordering on UP compiled | 1802 | Locks and semaphores may not provide any guarantee of ordering on UP compiled |
1742 | systems, and so cannot be counted on in such a situation to actually achieve | 1803 | systems, and so cannot be counted on in such a situation to actually achieve |
@@ -2757,7 +2818,7 @@ in that order, but, without intervention, the sequence may have almost any | |||
2757 | combination of elements combined or discarded, provided the program's view of | 2818 | combination of elements combined or discarded, provided the program's view of |
2758 | the world remains consistent. Note that ACCESS_ONCE() is -not- optional | 2819 | the world remains consistent. Note that ACCESS_ONCE() is -not- optional |
2759 | in the above example, as there are architectures where a given CPU might | 2820 | in the above example, as there are architectures where a given CPU might |
2760 | interchange successive loads to the same location. On such architectures, | 2821 | reorder successive loads to the same location. On such architectures, |
2761 | ACCESS_ONCE() does whatever is necessary to prevent this, for example, on | 2822 | ACCESS_ONCE() does whatever is necessary to prevent this, for example, on |
2762 | Itanium the volatile casts used by ACCESS_ONCE() cause GCC to emit the | 2823 | Itanium the volatile casts used by ACCESS_ONCE() cause GCC to emit the |
2763 | special ld.acq and st.rel instructions that prevent such reordering. | 2824 | special ld.acq and st.rel instructions that prevent such reordering. |
diff --git a/Documentation/module-signing.txt b/Documentation/module-signing.txt index 2b40e04d3c49..09c2382ad055 100644 --- a/Documentation/module-signing.txt +++ b/Documentation/module-signing.txt | |||
@@ -53,7 +53,8 @@ This has a number of options available: | |||
53 | 53 | ||
54 | If this is off (ie. "permissive"), then modules for which the key is not | 54 | If this is off (ie. "permissive"), then modules for which the key is not |
55 | available and modules that are unsigned are permitted, but the kernel will | 55 | available and modules that are unsigned are permitted, but the kernel will |
56 | be marked as being tainted. | 56 | be marked as being tainted, and the concerned modules will be marked as |
57 | tainted, shown with the character 'E'. | ||
57 | 58 | ||
58 | If this is on (ie. "restrictive"), only modules that have a valid | 59 | If this is on (ie. "restrictive"), only modules that have a valid |
59 | signature that can be verified by a public key in the kernel's possession | 60 | signature that can be verified by a public key in the kernel's possession |
@@ -77,11 +78,11 @@ This has a number of options available: | |||
77 | This presents a choice of which hash algorithm the installation phase will | 78 | This presents a choice of which hash algorithm the installation phase will |
78 | sign the modules with: | 79 | sign the modules with: |
79 | 80 | ||
80 | CONFIG_SIG_SHA1 "Sign modules with SHA-1" | 81 | CONFIG_MODULE_SIG_SHA1 "Sign modules with SHA-1" |
81 | CONFIG_SIG_SHA224 "Sign modules with SHA-224" | 82 | CONFIG_MODULE_SIG_SHA224 "Sign modules with SHA-224" |
82 | CONFIG_SIG_SHA256 "Sign modules with SHA-256" | 83 | CONFIG_MODULE_SIG_SHA256 "Sign modules with SHA-256" |
83 | CONFIG_SIG_SHA384 "Sign modules with SHA-384" | 84 | CONFIG_MODULE_SIG_SHA384 "Sign modules with SHA-384" |
84 | CONFIG_SIG_SHA512 "Sign modules with SHA-512" | 85 | CONFIG_MODULE_SIG_SHA512 "Sign modules with SHA-512" |
85 | 86 | ||
86 | The algorithm selected here will also be built into the kernel (rather | 87 | The algorithm selected here will also be built into the kernel (rather |
87 | than being a module) so that modules signed with that algorithm can have | 88 | than being a module) so that modules signed with that algorithm can have |
diff --git a/Documentation/networking/altera_tse.txt b/Documentation/networking/altera_tse.txt new file mode 100644 index 000000000000..3f24df8c6e65 --- /dev/null +++ b/Documentation/networking/altera_tse.txt | |||
@@ -0,0 +1,263 @@ | |||
1 | Altera Triple-Speed Ethernet MAC driver | ||
2 | |||
3 | Copyright (C) 2008-2014 Altera Corporation | ||
4 | |||
5 | This is the driver for the Altera Triple-Speed Ethernet (TSE) controllers | ||
6 | using the SGDMA and MSGDMA soft DMA IP components. The driver uses the | ||
7 | platform bus to obtain component resources. The designs used to test this | ||
8 | driver were built for a Cyclone(R) V SOC FPGA board, a Cyclone(R) V FPGA board, | ||
9 | and tested with ARM and NIOS processor hosts seperately. The anticipated use | ||
10 | cases are simple communications between an embedded system and an external peer | ||
11 | for status and simple configuration of the embedded system. | ||
12 | |||
13 | For more information visit www.altera.com and www.rocketboards.org. Support | ||
14 | forums for the driver may be found on www.rocketboards.org, and a design used | ||
15 | to test this driver may be found there as well. Support is also available from | ||
16 | the maintainer of this driver, found in MAINTAINERS. | ||
17 | |||
18 | The Triple-Speed Ethernet, SGDMA, and MSGDMA components are all soft IP | ||
19 | components that can be assembled and built into an FPGA using the Altera | ||
20 | Quartus toolchain. Quartus 13.1 and 14.0 were used to build the design that | ||
21 | this driver was tested against. The sopc2dts tool is used to create the | ||
22 | device tree for the driver, and may be found at rocketboards.org. | ||
23 | |||
24 | The driver probe function examines the device tree and determines if the | ||
25 | Triple-Speed Ethernet instance is using an SGDMA or MSGDMA component. The | ||
26 | probe function then installs the appropriate set of DMA routines to | ||
27 | initialize, setup transmits, receives, and interrupt handling primitives for | ||
28 | the respective configurations. | ||
29 | |||
30 | The SGDMA component is to be deprecated in the near future (over the next 1-2 | ||
31 | years as of this writing in early 2014) in favor of the MSGDMA component. | ||
32 | SGDMA support is included for existing designs and reference in case a | ||
33 | developer wishes to support their own soft DMA logic and driver support. Any | ||
34 | new designs should not use the SGDMA. | ||
35 | |||
36 | The SGDMA supports only a single transmit or receive operation at a time, and | ||
37 | therefore will not perform as well compared to the MSGDMA soft IP. Please | ||
38 | visit www.altera.com for known, documented SGDMA errata. | ||
39 | |||
40 | Scatter-gather DMA is not supported by the SGDMA or MSGDMA at this time. | ||
41 | Scatter-gather DMA will be added to a future maintenance update to this | ||
42 | driver. | ||
43 | |||
44 | Jumbo frames are not supported at this time. | ||
45 | |||
46 | The driver limits PHY operations to 10/100Mbps, and has not yet been fully | ||
47 | tested for 1Gbps. This support will be added in a future maintenance update. | ||
48 | |||
49 | 1) Kernel Configuration | ||
50 | The kernel configuration option is ALTERA_TSE: | ||
51 | Device Drivers ---> Network device support ---> Ethernet driver support ---> | ||
52 | Altera Triple-Speed Ethernet MAC support (ALTERA_TSE) | ||
53 | |||
54 | 2) Driver parameters list: | ||
55 | debug: message level (0: no output, 16: all); | ||
56 | dma_rx_num: Number of descriptors in the RX list (default is 64); | ||
57 | dma_tx_num: Number of descriptors in the TX list (default is 64). | ||
58 | |||
59 | 3) Command line options | ||
60 | Driver parameters can be also passed in command line by using: | ||
61 | altera_tse=dma_rx_num:128,dma_tx_num:512 | ||
62 | |||
63 | 4) Driver information and notes | ||
64 | |||
65 | 4.1) Transmit process | ||
66 | When the driver's transmit routine is called by the kernel, it sets up a | ||
67 | transmit descriptor by calling the underlying DMA transmit routine (SGDMA or | ||
68 | MSGDMA), and initites a transmit operation. Once the transmit is complete, an | ||
69 | interrupt is driven by the transmit DMA logic. The driver handles the transmit | ||
70 | completion in the context of the interrupt handling chain by recycling | ||
71 | resource required to send and track the requested transmit operation. | ||
72 | |||
73 | 4.2) Receive process | ||
74 | The driver will post receive buffers to the receive DMA logic during driver | ||
75 | intialization. Receive buffers may or may not be queued depending upon the | ||
76 | underlying DMA logic (MSGDMA is able queue receive buffers, SGDMA is not able | ||
77 | to queue receive buffers to the SGDMA receive logic). When a packet is | ||
78 | received, the DMA logic generates an interrupt. The driver handles a receive | ||
79 | interrupt by obtaining the DMA receive logic status, reaping receive | ||
80 | completions until no more receive completions are available. | ||
81 | |||
82 | 4.3) Interrupt Mitigation | ||
83 | The driver is able to mitigate the number of its DMA interrupts | ||
84 | using NAPI for receive operations. Interrupt mitigation is not yet supported | ||
85 | for transmit operations, but will be added in a future maintenance release. | ||
86 | |||
87 | 4.4) Ethtool support | ||
88 | Ethtool is supported. Driver statistics and internal errors can be taken using: | ||
89 | ethtool -S ethX command. It is possible to dump registers etc. | ||
90 | |||
91 | 4.5) PHY Support | ||
92 | The driver is compatible with PAL to work with PHY and GPHY devices. | ||
93 | |||
94 | 4.7) List of source files: | ||
95 | o Kconfig | ||
96 | o Makefile | ||
97 | o altera_tse_main.c: main network device driver | ||
98 | o altera_tse_ethtool.c: ethtool support | ||
99 | o altera_tse.h: private driver structure and common definitions | ||
100 | o altera_msgdma.h: MSGDMA implementation function definitions | ||
101 | o altera_sgdma.h: SGDMA implementation function definitions | ||
102 | o altera_msgdma.c: MSGDMA implementation | ||
103 | o altera_sgdma.c: SGDMA implementation | ||
104 | o altera_sgdmahw.h: SGDMA register and descriptor definitions | ||
105 | o altera_msgdmahw.h: MSGDMA register and descriptor definitions | ||
106 | o altera_utils.c: Driver utility functions | ||
107 | o altera_utils.h: Driver utility function definitions | ||
108 | |||
109 | 5) Debug Information | ||
110 | |||
111 | The driver exports debug information such as internal statistics, | ||
112 | debug information, MAC and DMA registers etc. | ||
113 | |||
114 | A user may use the ethtool support to get statistics: | ||
115 | e.g. using: ethtool -S ethX (that shows the statistics counters) | ||
116 | or sees the MAC registers: e.g. using: ethtool -d ethX | ||
117 | |||
118 | The developer can also use the "debug" module parameter to get | ||
119 | further debug information. | ||
120 | |||
121 | 6) Statistics Support | ||
122 | |||
123 | The controller and driver support a mix of IEEE standard defined statistics, | ||
124 | RFC defined statistics, and driver or Altera defined statistics. The four | ||
125 | specifications containing the standard definitions for these statistics are | ||
126 | as follows: | ||
127 | |||
128 | o IEEE 802.3-2012 - IEEE Standard for Ethernet. | ||
129 | o RFC 2863 found at http://www.rfc-editor.org/rfc/rfc2863.txt. | ||
130 | o RFC 2819 found at http://www.rfc-editor.org/rfc/rfc2819.txt. | ||
131 | o Altera Triple Speed Ethernet User Guide, found at http://www.altera.com | ||
132 | |||
133 | The statistics supported by the TSE and the device driver are as follows: | ||
134 | |||
135 | "tx_packets" is equivalent to aFramesTransmittedOK defined in IEEE 802.3-2012, | ||
136 | Section 5.2.2.1.2. This statistics is the count of frames that are successfully | ||
137 | transmitted. | ||
138 | |||
139 | "rx_packets" is equivalent to aFramesReceivedOK defined in IEEE 802.3-2012, | ||
140 | Section 5.2.2.1.5. This statistic is the count of frames that are successfully | ||
141 | received. This count does not include any error packets such as CRC errors, | ||
142 | length errors, or alignment errors. | ||
143 | |||
144 | "rx_crc_errors" is equivalent to aFrameCheckSequenceErrors defined in IEEE | ||
145 | 802.3-2012, Section 5.2.2.1.6. This statistic is the count of frames that are | ||
146 | an integral number of bytes in length and do not pass the CRC test as the frame | ||
147 | is received. | ||
148 | |||
149 | "rx_align_errors" is equivalent to aAlignmentErrors defined in IEEE 802.3-2012, | ||
150 | Section 5.2.2.1.7. This statistic is the count of frames that are not an | ||
151 | integral number of bytes in length and do not pass the CRC test as the frame is | ||
152 | received. | ||
153 | |||
154 | "tx_bytes" is equivalent to aOctetsTransmittedOK defined in IEEE 802.3-2012, | ||
155 | Section 5.2.2.1.8. This statistic is the count of data and pad bytes | ||
156 | successfully transmitted from the interface. | ||
157 | |||
158 | "rx_bytes" is equivalent to aOctetsReceivedOK defined in IEEE 802.3-2012, | ||
159 | Section 5.2.2.1.14. This statistic is the count of data and pad bytes | ||
160 | successfully received by the controller. | ||
161 | |||
162 | "tx_pause" is equivalent to aPAUSEMACCtrlFramesTransmitted defined in IEEE | ||
163 | 802.3-2012, Section 30.3.4.2. This statistic is a count of PAUSE frames | ||
164 | transmitted from the network controller. | ||
165 | |||
166 | "rx_pause" is equivalent to aPAUSEMACCtrlFramesReceived defined in IEEE | ||
167 | 802.3-2012, Section 30.3.4.3. This statistic is a count of PAUSE frames | ||
168 | received by the network controller. | ||
169 | |||
170 | "rx_errors" is equivalent to ifInErrors defined in RFC 2863. This statistic is | ||
171 | a count of the number of packets received containing errors that prevented the | ||
172 | packet from being delivered to a higher level protocol. | ||
173 | |||
174 | "tx_errors" is equivalent to ifOutErrors defined in RFC 2863. This statistic | ||
175 | is a count of the number of packets that could not be transmitted due to errors. | ||
176 | |||
177 | "rx_unicast" is equivalent to ifInUcastPkts defined in RFC 2863. This | ||
178 | statistic is a count of the number of packets received that were not addressed | ||
179 | to the broadcast address or a multicast group. | ||
180 | |||
181 | "rx_multicast" is equivalent to ifInMulticastPkts defined in RFC 2863. This | ||
182 | statistic is a count of the number of packets received that were addressed to | ||
183 | a multicast address group. | ||
184 | |||
185 | "rx_broadcast" is equivalent to ifInBroadcastPkts defined in RFC 2863. This | ||
186 | statistic is a count of the number of packets received that were addressed to | ||
187 | the broadcast address. | ||
188 | |||
189 | "tx_discards" is equivalent to ifOutDiscards defined in RFC 2863. This | ||
190 | statistic is the number of outbound packets not transmitted even though an | ||
191 | error was not detected. An example of a reason this might occur is to free up | ||
192 | internal buffer space. | ||
193 | |||
194 | "tx_unicast" is equivalent to ifOutUcastPkts defined in RFC 2863. This | ||
195 | statistic counts the number of packets transmitted that were not addressed to | ||
196 | a multicast group or broadcast address. | ||
197 | |||
198 | "tx_multicast" is equivalent to ifOutMulticastPkts defined in RFC 2863. This | ||
199 | statistic counts the number of packets transmitted that were addressed to a | ||
200 | multicast group. | ||
201 | |||
202 | "tx_broadcast" is equivalent to ifOutBroadcastPkts defined in RFC 2863. This | ||
203 | statistic counts the number of packets transmitted that were addressed to a | ||
204 | broadcast address. | ||
205 | |||
206 | "ether_drops" is equivalent to etherStatsDropEvents defined in RFC 2819. | ||
207 | This statistic counts the number of packets dropped due to lack of internal | ||
208 | controller resources. | ||
209 | |||
210 | "rx_total_bytes" is equivalent to etherStatsOctets defined in RFC 2819. | ||
211 | This statistic counts the total number of bytes received by the controller, | ||
212 | including error and discarded packets. | ||
213 | |||
214 | "rx_total_packets" is equivalent to etherStatsPkts defined in RFC 2819. | ||
215 | This statistic counts the total number of packets received by the controller, | ||
216 | including error, discarded, unicast, multicast, and broadcast packets. | ||
217 | |||
218 | "rx_undersize" is equivalent to etherStatsUndersizePkts defined in RFC 2819. | ||
219 | This statistic counts the number of correctly formed packets received less | ||
220 | than 64 bytes long. | ||
221 | |||
222 | "rx_oversize" is equivalent to etherStatsOversizePkts defined in RFC 2819. | ||
223 | This statistic counts the number of correctly formed packets greater than 1518 | ||
224 | bytes long. | ||
225 | |||
226 | "rx_64_bytes" is equivalent to etherStatsPkts64Octets defined in RFC 2819. | ||
227 | This statistic counts the total number of packets received that were 64 octets | ||
228 | in length. | ||
229 | |||
230 | "rx_65_127_bytes" is equivalent to etherStatsPkts65to127Octets defined in RFC | ||
231 | 2819. This statistic counts the total number of packets received that were | ||
232 | between 65 and 127 octets in length inclusive. | ||
233 | |||
234 | "rx_128_255_bytes" is equivalent to etherStatsPkts128to255Octets defined in | ||
235 | RFC 2819. This statistic is the total number of packets received that were | ||
236 | between 128 and 255 octets in length inclusive. | ||
237 | |||
238 | "rx_256_511_bytes" is equivalent to etherStatsPkts256to511Octets defined in | ||
239 | RFC 2819. This statistic is the total number of packets received that were | ||
240 | between 256 and 511 octets in length inclusive. | ||
241 | |||
242 | "rx_512_1023_bytes" is equivalent to etherStatsPkts512to1023Octets defined in | ||
243 | RFC 2819. This statistic is the total number of packets received that were | ||
244 | between 512 and 1023 octets in length inclusive. | ||
245 | |||
246 | "rx_1024_1518_bytes" is equivalent to etherStatsPkts1024to1518Octets define | ||
247 | in RFC 2819. This statistic is the total number of packets received that were | ||
248 | between 1024 and 1518 octets in length inclusive. | ||
249 | |||
250 | "rx_gte_1519_bytes" is a statistic defined specific to the behavior of the | ||
251 | Altera TSE. This statistics counts the number of received good and errored | ||
252 | frames between the length of 1519 and the maximum frame length configured | ||
253 | in the frm_length register. See the Altera TSE User Guide for More details. | ||
254 | |||
255 | "rx_jabbers" is equivalent to etherStatsJabbers defined in RFC 2819. This | ||
256 | statistic is the total number of packets received that were longer than 1518 | ||
257 | octets, and had either a bad CRC with an integral number of octets (CRC Error) | ||
258 | or a bad CRC with a non-integral number of octets (Alignment Error). | ||
259 | |||
260 | "rx_runts" is equivalent to etherStatsFragments defined in RFC 2819. This | ||
261 | statistic is the total number of packets received that were less than 64 octets | ||
262 | in length and had either a bad CRC with an integral number of octets (CRC | ||
263 | error) or a bad CRC with a non-integral number of octets (Alignment Error). | ||
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 5cdb22971d19..a383c00392d0 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -270,16 +270,15 @@ arp_ip_target | |||
270 | arp_validate | 270 | arp_validate |
271 | 271 | ||
272 | Specifies whether or not ARP probes and replies should be | 272 | Specifies whether or not ARP probes and replies should be |
273 | validated in the active-backup mode. This causes the ARP | 273 | validated in any mode that supports arp monitoring, or whether |
274 | monitor to examine the incoming ARP requests and replies, and | 274 | non-ARP traffic should be filtered (disregarded) for link |
275 | only consider a slave to be up if it is receiving the | 275 | monitoring purposes. |
276 | appropriate ARP traffic. | ||
277 | 276 | ||
278 | Possible values are: | 277 | Possible values are: |
279 | 278 | ||
280 | none or 0 | 279 | none or 0 |
281 | 280 | ||
282 | No validation is performed. This is the default. | 281 | No validation or filtering is performed. |
283 | 282 | ||
284 | active or 1 | 283 | active or 1 |
285 | 284 | ||
@@ -293,31 +292,68 @@ arp_validate | |||
293 | 292 | ||
294 | Validation is performed for all slaves. | 293 | Validation is performed for all slaves. |
295 | 294 | ||
296 | For the active slave, the validation checks ARP replies to | 295 | filter or 4 |
297 | confirm that they were generated by an arp_ip_target. Since | 296 | |
298 | backup slaves do not typically receive these replies, the | 297 | Filtering is applied to all slaves. No validation is |
299 | validation performed for backup slaves is on the ARP request | 298 | performed. |
300 | sent out via the active slave. It is possible that some | 299 | |
301 | switch or network configurations may result in situations | 300 | filter_active or 5 |
302 | wherein the backup slaves do not receive the ARP requests; in | 301 | |
303 | such a situation, validation of backup slaves must be | 302 | Filtering is applied to all slaves, validation is performed |
304 | disabled. | 303 | only for the active slave. |
305 | 304 | ||
306 | The validation of ARP requests on backup slaves is mainly | 305 | filter_backup or 6 |
307 | helping bonding to decide which slaves are more likely to | 306 | |
308 | work in case of the active slave failure, it doesn't really | 307 | Filtering is applied to all slaves, validation is performed |
309 | guarantee that the backup slave will work if it's selected | 308 | only for backup slaves. |
310 | as the next active slave. | 309 | |
311 | 310 | Validation: | |
312 | This option is useful in network configurations in which | 311 | |
313 | multiple bonding hosts are concurrently issuing ARPs to one or | 312 | Enabling validation causes the ARP monitor to examine the incoming |
314 | more targets beyond a common switch. Should the link between | 313 | ARP requests and replies, and only consider a slave to be up if it |
315 | the switch and target fail (but not the switch itself), the | 314 | is receiving the appropriate ARP traffic. |
316 | probe traffic generated by the multiple bonding instances will | 315 | |
317 | fool the standard ARP monitor into considering the links as | 316 | For an active slave, the validation checks ARP replies to confirm |
318 | still up. Use of the arp_validate option can resolve this, as | 317 | that they were generated by an arp_ip_target. Since backup slaves |
319 | the ARP monitor will only consider ARP requests and replies | 318 | do not typically receive these replies, the validation performed |
320 | associated with its own instance of bonding. | 319 | for backup slaves is on the broadcast ARP request sent out via the |
320 | active slave. It is possible that some switch or network | ||
321 | configurations may result in situations wherein the backup slaves | ||
322 | do not receive the ARP requests; in such a situation, validation | ||
323 | of backup slaves must be disabled. | ||
324 | |||
325 | The validation of ARP requests on backup slaves is mainly helping | ||
326 | bonding to decide which slaves are more likely to work in case of | ||
327 | the active slave failure, it doesn't really guarantee that the | ||
328 | backup slave will work if it's selected as the next active slave. | ||
329 | |||
330 | Validation is useful in network configurations in which multiple | ||
331 | bonding hosts are concurrently issuing ARPs to one or more targets | ||
332 | beyond a common switch. Should the link between the switch and | ||
333 | target fail (but not the switch itself), the probe traffic | ||
334 | generated by the multiple bonding instances will fool the standard | ||
335 | ARP monitor into considering the links as still up. Use of | ||
336 | validation can resolve this, as the ARP monitor will only consider | ||
337 | ARP requests and replies associated with its own instance of | ||
338 | bonding. | ||
339 | |||
340 | Filtering: | ||
341 | |||
342 | Enabling filtering causes the ARP monitor to only use incoming ARP | ||
343 | packets for link availability purposes. Arriving packets that are | ||
344 | not ARPs are delivered normally, but do not count when determining | ||
345 | if a slave is available. | ||
346 | |||
347 | Filtering operates by only considering the reception of ARP | ||
348 | packets (any ARP packet, regardless of source or destination) when | ||
349 | determining if a slave has received traffic for link availability | ||
350 | purposes. | ||
351 | |||
352 | Filtering is useful in network configurations in which significant | ||
353 | levels of third party broadcast traffic would fool the standard | ||
354 | ARP monitor into considering the links as still up. Use of | ||
355 | filtering can resolve this, as only ARP traffic is considered for | ||
356 | link availability purposes. | ||
321 | 357 | ||
322 | This option was added in bonding version 3.1.0. | 358 | This option was added in bonding version 3.1.0. |
323 | 359 | ||
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 0cbe6ec22d6f..2fa44cbe81b7 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
@@ -1017,7 +1017,7 @@ solution for a couple of reasons: | |||
1017 | in case of a bus-off condition after the specified delay time | 1017 | in case of a bus-off condition after the specified delay time |
1018 | in milliseconds. By default it's off. | 1018 | in milliseconds. By default it's off. |
1019 | 1019 | ||
1020 | "bitrate 125000 sample_point 0.875" | 1020 | "bitrate 125000 sample-point 0.875" |
1021 | Shows the real bit-rate in bits/sec and the sample-point in the | 1021 | Shows the real bit-rate in bits/sec and the sample-point in the |
1022 | range 0.000..0.999. If the calculation of bit-timing parameters | 1022 | range 0.000..0.999. If the calculation of bit-timing parameters |
1023 | is enabled in the kernel (CONFIG_CAN_CALC_BITTIMING=y), the | 1023 | is enabled in the kernel (CONFIG_CAN_CALC_BITTIMING=y), the |
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index a06b48d2f5cc..81f940f4e884 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
@@ -546,6 +546,130 @@ ffffffffa0069c8f + <x>: | |||
546 | For BPF JIT developers, bpf_jit_disasm, bpf_asm and bpf_dbg provides a useful | 546 | For BPF JIT developers, bpf_jit_disasm, bpf_asm and bpf_dbg provides a useful |
547 | toolchain for developing and testing the kernel's JIT compiler. | 547 | toolchain for developing and testing the kernel's JIT compiler. |
548 | 548 | ||
549 | BPF kernel internals | ||
550 | -------------------- | ||
551 | Internally, for the kernel interpreter, a different BPF instruction set | ||
552 | format with similar underlying principles from BPF described in previous | ||
553 | paragraphs is being used. However, the instruction set format is modelled | ||
554 | closer to the underlying architecture to mimic native instruction sets, so | ||
555 | that a better performance can be achieved (more details later). | ||
556 | |||
557 | It is designed to be JITed with one to one mapping, which can also open up | ||
558 | the possibility for GCC/LLVM compilers to generate optimized BPF code through | ||
559 | a BPF backend that performs almost as fast as natively compiled code. | ||
560 | |||
561 | The new instruction set was originally designed with the possible goal in | ||
562 | mind to write programs in "restricted C" and compile into BPF with a optional | ||
563 | GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with | ||
564 | minimal performance overhead over two steps, that is, C -> BPF -> native code. | ||
565 | |||
566 | Currently, the new format is being used for running user BPF programs, which | ||
567 | includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, | ||
568 | team driver's classifier for its load-balancing mode, netfilter's xt_bpf | ||
569 | extension, PTP dissector/classifier, and much more. They are all internally | ||
570 | converted by the kernel into the new instruction set representation and run | ||
571 | in the extended interpreter. For in-kernel handlers, this all works | ||
572 | transparently by using sk_unattached_filter_create() for setting up the | ||
573 | filter, resp. sk_unattached_filter_destroy() for destroying it. The macro | ||
574 | SK_RUN_FILTER(filter, ctx) transparently invokes the right BPF function to | ||
575 | run the filter. 'filter' is a pointer to struct sk_filter that we got from | ||
576 | sk_unattached_filter_create(), and 'ctx' the given context (e.g. skb pointer). | ||
577 | All constraints and restrictions from sk_chk_filter() apply before a | ||
578 | conversion to the new layout is being done behind the scenes! | ||
579 | |||
580 | Currently, for JITing, the user BPF format is being used and current BPF JIT | ||
581 | compilers reused whenever possible. In other words, we do not (yet!) perform | ||
582 | a JIT compilation in the new layout, however, future work will successively | ||
583 | migrate traditional JIT compilers into the new instruction format as well, so | ||
584 | that they will profit from the very same benefits. Thus, when speaking about | ||
585 | JIT in the following, a JIT compiler (TBD) for the new instruction format is | ||
586 | meant in this context. | ||
587 | |||
588 | Some core changes of the new internal format: | ||
589 | |||
590 | - Number of registers increase from 2 to 10: | ||
591 | |||
592 | The old format had two registers A and X, and a hidden frame pointer. The | ||
593 | new layout extends this to be 10 internal registers and a read-only frame | ||
594 | pointer. Since 64-bit CPUs are passing arguments to functions via registers | ||
595 | the number of args from BPF program to in-kernel function is restricted | ||
596 | to 5 and one register is used to accept return value from an in-kernel | ||
597 | function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ | ||
598 | sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved | ||
599 | registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. | ||
600 | |||
601 | Therefore, BPF calling convention is defined as: | ||
602 | |||
603 | * R0 - return value from in-kernel function | ||
604 | * R1 - R5 - arguments from BPF program to in-kernel function | ||
605 | * R6 - R9 - callee saved registers that in-kernel function will preserve | ||
606 | * R10 - read-only frame pointer to access stack | ||
607 | |||
608 | Thus, all BPF registers map one to one to HW registers on x86_64, aarch64, | ||
609 | etc, and BPF calling convention maps directly to ABIs used by the kernel on | ||
610 | 64-bit architectures. | ||
611 | |||
612 | On 32-bit architectures JIT may map programs that use only 32-bit arithmetic | ||
613 | and may let more complex programs to be interpreted. | ||
614 | |||
615 | R0 - R5 are scratch registers and BPF program needs spill/fill them if | ||
616 | necessary across calls. Note that there is only one BPF program (== one BPF | ||
617 | main routine) and it cannot call other BPF functions, it can only call | ||
618 | predefined in-kernel functions, though. | ||
619 | |||
620 | - Register width increases from 32-bit to 64-bit: | ||
621 | |||
622 | Still, the semantics of the original 32-bit ALU operations are preserved | ||
623 | via 32-bit subregisters. All BPF registers are 64-bit with 32-bit lower | ||
624 | subregisters that zero-extend into 64-bit if they are being written to. | ||
625 | That behavior maps directly to x86_64 and arm64 subregister definition, but | ||
626 | makes other JITs more difficult. | ||
627 | |||
628 | 32-bit architectures run 64-bit internal BPF programs via interpreter. | ||
629 | Their JITs may convert BPF programs that only use 32-bit subregisters into | ||
630 | native instruction set and let the rest being interpreted. | ||
631 | |||
632 | Operation is 64-bit, because on 64-bit architectures, pointers are also | ||
633 | 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, | ||
634 | so 32-bit BPF registers would otherwise require to define register-pair | ||
635 | ABI, thus, there won't be able to use a direct BPF register to HW register | ||
636 | mapping and JIT would need to do combine/split/move operations for every | ||
637 | register in and out of the function, which is complex, bug prone and slow. | ||
638 | Another reason is the use of atomic 64-bit counters. | ||
639 | |||
640 | - Conditional jt/jf targets replaced with jt/fall-through: | ||
641 | |||
642 | While the original design has constructs such as "if (cond) jump_true; | ||
643 | else jump_false;", they are being replaced into alternative constructs like | ||
644 | "if (cond) jump_true; /* else fall-through */". | ||
645 | |||
646 | - Introduces bpf_call insn and register passing convention for zero overhead | ||
647 | calls from/to other kernel functions: | ||
648 | |||
649 | After a kernel function call, R1 - R5 are reset to unreadable and R0 has a | ||
650 | return type of the function. Since R6 - R9 are callee saved, their state is | ||
651 | preserved across the call. | ||
652 | |||
653 | Also in the new design, BPF is limited to 4096 insns, which means that any | ||
654 | program will terminate quickly and will only call a fixed number of kernel | ||
655 | functions. Original BPF and the new format are two operand instructions, | ||
656 | which helps to do one-to-one mapping between BPF insn and x86 insn during JIT. | ||
657 | |||
658 | The input context pointer for invoking the interpreter function is generic, | ||
659 | its content is defined by a specific use case. For seccomp register R1 points | ||
660 | to seccomp_data, for converted BPF filters R1 points to a skb. | ||
661 | |||
662 | A program, that is translated internally consists of the following elements: | ||
663 | |||
664 | op:16, jt:8, jf:8, k:32 ==> op:8, a_reg:4, x_reg:4, off:16, imm:32 | ||
665 | |||
666 | Just like the original BPF, the new format runs within a controlled environment, | ||
667 | is deterministic and the kernel can easily prove that. The safety of the program | ||
668 | can be determined in two steps: first step does depth-first-search to disallow | ||
669 | loops and other CFG validation; second step starts from the first insn and | ||
670 | descends all possible paths. It simulates execution of every insn and observes | ||
671 | the state change of registers and stack. | ||
672 | |||
549 | Misc | 673 | Misc |
550 | ---- | 674 | ---- |
551 | 675 | ||
@@ -561,3 +685,4 @@ the underlying architecture. | |||
561 | 685 | ||
562 | Jay Schulist <jschlst@samba.org> | 686 | Jay Schulist <jschlst@samba.org> |
563 | Daniel Borkmann <dborkman@redhat.com> | 687 | Daniel Borkmann <dborkman@redhat.com> |
688 | Alexei Starovoitov <ast@plumgrid.com> | ||
diff --git a/Documentation/networking/gianfar.txt b/Documentation/networking/gianfar.txt index ad474ea07d07..ba1daea7f2e4 100644 --- a/Documentation/networking/gianfar.txt +++ b/Documentation/networking/gianfar.txt | |||
@@ -1,38 +1,8 @@ | |||
1 | The Gianfar Ethernet Driver | 1 | The Gianfar Ethernet Driver |
2 | Sysfs File description | ||
3 | 2 | ||
4 | Author: Andy Fleming <afleming@freescale.com> | 3 | Author: Andy Fleming <afleming@freescale.com> |
5 | Updated: 2005-07-28 | 4 | Updated: 2005-07-28 |
6 | 5 | ||
7 | SYSFS | ||
8 | |||
9 | Several of the features of the gianfar driver are controlled | ||
10 | through sysfs files. These are: | ||
11 | |||
12 | bd_stash: | ||
13 | To stash RX Buffer Descriptors in the L2, echo 'on' or '1' to | ||
14 | bd_stash, echo 'off' or '0' to disable | ||
15 | |||
16 | rx_stash_len: | ||
17 | To stash the first n bytes of the packet in L2, echo the number | ||
18 | of bytes to buf_stash_len. echo 0 to disable. | ||
19 | |||
20 | WARNING: You could really screw these up if you set them too low or high! | ||
21 | fifo_threshold: | ||
22 | To change the number of bytes the controller needs in the | ||
23 | fifo before it starts transmission, echo the number of bytes to | ||
24 | fifo_thresh. Range should be 0-511. | ||
25 | |||
26 | fifo_starve: | ||
27 | When the FIFO has less than this many bytes during a transmit, it | ||
28 | enters starve mode, and increases the priority of TX memory | ||
29 | transactions. To change, echo the number of bytes to | ||
30 | fifo_starve. Range should be 0-511. | ||
31 | |||
32 | fifo_starve_off: | ||
33 | Once in starve mode, the FIFO remains there until it has this | ||
34 | many bytes. To change, echo the number of bytes to | ||
35 | fifo_starve_off. Range should be 0-511. | ||
36 | 6 | ||
37 | CHECKSUM OFFLOADING | 7 | CHECKSUM OFFLOADING |
38 | 8 | ||
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt index 4ebbd659256f..43d3549366a0 100644 --- a/Documentation/networking/igb.txt +++ b/Documentation/networking/igb.txt | |||
@@ -36,54 +36,6 @@ Default Value: 0 | |||
36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to | 36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to |
37 | max_vfs worth of virtual function. | 37 | max_vfs worth of virtual function. |
38 | 38 | ||
39 | QueuePairs | ||
40 | ---------- | ||
41 | Valid Range: 0-1 | ||
42 | Default Value: 1 (TX and RX will be paired onto one interrupt vector) | ||
43 | |||
44 | If set to 0, when MSI-X is enabled, the TX and RX will attempt to occupy | ||
45 | separate vectors. | ||
46 | |||
47 | This option can be overridden to 1 if there are not sufficient interrupts | ||
48 | available. This can occur if any combination of RSS, VMDQ, and max_vfs | ||
49 | results in more than 4 queues being used. | ||
50 | |||
51 | Node | ||
52 | ---- | ||
53 | Valid Range: 0-n | ||
54 | Default Value: -1 (off) | ||
55 | |||
56 | 0 - n: where n is the number of the NUMA node that should be used to | ||
57 | allocate memory for this adapter port. | ||
58 | -1: uses the driver default of allocating memory on whichever processor is | ||
59 | running insmod/modprobe. | ||
60 | |||
61 | The Node parameter will allow you to pick which NUMA node you want to have | ||
62 | the adapter allocate memory from. All driver structures, in-memory queues, | ||
63 | and receive buffers will be allocated on the node specified. This parameter | ||
64 | is only useful when interrupt affinity is specified, otherwise some portion | ||
65 | of the time the interrupt could run on a different core than the memory is | ||
66 | allocated on, causing slower memory access and impacting throughput, CPU, or | ||
67 | both. | ||
68 | |||
69 | EEE | ||
70 | --- | ||
71 | Valid Range: 0-1 | ||
72 | Default Value: 1 (enabled) | ||
73 | |||
74 | A link between two EEE-compliant devices will result in periodic bursts of | ||
75 | data followed by long periods where in the link is in an idle state. This Low | ||
76 | Power Idle (LPI) state is supported in both 1Gbps and 100Mbps link speeds. | ||
77 | NOTE: EEE support requires autonegotiation. | ||
78 | |||
79 | DMAC | ||
80 | ---- | ||
81 | Valid Range: 0-1 | ||
82 | Default Value: 1 (enabled) | ||
83 | Enables or disables DMA Coalescing feature. | ||
84 | |||
85 | |||
86 | |||
87 | Additional Configurations | 39 | Additional Configurations |
88 | ========================= | 40 | ========================= |
89 | 41 | ||
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index ebf270719402..3544c98401fd 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt | |||
@@ -48,7 +48,7 @@ The MDIO bus | |||
48 | time, so it is safe for them to block, waiting for an interrupt to signal | 48 | time, so it is safe for them to block, waiting for an interrupt to signal |
49 | the operation is complete | 49 | the operation is complete |
50 | 50 | ||
51 | 2) A reset function is necessary. This is used to return the bus to an | 51 | 2) A reset function is optional. This is used to return the bus to an |
52 | initialized state. | 52 | initialized state. |
53 | 53 | ||
54 | 3) A probe function is needed. This function should set up anything the bus | 54 | 3) A probe function is needed. This function should set up anything the bus |
@@ -253,16 +253,25 @@ Writing a PHY driver | |||
253 | 253 | ||
254 | Each driver consists of a number of function pointers: | 254 | Each driver consists of a number of function pointers: |
255 | 255 | ||
256 | soft_reset: perform a PHY software reset | ||
256 | config_init: configures PHY into a sane state after a reset. | 257 | config_init: configures PHY into a sane state after a reset. |
257 | For instance, a Davicom PHY requires descrambling disabled. | 258 | For instance, a Davicom PHY requires descrambling disabled. |
258 | probe: Allocate phy->priv, optionally refuse to bind. | 259 | probe: Allocate phy->priv, optionally refuse to bind. |
259 | PHY may not have been reset or had fixups run yet. | 260 | PHY may not have been reset or had fixups run yet. |
260 | suspend/resume: power management | 261 | suspend/resume: power management |
261 | config_aneg: Changes the speed/duplex/negotiation settings | 262 | config_aneg: Changes the speed/duplex/negotiation settings |
263 | aneg_done: Determines the auto-negotiation result | ||
262 | read_status: Reads the current speed/duplex/negotiation settings | 264 | read_status: Reads the current speed/duplex/negotiation settings |
263 | ack_interrupt: Clear a pending interrupt | 265 | ack_interrupt: Clear a pending interrupt |
266 | did_interrupt: Checks if the PHY generated an interrupt | ||
264 | config_intr: Enable or disable interrupts | 267 | config_intr: Enable or disable interrupts |
265 | remove: Does any driver take-down | 268 | remove: Does any driver take-down |
269 | ts_info: Queries about the HW timestamping status | ||
270 | hwtstamp: Set the PHY HW timestamping configuration | ||
271 | rxtstamp: Requests a receive timestamp at the PHY level for a 'skb' | ||
272 | txtsamp: Requests a transmit timestamp at the PHY level for a 'skb' | ||
273 | set_wol: Enable Wake-on-LAN at the PHY level | ||
274 | get_wol: Get the Wake-on-LAN status at the PHY level | ||
266 | 275 | ||
267 | Of these, only config_aneg and read_status are required to be | 276 | Of these, only config_aneg and read_status are required to be |
268 | assigned by the driver code. The rest are optional. Also, it is | 277 | assigned by the driver code. The rest are optional. Also, it is |
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index 5a61a240a652..0e30c7845b2b 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt | |||
@@ -102,13 +102,18 @@ Examples: | |||
102 | The 'minimum' MAC is what you set with dstmac. | 102 | The 'minimum' MAC is what you set with dstmac. |
103 | 103 | ||
104 | pgset "flag [name]" Set a flag to determine behaviour. Current flags | 104 | pgset "flag [name]" Set a flag to determine behaviour. Current flags |
105 | are: IPSRC_RND #IP Source is random (between min/max), | 105 | are: IPSRC_RND # IP source is random (between min/max) |
106 | IPDST_RND, UDPSRC_RND, | 106 | IPDST_RND # IP destination is random |
107 | UDPDST_RND, MACSRC_RND, MACDST_RND | 107 | UDPSRC_RND, UDPDST_RND, |
108 | MACSRC_RND, MACDST_RND | ||
109 | TXSIZE_RND, IPV6, | ||
108 | MPLS_RND, VID_RND, SVID_RND | 110 | MPLS_RND, VID_RND, SVID_RND |
111 | FLOW_SEQ, | ||
109 | QUEUE_MAP_RND # queue map random | 112 | QUEUE_MAP_RND # queue map random |
110 | QUEUE_MAP_CPU # queue map mirrors smp_processor_id() | 113 | QUEUE_MAP_CPU # queue map mirrors smp_processor_id() |
111 | IPSEC # Make IPsec encapsulation for packet | 114 | UDPCSUM, |
115 | IPSEC # IPsec encapsulation (needs CONFIG_XFRM) | ||
116 | NODE_ALLOC # node specific memory allocation | ||
112 | 117 | ||
113 | pgset spi SPI_VALUE Set specific SA used to transform packet. | 118 | pgset spi SPI_VALUE Set specific SA used to transform packet. |
114 | 119 | ||
@@ -233,13 +238,22 @@ udp_dst_max | |||
233 | 238 | ||
234 | flag | 239 | flag |
235 | IPSRC_RND | 240 | IPSRC_RND |
236 | TXSIZE_RND | ||
237 | IPDST_RND | 241 | IPDST_RND |
238 | UDPSRC_RND | 242 | UDPSRC_RND |
239 | UDPDST_RND | 243 | UDPDST_RND |
240 | MACSRC_RND | 244 | MACSRC_RND |
241 | MACDST_RND | 245 | MACDST_RND |
246 | TXSIZE_RND | ||
247 | IPV6 | ||
248 | MPLS_RND | ||
249 | VID_RND | ||
250 | SVID_RND | ||
251 | FLOW_SEQ | ||
252 | QUEUE_MAP_RND | ||
253 | QUEUE_MAP_CPU | ||
254 | UDPCSUM | ||
242 | IPSEC | 255 | IPSEC |
256 | NODE_ALLOC | ||
243 | 257 | ||
244 | dst_min | 258 | dst_min |
245 | dst_max | 259 | dst_max |
diff --git a/Documentation/networking/rxrpc.txt b/Documentation/networking/rxrpc.txt index b89bc82eed46..16a924c486bf 100644 --- a/Documentation/networking/rxrpc.txt +++ b/Documentation/networking/rxrpc.txt | |||
@@ -27,6 +27,8 @@ Contents of this document: | |||
27 | 27 | ||
28 | (*) AF_RXRPC kernel interface. | 28 | (*) AF_RXRPC kernel interface. |
29 | 29 | ||
30 | (*) Configurable parameters. | ||
31 | |||
30 | 32 | ||
31 | ======== | 33 | ======== |
32 | OVERVIEW | 34 | OVERVIEW |
@@ -864,3 +866,82 @@ The kernel interface functions are as follows: | |||
864 | 866 | ||
865 | This is used to allocate a null RxRPC key that can be used to indicate | 867 | This is used to allocate a null RxRPC key that can be used to indicate |
866 | anonymous security for a particular domain. | 868 | anonymous security for a particular domain. |
869 | |||
870 | |||
871 | ======================= | ||
872 | CONFIGURABLE PARAMETERS | ||
873 | ======================= | ||
874 | |||
875 | The RxRPC protocol driver has a number of configurable parameters that can be | ||
876 | adjusted through sysctls in /proc/net/rxrpc/: | ||
877 | |||
878 | (*) req_ack_delay | ||
879 | |||
880 | The amount of time in milliseconds after receiving a packet with the | ||
881 | request-ack flag set before we honour the flag and actually send the | ||
882 | requested ack. | ||
883 | |||
884 | Usually the other side won't stop sending packets until the advertised | ||
885 | reception window is full (to a maximum of 255 packets), so delaying the | ||
886 | ACK permits several packets to be ACK'd in one go. | ||
887 | |||
888 | (*) soft_ack_delay | ||
889 | |||
890 | The amount of time in milliseconds after receiving a new packet before we | ||
891 | generate a soft-ACK to tell the sender that it doesn't need to resend. | ||
892 | |||
893 | (*) idle_ack_delay | ||
894 | |||
895 | The amount of time in milliseconds after all the packets currently in the | ||
896 | received queue have been consumed before we generate a hard-ACK to tell | ||
897 | the sender it can free its buffers, assuming no other reason occurs that | ||
898 | we would send an ACK. | ||
899 | |||
900 | (*) resend_timeout | ||
901 | |||
902 | The amount of time in milliseconds after transmitting a packet before we | ||
903 | transmit it again, assuming no ACK is received from the receiver telling | ||
904 | us they got it. | ||
905 | |||
906 | (*) max_call_lifetime | ||
907 | |||
908 | The maximum amount of time in seconds that a call may be in progress | ||
909 | before we preemptively kill it. | ||
910 | |||
911 | (*) dead_call_expiry | ||
912 | |||
913 | The amount of time in seconds before we remove a dead call from the call | ||
914 | list. Dead calls are kept around for a little while for the purpose of | ||
915 | repeating ACK and ABORT packets. | ||
916 | |||
917 | (*) connection_expiry | ||
918 | |||
919 | The amount of time in seconds after a connection was last used before we | ||
920 | remove it from the connection list. Whilst a connection is in existence, | ||
921 | it serves as a placeholder for negotiated security; when it is deleted, | ||
922 | the security must be renegotiated. | ||
923 | |||
924 | (*) transport_expiry | ||
925 | |||
926 | The amount of time in seconds after a transport was last used before we | ||
927 | remove it from the transport list. Whilst a transport is in existence, it | ||
928 | serves to anchor the peer data and keeps the connection ID counter. | ||
929 | |||
930 | (*) rxrpc_rx_window_size | ||
931 | |||
932 | The size of the receive window in packets. This is the maximum number of | ||
933 | unconsumed received packets we're willing to hold in memory for any | ||
934 | particular call. | ||
935 | |||
936 | (*) rxrpc_rx_mtu | ||
937 | |||
938 | The maximum packet MTU size that we're willing to receive in bytes. This | ||
939 | indicates to the peer whether we're willing to accept jumbo packets. | ||
940 | |||
941 | (*) rxrpc_rx_jumbo_max | ||
942 | |||
943 | The maximum number of packets that we're willing to accept in a jumbo | ||
944 | packet. Non-terminal packets in a jumbo packet must contain a four byte | ||
945 | header plus exactly 1412 bytes of data. The terminal packet must contain | ||
946 | a four byte header plus any amount of data. In any event, a jumbo packet | ||
947 | may not exceed rxrpc_rx_mtu in size. | ||
diff --git a/Documentation/networking/spider_net.txt b/Documentation/networking/spider_net.txt index 4b4adb8eb14f..b0b75f8463b3 100644 --- a/Documentation/networking/spider_net.txt +++ b/Documentation/networking/spider_net.txt | |||
@@ -73,7 +73,7 @@ Thus, in an idle system, the GDACTDPA, tail and head pointers will | |||
73 | all be pointing at the same descr, which should be "empty". All of the | 73 | all be pointing at the same descr, which should be "empty". All of the |
74 | other descrs in the ring should be "empty" as well. | 74 | other descrs in the ring should be "empty" as well. |
75 | 75 | ||
76 | The show_rx_chain() routine will print out the the locations of the | 76 | The show_rx_chain() routine will print out the locations of the |
77 | GDACTDPA, tail and head pointers. It will also summarize the contents | 77 | GDACTDPA, tail and head pointers. It will also summarize the contents |
78 | of the ring, starting at the tail pointer, and listing the status | 78 | of the ring, starting at the tail pointer, and listing the status |
79 | of the descrs that follow. | 79 | of the descrs that follow. |
diff --git a/Documentation/networking/tcp.txt b/Documentation/networking/tcp.txt index 7d11bb5dc30a..bdc4c0db51e1 100644 --- a/Documentation/networking/tcp.txt +++ b/Documentation/networking/tcp.txt | |||
@@ -30,7 +30,7 @@ A congestion control mechanism can be registered through functions in | |||
30 | tcp_cong.c. The functions used by the congestion control mechanism are | 30 | tcp_cong.c. The functions used by the congestion control mechanism are |
31 | registered via passing a tcp_congestion_ops struct to | 31 | registered via passing a tcp_congestion_ops struct to |
32 | tcp_register_congestion_control. As a minimum name, ssthresh, | 32 | tcp_register_congestion_control. As a minimum name, ssthresh, |
33 | cong_avoid, min_cwnd must be valid. | 33 | cong_avoid must be valid. |
34 | 34 | ||
35 | Private data for a congestion control mechanism is stored in tp->ca_priv. | 35 | Private data for a congestion control mechanism is stored in tp->ca_priv. |
36 | tcp_ca(tp) returns a pointer to this space. This is preallocated space - it | 36 | tcp_ca(tp) returns a pointer to this space. This is preallocated space - it |
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index 048c92b487f6..bc3554124903 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -202,6 +202,9 @@ Time stamps for outgoing packets are to be generated as follows: | |||
202 | and not free the skb. A driver not supporting hardware time stamping doesn't | 202 | and not free the skb. A driver not supporting hardware time stamping doesn't |
203 | do that. A driver must never touch sk_buff::tstamp! It is used to store | 203 | do that. A driver must never touch sk_buff::tstamp! It is used to store |
204 | software generated time stamps by the network subsystem. | 204 | software generated time stamps by the network subsystem. |
205 | - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware | ||
206 | as possible. skb_tx_timestamp() provides a software time stamp if requested | ||
207 | and hardware timestamping is not possible (SKBTX_IN_PROGRESS not set). | ||
205 | - As soon as the driver has sent the packet and/or obtained a | 208 | - As soon as the driver has sent the packet and/or obtained a |
206 | hardware time stamp for it, it passes the time stamp back by | 209 | hardware time stamp for it, it passes the time stamp back by |
207 | calling skb_hwtstamp_tx() with the original skb, the raw | 210 | calling skb_hwtstamp_tx() with the original skb, the raw |
@@ -212,6 +215,3 @@ Time stamps for outgoing packets are to be generated as follows: | |||
212 | this would occur at a later time in the processing pipeline than other | 215 | this would occur at a later time in the processing pipeline than other |
213 | software time stamping and therefore could lead to unexpected deltas | 216 | software time stamping and therefore could lead to unexpected deltas |
214 | between time stamps. | 217 | between time stamps. |
215 | - If the driver did not set the SKBTX_IN_PROGRESS flag (see above), then | ||
216 | dev_hard_start_xmit() checks whether software time stamping | ||
217 | is wanted as fallback and potentially generates the time stamp. | ||
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt index 13032c0140d4..e3155995ddd8 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt | |||
@@ -265,6 +265,9 @@ characters, each representing a particular tainted value. | |||
265 | 265 | ||
266 | 13: 'O' if an externally-built ("out-of-tree") module has been loaded. | 266 | 13: 'O' if an externally-built ("out-of-tree") module has been loaded. |
267 | 267 | ||
268 | 14: 'E' if an unsigned module has been loaded in a kernel supporting | ||
269 | module signature. | ||
270 | |||
268 | The primary reason for the 'Tainted: ' string is to tell kernel | 271 | The primary reason for the 'Tainted: ' string is to tell kernel |
269 | debuggers if this is a clean kernel or if anything unusual has | 272 | debuggers if this is a clean kernel or if anything unusual has |
270 | occurred. Tainting is permanent: even if an offending module is | 273 | occurred. Tainting is permanent: even if an offending module is |
diff --git a/Documentation/phy/samsung-usb2.txt b/Documentation/phy/samsung-usb2.txt new file mode 100644 index 000000000000..ed12d437189d --- /dev/null +++ b/Documentation/phy/samsung-usb2.txt | |||
@@ -0,0 +1,135 @@ | |||
1 | .------------------------------------------------------------------------------+ | ||
2 | | Samsung USB 2.0 PHY adaptation layer | | ||
3 | +-----------------------------------------------------------------------------+' | ||
4 | |||
5 | | 1. Description | ||
6 | +---------------- | ||
7 | |||
8 | The architecture of the USB 2.0 PHY module in Samsung SoCs is similar | ||
9 | among many SoCs. In spite of the similarities it proved difficult to | ||
10 | create a one driver that would fit all these PHY controllers. Often | ||
11 | the differences were minor and were found in particular bits of the | ||
12 | registers of the PHY. In some rare cases the order of register writes or | ||
13 | the PHY powering up process had to be altered. This adaptation layer is | ||
14 | a compromise between having separate drivers and having a single driver | ||
15 | with added support for many special cases. | ||
16 | |||
17 | | 2. Files description | ||
18 | +---------------------- | ||
19 | |||
20 | - phy-samsung-usb2.c | ||
21 | This is the main file of the adaptation layer. This file contains | ||
22 | the probe function and provides two callbacks to the Generic PHY | ||
23 | Framework. This two callbacks are used to power on and power off the | ||
24 | phy. They carry out the common work that has to be done on all version | ||
25 | of the PHY module. Depending on which SoC was chosen they execute SoC | ||
26 | specific callbacks. The specific SoC version is selected by choosing | ||
27 | the appropriate compatible string. In addition, this file contains | ||
28 | struct of_device_id definitions for particular SoCs. | ||
29 | |||
30 | - phy-samsung-usb2.h | ||
31 | This is the include file. It declares the structures used by this | ||
32 | driver. In addition it should contain extern declarations for | ||
33 | structures that describe particular SoCs. | ||
34 | |||
35 | | 3. Supporting SoCs | ||
36 | +-------------------- | ||
37 | |||
38 | To support a new SoC a new file should be added to the drivers/phy | ||
39 | directory. Each SoC's configuration is stored in an instance of the | ||
40 | struct samsung_usb2_phy_config. | ||
41 | |||
42 | struct samsung_usb2_phy_config { | ||
43 | const struct samsung_usb2_common_phy *phys; | ||
44 | int (*rate_to_clk)(unsigned long, u32 *); | ||
45 | unsigned int num_phys; | ||
46 | bool has_mode_switch; | ||
47 | }; | ||
48 | |||
49 | The num_phys is the number of phys handled by the driver. *phys is an | ||
50 | array that contains the configuration for each phy. The has_mode_switch | ||
51 | property is a boolean flag that determines whether the SoC has USB host | ||
52 | and device on a single pair of pins. If so, a special register has to | ||
53 | be modified to change the internal routing of these pins between a USB | ||
54 | device or host module. | ||
55 | |||
56 | For example the configuration for Exynos 4210 is following: | ||
57 | |||
58 | const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = { | ||
59 | .has_mode_switch = 0, | ||
60 | .num_phys = EXYNOS4210_NUM_PHYS, | ||
61 | .phys = exynos4210_phys, | ||
62 | .rate_to_clk = exynos4210_rate_to_clk, | ||
63 | } | ||
64 | |||
65 | - int (*rate_to_clk)(unsigned long, u32 *) | ||
66 | The rate_to_clk callback is to convert the rate of the clock | ||
67 | used as the reference clock for the PHY module to the value | ||
68 | that should be written in the hardware register. | ||
69 | |||
70 | The exynos4210_phys configuration array is as follows: | ||
71 | |||
72 | static const struct samsung_usb2_common_phy exynos4210_phys[] = { | ||
73 | { | ||
74 | .label = "device", | ||
75 | .id = EXYNOS4210_DEVICE, | ||
76 | .power_on = exynos4210_power_on, | ||
77 | .power_off = exynos4210_power_off, | ||
78 | }, | ||
79 | { | ||
80 | .label = "host", | ||
81 | .id = EXYNOS4210_HOST, | ||
82 | .power_on = exynos4210_power_on, | ||
83 | .power_off = exynos4210_power_off, | ||
84 | }, | ||
85 | { | ||
86 | .label = "hsic0", | ||
87 | .id = EXYNOS4210_HSIC0, | ||
88 | .power_on = exynos4210_power_on, | ||
89 | .power_off = exynos4210_power_off, | ||
90 | }, | ||
91 | { | ||
92 | .label = "hsic1", | ||
93 | .id = EXYNOS4210_HSIC1, | ||
94 | .power_on = exynos4210_power_on, | ||
95 | .power_off = exynos4210_power_off, | ||
96 | }, | ||
97 | {}, | ||
98 | }; | ||
99 | |||
100 | - int (*power_on)(struct samsung_usb2_phy_instance *); | ||
101 | - int (*power_off)(struct samsung_usb2_phy_instance *); | ||
102 | These two callbacks are used to power on and power off the phy | ||
103 | by modifying appropriate registers. | ||
104 | |||
105 | Final change to the driver is adding appropriate compatible value to the | ||
106 | phy-samsung-usb2.c file. In case of Exynos 4210 the following lines were | ||
107 | added to the struct of_device_id samsung_usb2_phy_of_match[] array: | ||
108 | |||
109 | #ifdef CONFIG_PHY_EXYNOS4210_USB2 | ||
110 | { | ||
111 | .compatible = "samsung,exynos4210-usb2-phy", | ||
112 | .data = &exynos4210_usb2_phy_config, | ||
113 | }, | ||
114 | #endif | ||
115 | |||
116 | To add further flexibility to the driver the Kconfig file enables to | ||
117 | include support for selected SoCs in the compiled driver. The Kconfig | ||
118 | entry for Exynos 4210 is following: | ||
119 | |||
120 | config PHY_EXYNOS4210_USB2 | ||
121 | bool "Support for Exynos 4210" | ||
122 | depends on PHY_SAMSUNG_USB2 | ||
123 | depends on CPU_EXYNOS4210 | ||
124 | help | ||
125 | Enable USB PHY support for Exynos 4210. This option requires that | ||
126 | Samsung USB 2.0 PHY driver is enabled and means that support for this | ||
127 | particular SoC is compiled in the driver. In case of Exynos 4210 four | ||
128 | phys are available - device, host, HSCI0 and HSCI1. | ||
129 | |||
130 | The newly created file that supports the new SoC has to be also added to the | ||
131 | Makefile. In case of Exynos 4210 the added line is following: | ||
132 | |||
133 | obj-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o | ||
134 | |||
135 | After completing these steps the support for the new SoC should be ready. | ||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index a66c9821b5ce..47d46dff70f7 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -391,7 +391,7 @@ When resuming from freeze, standby or memory sleep, the phases are: | |||
391 | the resume methods. This generally involves undoing the actions of the | 391 | the resume methods. This generally involves undoing the actions of the |
392 | preceding suspend_late phase. | 392 | preceding suspend_late phase. |
393 | 393 | ||
394 | 3 The resume methods should bring the the device back to its operating | 394 | 3 The resume methods should bring the device back to its operating |
395 | state, so that it can perform normal I/O. This generally involves | 395 | state, so that it can perform normal I/O. This generally involves |
396 | undoing the actions of the suspend phase. | 396 | undoing the actions of the suspend phase. |
397 | 397 | ||
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt index 483632087788..a5da5c7e7128 100644 --- a/Documentation/power/pm_qos_interface.txt +++ b/Documentation/power/pm_qos_interface.txt | |||
@@ -88,17 +88,19 @@ node. | |||
88 | 88 | ||
89 | 2. PM QoS per-device latency and flags framework | 89 | 2. PM QoS per-device latency and flags framework |
90 | 90 | ||
91 | For each device, there are two lists of PM QoS requests. One is maintained | 91 | For each device, there are three lists of PM QoS requests. Two of them are |
92 | along with the aggregated target of latency value and the other is for PM QoS | 92 | maintained along with the aggregated targets of resume latency and active |
93 | flags. Values are updated in response to changes of the request list. | 93 | state latency tolerance (in microseconds) and the third one is for PM QoS flags. |
94 | Values are updated in response to changes of the request list. | ||
94 | 95 | ||
95 | Target latency value is simply the minimum of the request values held in the | 96 | The target values of resume latency and active state latency tolerance are |
96 | parameter list elements. The PM QoS flags aggregate value is a gather (bitwise | 97 | simply the minimum of the request values held in the parameter list elements. |
97 | OR) of all list elements' values. Two device PM QoS flags are defined currently: | 98 | The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements' |
98 | PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP. | 99 | values. Two device PM QoS flags are defined currently: PM_QOS_FLAG_NO_POWER_OFF |
100 | and PM_QOS_FLAG_REMOTE_WAKEUP. | ||
99 | 101 | ||
100 | Note: the aggregated target value is implemented as an atomic variable so that | 102 | Note: The aggregated target values are implemented in such a way that reading |
101 | reading the aggregated value does not require any locking mechanism. | 103 | the aggregated value does not require any locking mechanism. |
102 | 104 | ||
103 | 105 | ||
104 | From kernel mode the use of this interface is the following: | 106 | From kernel mode the use of this interface is the following: |
@@ -132,19 +134,21 @@ The meaning of the return values is as follows: | |||
132 | PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been | 134 | PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been |
133 | initialized or the list of requests is empty. | 135 | initialized or the list of requests is empty. |
134 | 136 | ||
135 | int dev_pm_qos_add_ancestor_request(dev, handle, value) | 137 | int dev_pm_qos_add_ancestor_request(dev, handle, type, value) |
136 | Add a PM QoS request for the first direct ancestor of the given device whose | 138 | Add a PM QoS request for the first direct ancestor of the given device whose |
137 | power.ignore_children flag is unset. | 139 | power.ignore_children flag is unset (for DEV_PM_QOS_RESUME_LATENCY requests) |
140 | or whose power.set_latency_tolerance callback pointer is not NULL (for | ||
141 | DEV_PM_QOS_LATENCY_TOLERANCE requests). | ||
138 | 142 | ||
139 | int dev_pm_qos_expose_latency_limit(device, value) | 143 | int dev_pm_qos_expose_latency_limit(device, value) |
140 | Add a request to the device's PM QoS list of latency constraints and create | 144 | Add a request to the device's PM QoS list of resume latency constraints and |
141 | a sysfs attribute pm_qos_resume_latency_us under the device's power directory | 145 | create a sysfs attribute pm_qos_resume_latency_us under the device's power |
142 | allowing user space to manipulate that request. | 146 | directory allowing user space to manipulate that request. |
143 | 147 | ||
144 | void dev_pm_qos_hide_latency_limit(device) | 148 | void dev_pm_qos_hide_latency_limit(device) |
145 | Drop the request added by dev_pm_qos_expose_latency_limit() from the device's | 149 | Drop the request added by dev_pm_qos_expose_latency_limit() from the device's |
146 | PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us | 150 | PM QoS list of resume latency constraints and remove sysfs attribute |
147 | from the device's power directory. | 151 | pm_qos_resume_latency_us from the device's power directory. |
148 | 152 | ||
149 | int dev_pm_qos_expose_flags(device, value) | 153 | int dev_pm_qos_expose_flags(device, value) |
150 | Add a request to the device's PM QoS list of flags and create sysfs attributes | 154 | Add a request to the device's PM QoS list of flags and create sysfs attributes |
@@ -163,7 +167,7 @@ a per-device notification tree and a global notification tree. | |||
163 | int dev_pm_qos_add_notifier(device, notifier): | 167 | int dev_pm_qos_add_notifier(device, notifier): |
164 | Adds a notification callback function for the device. | 168 | Adds a notification callback function for the device. |
165 | The callback is called when the aggregated value of the device constraints list | 169 | The callback is called when the aggregated value of the device constraints list |
166 | is changed. | 170 | is changed (for resume latency device PM QoS only). |
167 | 171 | ||
168 | int dev_pm_qos_remove_notifier(device, notifier): | 172 | int dev_pm_qos_remove_notifier(device, notifier): |
169 | Removes the notification callback function for the device. | 173 | Removes the notification callback function for the device. |
@@ -171,14 +175,48 @@ Removes the notification callback function for the device. | |||
171 | int dev_pm_qos_add_global_notifier(notifier): | 175 | int dev_pm_qos_add_global_notifier(notifier): |
172 | Adds a notification callback function in the global notification tree of the | 176 | Adds a notification callback function in the global notification tree of the |
173 | framework. | 177 | framework. |
174 | The callback is called when the aggregated value for any device is changed. | 178 | The callback is called when the aggregated value for any device is changed |
179 | (for resume latency device PM QoS only). | ||
175 | 180 | ||
176 | int dev_pm_qos_remove_global_notifier(notifier): | 181 | int dev_pm_qos_remove_global_notifier(notifier): |
177 | Removes the notification callback function from the global notification tree | 182 | Removes the notification callback function from the global notification tree |
178 | of the framework. | 183 | of the framework. |
179 | 184 | ||
180 | 185 | ||
181 | From user mode: | 186 | Active state latency tolerance |
182 | No API for user space access to the per-device latency constraints is provided | 187 | |
183 | yet - still under discussion. | 188 | This device PM QoS type is used to support systems in which hardware may switch |
184 | 189 | to energy-saving operation modes on the fly. In those systems, if the operation | |
190 | mode chosen by the hardware attempts to save energy in an overly aggressive way, | ||
191 | it may cause excess latencies to be visible to software, causing it to miss | ||
192 | certain protocol requirements or target frame or sample rates etc. | ||
193 | |||
194 | If there is a latency tolerance control mechanism for a given device available | ||
195 | to software, the .set_latency_tolerance callback in that device's dev_pm_info | ||
196 | structure should be populated. The routine pointed to by it is should implement | ||
197 | whatever is necessary to transfer the effective requirement value to the | ||
198 | hardware. | ||
199 | |||
200 | Whenever the effective latency tolerance changes for the device, its | ||
201 | .set_latency_tolerance() callback will be executed and the effective value will | ||
202 | be passed to it. If that value is negative, which means that the list of | ||
203 | latency tolerance requirements for the device is empty, the callback is expected | ||
204 | to switch the underlying hardware latency tolerance control mechanism to an | ||
205 | autonomous mode if available. If that value is PM_QOS_LATENCY_ANY, in turn, and | ||
206 | the hardware supports a special "no requirement" setting, the callback is | ||
207 | expected to use it. That allows software to prevent the hardware from | ||
208 | automatically updating the device's latency tolerance in response to its power | ||
209 | state changes (e.g. during transitions from D3cold to D0), which generally may | ||
210 | be done in the autonomous latency tolerance control mode. | ||
211 | |||
212 | If .set_latency_tolerance() is present for the device, sysfs attribute | ||
213 | pm_qos_latency_tolerance_us will be present in the devivce's power directory. | ||
214 | Then, user space can use that attribute to specify its latency tolerance | ||
215 | requirement for the device, if any. Writing "any" to it means "no requirement, | ||
216 | but do not let the hardware control latency tolerance" and writing "auto" to it | ||
217 | allows the hardware to be switched to the autonomous mode if there are no other | ||
218 | requirements from the kernel side in the device's list. | ||
219 | |||
220 | Kernel code can use the functions described above along with the | ||
221 | DEV_PM_QOS_LATENCY_TOLERANCE device PM QoS type to add, remove and update | ||
222 | latency tolerance requirements for devices. | ||
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index b6ce00b2be9a..5f96daf8566a 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -232,7 +232,7 @@ defined in include/linux/pm.h: | |||
232 | equal to zero); the initial value of it is 1 (i.e. runtime PM is | 232 | equal to zero); the initial value of it is 1 (i.e. runtime PM is |
233 | initially disabled for all devices) | 233 | initially disabled for all devices) |
234 | 234 | ||
235 | unsigned int runtime_error; | 235 | int runtime_error; |
236 | - if set, there was a fatal error (one of the callbacks returned error code | 236 | - if set, there was a fatal error (one of the callbacks returned error code |
237 | as described in Section 2), so the helper funtions will not work until | 237 | as described in Section 2), so the helper funtions will not work until |
238 | this flag is cleared; this is the error code returned by the failing | 238 | this flag is cleared; this is the error code returned by the failing |
@@ -401,11 +401,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
401 | int pm_runtime_disable(struct device *dev); | 401 | int pm_runtime_disable(struct device *dev); |
402 | - increment the device's 'power.disable_depth' field (if the value of that | 402 | - increment the device's 'power.disable_depth' field (if the value of that |
403 | field was previously zero, this prevents subsystem-level runtime PM | 403 | field was previously zero, this prevents subsystem-level runtime PM |
404 | callbacks from being run for the device), make sure that all of the pending | 404 | callbacks from being run for the device), make sure that all of the |
405 | runtime PM operations on the device are either completed or canceled; | 405 | pending runtime PM operations on the device are either completed or |
406 | returns 1 if there was a resume request pending and it was necessary to | 406 | canceled; returns 1 if there was a resume request pending and it was |
407 | execute the subsystem-level resume callback for the device to satisfy that | 407 | necessary to execute the subsystem-level resume callback for the device |
408 | request, otherwise 0 is returned | 408 | to satisfy that request, otherwise 0 is returned |
409 | 409 | ||
410 | int pm_runtime_barrier(struct device *dev); | 410 | int pm_runtime_barrier(struct device *dev); |
411 | - check if there's a resume request pending for the device and resume it | 411 | - check if there's a resume request pending for the device and resume it |
@@ -667,11 +667,11 @@ driver/base/power/generic_ops.c: | |||
667 | 667 | ||
668 | int pm_generic_runtime_suspend(struct device *dev); | 668 | int pm_generic_runtime_suspend(struct device *dev); |
669 | - invoke the ->runtime_suspend() callback provided by the driver of this | 669 | - invoke the ->runtime_suspend() callback provided by the driver of this |
670 | device and return its result, or return -EINVAL if not defined | 670 | device and return its result, or return 0 if not defined |
671 | 671 | ||
672 | int pm_generic_runtime_resume(struct device *dev); | 672 | int pm_generic_runtime_resume(struct device *dev); |
673 | - invoke the ->runtime_resume() callback provided by the driver of this | 673 | - invoke the ->runtime_resume() callback provided by the driver of this |
674 | device and return its result, or return -EINVAL if not defined | 674 | device and return its result, or return 0 if not defined |
675 | 675 | ||
676 | int pm_generic_suspend(struct device *dev); | 676 | int pm_generic_suspend(struct device *dev); |
677 | - if the device has not been suspended at run time, invoke the ->suspend() | 677 | - if the device has not been suspended at run time, invoke the ->suspend() |
@@ -727,15 +727,12 @@ driver/base/power/generic_ops.c: | |||
727 | int pm_generic_restore_noirq(struct device *dev); | 727 | int pm_generic_restore_noirq(struct device *dev); |
728 | - invoke the ->restore_noirq() callback provided by the device's driver | 728 | - invoke the ->restore_noirq() callback provided by the device's driver |
729 | 729 | ||
730 | These functions can be assigned to the ->runtime_idle(), ->runtime_suspend(), | 730 | These functions are the defaults used by the PM core, if a subsystem doesn't |
731 | provide its own callbacks for ->runtime_idle(), ->runtime_suspend(), | ||
731 | ->runtime_resume(), ->suspend(), ->suspend_noirq(), ->resume(), | 732 | ->runtime_resume(), ->suspend(), ->suspend_noirq(), ->resume(), |
732 | ->resume_noirq(), ->freeze(), ->freeze_noirq(), ->thaw(), ->thaw_noirq(), | 733 | ->resume_noirq(), ->freeze(), ->freeze_noirq(), ->thaw(), ->thaw_noirq(), |
733 | ->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() callback | 734 | ->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() in the |
734 | pointers in the subsystem-level dev_pm_ops structures. | 735 | subsystem-level dev_pm_ops structure. |
735 | |||
736 | If a subsystem wishes to use all of them at the same time, it can simply assign | ||
737 | the GENERIC_SUBSYS_PM_OPS macro, defined in include/linux/pm.h, to its | ||
738 | dev_pm_ops structure pointer. | ||
739 | 736 | ||
740 | Device drivers that wish to use the same function as a system suspend, freeze, | 737 | Device drivers that wish to use the same function as a system suspend, freeze, |
741 | poweroff and runtime suspend callback, and similarly for system resume, thaw, | 738 | poweroff and runtime suspend callback, and similarly for system resume, thaw, |
@@ -873,7 +870,7 @@ Here is a schematic pseudo-code example: | |||
873 | foo->is_suspended = 0; | 870 | foo->is_suspended = 0; |
874 | pm_runtime_mark_last_busy(&foo->dev); | 871 | pm_runtime_mark_last_busy(&foo->dev); |
875 | if (foo->num_pending_requests > 0) | 872 | if (foo->num_pending_requests > 0) |
876 | foo_process_requests(foo); | 873 | foo_process_next_request(foo); |
877 | unlock(&foo->private_lock); | 874 | unlock(&foo->private_lock); |
878 | return 0; | 875 | return 0; |
879 | } | 876 | } |
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c index 4aba0436da65..f1ac2dae999e 100644 --- a/Documentation/ptp/testptp.c +++ b/Documentation/ptp/testptp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #include <errno.h> | 20 | #include <errno.h> |
21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
22 | #include <inttypes.h> | ||
22 | #include <math.h> | 23 | #include <math.h> |
23 | #include <signal.h> | 24 | #include <signal.h> |
24 | #include <stdio.h> | 25 | #include <stdio.h> |
@@ -120,11 +121,19 @@ static void usage(char *progname) | |||
120 | " -i val index for event/trigger\n" | 121 | " -i val index for event/trigger\n" |
121 | " -k val measure the time offset between system and phc clock\n" | 122 | " -k val measure the time offset between system and phc clock\n" |
122 | " for 'val' times (Maximum 25)\n" | 123 | " for 'val' times (Maximum 25)\n" |
124 | " -l list the current pin configuration\n" | ||
125 | " -L pin,val configure pin index 'pin' with function 'val'\n" | ||
126 | " the channel index is taken from the '-i' option\n" | ||
127 | " 'val' specifies the auxiliary function:\n" | ||
128 | " 0 - none\n" | ||
129 | " 1 - external time stamp\n" | ||
130 | " 2 - periodic output\n" | ||
123 | " -p val enable output with a period of 'val' nanoseconds\n" | 131 | " -p val enable output with a period of 'val' nanoseconds\n" |
124 | " -P val enable or disable (val=1|0) the system clock PPS\n" | 132 | " -P val enable or disable (val=1|0) the system clock PPS\n" |
125 | " -s set the ptp clock time from the system time\n" | 133 | " -s set the ptp clock time from the system time\n" |
126 | " -S set the system time from the ptp clock time\n" | 134 | " -S set the system time from the ptp clock time\n" |
127 | " -t val shift the ptp clock time by 'val' seconds\n", | 135 | " -t val shift the ptp clock time by 'val' seconds\n" |
136 | " -T val set the ptp clock time to 'val' seconds\n", | ||
128 | progname); | 137 | progname); |
129 | } | 138 | } |
130 | 139 | ||
@@ -134,6 +143,7 @@ int main(int argc, char *argv[]) | |||
134 | struct ptp_extts_event event; | 143 | struct ptp_extts_event event; |
135 | struct ptp_extts_request extts_request; | 144 | struct ptp_extts_request extts_request; |
136 | struct ptp_perout_request perout_request; | 145 | struct ptp_perout_request perout_request; |
146 | struct ptp_pin_desc desc; | ||
137 | struct timespec ts; | 147 | struct timespec ts; |
138 | struct timex tx; | 148 | struct timex tx; |
139 | 149 | ||
@@ -156,12 +166,15 @@ int main(int argc, char *argv[]) | |||
156 | int extts = 0; | 166 | int extts = 0; |
157 | int gettime = 0; | 167 | int gettime = 0; |
158 | int index = 0; | 168 | int index = 0; |
169 | int list_pins = 0; | ||
159 | int oneshot = 0; | 170 | int oneshot = 0; |
160 | int pct_offset = 0; | 171 | int pct_offset = 0; |
161 | int n_samples = 0; | 172 | int n_samples = 0; |
162 | int periodic = 0; | 173 | int periodic = 0; |
163 | int perout = -1; | 174 | int perout = -1; |
175 | int pin_index = -1, pin_func; | ||
164 | int pps = -1; | 176 | int pps = -1; |
177 | int seconds = 0; | ||
165 | int settime = 0; | 178 | int settime = 0; |
166 | 179 | ||
167 | int64_t t1, t2, tp; | 180 | int64_t t1, t2, tp; |
@@ -169,7 +182,7 @@ int main(int argc, char *argv[]) | |||
169 | 182 | ||
170 | progname = strrchr(argv[0], '/'); | 183 | progname = strrchr(argv[0], '/'); |
171 | progname = progname ? 1+progname : argv[0]; | 184 | progname = progname ? 1+progname : argv[0]; |
172 | while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghi:k:p:P:sSt:v"))) { | 185 | while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghi:k:lL:p:P:sSt:T:v"))) { |
173 | switch (c) { | 186 | switch (c) { |
174 | case 'a': | 187 | case 'a': |
175 | oneshot = atoi(optarg); | 188 | oneshot = atoi(optarg); |
@@ -199,6 +212,16 @@ int main(int argc, char *argv[]) | |||
199 | pct_offset = 1; | 212 | pct_offset = 1; |
200 | n_samples = atoi(optarg); | 213 | n_samples = atoi(optarg); |
201 | break; | 214 | break; |
215 | case 'l': | ||
216 | list_pins = 1; | ||
217 | break; | ||
218 | case 'L': | ||
219 | cnt = sscanf(optarg, "%d,%d", &pin_index, &pin_func); | ||
220 | if (cnt != 2) { | ||
221 | usage(progname); | ||
222 | return -1; | ||
223 | } | ||
224 | break; | ||
202 | case 'p': | 225 | case 'p': |
203 | perout = atoi(optarg); | 226 | perout = atoi(optarg); |
204 | break; | 227 | break; |
@@ -214,6 +237,10 @@ int main(int argc, char *argv[]) | |||
214 | case 't': | 237 | case 't': |
215 | adjtime = atoi(optarg); | 238 | adjtime = atoi(optarg); |
216 | break; | 239 | break; |
240 | case 'T': | ||
241 | settime = 3; | ||
242 | seconds = atoi(optarg); | ||
243 | break; | ||
217 | case 'h': | 244 | case 'h': |
218 | usage(progname); | 245 | usage(progname); |
219 | return 0; | 246 | return 0; |
@@ -245,12 +272,14 @@ int main(int argc, char *argv[]) | |||
245 | " %d programmable alarms\n" | 272 | " %d programmable alarms\n" |
246 | " %d external time stamp channels\n" | 273 | " %d external time stamp channels\n" |
247 | " %d programmable periodic signals\n" | 274 | " %d programmable periodic signals\n" |
248 | " %d pulse per second\n", | 275 | " %d pulse per second\n" |
276 | " %d programmable pins\n", | ||
249 | caps.max_adj, | 277 | caps.max_adj, |
250 | caps.n_alarm, | 278 | caps.n_alarm, |
251 | caps.n_ext_ts, | 279 | caps.n_ext_ts, |
252 | caps.n_per_out, | 280 | caps.n_per_out, |
253 | caps.pps); | 281 | caps.pps, |
282 | caps.n_pins); | ||
254 | } | 283 | } |
255 | } | 284 | } |
256 | 285 | ||
@@ -304,6 +333,16 @@ int main(int argc, char *argv[]) | |||
304 | } | 333 | } |
305 | } | 334 | } |
306 | 335 | ||
336 | if (settime == 3) { | ||
337 | ts.tv_sec = seconds; | ||
338 | ts.tv_nsec = 0; | ||
339 | if (clock_settime(clkid, &ts)) { | ||
340 | perror("clock_settime"); | ||
341 | } else { | ||
342 | puts("set time okay"); | ||
343 | } | ||
344 | } | ||
345 | |||
307 | if (extts) { | 346 | if (extts) { |
308 | memset(&extts_request, 0, sizeof(extts_request)); | 347 | memset(&extts_request, 0, sizeof(extts_request)); |
309 | extts_request.index = index; | 348 | extts_request.index = index; |
@@ -331,6 +370,24 @@ int main(int argc, char *argv[]) | |||
331 | } | 370 | } |
332 | } | 371 | } |
333 | 372 | ||
373 | if (list_pins) { | ||
374 | int n_pins = 0; | ||
375 | if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { | ||
376 | perror("PTP_CLOCK_GETCAPS"); | ||
377 | } else { | ||
378 | n_pins = caps.n_pins; | ||
379 | } | ||
380 | for (i = 0; i < n_pins; i++) { | ||
381 | desc.index = i; | ||
382 | if (ioctl(fd, PTP_PIN_GETFUNC, &desc)) { | ||
383 | perror("PTP_PIN_GETFUNC"); | ||
384 | break; | ||
385 | } | ||
386 | printf("name %s index %u func %u chan %u\n", | ||
387 | desc.name, desc.index, desc.func, desc.chan); | ||
388 | } | ||
389 | } | ||
390 | |||
334 | if (oneshot) { | 391 | if (oneshot) { |
335 | install_handler(SIGALRM, handle_alarm); | 392 | install_handler(SIGALRM, handle_alarm); |
336 | /* Create a timer. */ | 393 | /* Create a timer. */ |
@@ -392,6 +449,18 @@ int main(int argc, char *argv[]) | |||
392 | } | 449 | } |
393 | } | 450 | } |
394 | 451 | ||
452 | if (pin_index >= 0) { | ||
453 | memset(&desc, 0, sizeof(desc)); | ||
454 | desc.index = pin_index; | ||
455 | desc.func = pin_func; | ||
456 | desc.chan = index; | ||
457 | if (ioctl(fd, PTP_PIN_SETFUNC, &desc)) { | ||
458 | perror("PTP_PIN_SETFUNC"); | ||
459 | } else { | ||
460 | puts("set pin function okay"); | ||
461 | } | ||
462 | } | ||
463 | |||
395 | if (pps != -1) { | 464 | if (pps != -1) { |
396 | int enable = pps ? 1 : 0; | 465 | int enable = pps ? 1 : 0; |
397 | if (ioctl(fd, PTP_ENABLE_PPS, enable)) { | 466 | if (ioctl(fd, PTP_ENABLE_PPS, enable)) { |
@@ -428,14 +497,14 @@ int main(int argc, char *argv[]) | |||
428 | interval = t2 - t1; | 497 | interval = t2 - t1; |
429 | offset = (t2 + t1) / 2 - tp; | 498 | offset = (t2 + t1) / 2 - tp; |
430 | 499 | ||
431 | printf("system time: %ld.%ld\n", | 500 | printf("system time: %" PRId64 ".%u\n", |
432 | (pct+2*i)->sec, (pct+2*i)->nsec); | 501 | (pct+2*i)->sec, (pct+2*i)->nsec); |
433 | printf("phc time: %ld.%ld\n", | 502 | printf("phc time: %" PRId64 ".%u\n", |
434 | (pct+2*i+1)->sec, (pct+2*i+1)->nsec); | 503 | (pct+2*i+1)->sec, (pct+2*i+1)->nsec); |
435 | printf("system time: %ld.%ld\n", | 504 | printf("system time: %" PRId64 ".%u\n", |
436 | (pct+2*i+2)->sec, (pct+2*i+2)->nsec); | 505 | (pct+2*i+2)->sec, (pct+2*i+2)->nsec); |
437 | printf("system/phc clock time offset is %ld ns\n" | 506 | printf("system/phc clock time offset is %" PRId64 " ns\n" |
438 | "system clock time delay is %ld ns\n", | 507 | "system clock time delay is %" PRId64 " ns\n", |
439 | offset, interval); | 508 | offset, interval); |
440 | } | 509 | } |
441 | 510 | ||
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt index 271438c0617f..47ce9a5336e1 100644 --- a/Documentation/rapidio/sysfs.txt +++ b/Documentation/rapidio/sysfs.txt | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4 | 4 | ||
5 | 1. Device Subdirectories | 5 | 1. RapidIO Device Subdirectories |
6 | ------------------------ | 6 | -------------------------------- |
7 | 7 | ||
8 | For each RapidIO device, the RapidIO subsystem creates files in an individual | 8 | For each RapidIO device, the RapidIO subsystem creates files in an individual |
9 | subdirectory with the following name, /sys/bus/rapidio/devices/<device_name>. | 9 | subdirectory with the following name, /sys/bus/rapidio/devices/<device_name>. |
@@ -25,8 +25,8 @@ seen by the enumerating host (destID = 1): | |||
25 | NOTE: An enumerating or discovering endpoint does not create a sysfs entry for | 25 | NOTE: An enumerating or discovering endpoint does not create a sysfs entry for |
26 | itself, this is why an endpoint with destID=1 is not shown in the list. | 26 | itself, this is why an endpoint with destID=1 is not shown in the list. |
27 | 27 | ||
28 | 2. Attributes Common for All Devices | 28 | 2. Attributes Common for All RapidIO Devices |
29 | ------------------------------------ | 29 | -------------------------------------------- |
30 | 30 | ||
31 | Each device subdirectory contains the following informational read-only files: | 31 | Each device subdirectory contains the following informational read-only files: |
32 | 32 | ||
@@ -52,16 +52,16 @@ This attribute is similar in behavior to the "config" attribute of PCI devices | |||
52 | and provides an access to the RapidIO device registers using standard file read | 52 | and provides an access to the RapidIO device registers using standard file read |
53 | and write operations. | 53 | and write operations. |
54 | 54 | ||
55 | 3. Endpoint Device Attributes | 55 | 3. RapidIO Endpoint Device Attributes |
56 | ----------------------------- | 56 | ------------------------------------- |
57 | 57 | ||
58 | Currently Linux RapidIO subsystem does not create any endpoint specific sysfs | 58 | Currently Linux RapidIO subsystem does not create any endpoint specific sysfs |
59 | attributes. It is possible that RapidIO master port drivers and endpoint device | 59 | attributes. It is possible that RapidIO master port drivers and endpoint device |
60 | drivers will add their device-specific sysfs attributes but such attributes are | 60 | drivers will add their device-specific sysfs attributes but such attributes are |
61 | outside the scope of this document. | 61 | outside the scope of this document. |
62 | 62 | ||
63 | 4. Switch Device Attributes | 63 | 4. RapidIO Switch Device Attributes |
64 | --------------------------- | 64 | ----------------------------------- |
65 | 65 | ||
66 | RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports | 66 | RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports |
67 | common and device-specific sysfs attributes for switches. Because switches are | 67 | common and device-specific sysfs attributes for switches. Because switches are |
@@ -106,3 +106,53 @@ attribute: | |||
106 | for that controller always will be 0. | 106 | for that controller always will be 0. |
107 | To initiate RapidIO enumeration/discovery on all available mports | 107 | To initiate RapidIO enumeration/discovery on all available mports |
108 | a user must write '-1' (or RIO_MPORT_ANY) into this attribute file. | 108 | a user must write '-1' (or RIO_MPORT_ANY) into this attribute file. |
109 | |||
110 | |||
111 | 6. RapidIO Bus Controllers/Ports | ||
112 | -------------------------------- | ||
113 | |||
114 | On-chip RapidIO controllers and PCIe-to-RapidIO bridges (referenced as | ||
115 | "Master Port" or "mport") are presented in sysfs as the special class of | ||
116 | devices: "rapidio_port". | ||
117 | |||
118 | The /sys/class/rapidio_port subdirectory contains individual subdirectories | ||
119 | named as "rapidioN" where N = mport ID registered with RapidIO subsystem. | ||
120 | |||
121 | NOTE: An mport ID is not a RapidIO destination ID assigned to a given local | ||
122 | mport device. | ||
123 | |||
124 | Each mport device subdirectory in addition to standard entries contains the | ||
125 | following device-specific attributes: | ||
126 | |||
127 | port_destid - reports RapidIO destination ID assigned to the given RapidIO | ||
128 | mport device. If value 0xFFFFFFFF is returned this means that | ||
129 | no valid destination ID have been assigned to the mport (yet). | ||
130 | Normally, before enumeration/discovery have been executed only | ||
131 | fabric enumerating mports have a valid destination ID assigned | ||
132 | to them using "hdid=..." rapidio module parameter. | ||
133 | sys_size - reports RapidIO common transport system size: | ||
134 | 0 = small (8-bit destination ID, max. 256 devices), | ||
135 | 1 = large (16-bit destination ID, max. 65536 devices). | ||
136 | |||
137 | After enumeration or discovery was performed for a given mport device, | ||
138 | the corresponding subdirectory will also contain subdirectories for each | ||
139 | child RapidIO device connected to the mport. Naming conventions for RapidIO | ||
140 | devices are described in Section 1 above. | ||
141 | |||
142 | The example below shows mport device subdirectory with several child RapidIO | ||
143 | devices attached to it. | ||
144 | |||
145 | [rio@rapidio ~]$ ls /sys/class/rapidio_port/rapidio0/ -l | ||
146 | total 0 | ||
147 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0001 | ||
148 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0004 | ||
149 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0007 | ||
150 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0002 | ||
151 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0003 | ||
152 | drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0005 | ||
153 | lrwxrwxrwx 1 root root 0 Feb 11 15:11 device -> ../../../0000:01:00.0 | ||
154 | -r--r--r-- 1 root root 4096 Feb 11 15:11 port_destid | ||
155 | drwxr-xr-x 2 root root 0 Feb 11 15:11 power | ||
156 | lrwxrwxrwx 1 root root 0 Feb 11 15:04 subsystem -> ../../../../../../class/rapidio_port | ||
157 | -r--r--r-- 1 root root 4096 Feb 11 15:11 sys_size | ||
158 | -rw-r--r-- 1 root root 4096 Feb 11 15:04 uevent | ||
diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt index 9290de703450..a2f27bbf2cba 100644 --- a/Documentation/scheduler/sched-arch.txt +++ b/Documentation/scheduler/sched-arch.txt | |||
@@ -8,7 +8,7 @@ Context switch | |||
8 | By default, the switch_to arch function is called with the runqueue | 8 | By default, the switch_to arch function is called with the runqueue |
9 | locked. This is usually not a problem unless switch_to may need to | 9 | locked. This is usually not a problem unless switch_to may need to |
10 | take the runqueue lock. This is usually due to a wake up operation in | 10 | take the runqueue lock. This is usually due to a wake up operation in |
11 | the context switch. See arch/ia64/include/asm/system.h for an example. | 11 | the context switch. See arch/ia64/include/asm/switch_to.h for an example. |
12 | 12 | ||
13 | To request the scheduler call switch_to with the runqueue unlocked, | 13 | To request the scheduler call switch_to with the runqueue unlocked, |
14 | you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file | 14 | you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file |
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 6edaa65b0818..91ba58ef02d7 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,16 @@ | |||
1 | Release Date : Mon. Mar 10, 2014 17:00:00 PST 2014 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Adam Radford | ||
4 | Kashyap Desai | ||
5 | Sumit Saxena | ||
6 | Current Version : 06.803.01.00-rc1 | ||
7 | Old Version : 06.700.06.00-rc1 | ||
8 | 1. Load correct raid context timeout value for multipathing & clustering. | ||
9 | 2. Fix megasas_ioc_init_fusion to use local stack variable. | ||
10 | 3. Return leaked MPT frames to MPT command pool. | ||
11 | 4. Add Dell PowerEdge VRTX SR-IOV VF device support. | ||
12 | 5. Version and Changelog update. | ||
13 | ------------------------------------------------------------------------------- | ||
1 | Release Date : Sat. Aug 31, 2013 17:00:00 PST 2013 - | 14 | Release Date : Sat. Aug 31, 2013 17:00:00 PST 2013 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 15 | (emaild-id:megaraidlinux@lsi.com) |
3 | Adam Radford | 16 | Adam Radford |
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index 7a2d30c132e3..5ea996f21d6c 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
@@ -3,7 +3,7 @@ | |||
3 | "Good for you, you've decided to clean the elevator!" | 3 | "Good for you, you've decided to clean the elevator!" |
4 | - The Elevator, from Dark Star | 4 | - The Elevator, from Dark Star |
5 | 5 | ||
6 | Smack is the the Simplified Mandatory Access Control Kernel. | 6 | Smack is the Simplified Mandatory Access Control Kernel. |
7 | Smack is a kernel based implementation of mandatory access | 7 | Smack is a kernel based implementation of mandatory access |
8 | control that includes simplicity in its primary design goals. | 8 | control that includes simplicity in its primary design goals. |
9 | 9 | ||
diff --git a/Documentation/sgi-visws.txt b/Documentation/sgi-visws.txt deleted file mode 100644 index 7ff0811ca2ba..000000000000 --- a/Documentation/sgi-visws.txt +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | |||
2 | The SGI Visual Workstations (models 320 and 540) are based around | ||
3 | the Cobalt, Lithium, and Arsenic ASICs. The Cobalt ASIC is the | ||
4 | main system ASIC which interfaces the 1-4 IA32 cpus, the memory | ||
5 | system, and the I/O system in the Lithium ASIC. The Cobalt ASIC | ||
6 | also contains the 3D gfx rendering engine which renders to main | ||
7 | system memory -- part of which is used as the frame buffer which | ||
8 | is DMA'ed to a video connector using the Arsenic ASIC. A PIIX4 | ||
9 | chip and NS87307 are used to provide legacy device support (IDE, | ||
10 | serial, floppy, and parallel). | ||
11 | |||
12 | The Visual Workstation chipset largely conforms to the PC architecture | ||
13 | with some notable exceptions such as interrupt handling. | ||
diff --git a/Documentation/sound/oss/vwsnd b/Documentation/sound/oss/vwsnd deleted file mode 100644 index 4c6cbdb3c548..000000000000 --- a/Documentation/sound/oss/vwsnd +++ /dev/null | |||
@@ -1,293 +0,0 @@ | |||
1 | vwsnd - Sound driver for the Silicon Graphics 320 and 540 Visual | ||
2 | Workstations' onboard audio. | ||
3 | |||
4 | Copyright 1999 Silicon Graphics, Inc. All rights reserved. | ||
5 | |||
6 | |||
7 | At the time of this writing, March 1999, there are two models of | ||
8 | Visual Workstation, the 320 and the 540. This document only describes | ||
9 | those models. Future Visual Workstation models may have different | ||
10 | sound capabilities, and this driver will probably not work on those | ||
11 | boxes. | ||
12 | |||
13 | The Visual Workstation has an Analog Devices AD1843 "SoundComm" audio | ||
14 | codec chip. The AD1843 is accessed through the Cobalt I/O ASIC, also | ||
15 | known as Lithium. This driver programs both chips. | ||
16 | |||
17 | ============================================================================== | ||
18 | QUICK CONFIGURATION | ||
19 | |||
20 | # insmod soundcore | ||
21 | # insmod vwsnd | ||
22 | |||
23 | ============================================================================== | ||
24 | I/O CONNECTIONS | ||
25 | |||
26 | On the Visual Workstation, only three of the AD1843 inputs are hooked | ||
27 | up. The analog line in jacks are connected to the AD1843's AUX1 | ||
28 | input. The CD audio lines are connected to the AD1843's AUX2 input. | ||
29 | The microphone jack is connected to the AD1843's MIC input. The mic | ||
30 | jack is mono, but the signal is delivered to both the left and right | ||
31 | MIC inputs. You can record in stereo from the mic input, but you will | ||
32 | get the same signal on both channels (within the limits of A/D | ||
33 | accuracy). Full scale on the Line input is +/- 2.0 V. Full scale on | ||
34 | the MIC input is 20 dB less, or +/- 0.2 V. | ||
35 | |||
36 | The AD1843's LOUT1 outputs are connected to the Line Out jacks. The | ||
37 | AD1843's HPOUT outputs are connected to the speaker/headphone jack. | ||
38 | LOUT2 is not connected. Line out's maximum level is +/- 2.0 V peak to | ||
39 | peak. The speaker/headphone out's maximum is +/- 4.0 V peak to peak. | ||
40 | |||
41 | The AD1843's PCM input channel and one of its output channels (DAC1) | ||
42 | are connected to Lithium. The other output channel (DAC2) is not | ||
43 | connected. | ||
44 | |||
45 | ============================================================================== | ||
46 | CAPABILITIES | ||
47 | |||
48 | The AD1843 has PCM input and output (Pulse Code Modulation, also known | ||
49 | as wavetable). PCM input and output can be mono or stereo in any of | ||
50 | four formats. The formats are 16 bit signed and 8 bit unsigned, | ||
51 | u-Law, and A-Law format. Any sample rate from 4 KHz to 49 KHz is | ||
52 | available, in 1 Hz increments. | ||
53 | |||
54 | The AD1843 includes an analog mixer that can mix all three input | ||
55 | signals (line, mic and CD) into the analog outputs. The mixer has a | ||
56 | separate gain control and mute switch for each input. | ||
57 | |||
58 | There are two outputs, line out and speaker/headphone out. They | ||
59 | always produce the same signal, and the speaker always has 3 dB more | ||
60 | gain than the line out. The speaker/headphone output can be muted, | ||
61 | but this driver does not export that function. | ||
62 | |||
63 | The hardware can sync audio to the video clock, but this driver does | ||
64 | not have a way to specify syncing to video. | ||
65 | |||
66 | ============================================================================== | ||
67 | PROGRAMMING | ||
68 | |||
69 | This section explains the API supported by the driver. Also see the | ||
70 | Open Sound Programming Guide at http://www.opensound.com/pguide/ . | ||
71 | This section assumes familiarity with that document. | ||
72 | |||
73 | The driver has two interfaces, an I/O interface and a mixer interface. | ||
74 | There is no MIDI or sequencer capability. | ||
75 | |||
76 | ============================================================================== | ||
77 | PROGRAMMING PCM I/O | ||
78 | |||
79 | The I/O interface is usually accessed as /dev/audio or /dev/dsp. | ||
80 | Using the standard Open Sound System (OSS) ioctl calls, the sample | ||
81 | rate, number of channels, and sample format may be set within the | ||
82 | limitations described above. The driver supports triggering. It also | ||
83 | supports getting the input and output pointers with one-sample | ||
84 | accuracy. | ||
85 | |||
86 | The SNDCTL_DSP_GETCAP ioctl returns these capabilities. | ||
87 | |||
88 | DSP_CAP_DUPLEX - driver supports full duplex. | ||
89 | |||
90 | DSP_CAP_TRIGGER - driver supports triggering. | ||
91 | |||
92 | DSP_CAP_REALTIME - values returned by SNDCTL_DSP_GETIPTR | ||
93 | and SNDCTL_DSP_GETOPTR are accurate to a few samples. | ||
94 | |||
95 | Memory mapping (mmap) is not implemented. | ||
96 | |||
97 | The driver permits subdivided fragment sizes from 64 to 4096 bytes. | ||
98 | The number of fragments can be anything from 3 fragments to however | ||
99 | many fragments fit into 124 kilobytes. It is up to the user to | ||
100 | determine how few/small fragments can be used without introducing | ||
101 | glitches with a given workload. Linux is not realtime, so we can't | ||
102 | promise anything. (sigh...) | ||
103 | |||
104 | When this driver is switched into or out of mu-Law or A-Law mode on | ||
105 | output, it may produce an audible click. This is unavoidable. To | ||
106 | prevent clicking, use signed 16-bit mode instead, and convert from | ||
107 | mu-Law or A-Law format in software. | ||
108 | |||
109 | ============================================================================== | ||
110 | PROGRAMMING THE MIXER INTERFACE | ||
111 | |||
112 | The mixer interface is usually accessed as /dev/mixer. It is accessed | ||
113 | through ioctls. The mixer allows the application to control gain or | ||
114 | mute several audio signal paths, and also allows selection of the | ||
115 | recording source. | ||
116 | |||
117 | Each of the constants described here can be read using the | ||
118 | MIXER_READ(SOUND_MIXER_xxx) ioctl. Those that are not read-only can | ||
119 | also be written using the MIXER_WRITE(SOUND_MIXER_xxx) ioctl. In most | ||
120 | cases, <sys/soundcard.h> defines constants SOUND_MIXER_READ_xxx and | ||
121 | SOUND_MIXER_WRITE_xxx which work just as well. | ||
122 | |||
123 | SOUND_MIXER_CAPS Read-only | ||
124 | |||
125 | This is a mask of optional driver capabilities that are implemented. | ||
126 | This driver's only capability is SOUND_CAP_EXCL_INPUT, which means | ||
127 | that only one recording source can be active at a time. | ||
128 | |||
129 | SOUND_MIXER_DEVMASK Read-only | ||
130 | |||
131 | This is a mask of the sound channels. This driver's channels are PCM, | ||
132 | LINE, MIC, CD, and RECLEV. | ||
133 | |||
134 | SOUND_MIXER_STEREODEVS Read-only | ||
135 | |||
136 | This is a mask of which sound channels are capable of stereo. All | ||
137 | channels are capable of stereo. (But see caveat on MIC input in I/O | ||
138 | CONNECTIONS section above). | ||
139 | |||
140 | SOUND_MIXER_OUTMASK Read-only | ||
141 | |||
142 | This is a mask of channels that route inputs through to outputs. | ||
143 | Those are LINE, MIC, and CD. | ||
144 | |||
145 | SOUND_MIXER_RECMASK Read-only | ||
146 | |||
147 | This is a mask of channels that can be recording sources. Those are | ||
148 | PCM, LINE, MIC, CD. | ||
149 | |||
150 | SOUND_MIXER_PCM Default: 0x5757 (0 dB) | ||
151 | |||
152 | This is the gain control for PCM output. The left and right channel | ||
153 | gain are controlled independently. This gain control has 64 levels, | ||
154 | which range from -82.5 dB to +12.0 dB in 1.5 dB steps. Those 64 | ||
155 | levels are mapped onto 100 levels at the ioctl, see below. | ||
156 | |||
157 | SOUND_MIXER_LINE Default: 0x4a4a (0 dB) | ||
158 | |||
159 | This is the gain control for mixing the Line In source into the | ||
160 | outputs. The left and right channel gain are controlled | ||
161 | independently. This gain control has 32 levels, which range from | ||
162 | -34.5 dB to +12.0 dB in 1.5 dB steps. Those 32 levels are mapped onto | ||
163 | 100 levels at the ioctl, see below. | ||
164 | |||
165 | SOUND_MIXER_MIC Default: 0x4a4a (0 dB) | ||
166 | |||
167 | This is the gain control for mixing the MIC source into the outputs. | ||
168 | The left and right channel gain are controlled independently. This | ||
169 | gain control has 32 levels, which range from -34.5 dB to +12.0 dB in | ||
170 | 1.5 dB steps. Those 32 levels are mapped onto 100 levels at the | ||
171 | ioctl, see below. | ||
172 | |||
173 | SOUND_MIXER_CD Default: 0x4a4a (0 dB) | ||
174 | |||
175 | This is the gain control for mixing the CD audio source into the | ||
176 | outputs. The left and right channel gain are controlled | ||
177 | independently. This gain control has 32 levels, which range from | ||
178 | -34.5 dB to +12.0 dB in 1.5 dB steps. Those 32 levels are mapped onto | ||
179 | 100 levels at the ioctl, see below. | ||
180 | |||
181 | SOUND_MIXER_RECLEV Default: 0 (0 dB) | ||
182 | |||
183 | This is the gain control for PCM input (RECording LEVel). The left | ||
184 | and right channel gain are controlled independently. This gain | ||
185 | control has 16 levels, which range from 0 dB to +22.5 dB in 1.5 dB | ||
186 | steps. Those 16 levels are mapped onto 100 levels at the ioctl, see | ||
187 | below. | ||
188 | |||
189 | SOUND_MIXER_RECSRC Default: SOUND_MASK_LINE | ||
190 | |||
191 | This is a mask of currently selected PCM input sources (RECording | ||
192 | SouRCes). Because the AD1843 can only have a single recording source | ||
193 | at a time, only one bit at a time can be set in this mask. The | ||
194 | allowable values are SOUND_MASK_PCM, SOUND_MASK_LINE, SOUND_MASK_MIC, | ||
195 | or SOUND_MASK_CD. Selecting SOUND_MASK_PCM sets up internal | ||
196 | resampling which is useful for loopback testing and for hardware | ||
197 | sample rate conversion. But software sample rate conversion is | ||
198 | probably faster, so I don't know how useful that is. | ||
199 | |||
200 | SOUND_MIXER_OUTSRC DEFAULT: SOUND_MASK_LINE|SOUND_MASK_MIC|SOUND_MASK_CD | ||
201 | |||
202 | This is a mask of sources that are currently passed through to the | ||
203 | outputs. Those sources whose bits are not set are muted. | ||
204 | |||
205 | ============================================================================== | ||
206 | GAIN CONTROL | ||
207 | |||
208 | There are five gain controls listed above. Each has 16, 32, or 64 | ||
209 | steps. Each control has 1.5 dB of gain per step. Each control is | ||
210 | stereo. | ||
211 | |||
212 | The OSS defines the argument to a channel gain ioctl as having two | ||
213 | components, left and right, each of which ranges from 0 to 100. The | ||
214 | two components are packed into the same word, with the left side gain | ||
215 | in the least significant byte, and the right side gain in the second | ||
216 | least significant byte. In C, we would say this. | ||
217 | |||
218 | #include <assert.h> | ||
219 | |||
220 | ... | ||
221 | |||
222 | assert(leftgain >= 0 && leftgain <= 100); | ||
223 | assert(rightgain >= 0 && rightgain <= 100); | ||
224 | arg = leftgain | rightgain << 8; | ||
225 | |||
226 | So each OSS gain control has 101 steps. But the hardware has 16, 32, | ||
227 | or 64 steps. The hardware steps are spread across the 101 OSS steps | ||
228 | nearly evenly. The conversion formulas are like this, given N equals | ||
229 | 16, 32, or 64. | ||
230 | |||
231 | int round = N/2 - 1; | ||
232 | OSS_gain_steps = (hw_gain_steps * 100 + round) / (N - 1); | ||
233 | hw_gain_steps = (OSS_gain_steps * (N - 1) + round) / 100; | ||
234 | |||
235 | Here is a snippet of C code that will return the left and right gain | ||
236 | of any channel in dB. Pass it one of the predefined gain_desc_t | ||
237 | structures to access any of the five channels' gains. | ||
238 | |||
239 | typedef struct gain_desc { | ||
240 | float min_gain; | ||
241 | float gain_step; | ||
242 | int nbits; | ||
243 | int chan; | ||
244 | } gain_desc_t; | ||
245 | |||
246 | const gain_desc_t gain_pcm = { -82.5, 1.5, 6, SOUND_MIXER_PCM }; | ||
247 | const gain_desc_t gain_line = { -34.5, 1.5, 5, SOUND_MIXER_LINE }; | ||
248 | const gain_desc_t gain_mic = { -34.5, 1.5, 5, SOUND_MIXER_MIC }; | ||
249 | const gain_desc_t gain_cd = { -34.5, 1.5, 5, SOUND_MIXER_CD }; | ||
250 | const gain_desc_t gain_reclev = { 0.0, 1.5, 4, SOUND_MIXER_RECLEV }; | ||
251 | |||
252 | int get_gain_dB(int fd, const gain_desc_t *gp, | ||
253 | float *left, float *right) | ||
254 | { | ||
255 | int word; | ||
256 | int lg, rg; | ||
257 | int mask = (1 << gp->nbits) - 1; | ||
258 | |||
259 | if (ioctl(fd, MIXER_READ(gp->chan), &word) != 0) | ||
260 | return -1; /* fail */ | ||
261 | lg = word & 0xFF; | ||
262 | rg = word >> 8 & 0xFF; | ||
263 | lg = (lg * mask + mask / 2) / 100; | ||
264 | rg = (rg * mask + mask / 2) / 100; | ||
265 | *left = gp->min_gain + gp->gain_step * lg; | ||
266 | *right = gp->min_gain + gp->gain_step * rg; | ||
267 | return 0; | ||
268 | } | ||
269 | |||
270 | And here is the corresponding routine to set a channel's gain in dB. | ||
271 | |||
272 | int set_gain_dB(int fd, const gain_desc_t *gp, float left, float right) | ||
273 | { | ||
274 | float max_gain = | ||
275 | gp->min_gain + (1 << gp->nbits) * gp->gain_step; | ||
276 | float round = gp->gain_step / 2; | ||
277 | int mask = (1 << gp->nbits) - 1; | ||
278 | int word; | ||
279 | int lg, rg; | ||
280 | |||
281 | if (left < gp->min_gain || right < gp->min_gain) | ||
282 | return EINVAL; | ||
283 | lg = (left - gp->min_gain + round) / gp->gain_step; | ||
284 | rg = (right - gp->min_gain + round) / gp->gain_step; | ||
285 | if (lg >= (1 << gp->nbits) || rg >= (1 << gp->nbits)) | ||
286 | return EINVAL; | ||
287 | lg = (100 * lg + mask / 2) / mask; | ||
288 | rg = (100 * rg + mask / 2) / mask; | ||
289 | word = lg | rg << 8; | ||
290 | |||
291 | return ioctl(fd, MIXER_WRITE(gp->chan), &word); | ||
292 | } | ||
293 | |||
diff --git a/Documentation/spi/spidev b/Documentation/spi/spidev index ed2da5e5b28a..3d14035b1766 100644 --- a/Documentation/spi/spidev +++ b/Documentation/spi/spidev | |||
@@ -85,6 +85,12 @@ settings for data transfer parameters: | |||
85 | SPI_MODE_0..SPI_MODE_3; or if you prefer you can combine SPI_CPOL | 85 | SPI_MODE_0..SPI_MODE_3; or if you prefer you can combine SPI_CPOL |
86 | (clock polarity, idle high iff this is set) or SPI_CPHA (clock phase, | 86 | (clock polarity, idle high iff this is set) or SPI_CPHA (clock phase, |
87 | sample on trailing edge iff this is set) flags. | 87 | sample on trailing edge iff this is set) flags. |
88 | Note that this request is limited to SPI mode flags that fit in a | ||
89 | single byte. | ||
90 | |||
91 | SPI_IOC_RD_MODE32, SPI_IOC_WR_MODE32 ... pass a pointer to a uin32_t | ||
92 | which will return (RD) or assign (WR) the full SPI transfer mode, | ||
93 | not limited to the bits that fit in one byte. | ||
88 | 94 | ||
89 | SPI_IOC_RD_LSB_FIRST, SPI_IOC_WR_LSB_FIRST ... pass a pointer to a byte | 95 | SPI_IOC_RD_LSB_FIRST, SPI_IOC_WR_LSB_FIRST ... pass a pointer to a byte |
90 | which will return (RD) or assign (WR) the bit justification used to | 96 | which will return (RD) or assign (WR) the bit justification used to |
diff --git a/Documentation/spi/spidev_fdx.c b/Documentation/spi/spidev_fdx.c index 36ec0774ca0b..0ea3e51292fc 100644 --- a/Documentation/spi/spidev_fdx.c +++ b/Documentation/spi/spidev_fdx.c | |||
@@ -78,10 +78,10 @@ static void do_msg(int fd, int len) | |||
78 | 78 | ||
79 | static void dumpstat(const char *name, int fd) | 79 | static void dumpstat(const char *name, int fd) |
80 | { | 80 | { |
81 | __u8 mode, lsb, bits; | 81 | __u8 lsb, bits; |
82 | __u32 speed; | 82 | __u32 mode, speed; |
83 | 83 | ||
84 | if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) { | 84 | if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) { |
85 | perror("SPI rd_mode"); | 85 | perror("SPI rd_mode"); |
86 | return; | 86 | return; |
87 | } | 87 | } |
@@ -98,7 +98,7 @@ static void dumpstat(const char *name, int fd) | |||
98 | return; | 98 | return; |
99 | } | 99 | } |
100 | 100 | ||
101 | printf("%s: spi mode %d, %d bits %sper word, %d Hz max\n", | 101 | printf("%s: spi mode 0x%x, %d bits %sper word, %d Hz max\n", |
102 | name, mode, bits, lsb ? "(lsb first) " : "", speed); | 102 | name, mode, bits, lsb ? "(lsb first) " : "", speed); |
103 | } | 103 | } |
104 | 104 | ||
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c index 16feda901469..3a2f9d59edab 100644 --- a/Documentation/spi/spidev_test.c +++ b/Documentation/spi/spidev_test.c | |||
@@ -30,7 +30,7 @@ static void pabort(const char *s) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | static const char *device = "/dev/spidev1.1"; | 32 | static const char *device = "/dev/spidev1.1"; |
33 | static uint8_t mode; | 33 | static uint32_t mode; |
34 | static uint8_t bits = 8; | 34 | static uint8_t bits = 8; |
35 | static uint32_t speed = 500000; | 35 | static uint32_t speed = 500000; |
36 | static uint16_t delay; | 36 | static uint16_t delay; |
@@ -57,6 +57,21 @@ static void transfer(int fd) | |||
57 | .bits_per_word = bits, | 57 | .bits_per_word = bits, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | if (mode & SPI_TX_QUAD) | ||
61 | tr.tx_nbits = 4; | ||
62 | else if (mode & SPI_TX_DUAL) | ||
63 | tr.tx_nbits = 2; | ||
64 | if (mode & SPI_RX_QUAD) | ||
65 | tr.rx_nbits = 4; | ||
66 | else if (mode & SPI_RX_DUAL) | ||
67 | tr.rx_nbits = 2; | ||
68 | if (!(mode & SPI_LOOP)) { | ||
69 | if (mode & (SPI_TX_QUAD | SPI_TX_DUAL)) | ||
70 | tr.rx_buf = 0; | ||
71 | else if (mode & (SPI_RX_QUAD | SPI_RX_DUAL)) | ||
72 | tr.tx_buf = 0; | ||
73 | } | ||
74 | |||
60 | ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); | 75 | ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); |
61 | if (ret < 1) | 76 | if (ret < 1) |
62 | pabort("can't send spi message"); | 77 | pabort("can't send spi message"); |
@@ -81,7 +96,11 @@ static void print_usage(const char *prog) | |||
81 | " -O --cpol clock polarity\n" | 96 | " -O --cpol clock polarity\n" |
82 | " -L --lsb least significant bit first\n" | 97 | " -L --lsb least significant bit first\n" |
83 | " -C --cs-high chip select active high\n" | 98 | " -C --cs-high chip select active high\n" |
84 | " -3 --3wire SI/SO signals shared\n"); | 99 | " -3 --3wire SI/SO signals shared\n" |
100 | " -N --no-cs no chip select\n" | ||
101 | " -R --ready slave pulls low to pause\n" | ||
102 | " -2 --dual dual transfer\n" | ||
103 | " -4 --quad quad transfer\n"); | ||
85 | exit(1); | 104 | exit(1); |
86 | } | 105 | } |
87 | 106 | ||
@@ -101,11 +120,13 @@ static void parse_opts(int argc, char *argv[]) | |||
101 | { "3wire", 0, 0, '3' }, | 120 | { "3wire", 0, 0, '3' }, |
102 | { "no-cs", 0, 0, 'N' }, | 121 | { "no-cs", 0, 0, 'N' }, |
103 | { "ready", 0, 0, 'R' }, | 122 | { "ready", 0, 0, 'R' }, |
123 | { "dual", 0, 0, '2' }, | ||
124 | { "quad", 0, 0, '4' }, | ||
104 | { NULL, 0, 0, 0 }, | 125 | { NULL, 0, 0, 0 }, |
105 | }; | 126 | }; |
106 | int c; | 127 | int c; |
107 | 128 | ||
108 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3NR", lopts, NULL); | 129 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3NR24", lopts, NULL); |
109 | 130 | ||
110 | if (c == -1) | 131 | if (c == -1) |
111 | break; | 132 | break; |
@@ -147,11 +168,23 @@ static void parse_opts(int argc, char *argv[]) | |||
147 | case 'R': | 168 | case 'R': |
148 | mode |= SPI_READY; | 169 | mode |= SPI_READY; |
149 | break; | 170 | break; |
171 | case '2': | ||
172 | mode |= SPI_TX_DUAL; | ||
173 | break; | ||
174 | case '4': | ||
175 | mode |= SPI_TX_QUAD; | ||
176 | break; | ||
150 | default: | 177 | default: |
151 | print_usage(argv[0]); | 178 | print_usage(argv[0]); |
152 | break; | 179 | break; |
153 | } | 180 | } |
154 | } | 181 | } |
182 | if (mode & SPI_LOOP) { | ||
183 | if (mode & SPI_TX_DUAL) | ||
184 | mode |= SPI_RX_DUAL; | ||
185 | if (mode & SPI_TX_QUAD) | ||
186 | mode |= SPI_RX_QUAD; | ||
187 | } | ||
155 | } | 188 | } |
156 | 189 | ||
157 | int main(int argc, char *argv[]) | 190 | int main(int argc, char *argv[]) |
@@ -168,11 +201,11 @@ int main(int argc, char *argv[]) | |||
168 | /* | 201 | /* |
169 | * spi mode | 202 | * spi mode |
170 | */ | 203 | */ |
171 | ret = ioctl(fd, SPI_IOC_WR_MODE, &mode); | 204 | ret = ioctl(fd, SPI_IOC_WR_MODE32, &mode); |
172 | if (ret == -1) | 205 | if (ret == -1) |
173 | pabort("can't set spi mode"); | 206 | pabort("can't set spi mode"); |
174 | 207 | ||
175 | ret = ioctl(fd, SPI_IOC_RD_MODE, &mode); | 208 | ret = ioctl(fd, SPI_IOC_RD_MODE32, &mode); |
176 | if (ret == -1) | 209 | if (ret == -1) |
177 | pabort("can't get spi mode"); | 210 | pabort("can't get spi mode"); |
178 | 211 | ||
@@ -198,7 +231,7 @@ int main(int argc, char *argv[]) | |||
198 | if (ret == -1) | 231 | if (ret == -1) |
199 | pabort("can't get max speed hz"); | 232 | pabort("can't get max speed hz"); |
200 | 233 | ||
201 | printf("spi mode: %d\n", mode); | 234 | printf("spi mode: 0x%x\n", mode); |
202 | printf("bits per word: %d\n", bits); | 235 | printf("bits per word: %d\n", bits); |
203 | printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000); | 236 | printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000); |
204 | 237 | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index e55124e7c40c..9886c3d57fc2 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -317,13 +317,15 @@ for more than this value report a warning. | |||
317 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | 317 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. |
318 | 318 | ||
319 | 0: means infinite timeout - no checking done. | 319 | 0: means infinite timeout - no checking done. |
320 | Possible values to set are in range {0..LONG_MAX/HZ}. | ||
320 | 321 | ||
321 | ============================================================== | 322 | ============================================================== |
322 | 323 | ||
323 | hung_task_warning: | 324 | hung_task_warnings: |
324 | 325 | ||
325 | The maximum number of warnings to report. During a check interval | 326 | The maximum number of warnings to report. During a check interval |
326 | When this value is reached, no more the warnings will be reported. | 327 | if a hung task is detected, this value is decreased by 1. |
328 | When this value reaches 0, no more warnings will be reported. | ||
327 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | 329 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. |
328 | 330 | ||
329 | -1: report an infinite number of warnings. | 331 | -1: report an infinite number of warnings. |
@@ -441,8 +443,7 @@ feature should be disabled. Otherwise, if the system overhead from the | |||
441 | feature is too high then the rate the kernel samples for NUMA hinting | 443 | feature is too high then the rate the kernel samples for NUMA hinting |
442 | faults may be controlled by the numa_balancing_scan_period_min_ms, | 444 | faults may be controlled by the numa_balancing_scan_period_min_ms, |
443 | numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, | 445 | numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, |
444 | numa_balancing_scan_size_mb, numa_balancing_settle_count sysctls and | 446 | numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls. |
445 | numa_balancing_migrate_deferred. | ||
446 | 447 | ||
447 | ============================================================== | 448 | ============================================================== |
448 | 449 | ||
@@ -483,13 +484,6 @@ rate for each task. | |||
483 | numa_balancing_scan_size_mb is how many megabytes worth of pages are | 484 | numa_balancing_scan_size_mb is how many megabytes worth of pages are |
484 | scanned for a given scan. | 485 | scanned for a given scan. |
485 | 486 | ||
486 | numa_balancing_migrate_deferred is how many page migrations get skipped | ||
487 | unconditionally, after a page migration is skipped because a page is shared | ||
488 | with other tasks. This reduces page migration overhead, and determines | ||
489 | how much stronger the "move task near its memory" policy scheduler becomes, | ||
490 | versus the "move memory near its task" memory management policy, for workloads | ||
491 | with shared memory. | ||
492 | |||
493 | ============================================================== | 487 | ============================================================== |
494 | 488 | ||
495 | osrelease, ostype & version: | 489 | osrelease, ostype & version: |
@@ -792,6 +786,8 @@ can be ORed together: | |||
792 | 1024 - A module from drivers/staging was loaded. | 786 | 1024 - A module from drivers/staging was loaded. |
793 | 2048 - The system is working around a severe firmware bug. | 787 | 2048 - The system is working around a severe firmware bug. |
794 | 4096 - An out-of-tree module has been loaded. | 788 | 4096 - An out-of-tree module has been loaded. |
789 | 8192 - An unsigned module has been loaded in a kernel supporting module | ||
790 | signature. | ||
795 | 791 | ||
796 | ============================================================== | 792 | ============================================================== |
797 | 793 | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index d614a9b6a280..dd9d0e33b443 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -175,18 +175,39 @@ Setting this to zero disables periodic writeback altogether. | |||
175 | 175 | ||
176 | drop_caches | 176 | drop_caches |
177 | 177 | ||
178 | Writing to this will cause the kernel to drop clean caches, dentries and | 178 | Writing to this will cause the kernel to drop clean caches, as well as |
179 | inodes from memory, causing that memory to become free. | 179 | reclaimable slab objects like dentries and inodes. Once dropped, their |
180 | memory becomes free. | ||
180 | 181 | ||
181 | To free pagecache: | 182 | To free pagecache: |
182 | echo 1 > /proc/sys/vm/drop_caches | 183 | echo 1 > /proc/sys/vm/drop_caches |
183 | To free dentries and inodes: | 184 | To free reclaimable slab objects (includes dentries and inodes): |
184 | echo 2 > /proc/sys/vm/drop_caches | 185 | echo 2 > /proc/sys/vm/drop_caches |
185 | To free pagecache, dentries and inodes: | 186 | To free slab objects and pagecache: |
186 | echo 3 > /proc/sys/vm/drop_caches | 187 | echo 3 > /proc/sys/vm/drop_caches |
187 | 188 | ||
188 | As this is a non-destructive operation and dirty objects are not freeable, the | 189 | This is a non-destructive operation and will not free any dirty objects. |
189 | user should run `sync' first. | 190 | To increase the number of objects freed by this operation, the user may run |
191 | `sync' prior to writing to /proc/sys/vm/drop_caches. This will minimize the | ||
192 | number of dirty objects on the system and create more candidates to be | ||
193 | dropped. | ||
194 | |||
195 | This file is not a means to control the growth of the various kernel caches | ||
196 | (inodes, dentries, pagecache, etc...) These objects are automatically | ||
197 | reclaimed by the kernel when memory is needed elsewhere on the system. | ||
198 | |||
199 | Use of this file can cause performance problems. Since it discards cached | ||
200 | objects, it may cost a significant amount of I/O and CPU to recreate the | ||
201 | dropped objects, especially if they were under heavy use. Because of this, | ||
202 | use outside of a testing or debugging environment is not recommended. | ||
203 | |||
204 | You may see informational messages in your kernel log when this file is | ||
205 | used: | ||
206 | |||
207 | cat (1234): drop_caches: 3 | ||
208 | |||
209 | These are informational only. They do not mean that anything is wrong | ||
210 | with your system. To disable them, echo 4 (bit 3) into drop_caches. | ||
190 | 211 | ||
191 | ============================================================== | 212 | ============================================================== |
192 | 213 | ||
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt index 3bd33b8dc7c4..21d514ced212 100644 --- a/Documentation/trace/events-power.txt +++ b/Documentation/trace/events-power.txt | |||
@@ -92,5 +92,5 @@ dev_pm_qos_remove_request "device=%s type=%s new_value=%d" | |||
92 | 92 | ||
93 | The first parameter gives the device name which tries to add/update/remove | 93 | The first parameter gives the device name which tries to add/update/remove |
94 | QoS requests. | 94 | QoS requests. |
95 | The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY"). | 95 | The second parameter gives the request type (e.g. "DEV_PM_QOS_RESUME_LATENCY"). |
96 | The third parameter is value to be added/updated/removed. | 96 | The third parameter is value to be added/updated/removed. |
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt index 79fcafc7fd64..3f669b9e8852 100644 --- a/Documentation/trace/ftrace-design.txt +++ b/Documentation/trace/ftrace-design.txt | |||
@@ -358,11 +358,8 @@ Every arch has an init callback function. If you need to do something early on | |||
358 | to initialize some state, this is the time to do that. Otherwise, this simple | 358 | to initialize some state, this is the time to do that. Otherwise, this simple |
359 | function below should be sufficient for most people: | 359 | function below should be sufficient for most people: |
360 | 360 | ||
361 | int __init ftrace_dyn_arch_init(void *data) | 361 | int __init ftrace_dyn_arch_init(void) |
362 | { | 362 | { |
363 | /* return value is done indirectly via data */ | ||
364 | *(unsigned long *)data = 0; | ||
365 | |||
366 | return 0; | 363 | return 0; |
367 | } | 364 | } |
368 | 365 | ||
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt index 7d350b496585..ff747b6fa39b 100644 --- a/Documentation/trace/ring-buffer-design.txt +++ b/Documentation/trace/ring-buffer-design.txt | |||
@@ -683,7 +683,7 @@ against nested writers. | |||
683 | cmpxchg(tail_page, temp_page, next_page) | 683 | cmpxchg(tail_page, temp_page, next_page) |
684 | 684 | ||
685 | The above will update the tail page if it is still pointing to the expected | 685 | The above will update the tail page if it is still pointing to the expected |
686 | page. If this fails, a nested write pushed it forward, the the current write | 686 | page. If this fails, a nested write pushed it forward, the current write |
687 | does not need to push it. | 687 | does not need to push it. |
688 | 688 | ||
689 | 689 | ||
diff --git a/Documentation/usb/WUSB-Design-overview.txt b/Documentation/usb/WUSB-Design-overview.txt index 4c5e37939344..1cd07c017cf6 100644 --- a/Documentation/usb/WUSB-Design-overview.txt +++ b/Documentation/usb/WUSB-Design-overview.txt | |||
@@ -25,7 +25,7 @@ updated content. | |||
25 | * Design-overview.txt-1.8 | 25 | * Design-overview.txt-1.8 |
26 | 26 | ||
27 | This code implements a Ultra Wide Band stack for Linux, as well as | 27 | This code implements a Ultra Wide Band stack for Linux, as well as |
28 | drivers for the the USB based UWB radio controllers defined in the | 28 | drivers for the USB based UWB radio controllers defined in the |
29 | Wireless USB 1.0 specification (including Wireless USB host controller | 29 | Wireless USB 1.0 specification (including Wireless USB host controller |
30 | and an Intel WiNET controller). | 30 | and an Intel WiNET controller). |
31 | 31 | ||
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index f14475011fea..2f6e93597ce0 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -163,3 +163,4 @@ | |||
163 | 162 -> Adlink MPG24 | 163 | 162 -> Adlink MPG24 |
164 | 163 -> Bt848 Capture 14MHz | 164 | 163 -> Bt848 Capture 14MHz |
165 | 164 -> CyberVision CV06 (SV) | 165 | 164 -> CyberVision CV06 (SV) |
166 | 165 -> Kworld V-Stream Xpert TV PVR878 | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 9f056d512e35..fc009d0ee7d6 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -31,10 +31,13 @@ | |||
31 | 30 -> NetUP Dual DVB-T/C-CI RF [1b55:e2e4] | 31 | 30 -> NetUP Dual DVB-T/C-CI RF [1b55:e2e4] |
32 | 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39] | 32 | 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39] |
33 | 32 -> MPX-885 | 33 | 32 -> MPX-885 |
34 | 33 -> Mygica X8507 [14f1:8502] | 34 | 33 -> Mygica X8502/X8507 ISDB-T [14f1:8502] |
35 | 34 -> TerraTec Cinergy T PCIe Dual [153b:117e] | 35 | 34 -> TerraTec Cinergy T PCIe Dual [153b:117e] |
36 | 35 -> TeVii S471 [d471:9022] | 36 | 35 -> TeVii S471 [d471:9022] |
37 | 36 -> Hauppauge WinTV-HVR1255 [0070:2259] | 37 | 36 -> Hauppauge WinTV-HVR1255 [0070:2259] |
38 | 37 -> Prof Revolution DVB-S2 8000 [8000:3034] | 38 | 37 -> Prof Revolution DVB-S2 8000 [8000:3034] |
39 | 38 -> Hauppauge WinTV-HVR4400 [0070:c108,0070:c138,0070:c12a,0070:c1f8] | 39 | 38 -> Hauppauge WinTV-HVR4400 [0070:c108,0070:c138,0070:c12a,0070:c1f8] |
40 | 39 -> AVerTV Hybrid Express Slim HC81R [1461:d939] | 40 | 39 -> AVerTV Hybrid Express Slim HC81R [1461:d939] |
41 | 40 -> TurboSight TBS 6981 [6981:8888] | ||
42 | 41 -> TurboSight TBS 6980 [6980:8888] | ||
43 | 42 -> Leadtek Winfast PxPVR2200 [107d:6f21] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index e81864405102..e085b1243b45 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -57,6 +57,7 @@ | |||
57 | 56 -> Pinnacle Hybrid Pro (330e) (em2882) [2304:0226] | 57 | 56 -> Pinnacle Hybrid Pro (330e) (em2882) [2304:0226] |
58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] | 58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] |
59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] | 59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] |
60 | 59 -> Pinnacle PCTV HD Mini (em2874) [2304:023f] | ||
60 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] | 61 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] |
61 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) | 62 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) |
62 | 62 -> Gadmei TVR200 (em2820/em2840) | 63 | 62 -> Gadmei TVR200 (em2820/em2840) |
@@ -86,3 +87,8 @@ | |||
86 | 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251] | 87 | 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251] |
87 | 87 -> Terratec Cinergy HTC USB XS (em2884) [0ccd:008e,0ccd:00ac] | 88 | 87 -> Terratec Cinergy HTC USB XS (em2884) [0ccd:008e,0ccd:00ac] |
88 | 88 -> C3 Tech Digital Duo HDTV/SDTV USB (em2884) [1b80:e755] | 89 | 88 -> C3 Tech Digital Duo HDTV/SDTV USB (em2884) [1b80:e755] |
90 | 89 -> Delock 61959 (em2874) [1b80:e1cc] | ||
91 | 90 -> KWorld USB ATSC TV Stick UB435-Q V2 (em2874) [1b80:e346] | ||
92 | 91 -> SpeedLink Vicious And Devine Laplace webcam (em2765) [1ae7:9003,1ae7:9004] | ||
93 | 92 -> PCTV DVB-S2 Stick (461e) (em28178) | ||
94 | 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] | ||
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt index e51f1b5b7324..7d6e160724bd 100644 --- a/Documentation/video4linux/fimc.txt +++ b/Documentation/video4linux/fimc.txt | |||
@@ -151,9 +151,8 @@ CONFIG_S5P_DEV_FIMC1 \ | |||
151 | CONFIG_S5P_DEV_FIMC2 | optional | 151 | CONFIG_S5P_DEV_FIMC2 | optional |
152 | CONFIG_S5P_DEV_FIMC3 | | 152 | CONFIG_S5P_DEV_FIMC3 | |
153 | CONFIG_S5P_SETUP_FIMC / | 153 | CONFIG_S5P_SETUP_FIMC / |
154 | CONFIG_S5P_SETUP_MIPIPHY \ | 154 | CONFIG_S5P_DEV_CSIS0 \ optional for MIPI-CSI interface |
155 | CONFIG_S5P_DEV_CSIS0 | optional for MIPI-CSI interface | 155 | CONFIG_S5P_DEV_CSIS1 / |
156 | CONFIG_S5P_DEV_CSIS1 / | ||
157 | 156 | ||
158 | Except that, relevant s5p_device_fimc? should be registered in the machine code | 157 | Except that, relevant s5p_device_fimc? should be registered in the machine code |
159 | in addition to a "s5p-fimc-md" platform device to which the media device driver | 158 | in addition to a "s5p-fimc-md" platform device to which the media device driver |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 1e6b6531bbcc..d2ba80bb7af5 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -55,6 +55,7 @@ zc3xx 0458:700f Genius VideoCam Web V2 | |||
55 | sonixj 0458:7025 Genius Eye 311Q | 55 | sonixj 0458:7025 Genius Eye 311Q |
56 | sn9c20x 0458:7029 Genius Look 320s | 56 | sn9c20x 0458:7029 Genius Look 320s |
57 | sonixj 0458:702e Genius Slim 310 NB | 57 | sonixj 0458:702e Genius Slim 310 NB |
58 | sn9c20x 0458:7045 Genius Look 1320 V2 | ||
58 | sn9c20x 0458:704a Genius Slim 1320 | 59 | sn9c20x 0458:704a Genius Slim 1320 |
59 | sn9c20x 0458:704c Genius i-Look 1321 | 60 | sn9c20x 0458:704c Genius i-Look 1321 |
60 | sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650) | 61 | sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650) |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 6c4866b49eb5..667a43361706 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -34,6 +34,10 @@ So this framework sets up the basic building blocks that all drivers | |||
34 | need and this same framework should make it much easier to refactor | 34 | need and this same framework should make it much easier to refactor |
35 | common code into utility functions shared by all drivers. | 35 | common code into utility functions shared by all drivers. |
36 | 36 | ||
37 | A good example to look at as a reference is the v4l2-pci-skeleton.c | ||
38 | source that is available in this directory. It is a skeleton driver for | ||
39 | a PCI capture card, and demonstrates how to use the V4L2 driver | ||
40 | framework. It can be used as a template for real PCI video capture driver. | ||
37 | 41 | ||
38 | Structure of a driver | 42 | Structure of a driver |
39 | --------------------- | 43 | --------------------- |
@@ -768,6 +772,7 @@ types exist: | |||
768 | VFL_TYPE_GRABBER: videoX for video input/output devices | 772 | VFL_TYPE_GRABBER: videoX for video input/output devices |
769 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) | 773 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) |
770 | VFL_TYPE_RADIO: radioX for radio tuners | 774 | VFL_TYPE_RADIO: radioX for radio tuners |
775 | VFL_TYPE_SDR: swradioX for Software Defined Radio tuners | ||
771 | 776 | ||
772 | The last argument gives you a certain amount of control over the device | 777 | The last argument gives you a certain amount of control over the device |
773 | device node number used (i.e. the X in videoX). Normally you will pass -1 | 778 | device node number used (i.e. the X in videoX). Normally you will pass -1 |
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c new file mode 100644 index 000000000000..3a1c0d2dafce --- /dev/null +++ b/Documentation/video4linux/v4l2-pci-skeleton.c | |||
@@ -0,0 +1,913 @@ | |||
1 | /* | ||
2 | * This is a V4L2 PCI Skeleton Driver. It gives an initial skeleton source | ||
3 | * for use with other PCI drivers. | ||
4 | * | ||
5 | * This skeleton PCI driver assumes that the card has an S-Video connector as | ||
6 | * input 0 and an HDMI connector as input 1. | ||
7 | * | ||
8 | * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you may redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; version 2 of the License. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
18 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
19 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | * SOFTWARE. | ||
22 | */ | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/module.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/kmod.h> | ||
29 | #include <linux/mutex.h> | ||
30 | #include <linux/pci.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/videodev2.h> | ||
33 | #include <linux/v4l2-dv-timings.h> | ||
34 | #include <media/v4l2-device.h> | ||
35 | #include <media/v4l2-dev.h> | ||
36 | #include <media/v4l2-ioctl.h> | ||
37 | #include <media/v4l2-dv-timings.h> | ||
38 | #include <media/v4l2-ctrls.h> | ||
39 | #include <media/v4l2-event.h> | ||
40 | #include <media/videobuf2-dma-contig.h> | ||
41 | |||
42 | MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver"); | ||
43 | MODULE_AUTHOR("Hans Verkuil"); | ||
44 | MODULE_LICENSE("GPL v2"); | ||
45 | MODULE_DEVICE_TABLE(pci, skeleton_pci_tbl); | ||
46 | |||
47 | /** | ||
48 | * struct skeleton - All internal data for one instance of device | ||
49 | * @pdev: PCI device | ||
50 | * @v4l2_dev: top-level v4l2 device struct | ||
51 | * @vdev: video node structure | ||
52 | * @ctrl_handler: control handler structure | ||
53 | * @lock: ioctl serialization mutex | ||
54 | * @std: current SDTV standard | ||
55 | * @timings: current HDTV timings | ||
56 | * @format: current pix format | ||
57 | * @input: current video input (0 = SDTV, 1 = HDTV) | ||
58 | * @queue: vb2 video capture queue | ||
59 | * @alloc_ctx: vb2 contiguous DMA context | ||
60 | * @qlock: spinlock controlling access to buf_list and sequence | ||
61 | * @buf_list: list of buffers queued for DMA | ||
62 | * @sequence: frame sequence counter | ||
63 | */ | ||
64 | struct skeleton { | ||
65 | struct pci_dev *pdev; | ||
66 | struct v4l2_device v4l2_dev; | ||
67 | struct video_device vdev; | ||
68 | struct v4l2_ctrl_handler ctrl_handler; | ||
69 | struct mutex lock; | ||
70 | v4l2_std_id std; | ||
71 | struct v4l2_dv_timings timings; | ||
72 | struct v4l2_pix_format format; | ||
73 | unsigned input; | ||
74 | |||
75 | struct vb2_queue queue; | ||
76 | struct vb2_alloc_ctx *alloc_ctx; | ||
77 | |||
78 | spinlock_t qlock; | ||
79 | struct list_head buf_list; | ||
80 | unsigned int sequence; | ||
81 | }; | ||
82 | |||
83 | struct skel_buffer { | ||
84 | struct vb2_buffer vb; | ||
85 | struct list_head list; | ||
86 | }; | ||
87 | |||
88 | static inline struct skel_buffer *to_skel_buffer(struct vb2_buffer *vb2) | ||
89 | { | ||
90 | return container_of(vb2, struct skel_buffer, vb); | ||
91 | } | ||
92 | |||
93 | static const struct pci_device_id skeleton_pci_tbl[] = { | ||
94 | /* { PCI_DEVICE(PCI_VENDOR_ID_, PCI_DEVICE_ID_) }, */ | ||
95 | { 0, } | ||
96 | }; | ||
97 | |||
98 | /* | ||
99 | * HDTV: this structure has the capabilities of the HDTV receiver. | ||
100 | * It is used to constrain the huge list of possible formats based | ||
101 | * upon the hardware capabilities. | ||
102 | */ | ||
103 | static const struct v4l2_dv_timings_cap skel_timings_cap = { | ||
104 | .type = V4L2_DV_BT_656_1120, | ||
105 | /* keep this initialization for compatibility with GCC < 4.4.6 */ | ||
106 | .reserved = { 0 }, | ||
107 | V4L2_INIT_BT_TIMINGS( | ||
108 | 720, 1920, /* min/max width */ | ||
109 | 480, 1080, /* min/max height */ | ||
110 | 27000000, 74250000, /* min/max pixelclock*/ | ||
111 | V4L2_DV_BT_STD_CEA861, /* Supported standards */ | ||
112 | /* capabilities */ | ||
113 | V4L2_DV_BT_CAP_INTERLACED | V4L2_DV_BT_CAP_PROGRESSIVE | ||
114 | ) | ||
115 | }; | ||
116 | |||
117 | /* | ||
118 | * Supported SDTV standards. This does the same job as skel_timings_cap, but | ||
119 | * for standard TV formats. | ||
120 | */ | ||
121 | #define SKEL_TVNORMS V4L2_STD_ALL | ||
122 | |||
123 | /* | ||
124 | * Interrupt handler: typically interrupts happen after a new frame has been | ||
125 | * captured. It is the job of the handler to remove the new frame from the | ||
126 | * internal list and give it back to the vb2 framework, updating the sequence | ||
127 | * counter and timestamp at the same time. | ||
128 | */ | ||
129 | static irqreturn_t skeleton_irq(int irq, void *dev_id) | ||
130 | { | ||
131 | #ifdef TODO | ||
132 | struct skeleton *skel = dev_id; | ||
133 | |||
134 | /* handle interrupt */ | ||
135 | |||
136 | /* Once a new frame has been captured, mark it as done like this: */ | ||
137 | if (captured_new_frame) { | ||
138 | ... | ||
139 | spin_lock(&skel->qlock); | ||
140 | list_del(&new_buf->list); | ||
141 | spin_unlock(&skel->qlock); | ||
142 | new_buf->vb.v4l2_buf.sequence = skel->sequence++; | ||
143 | v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); | ||
144 | vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); | ||
145 | } | ||
146 | #endif | ||
147 | return IRQ_HANDLED; | ||
148 | } | ||
149 | |||
150 | /* | ||
151 | * Setup the constraints of the queue: besides setting the number of planes | ||
152 | * per buffer and the size and allocation context of each plane, it also | ||
153 | * checks if sufficient buffers have been allocated. Usually 3 is a good | ||
154 | * minimum number: many DMA engines need a minimum of 2 buffers in the | ||
155 | * queue and you need to have another available for userspace processing. | ||
156 | */ | ||
157 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, | ||
158 | unsigned int *nbuffers, unsigned int *nplanes, | ||
159 | unsigned int sizes[], void *alloc_ctxs[]) | ||
160 | { | ||
161 | struct skeleton *skel = vb2_get_drv_priv(vq); | ||
162 | |||
163 | if (vq->num_buffers + *nbuffers < 3) | ||
164 | *nbuffers = 3 - vq->num_buffers; | ||
165 | |||
166 | if (fmt && fmt->fmt.pix.sizeimage < skel->format.sizeimage) | ||
167 | return -EINVAL; | ||
168 | *nplanes = 1; | ||
169 | sizes[0] = fmt ? fmt->fmt.pix.sizeimage : skel->format.sizeimage; | ||
170 | alloc_ctxs[0] = skel->alloc_ctx; | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * Prepare the buffer for queueing to the DMA engine: check and set the | ||
176 | * payload size and fill in the field. Note: if the format's field is | ||
177 | * V4L2_FIELD_ALTERNATE, then vb->v4l2_buf.field should be set in the | ||
178 | * interrupt handler since that's usually where you know if the TOP or | ||
179 | * BOTTOM field has been captured. | ||
180 | */ | ||
181 | static int buffer_prepare(struct vb2_buffer *vb) | ||
182 | { | ||
183 | struct skeleton *skel = vb2_get_drv_priv(vb->vb2_queue); | ||
184 | unsigned long size = skel->format.sizeimage; | ||
185 | |||
186 | if (vb2_plane_size(vb, 0) < size) { | ||
187 | dev_err(&skel->pdev->dev, "buffer too small (%lu < %lu)\n", | ||
188 | vb2_plane_size(vb, 0), size); | ||
189 | return -EINVAL; | ||
190 | } | ||
191 | |||
192 | vb2_set_plane_payload(vb, 0, size); | ||
193 | vb->v4l2_buf.field = skel->format.field; | ||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | /* | ||
198 | * Queue this buffer to the DMA engine. | ||
199 | */ | ||
200 | static void buffer_queue(struct vb2_buffer *vb) | ||
201 | { | ||
202 | struct skeleton *skel = vb2_get_drv_priv(vb->vb2_queue); | ||
203 | struct skel_buffer *buf = to_skel_buffer(vb); | ||
204 | unsigned long flags; | ||
205 | |||
206 | spin_lock_irqsave(&skel->qlock, flags); | ||
207 | list_add_tail(&buf->list, &skel->buf_list); | ||
208 | |||
209 | /* TODO: Update any DMA pointers if necessary */ | ||
210 | |||
211 | spin_unlock_irqrestore(&skel->qlock, flags); | ||
212 | } | ||
213 | |||
214 | static void return_all_buffers(struct skeleton *skel, | ||
215 | enum vb2_buffer_state state) | ||
216 | { | ||
217 | struct skel_buffer *buf, *node; | ||
218 | unsigned long flags; | ||
219 | |||
220 | spin_lock_irqsave(&skel->qlock, flags); | ||
221 | list_for_each_entry_safe(buf, node, &skel->buf_list, list) { | ||
222 | vb2_buffer_done(&buf->vb, state); | ||
223 | list_del(&buf->list); | ||
224 | } | ||
225 | spin_unlock_irqrestore(&skel->qlock, flags); | ||
226 | } | ||
227 | |||
228 | /* | ||
229 | * Start streaming. First check if the minimum number of buffers have been | ||
230 | * queued. If not, then return -ENOBUFS and the vb2 framework will call | ||
231 | * this function again the next time a buffer has been queued until enough | ||
232 | * buffers are available to actually start the DMA engine. | ||
233 | */ | ||
234 | static int start_streaming(struct vb2_queue *vq, unsigned int count) | ||
235 | { | ||
236 | struct skeleton *skel = vb2_get_drv_priv(vq); | ||
237 | int ret = 0; | ||
238 | |||
239 | skel->sequence = 0; | ||
240 | |||
241 | /* TODO: start DMA */ | ||
242 | |||
243 | if (ret) { | ||
244 | /* | ||
245 | * In case of an error, return all active buffers to the | ||
246 | * QUEUED state | ||
247 | */ | ||
248 | return_all_buffers(skel, VB2_BUF_STATE_QUEUED); | ||
249 | } | ||
250 | return ret; | ||
251 | } | ||
252 | |||
253 | /* | ||
254 | * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued | ||
255 | * and passed on to the vb2 framework marked as STATE_ERROR. | ||
256 | */ | ||
257 | static int stop_streaming(struct vb2_queue *vq) | ||
258 | { | ||
259 | struct skeleton *skel = vb2_get_drv_priv(vq); | ||
260 | |||
261 | /* TODO: stop DMA */ | ||
262 | |||
263 | /* Release all active buffers */ | ||
264 | return_all_buffers(skel, VB2_BUF_STATE_ERROR); | ||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | /* | ||
269 | * The vb2 queue ops. Note that since q->lock is set we can use the standard | ||
270 | * vb2_ops_wait_prepare/finish helper functions. If q->lock would be NULL, | ||
271 | * then this driver would have to provide these ops. | ||
272 | */ | ||
273 | static struct vb2_ops skel_qops = { | ||
274 | .queue_setup = queue_setup, | ||
275 | .buf_prepare = buffer_prepare, | ||
276 | .buf_queue = buffer_queue, | ||
277 | .start_streaming = start_streaming, | ||
278 | .stop_streaming = stop_streaming, | ||
279 | .wait_prepare = vb2_ops_wait_prepare, | ||
280 | .wait_finish = vb2_ops_wait_finish, | ||
281 | }; | ||
282 | |||
283 | /* | ||
284 | * Required ioctl querycap. Note that the version field is prefilled with | ||
285 | * the version of the kernel. | ||
286 | */ | ||
287 | static int skeleton_querycap(struct file *file, void *priv, | ||
288 | struct v4l2_capability *cap) | ||
289 | { | ||
290 | struct skeleton *skel = video_drvdata(file); | ||
291 | |||
292 | strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver)); | ||
293 | strlcpy(cap->card, "V4L2 PCI Skeleton", sizeof(cap->card)); | ||
294 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", | ||
295 | pci_name(skel->pdev)); | ||
296 | cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | | ||
297 | V4L2_CAP_STREAMING; | ||
298 | cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; | ||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | /* | ||
303 | * Helper function to check and correct struct v4l2_pix_format. It's used | ||
304 | * not only in VIDIOC_TRY/S_FMT, but also elsewhere if changes to the SDTV | ||
305 | * standard, HDTV timings or the video input would require updating the | ||
306 | * current format. | ||
307 | */ | ||
308 | static void skeleton_fill_pix_format(struct skeleton *skel, | ||
309 | struct v4l2_pix_format *pix) | ||
310 | { | ||
311 | pix->pixelformat = V4L2_PIX_FMT_YUYV; | ||
312 | if (skel->input == 0) { | ||
313 | /* S-Video input */ | ||
314 | pix->width = 720; | ||
315 | pix->height = (skel->std & V4L2_STD_525_60) ? 480 : 576; | ||
316 | pix->field = V4L2_FIELD_INTERLACED; | ||
317 | pix->colorspace = V4L2_COLORSPACE_SMPTE170M; | ||
318 | } else { | ||
319 | /* HDMI input */ | ||
320 | pix->width = skel->timings.bt.width; | ||
321 | pix->height = skel->timings.bt.height; | ||
322 | if (skel->timings.bt.interlaced) | ||
323 | pix->field = V4L2_FIELD_INTERLACED; | ||
324 | else | ||
325 | pix->field = V4L2_FIELD_NONE; | ||
326 | pix->colorspace = V4L2_COLORSPACE_REC709; | ||
327 | } | ||
328 | |||
329 | /* | ||
330 | * The YUYV format is four bytes for every two pixels, so bytesperline | ||
331 | * is width * 2. | ||
332 | */ | ||
333 | pix->bytesperline = pix->width * 2; | ||
334 | pix->sizeimage = pix->bytesperline * pix->height; | ||
335 | pix->priv = 0; | ||
336 | } | ||
337 | |||
338 | static int skeleton_try_fmt_vid_cap(struct file *file, void *priv, | ||
339 | struct v4l2_format *f) | ||
340 | { | ||
341 | struct skeleton *skel = video_drvdata(file); | ||
342 | struct v4l2_pix_format *pix = &f->fmt.pix; | ||
343 | |||
344 | /* | ||
345 | * Due to historical reasons providing try_fmt with an unsupported | ||
346 | * pixelformat will return -EINVAL for video receivers. Webcam drivers, | ||
347 | * however, will silently correct the pixelformat. Some video capture | ||
348 | * applications rely on this behavior... | ||
349 | */ | ||
350 | if (pix->pixelformat != V4L2_PIX_FMT_YUYV) | ||
351 | return -EINVAL; | ||
352 | skeleton_fill_pix_format(skel, pix); | ||
353 | return 0; | ||
354 | } | ||
355 | |||
356 | static int skeleton_s_fmt_vid_cap(struct file *file, void *priv, | ||
357 | struct v4l2_format *f) | ||
358 | { | ||
359 | struct skeleton *skel = video_drvdata(file); | ||
360 | int ret; | ||
361 | |||
362 | ret = skeleton_try_fmt_vid_cap(file, priv, f); | ||
363 | if (ret) | ||
364 | return ret; | ||
365 | |||
366 | /* | ||
367 | * It is not allowed to change the format while buffers for use with | ||
368 | * streaming have already been allocated. | ||
369 | */ | ||
370 | if (vb2_is_busy(&skel->queue)) | ||
371 | return -EBUSY; | ||
372 | |||
373 | /* TODO: change format */ | ||
374 | skel->format = f->fmt.pix; | ||
375 | return 0; | ||
376 | } | ||
377 | |||
378 | static int skeleton_g_fmt_vid_cap(struct file *file, void *priv, | ||
379 | struct v4l2_format *f) | ||
380 | { | ||
381 | struct skeleton *skel = video_drvdata(file); | ||
382 | |||
383 | f->fmt.pix = skel->format; | ||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | static int skeleton_enum_fmt_vid_cap(struct file *file, void *priv, | ||
388 | struct v4l2_fmtdesc *f) | ||
389 | { | ||
390 | if (f->index != 0) | ||
391 | return -EINVAL; | ||
392 | |||
393 | strlcpy(f->description, "4:2:2, packed, YUYV", sizeof(f->description)); | ||
394 | f->pixelformat = V4L2_PIX_FMT_YUYV; | ||
395 | f->flags = 0; | ||
396 | return 0; | ||
397 | } | ||
398 | |||
399 | static int skeleton_s_std(struct file *file, void *priv, v4l2_std_id std) | ||
400 | { | ||
401 | struct skeleton *skel = video_drvdata(file); | ||
402 | |||
403 | /* S_STD is not supported on the HDMI input */ | ||
404 | if (skel->input) | ||
405 | return -ENODATA; | ||
406 | |||
407 | /* | ||
408 | * No change, so just return. Some applications call S_STD again after | ||
409 | * the buffers for streaming have been set up, so we have to allow for | ||
410 | * this behavior. | ||
411 | */ | ||
412 | if (std == skel->std) | ||
413 | return 0; | ||
414 | |||
415 | /* | ||
416 | * Changing the standard implies a format change, which is not allowed | ||
417 | * while buffers for use with streaming have already been allocated. | ||
418 | */ | ||
419 | if (vb2_is_busy(&skel->queue)) | ||
420 | return -EBUSY; | ||
421 | |||
422 | /* TODO: handle changing std */ | ||
423 | |||
424 | skel->std = std; | ||
425 | |||
426 | /* Update the internal format */ | ||
427 | skeleton_fill_pix_format(skel, &skel->format); | ||
428 | return 0; | ||
429 | } | ||
430 | |||
431 | static int skeleton_g_std(struct file *file, void *priv, v4l2_std_id *std) | ||
432 | { | ||
433 | struct skeleton *skel = video_drvdata(file); | ||
434 | |||
435 | /* G_STD is not supported on the HDMI input */ | ||
436 | if (skel->input) | ||
437 | return -ENODATA; | ||
438 | |||
439 | *std = skel->std; | ||
440 | return 0; | ||
441 | } | ||
442 | |||
443 | /* | ||
444 | * Query the current standard as seen by the hardware. This function shall | ||
445 | * never actually change the standard, it just detects and reports. | ||
446 | * The framework will initially set *std to tvnorms (i.e. the set of | ||
447 | * supported standards by this input), and this function should just AND | ||
448 | * this value. If there is no signal, then *std should be set to 0. | ||
449 | */ | ||
450 | static int skeleton_querystd(struct file *file, void *priv, v4l2_std_id *std) | ||
451 | { | ||
452 | struct skeleton *skel = video_drvdata(file); | ||
453 | |||
454 | /* QUERY_STD is not supported on the HDMI input */ | ||
455 | if (skel->input) | ||
456 | return -ENODATA; | ||
457 | |||
458 | #ifdef TODO | ||
459 | /* | ||
460 | * Query currently seen standard. Initial value of *std is | ||
461 | * V4L2_STD_ALL. This function should look something like this: | ||
462 | */ | ||
463 | get_signal_info(); | ||
464 | if (no_signal) { | ||
465 | *std = 0; | ||
466 | return 0; | ||
467 | } | ||
468 | /* Use signal information to reduce the number of possible standards */ | ||
469 | if (signal_has_525_lines) | ||
470 | *std &= V4L2_STD_525_60; | ||
471 | else | ||
472 | *std &= V4L2_STD_625_50; | ||
473 | #endif | ||
474 | return 0; | ||
475 | } | ||
476 | |||
477 | static int skeleton_s_dv_timings(struct file *file, void *_fh, | ||
478 | struct v4l2_dv_timings *timings) | ||
479 | { | ||
480 | struct skeleton *skel = video_drvdata(file); | ||
481 | |||
482 | /* S_DV_TIMINGS is not supported on the S-Video input */ | ||
483 | if (skel->input == 0) | ||
484 | return -ENODATA; | ||
485 | |||
486 | /* Quick sanity check */ | ||
487 | if (!v4l2_valid_dv_timings(timings, &skel_timings_cap, NULL, NULL)) | ||
488 | return -EINVAL; | ||
489 | |||
490 | /* Check if the timings are part of the CEA-861 timings. */ | ||
491 | if (!v4l2_find_dv_timings_cap(timings, &skel_timings_cap, | ||
492 | 0, NULL, NULL)) | ||
493 | return -EINVAL; | ||
494 | |||
495 | /* Return 0 if the new timings are the same as the current timings. */ | ||
496 | if (v4l2_match_dv_timings(timings, &skel->timings, 0)) | ||
497 | return 0; | ||
498 | |||
499 | /* | ||
500 | * Changing the timings implies a format change, which is not allowed | ||
501 | * while buffers for use with streaming have already been allocated. | ||
502 | */ | ||
503 | if (vb2_is_busy(&skel->queue)) | ||
504 | return -EBUSY; | ||
505 | |||
506 | /* TODO: Configure new timings */ | ||
507 | |||
508 | /* Save timings */ | ||
509 | skel->timings = *timings; | ||
510 | |||
511 | /* Update the internal format */ | ||
512 | skeleton_fill_pix_format(skel, &skel->format); | ||
513 | return 0; | ||
514 | } | ||
515 | |||
516 | static int skeleton_g_dv_timings(struct file *file, void *_fh, | ||
517 | struct v4l2_dv_timings *timings) | ||
518 | { | ||
519 | struct skeleton *skel = video_drvdata(file); | ||
520 | |||
521 | /* G_DV_TIMINGS is not supported on the S-Video input */ | ||
522 | if (skel->input == 0) | ||
523 | return -ENODATA; | ||
524 | |||
525 | *timings = skel->timings; | ||
526 | return 0; | ||
527 | } | ||
528 | |||
529 | static int skeleton_enum_dv_timings(struct file *file, void *_fh, | ||
530 | struct v4l2_enum_dv_timings *timings) | ||
531 | { | ||
532 | struct skeleton *skel = video_drvdata(file); | ||
533 | |||
534 | /* ENUM_DV_TIMINGS is not supported on the S-Video input */ | ||
535 | if (skel->input == 0) | ||
536 | return -ENODATA; | ||
537 | |||
538 | return v4l2_enum_dv_timings_cap(timings, &skel_timings_cap, | ||
539 | NULL, NULL); | ||
540 | } | ||
541 | |||
542 | /* | ||
543 | * Query the current timings as seen by the hardware. This function shall | ||
544 | * never actually change the timings, it just detects and reports. | ||
545 | * If no signal is detected, then return -ENOLINK. If the hardware cannot | ||
546 | * lock to the signal, then return -ENOLCK. If the signal is out of range | ||
547 | * of the capabilities of the system (e.g., it is possible that the receiver | ||
548 | * can lock but that the DMA engine it is connected to cannot handle | ||
549 | * pixelclocks above a certain frequency), then -ERANGE is returned. | ||
550 | */ | ||
551 | static int skeleton_query_dv_timings(struct file *file, void *_fh, | ||
552 | struct v4l2_dv_timings *timings) | ||
553 | { | ||
554 | struct skeleton *skel = video_drvdata(file); | ||
555 | |||
556 | /* QUERY_DV_TIMINGS is not supported on the S-Video input */ | ||
557 | if (skel->input == 0) | ||
558 | return -ENODATA; | ||
559 | |||
560 | #ifdef TODO | ||
561 | /* | ||
562 | * Query currently seen timings. This function should look | ||
563 | * something like this: | ||
564 | */ | ||
565 | detect_timings(); | ||
566 | if (no_signal) | ||
567 | return -ENOLINK; | ||
568 | if (cannot_lock_to_signal) | ||
569 | return -ENOLCK; | ||
570 | if (signal_out_of_range_of_capabilities) | ||
571 | return -ERANGE; | ||
572 | |||
573 | /* Useful for debugging */ | ||
574 | v4l2_print_dv_timings(skel->v4l2_dev.name, "query_dv_timings:", | ||
575 | timings, true); | ||
576 | #endif | ||
577 | return 0; | ||
578 | } | ||
579 | |||
580 | static int skeleton_dv_timings_cap(struct file *file, void *fh, | ||
581 | struct v4l2_dv_timings_cap *cap) | ||
582 | { | ||
583 | struct skeleton *skel = video_drvdata(file); | ||
584 | |||
585 | /* DV_TIMINGS_CAP is not supported on the S-Video input */ | ||
586 | if (skel->input == 0) | ||
587 | return -ENODATA; | ||
588 | *cap = skel_timings_cap; | ||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | static int skeleton_enum_input(struct file *file, void *priv, | ||
593 | struct v4l2_input *i) | ||
594 | { | ||
595 | if (i->index > 1) | ||
596 | return -EINVAL; | ||
597 | |||
598 | i->type = V4L2_INPUT_TYPE_CAMERA; | ||
599 | if (i->index == 0) { | ||
600 | i->std = SKEL_TVNORMS; | ||
601 | strlcpy(i->name, "S-Video", sizeof(i->name)); | ||
602 | i->capabilities = V4L2_IN_CAP_STD; | ||
603 | } else { | ||
604 | i->std = 0; | ||
605 | strlcpy(i->name, "HDMI", sizeof(i->name)); | ||
606 | i->capabilities = V4L2_IN_CAP_DV_TIMINGS; | ||
607 | } | ||
608 | return 0; | ||
609 | } | ||
610 | |||
611 | static int skeleton_s_input(struct file *file, void *priv, unsigned int i) | ||
612 | { | ||
613 | struct skeleton *skel = video_drvdata(file); | ||
614 | |||
615 | if (i > 1) | ||
616 | return -EINVAL; | ||
617 | |||
618 | /* | ||
619 | * Changing the input implies a format change, which is not allowed | ||
620 | * while buffers for use with streaming have already been allocated. | ||
621 | */ | ||
622 | if (vb2_is_busy(&skel->queue)) | ||
623 | return -EBUSY; | ||
624 | |||
625 | skel->input = i; | ||
626 | /* | ||
627 | * Update tvnorms. The tvnorms value is used by the core to implement | ||
628 | * VIDIOC_ENUMSTD so it has to be correct. If tvnorms == 0, then | ||
629 | * ENUMSTD will return -ENODATA. | ||
630 | */ | ||
631 | skel->vdev.tvnorms = i ? 0 : SKEL_TVNORMS; | ||
632 | |||
633 | /* Update the internal format */ | ||
634 | skeleton_fill_pix_format(skel, &skel->format); | ||
635 | return 0; | ||
636 | } | ||
637 | |||
638 | static int skeleton_g_input(struct file *file, void *priv, unsigned int *i) | ||
639 | { | ||
640 | struct skeleton *skel = video_drvdata(file); | ||
641 | |||
642 | *i = skel->input; | ||
643 | return 0; | ||
644 | } | ||
645 | |||
646 | /* The control handler. */ | ||
647 | static int skeleton_s_ctrl(struct v4l2_ctrl *ctrl) | ||
648 | { | ||
649 | /*struct skeleton *skel = | ||
650 | container_of(ctrl->handler, struct skeleton, ctrl_handler);*/ | ||
651 | |||
652 | switch (ctrl->id) { | ||
653 | case V4L2_CID_BRIGHTNESS: | ||
654 | /* TODO: set brightness to ctrl->val */ | ||
655 | break; | ||
656 | case V4L2_CID_CONTRAST: | ||
657 | /* TODO: set contrast to ctrl->val */ | ||
658 | break; | ||
659 | case V4L2_CID_SATURATION: | ||
660 | /* TODO: set saturation to ctrl->val */ | ||
661 | break; | ||
662 | case V4L2_CID_HUE: | ||
663 | /* TODO: set hue to ctrl->val */ | ||
664 | break; | ||
665 | default: | ||
666 | return -EINVAL; | ||
667 | } | ||
668 | return 0; | ||
669 | } | ||
670 | |||
671 | /* ------------------------------------------------------------------ | ||
672 | File operations for the device | ||
673 | ------------------------------------------------------------------*/ | ||
674 | |||
675 | static const struct v4l2_ctrl_ops skel_ctrl_ops = { | ||
676 | .s_ctrl = skeleton_s_ctrl, | ||
677 | }; | ||
678 | |||
679 | /* | ||
680 | * The set of all supported ioctls. Note that all the streaming ioctls | ||
681 | * use the vb2 helper functions that take care of all the locking and | ||
682 | * that also do ownership tracking (i.e. only the filehandle that requested | ||
683 | * the buffers can call the streaming ioctls, all other filehandles will | ||
684 | * receive -EBUSY if they attempt to call the same streaming ioctls). | ||
685 | * | ||
686 | * The last three ioctls also use standard helper functions: these implement | ||
687 | * standard behavior for drivers with controls. | ||
688 | */ | ||
689 | static const struct v4l2_ioctl_ops skel_ioctl_ops = { | ||
690 | .vidioc_querycap = skeleton_querycap, | ||
691 | .vidioc_try_fmt_vid_cap = skeleton_try_fmt_vid_cap, | ||
692 | .vidioc_s_fmt_vid_cap = skeleton_s_fmt_vid_cap, | ||
693 | .vidioc_g_fmt_vid_cap = skeleton_g_fmt_vid_cap, | ||
694 | .vidioc_enum_fmt_vid_cap = skeleton_enum_fmt_vid_cap, | ||
695 | |||
696 | .vidioc_g_std = skeleton_g_std, | ||
697 | .vidioc_s_std = skeleton_s_std, | ||
698 | .vidioc_querystd = skeleton_querystd, | ||
699 | |||
700 | .vidioc_s_dv_timings = skeleton_s_dv_timings, | ||
701 | .vidioc_g_dv_timings = skeleton_g_dv_timings, | ||
702 | .vidioc_enum_dv_timings = skeleton_enum_dv_timings, | ||
703 | .vidioc_query_dv_timings = skeleton_query_dv_timings, | ||
704 | .vidioc_dv_timings_cap = skeleton_dv_timings_cap, | ||
705 | |||
706 | .vidioc_enum_input = skeleton_enum_input, | ||
707 | .vidioc_g_input = skeleton_g_input, | ||
708 | .vidioc_s_input = skeleton_s_input, | ||
709 | |||
710 | .vidioc_reqbufs = vb2_ioctl_reqbufs, | ||
711 | .vidioc_create_bufs = vb2_ioctl_create_bufs, | ||
712 | .vidioc_querybuf = vb2_ioctl_querybuf, | ||
713 | .vidioc_qbuf = vb2_ioctl_qbuf, | ||
714 | .vidioc_dqbuf = vb2_ioctl_dqbuf, | ||
715 | .vidioc_expbuf = vb2_ioctl_expbuf, | ||
716 | .vidioc_streamon = vb2_ioctl_streamon, | ||
717 | .vidioc_streamoff = vb2_ioctl_streamoff, | ||
718 | |||
719 | .vidioc_log_status = v4l2_ctrl_log_status, | ||
720 | .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, | ||
721 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, | ||
722 | }; | ||
723 | |||
724 | /* | ||
725 | * The set of file operations. Note that all these ops are standard core | ||
726 | * helper functions. | ||
727 | */ | ||
728 | static const struct v4l2_file_operations skel_fops = { | ||
729 | .owner = THIS_MODULE, | ||
730 | .open = v4l2_fh_open, | ||
731 | .release = vb2_fop_release, | ||
732 | .unlocked_ioctl = video_ioctl2, | ||
733 | .read = vb2_fop_read, | ||
734 | .mmap = vb2_fop_mmap, | ||
735 | .poll = vb2_fop_poll, | ||
736 | }; | ||
737 | |||
738 | /* | ||
739 | * The initial setup of this device instance. Note that the initial state of | ||
740 | * the driver should be complete. So the initial format, standard, timings | ||
741 | * and video input should all be initialized to some reasonable value. | ||
742 | */ | ||
743 | static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
744 | { | ||
745 | /* The initial timings are chosen to be 720p60. */ | ||
746 | static const struct v4l2_dv_timings timings_def = | ||
747 | V4L2_DV_BT_CEA_1280X720P60; | ||
748 | struct skeleton *skel; | ||
749 | struct video_device *vdev; | ||
750 | struct v4l2_ctrl_handler *hdl; | ||
751 | struct vb2_queue *q; | ||
752 | int ret; | ||
753 | |||
754 | /* Enable PCI */ | ||
755 | ret = pci_enable_device(pdev); | ||
756 | if (ret) | ||
757 | return ret; | ||
758 | ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); | ||
759 | if (ret) { | ||
760 | dev_err(&pdev->dev, "no suitable DMA available.\n"); | ||
761 | goto disable_pci; | ||
762 | } | ||
763 | |||
764 | /* Allocate a new instance */ | ||
765 | skel = devm_kzalloc(&pdev->dev, sizeof(struct skeleton), GFP_KERNEL); | ||
766 | if (!skel) | ||
767 | return -ENOMEM; | ||
768 | |||
769 | /* Allocate the interrupt */ | ||
770 | ret = devm_request_irq(&pdev->dev, pdev->irq, | ||
771 | skeleton_irq, 0, KBUILD_MODNAME, skel); | ||
772 | if (ret) { | ||
773 | dev_err(&pdev->dev, "request_irq failed\n"); | ||
774 | goto disable_pci; | ||
775 | } | ||
776 | skel->pdev = pdev; | ||
777 | |||
778 | /* Fill in the initial format-related settings */ | ||
779 | skel->timings = timings_def; | ||
780 | skel->std = V4L2_STD_625_50; | ||
781 | skeleton_fill_pix_format(skel, &skel->format); | ||
782 | |||
783 | /* Initialize the top-level structure */ | ||
784 | ret = v4l2_device_register(&pdev->dev, &skel->v4l2_dev); | ||
785 | if (ret) | ||
786 | goto disable_pci; | ||
787 | |||
788 | mutex_init(&skel->lock); | ||
789 | |||
790 | /* Add the controls */ | ||
791 | hdl = &skel->ctrl_handler; | ||
792 | v4l2_ctrl_handler_init(hdl, 4); | ||
793 | v4l2_ctrl_new_std(hdl, &skel_ctrl_ops, | ||
794 | V4L2_CID_BRIGHTNESS, 0, 255, 1, 127); | ||
795 | v4l2_ctrl_new_std(hdl, &skel_ctrl_ops, | ||
796 | V4L2_CID_CONTRAST, 0, 255, 1, 16); | ||
797 | v4l2_ctrl_new_std(hdl, &skel_ctrl_ops, | ||
798 | V4L2_CID_SATURATION, 0, 255, 1, 127); | ||
799 | v4l2_ctrl_new_std(hdl, &skel_ctrl_ops, | ||
800 | V4L2_CID_HUE, -128, 127, 1, 0); | ||
801 | if (hdl->error) { | ||
802 | ret = hdl->error; | ||
803 | goto free_hdl; | ||
804 | } | ||
805 | skel->v4l2_dev.ctrl_handler = hdl; | ||
806 | |||
807 | /* Initialize the vb2 queue */ | ||
808 | q = &skel->queue; | ||
809 | q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
810 | q->io_modes = VB2_MMAP | VB2_DMABUF | VB2_READ; | ||
811 | q->drv_priv = skel; | ||
812 | q->buf_struct_size = sizeof(struct skel_buffer); | ||
813 | q->ops = &skel_qops; | ||
814 | q->mem_ops = &vb2_dma_contig_memops; | ||
815 | q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
816 | /* | ||
817 | * Assume that this DMA engine needs to have at least two buffers | ||
818 | * available before it can be started. The start_streaming() op | ||
819 | * won't be called until at least this many buffers are queued up. | ||
820 | */ | ||
821 | q->min_buffers_needed = 2; | ||
822 | /* | ||
823 | * The serialization lock for the streaming ioctls. This is the same | ||
824 | * as the main serialization lock, but if some of the non-streaming | ||
825 | * ioctls could take a long time to execute, then you might want to | ||
826 | * have a different lock here to prevent VIDIOC_DQBUF from being | ||
827 | * blocked while waiting for another action to finish. This is | ||
828 | * generally not needed for PCI devices, but USB devices usually do | ||
829 | * want a separate lock here. | ||
830 | */ | ||
831 | q->lock = &skel->lock; | ||
832 | /* | ||
833 | * Since this driver can only do 32-bit DMA we must make sure that | ||
834 | * the vb2 core will allocate the buffers in 32-bit DMA memory. | ||
835 | */ | ||
836 | q->gfp_flags = GFP_DMA32; | ||
837 | ret = vb2_queue_init(q); | ||
838 | if (ret) | ||
839 | goto free_hdl; | ||
840 | |||
841 | skel->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); | ||
842 | if (IS_ERR(skel->alloc_ctx)) { | ||
843 | dev_err(&pdev->dev, "Can't allocate buffer context"); | ||
844 | ret = PTR_ERR(skel->alloc_ctx); | ||
845 | goto free_hdl; | ||
846 | } | ||
847 | INIT_LIST_HEAD(&skel->buf_list); | ||
848 | spin_lock_init(&skel->qlock); | ||
849 | |||
850 | /* Initialize the video_device structure */ | ||
851 | vdev = &skel->vdev; | ||
852 | strlcpy(vdev->name, KBUILD_MODNAME, sizeof(vdev->name)); | ||
853 | /* | ||
854 | * There is nothing to clean up, so release is set to an empty release | ||
855 | * function. The release callback must be non-NULL. | ||
856 | */ | ||
857 | vdev->release = video_device_release_empty; | ||
858 | vdev->fops = &skel_fops, | ||
859 | vdev->ioctl_ops = &skel_ioctl_ops, | ||
860 | /* | ||
861 | * The main serialization lock. All ioctls are serialized by this | ||
862 | * lock. Exception: if q->lock is set, then the streaming ioctls | ||
863 | * are serialized by that separate lock. | ||
864 | */ | ||
865 | vdev->lock = &skel->lock; | ||
866 | vdev->queue = q; | ||
867 | vdev->v4l2_dev = &skel->v4l2_dev; | ||
868 | /* Supported SDTV standards, if any */ | ||
869 | vdev->tvnorms = SKEL_TVNORMS; | ||
870 | /* If this bit is set, then the v4l2 core will provide the support | ||
871 | * for the VIDIOC_G/S_PRIORITY ioctls. This flag will eventually | ||
872 | * go away once all drivers have been converted to use struct v4l2_fh. | ||
873 | */ | ||
874 | set_bit(V4L2_FL_USE_FH_PRIO, &vdev->flags); | ||
875 | video_set_drvdata(vdev, skel); | ||
876 | |||
877 | ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); | ||
878 | if (ret) | ||
879 | goto free_ctx; | ||
880 | |||
881 | dev_info(&pdev->dev, "V4L2 PCI Skeleton Driver loaded\n"); | ||
882 | return 0; | ||
883 | |||
884 | free_ctx: | ||
885 | vb2_dma_contig_cleanup_ctx(skel->alloc_ctx); | ||
886 | free_hdl: | ||
887 | v4l2_ctrl_handler_free(&skel->ctrl_handler); | ||
888 | v4l2_device_unregister(&skel->v4l2_dev); | ||
889 | disable_pci: | ||
890 | pci_disable_device(pdev); | ||
891 | return ret; | ||
892 | } | ||
893 | |||
894 | static void skeleton_remove(struct pci_dev *pdev) | ||
895 | { | ||
896 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); | ||
897 | struct skeleton *skel = container_of(v4l2_dev, struct skeleton, v4l2_dev); | ||
898 | |||
899 | video_unregister_device(&skel->vdev); | ||
900 | v4l2_ctrl_handler_free(&skel->ctrl_handler); | ||
901 | vb2_dma_contig_cleanup_ctx(skel->alloc_ctx); | ||
902 | v4l2_device_unregister(&skel->v4l2_dev); | ||
903 | pci_disable_device(skel->pdev); | ||
904 | } | ||
905 | |||
906 | static struct pci_driver skeleton_driver = { | ||
907 | .name = KBUILD_MODNAME, | ||
908 | .probe = skeleton_probe, | ||
909 | .remove = skeleton_remove, | ||
910 | .id_table = skeleton_pci_tbl, | ||
911 | }; | ||
912 | |||
913 | module_pci_driver(skeleton_driver); | ||
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 6cd63a9010fb..a9380ba54c8e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -586,8 +586,8 @@ struct kvm_fpu { | |||
586 | 586 | ||
587 | 4.24 KVM_CREATE_IRQCHIP | 587 | 4.24 KVM_CREATE_IRQCHIP |
588 | 588 | ||
589 | Capability: KVM_CAP_IRQCHIP | 589 | Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390) |
590 | Architectures: x86, ia64, ARM, arm64 | 590 | Architectures: x86, ia64, ARM, arm64, s390 |
591 | Type: vm ioctl | 591 | Type: vm ioctl |
592 | Parameters: none | 592 | Parameters: none |
593 | Returns: 0 on success, -1 on error | 593 | Returns: 0 on success, -1 on error |
@@ -596,7 +596,10 @@ Creates an interrupt controller model in the kernel. On x86, creates a virtual | |||
596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | 596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a |
597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is | 598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is |
599 | created. | 599 | created. On s390, a dummy irq routing table is created. |
600 | |||
601 | Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled | ||
602 | before KVM_CREATE_IRQCHIP can be used. | ||
600 | 603 | ||
601 | 604 | ||
602 | 4.25 KVM_IRQ_LINE | 605 | 4.25 KVM_IRQ_LINE |
@@ -612,6 +615,20 @@ On some architectures it is required that an interrupt controller model has | |||
612 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered | 615 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered |
613 | interrupts require the level to be set to 1 and then back to 0. | 616 | interrupts require the level to be set to 1 and then back to 0. |
614 | 617 | ||
618 | On real hardware, interrupt pins can be active-low or active-high. This | ||
619 | does not matter for the level field of struct kvm_irq_level: 1 always | ||
620 | means active (asserted), 0 means inactive (deasserted). | ||
621 | |||
622 | x86 allows the operating system to program the interrupt polarity | ||
623 | (active-low/active-high) for level-triggered interrupts, and KVM used | ||
624 | to consider the polarity. However, due to bitrot in the handling of | ||
625 | active-low interrupts, the above convention is now valid on x86 too. | ||
626 | This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace | ||
627 | should not present interrupts to the guest as active-low unless this | ||
628 | capability is present (or unless it is not using the in-kernel irqchip, | ||
629 | of course). | ||
630 | |||
631 | |||
615 | ARM/arm64 can signal an interrupt either at the CPU level, or at the | 632 | ARM/arm64 can signal an interrupt either at the CPU level, or at the |
616 | in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to | 633 | in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to |
617 | use PPIs designated for specific cpus. The irq field is interpreted | 634 | use PPIs designated for specific cpus. The irq field is interpreted |
@@ -628,7 +645,7 @@ The irq_type field has the following values: | |||
628 | 645 | ||
629 | (The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs) | 646 | (The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs) |
630 | 647 | ||
631 | In both cases, level is used to raise/lower the line. | 648 | In both cases, level is used to assert/deassert the line. |
632 | 649 | ||
633 | struct kvm_irq_level { | 650 | struct kvm_irq_level { |
634 | union { | 651 | union { |
@@ -918,9 +935,9 @@ documentation when it pops into existence). | |||
918 | 935 | ||
919 | 4.37 KVM_ENABLE_CAP | 936 | 4.37 KVM_ENABLE_CAP |
920 | 937 | ||
921 | Capability: KVM_CAP_ENABLE_CAP | 938 | Capability: KVM_CAP_ENABLE_CAP, KVM_CAP_ENABLE_CAP_VM |
922 | Architectures: ppc, s390 | 939 | Architectures: ppc, s390 |
923 | Type: vcpu ioctl | 940 | Type: vcpu ioctl, vm ioctl (with KVM_CAP_ENABLE_CAP_VM) |
924 | Parameters: struct kvm_enable_cap (in) | 941 | Parameters: struct kvm_enable_cap (in) |
925 | Returns: 0 on success; -1 on error | 942 | Returns: 0 on success; -1 on error |
926 | 943 | ||
@@ -951,6 +968,8 @@ function properly, this is the place to put them. | |||
951 | __u8 pad[64]; | 968 | __u8 pad[64]; |
952 | }; | 969 | }; |
953 | 970 | ||
971 | The vcpu ioctl should be used for vcpu-specific capabilities, the vm ioctl | ||
972 | for vm-wide capabilities. | ||
954 | 973 | ||
955 | 4.38 KVM_GET_MP_STATE | 974 | 4.38 KVM_GET_MP_STATE |
956 | 975 | ||
@@ -1320,7 +1339,7 @@ KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. | |||
1320 | 4.52 KVM_SET_GSI_ROUTING | 1339 | 4.52 KVM_SET_GSI_ROUTING |
1321 | 1340 | ||
1322 | Capability: KVM_CAP_IRQ_ROUTING | 1341 | Capability: KVM_CAP_IRQ_ROUTING |
1323 | Architectures: x86 ia64 | 1342 | Architectures: x86 ia64 s390 |
1324 | Type: vm ioctl | 1343 | Type: vm ioctl |
1325 | Parameters: struct kvm_irq_routing (in) | 1344 | Parameters: struct kvm_irq_routing (in) |
1326 | Returns: 0 on success, -1 on error | 1345 | Returns: 0 on success, -1 on error |
@@ -1343,6 +1362,7 @@ struct kvm_irq_routing_entry { | |||
1343 | union { | 1362 | union { |
1344 | struct kvm_irq_routing_irqchip irqchip; | 1363 | struct kvm_irq_routing_irqchip irqchip; |
1345 | struct kvm_irq_routing_msi msi; | 1364 | struct kvm_irq_routing_msi msi; |
1365 | struct kvm_irq_routing_s390_adapter adapter; | ||
1346 | __u32 pad[8]; | 1366 | __u32 pad[8]; |
1347 | } u; | 1367 | } u; |
1348 | }; | 1368 | }; |
@@ -1350,6 +1370,7 @@ struct kvm_irq_routing_entry { | |||
1350 | /* gsi routing entry types */ | 1370 | /* gsi routing entry types */ |
1351 | #define KVM_IRQ_ROUTING_IRQCHIP 1 | 1371 | #define KVM_IRQ_ROUTING_IRQCHIP 1 |
1352 | #define KVM_IRQ_ROUTING_MSI 2 | 1372 | #define KVM_IRQ_ROUTING_MSI 2 |
1373 | #define KVM_IRQ_ROUTING_S390_ADAPTER 3 | ||
1353 | 1374 | ||
1354 | No flags are specified so far, the corresponding field must be set to zero. | 1375 | No flags are specified so far, the corresponding field must be set to zero. |
1355 | 1376 | ||
@@ -1365,6 +1386,14 @@ struct kvm_irq_routing_msi { | |||
1365 | __u32 pad; | 1386 | __u32 pad; |
1366 | }; | 1387 | }; |
1367 | 1388 | ||
1389 | struct kvm_irq_routing_s390_adapter { | ||
1390 | __u64 ind_addr; | ||
1391 | __u64 summary_addr; | ||
1392 | __u64 ind_offset; | ||
1393 | __u32 summary_offset; | ||
1394 | __u32 adapter_id; | ||
1395 | }; | ||
1396 | |||
1368 | 1397 | ||
1369 | 4.53 KVM_ASSIGN_SET_MSIX_NR | 1398 | 4.53 KVM_ASSIGN_SET_MSIX_NR |
1370 | 1399 | ||
@@ -1462,7 +1491,7 @@ struct kvm_lapic_state { | |||
1462 | char regs[KVM_APIC_REG_SIZE]; | 1491 | char regs[KVM_APIC_REG_SIZE]; |
1463 | }; | 1492 | }; |
1464 | 1493 | ||
1465 | Copies the input argument into the the Local APIC registers. The data format | 1494 | Copies the input argument into the Local APIC registers. The data format |
1466 | and layout are the same as documented in the architecture manual. | 1495 | and layout are the same as documented in the architecture manual. |
1467 | 1496 | ||
1468 | 1497 | ||
@@ -2566,6 +2595,10 @@ executed a memory-mapped I/O instruction which could not be satisfied | |||
2566 | by kvm. The 'data' member contains the written data if 'is_write' is | 2595 | by kvm. The 'data' member contains the written data if 'is_write' is |
2567 | true, and should be filled by application code otherwise. | 2596 | true, and should be filled by application code otherwise. |
2568 | 2597 | ||
2598 | The 'data' member contains, in its first 'len' bytes, the value as it would | ||
2599 | appear if the VCPU performed a load or store of the appropriate width directly | ||
2600 | to the byte array. | ||
2601 | |||
2569 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR, | 2602 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR, |
2570 | KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding | 2603 | KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding |
2571 | operations are complete (and guest state is consistent) only after userspace | 2604 | operations are complete (and guest state is consistent) only after userspace |
diff --git a/Documentation/virtual/kvm/devices/s390_flic.txt b/Documentation/virtual/kvm/devices/s390_flic.txt new file mode 100644 index 000000000000..4ceef53164b0 --- /dev/null +++ b/Documentation/virtual/kvm/devices/s390_flic.txt | |||
@@ -0,0 +1,91 @@ | |||
1 | FLIC (floating interrupt controller) | ||
2 | ==================================== | ||
3 | |||
4 | FLIC handles floating (non per-cpu) interrupts, i.e. I/O, service and some | ||
5 | machine check interruptions. All interrupts are stored in a per-vm list of | ||
6 | pending interrupts. FLIC performs operations on this list. | ||
7 | |||
8 | Only one FLIC instance may be instantiated. | ||
9 | |||
10 | FLIC provides support to | ||
11 | - add interrupts (KVM_DEV_FLIC_ENQUEUE) | ||
12 | - inspect currently pending interrupts (KVM_FLIC_GET_ALL_IRQS) | ||
13 | - purge all pending floating interrupts (KVM_DEV_FLIC_CLEAR_IRQS) | ||
14 | - enable/disable for the guest transparent async page faults | ||
15 | - register and modify adapter interrupt sources (KVM_DEV_FLIC_ADAPTER_*) | ||
16 | |||
17 | Groups: | ||
18 | KVM_DEV_FLIC_ENQUEUE | ||
19 | Passes a buffer and length into the kernel which are then injected into | ||
20 | the list of pending interrupts. | ||
21 | attr->addr contains the pointer to the buffer and attr->attr contains | ||
22 | the length of the buffer. | ||
23 | The format of the data structure kvm_s390_irq as it is copied from userspace | ||
24 | is defined in usr/include/linux/kvm.h. | ||
25 | |||
26 | KVM_DEV_FLIC_GET_ALL_IRQS | ||
27 | Copies all floating interrupts into a buffer provided by userspace. | ||
28 | When the buffer is too small it returns -ENOMEM, which is the indication | ||
29 | for userspace to try again with a bigger buffer. | ||
30 | All interrupts remain pending, i.e. are not deleted from the list of | ||
31 | currently pending interrupts. | ||
32 | attr->addr contains the userspace address of the buffer into which all | ||
33 | interrupt data will be copied. | ||
34 | attr->attr contains the size of the buffer in bytes. | ||
35 | |||
36 | KVM_DEV_FLIC_CLEAR_IRQS | ||
37 | Simply deletes all elements from the list of currently pending floating | ||
38 | interrupts. No interrupts are injected into the guest. | ||
39 | |||
40 | KVM_DEV_FLIC_APF_ENABLE | ||
41 | Enables async page faults for the guest. So in case of a major page fault | ||
42 | the host is allowed to handle this async and continues the guest. | ||
43 | |||
44 | KVM_DEV_FLIC_APF_DISABLE_WAIT | ||
45 | Disables async page faults for the guest and waits until already pending | ||
46 | async page faults are done. This is necessary to trigger a completion interrupt | ||
47 | for every init interrupt before migrating the interrupt list. | ||
48 | |||
49 | KVM_DEV_FLIC_ADAPTER_REGISTER | ||
50 | Register an I/O adapter interrupt source. Takes a kvm_s390_io_adapter | ||
51 | describing the adapter to register: | ||
52 | |||
53 | struct kvm_s390_io_adapter { | ||
54 | __u32 id; | ||
55 | __u8 isc; | ||
56 | __u8 maskable; | ||
57 | __u8 swap; | ||
58 | __u8 pad; | ||
59 | }; | ||
60 | |||
61 | id contains the unique id for the adapter, isc the I/O interruption subclass | ||
62 | to use, maskable whether this adapter may be masked (interrupts turned off) | ||
63 | and swap whether the indicators need to be byte swapped. | ||
64 | |||
65 | |||
66 | KVM_DEV_FLIC_ADAPTER_MODIFY | ||
67 | Modifies attributes of an existing I/O adapter interrupt source. Takes | ||
68 | a kvm_s390_io_adapter_req specifiying the adapter and the operation: | ||
69 | |||
70 | struct kvm_s390_io_adapter_req { | ||
71 | __u32 id; | ||
72 | __u8 type; | ||
73 | __u8 mask; | ||
74 | __u16 pad0; | ||
75 | __u64 addr; | ||
76 | }; | ||
77 | |||
78 | id specifies the adapter and type the operation. The supported operations | ||
79 | are: | ||
80 | |||
81 | KVM_S390_IO_ADAPTER_MASK | ||
82 | mask or unmask the adapter, as specified in mask | ||
83 | |||
84 | KVM_S390_IO_ADAPTER_MAP | ||
85 | perform a gmap translation for the guest address provided in addr, | ||
86 | pin a userspace page for the translated address and add it to the | ||
87 | list of mappings | ||
88 | |||
89 | KVM_S390_IO_ADAPTER_UNMAP | ||
90 | release a userspace page for the translated address specified in addr | ||
91 | from the list of mappings | ||
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt index a68db7692ee8..744f82f86c58 100644 --- a/Documentation/vm/unevictable-lru.txt +++ b/Documentation/vm/unevictable-lru.txt | |||
@@ -453,7 +453,7 @@ putback_lru_page() function to add migrated pages back to the LRU. | |||
453 | mmap(MAP_LOCKED) SYSTEM CALL HANDLING | 453 | mmap(MAP_LOCKED) SYSTEM CALL HANDLING |
454 | ------------------------------------- | 454 | ------------------------------------- |
455 | 455 | ||
456 | In addition the the mlock()/mlockall() system calls, an application can request | 456 | In addition the mlock()/mlockall() system calls, an application can request |
457 | that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() | 457 | that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() |
458 | call. Furthermore, any mmap() call or brk() call that expands the heap by a | 458 | call. Furthermore, any mmap() call or brk() call that expands the heap by a |
459 | task that has previously called mlockall() with the MCL_FUTURE flag will result | 459 | task that has previously called mlockall() with the MCL_FUTURE flag will result |
diff --git a/Documentation/w1/masters/ds2490 b/Documentation/w1/masters/ds2490 index 28176def3d6f..3e091151dd80 100644 --- a/Documentation/w1/masters/ds2490 +++ b/Documentation/w1/masters/ds2490 | |||
@@ -21,8 +21,6 @@ Notes and limitations. | |||
21 | - The weak pullup current is a minimum of 0.9mA and maximum of 6.0mA. | 21 | - The weak pullup current is a minimum of 0.9mA and maximum of 6.0mA. |
22 | - The 5V strong pullup is supported with a minimum of 5.9mA and a | 22 | - The 5V strong pullup is supported with a minimum of 5.9mA and a |
23 | maximum of 30.4 mA. (From DS2490.pdf) | 23 | maximum of 30.4 mA. (From DS2490.pdf) |
24 | - While the ds2490 supports a hardware search the code doesn't take | ||
25 | advantage of it (in tested case it only returned first device). | ||
26 | - The hardware will detect when devices are attached to the bus on the | 24 | - The hardware will detect when devices are attached to the bus on the |
27 | next bus (reset?) operation, however only a message is printed as | 25 | next bus (reset?) operation, however only a message is printed as |
28 | the core w1 code doesn't make use of the information. Connecting | 26 | the core w1 code doesn't make use of the information. Connecting |
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink index f59a31965d50..927a52cc0519 100644 --- a/Documentation/w1/w1.netlink +++ b/Documentation/w1/w1.netlink | |||
@@ -5,8 +5,8 @@ Message types. | |||
5 | ============= | 5 | ============= |
6 | 6 | ||
7 | There are three types of messages between w1 core and userspace: | 7 | There are three types of messages between w1 core and userspace: |
8 | 1. Events. They are generated each time new master or slave device | 8 | 1. Events. They are generated each time a new master or slave device |
9 | found either due to automatic or requested search. | 9 | is found either due to automatic or requested search. |
10 | 2. Userspace commands. | 10 | 2. Userspace commands. |
11 | 3. Replies to userspace commands. | 11 | 3. Replies to userspace commands. |
12 | 12 | ||
@@ -131,7 +131,7 @@ of the w1_netlink_cmd structure and cn_msg.len will be equal to the sum | |||
131 | of the sizeof(struct w1_netlink_msg) and sizeof(struct w1_netlink_cmd). | 131 | of the sizeof(struct w1_netlink_msg) and sizeof(struct w1_netlink_cmd). |
132 | If reply is generated for master or root command (which do not have | 132 | If reply is generated for master or root command (which do not have |
133 | w1_netlink_cmd attached), reply will contain only cn_msg and w1_netlink_msg | 133 | w1_netlink_cmd attached), reply will contain only cn_msg and w1_netlink_msg |
134 | structires. | 134 | structures. |
135 | 135 | ||
136 | w1_netlink_msg.status field will carry positive error value | 136 | w1_netlink_msg.status field will carry positive error value |
137 | (EINVAL for example) or zero in case of success. | 137 | (EINVAL for example) or zero in case of success. |
@@ -160,7 +160,7 @@ procedure is started to select given device. | |||
160 | Then all requested in w1_netlink_msg operations are performed one by one. | 160 | Then all requested in w1_netlink_msg operations are performed one by one. |
161 | If command requires reply (like read command) it is sent on command completion. | 161 | If command requires reply (like read command) it is sent on command completion. |
162 | 162 | ||
163 | When all commands (w1_netlink_cmd) are processed muster device is unlocked | 163 | When all commands (w1_netlink_cmd) are processed master device is unlocked |
164 | and next w1_netlink_msg header processing started. | 164 | and next w1_netlink_msg header processing started. |
165 | 165 | ||
166 | 166 | ||
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt index f9492fed4104..692791cc674c 100644 --- a/Documentation/watchdog/watchdog-parameters.txt +++ b/Documentation/watchdog/watchdog-parameters.txt | |||
@@ -150,6 +150,8 @@ nowayout: Disable watchdog shutdown on close | |||
150 | ------------------------------------------------- | 150 | ------------------------------------------------- |
151 | it87_wdt: | 151 | it87_wdt: |
152 | nogameport: Forbid the activation of game port, default=0 | 152 | nogameport: Forbid the activation of game port, default=0 |
153 | nocir: Forbid the use of CIR (workaround for some buggy setups); set to 1 if | ||
154 | system resets despite watchdog daemon running, default=0 | ||
153 | exclusive: Watchdog exclusive device open, default=1 | 155 | exclusive: Watchdog exclusive device open, default=1 |
154 | timeout: Watchdog timeout in seconds, default=60 | 156 | timeout: Watchdog timeout in seconds, default=60 |
155 | testmode: Watchdog test mode (1 = no reboot), default=0 | 157 | testmode: Watchdog test mode (1 = no reboot), default=0 |
@@ -325,6 +327,11 @@ soft_noboot: Softdog action, set to 1 to ignore reboots, 0 to reboot | |||
325 | stmp3xxx_wdt: | 327 | stmp3xxx_wdt: |
326 | heartbeat: Watchdog heartbeat period in seconds from 1 to 4194304, default 19 | 328 | heartbeat: Watchdog heartbeat period in seconds from 1 to 4194304, default 19 |
327 | ------------------------------------------------- | 329 | ------------------------------------------------- |
330 | tegra_wdt: | ||
331 | heartbeat: Watchdog heartbeats in seconds. (default = 120) | ||
332 | nowayout: Watchdog cannot be stopped once started | ||
333 | (default=kernel config parameter) | ||
334 | ------------------------------------------------- | ||
328 | ts72xx_wdt: | 335 | ts72xx_wdt: |
329 | timeout: Watchdog timeout in seconds. (1 <= timeout <= 8, default=8) | 336 | timeout: Watchdog timeout in seconds. (1 <= timeout <= 8, default=8) |
330 | nowayout: Disable watchdog shutdown on close | 337 | nowayout: Disable watchdog shutdown on close |
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index cb81741d3b0b..a75e3adaa39d 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -182,7 +182,7 @@ Offset Proto Name Meaning | |||
182 | 0226/1 2.02+(3 ext_loader_ver Extended boot loader version | 182 | 0226/1 2.02+(3 ext_loader_ver Extended boot loader version |
183 | 0227/1 2.02+(3 ext_loader_type Extended boot loader ID | 183 | 0227/1 2.02+(3 ext_loader_type Extended boot loader ID |
184 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line | 184 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line |
185 | 022C/4 2.03+ ramdisk_max Highest legal initrd address | 185 | 022C/4 2.03+ initrd_addr_max Highest legal initrd address |
186 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel | 186 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel |
187 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not | 187 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not |
188 | 0235/1 2.10+ min_alignment Minimum alignment, as a power of two | 188 | 0235/1 2.10+ min_alignment Minimum alignment, as a power of two |
@@ -534,7 +534,7 @@ Protocol: 2.02+ | |||
534 | zero, the kernel will assume that your boot loader does not support | 534 | zero, the kernel will assume that your boot loader does not support |
535 | the 2.02+ protocol. | 535 | the 2.02+ protocol. |
536 | 536 | ||
537 | Field name: ramdisk_max | 537 | Field name: initrd_addr_max |
538 | Type: read | 538 | Type: read |
539 | Offset/size: 0x22c/4 | 539 | Offset/size: 0x22c/4 |
540 | Protocol: 2.03+ | 540 | Protocol: 2.03+ |
diff --git a/Documentation/zh_CN/SubmittingPatches b/Documentation/zh_CN/SubmittingPatches index be0bd4725062..1d3a10f8746b 100644 --- a/Documentation/zh_CN/SubmittingPatches +++ b/Documentation/zh_CN/SubmittingPatches | |||
@@ -82,10 +82,6 @@ Documentation/SubmittingDrivers 。 | |||
82 | Quilt: | 82 | Quilt: |
83 | http://savannah.nongnu.org/projects/quilt | 83 | http://savannah.nongnu.org/projects/quilt |
84 | 84 | ||
85 | Andrew Morton 的补丁脚本: | ||
86 | http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz | ||
87 | 作为这些脚本的替代,quilt 是值得推荐的补丁管理工具(看上面的链接)。 | ||
88 | |||
89 | 2)描述你的改动。 | 85 | 2)描述你的改动。 |
90 | 描述你的改动包含的技术细节。 | 86 | 描述你的改动包含的技术细节。 |
91 | 87 | ||
@@ -394,7 +390,7 @@ Static inline 函数相比宏来说,是好得多的选择。Static inline 函 | |||
394 | ---------------- | 390 | ---------------- |
395 | 391 | ||
396 | Andrew Morton, "The perfect patch" (tpp). | 392 | Andrew Morton, "The perfect patch" (tpp). |
397 | <http://userweb.kernel.org/~akpm/stuff/tpp.txt> | 393 | <http://www.ozlabs.org/~akpm/stuff/tpp.txt> |
398 | 394 | ||
399 | Jeff Garzik, "Linux kernel patch submission format". | 395 | Jeff Garzik, "Linux kernel patch submission format". |
400 | <http://linux.yyz.us/patch-format.html> | 396 | <http://linux.yyz.us/patch-format.html> |
@@ -406,7 +402,7 @@ Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". | |||
406 | <http://www.kroah.com/log/2006/01/11/> | 402 | <http://www.kroah.com/log/2006/01/11/> |
407 | 403 | ||
408 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! | 404 | NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! |
409 | <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> | 405 | <https://lkml.org/lkml/2005/7/11/336> |
410 | 406 | ||
411 | Kernel Documentation/CodingStyle: | 407 | Kernel Documentation/CodingStyle: |
412 | <http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle> | 408 | <http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle> |