diff options
Diffstat (limited to 'Documentation')
339 files changed, 11952 insertions, 2454 deletions
diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb index e2bc700a6f9c..831f15d9672f 100644 --- a/Documentation/ABI/stable/sysfs-bus-usb +++ b/Documentation/ABI/stable/sysfs-bus-usb | |||
@@ -32,10 +32,9 @@ Date: January 2008 | |||
32 | KernelVersion: 2.6.25 | 32 | KernelVersion: 2.6.25 |
33 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> | 33 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> |
34 | Description: | 34 | Description: |
35 | If CONFIG_PM_RUNTIME is enabled then this file | 35 | If CONFIG_PM is enabled, then this file is present. When read, |
36 | is present. When read, it returns the total time (in msec) | 36 | it returns the total time (in msec) that the USB device has been |
37 | that the USB device has been connected to the machine. This | 37 | connected to the machine. This file is read-only. |
38 | file is read-only. | ||
39 | Users: | 38 | Users: |
40 | PowerTOP <powertop@lists.01.org> | 39 | PowerTOP <powertop@lists.01.org> |
41 | https://01.org/powertop/ | 40 | https://01.org/powertop/ |
@@ -45,10 +44,9 @@ Date: January 2008 | |||
45 | KernelVersion: 2.6.25 | 44 | KernelVersion: 2.6.25 |
46 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> | 45 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> |
47 | Description: | 46 | Description: |
48 | If CONFIG_PM_RUNTIME is enabled then this file | 47 | If CONFIG_PM is enabled, then this file is present. When read, |
49 | is present. When read, it returns the total time (in msec) | 48 | it returns the total time (in msec) that the USB device has been |
50 | that the USB device has been active, i.e. not in a suspended | 49 | active, i.e. not in a suspended state. This file is read-only. |
51 | state. This file is read-only. | ||
52 | 50 | ||
53 | Tools can use this file and the connected_duration file to | 51 | Tools can use this file and the connected_duration file to |
54 | compute the percentage of time that a device has been active. | 52 | compute the percentage of time that a device has been active. |
diff --git a/Documentation/ABI/stable/sysfs-class-udc b/Documentation/ABI/stable/sysfs-class-udc new file mode 100644 index 000000000000..85d3dac2e204 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-udc | |||
@@ -0,0 +1,93 @@ | |||
1 | What: /sys/class/udc/<udc>/a_alt_hnp_support | ||
2 | Date: June 2011 | ||
3 | KernelVersion: 3.1 | ||
4 | Contact: Felipe Balbi <balbi@kernel.org> | ||
5 | Description: | ||
6 | Indicates if an OTG A-Host supports HNP at an alternate port. | ||
7 | Users: | ||
8 | |||
9 | What: /sys/class/udc/<udc>/a_hnp_support | ||
10 | Date: June 2011 | ||
11 | KernelVersion: 3.1 | ||
12 | Contact: Felipe Balbi <balbi@kernel.org> | ||
13 | Description: | ||
14 | Indicates if an OTG A-Host supports HNP at this port. | ||
15 | Users: | ||
16 | |||
17 | What: /sys/class/udc/<udc>/b_hnp_enable | ||
18 | Date: June 2011 | ||
19 | KernelVersion: 3.1 | ||
20 | Contact: Felipe Balbi <balbi@kernel.org> | ||
21 | Description: | ||
22 | Indicates if an OTG A-Host enabled HNP support. | ||
23 | Users: | ||
24 | |||
25 | What: /sys/class/udc/<udc>/current_speed | ||
26 | Date: June 2011 | ||
27 | KernelVersion: 3.1 | ||
28 | Contact: Felipe Balbi <balbi@kernel.org> | ||
29 | Description: | ||
30 | Indicates the current negotiated speed at this port. | ||
31 | Users: | ||
32 | |||
33 | What: /sys/class/udc/<udc>/is_a_peripheral | ||
34 | Date: June 2011 | ||
35 | KernelVersion: 3.1 | ||
36 | Contact: Felipe Balbi <balbi@kernel.org> | ||
37 | Description: | ||
38 | Indicates that this port is the default Host on an OTG session | ||
39 | but HNP was used to switch roles. | ||
40 | Users: | ||
41 | |||
42 | What: /sys/class/udc/<udc>/is_otg | ||
43 | Date: June 2011 | ||
44 | KernelVersion: 3.1 | ||
45 | Contact: Felipe Balbi <balbi@kernel.org> | ||
46 | Description: | ||
47 | Indicates that this port support OTG. | ||
48 | Users: | ||
49 | |||
50 | What: /sys/class/udc/<udc>/maximum_speed | ||
51 | Date: June 2011 | ||
52 | KernelVersion: 3.1 | ||
53 | Contact: Felipe Balbi <balbi@kernel.org> | ||
54 | Description: | ||
55 | Indicates the maximum USB speed supported by this port. | ||
56 | Users: | ||
57 | |||
58 | What: /sys/class/udc/<udc>/maximum_speed | ||
59 | Date: June 2011 | ||
60 | KernelVersion: 3.1 | ||
61 | Contact: Felipe Balbi <balbi@kernel.org> | ||
62 | Description: | ||
63 | Indicates the maximum USB speed supported by this port. | ||
64 | Users: | ||
65 | |||
66 | What: /sys/class/udc/<udc>/soft_connect | ||
67 | Date: June 2011 | ||
68 | KernelVersion: 3.1 | ||
69 | Contact: Felipe Balbi <balbi@kernel.org> | ||
70 | Description: | ||
71 | Allows users to disconnect data pullup resistors thus causing a | ||
72 | logical disconnection from the USB Host. | ||
73 | Users: | ||
74 | |||
75 | What: /sys/class/udc/<udc>/srp | ||
76 | Date: June 2011 | ||
77 | KernelVersion: 3.1 | ||
78 | Contact: Felipe Balbi <balbi@kernel.org> | ||
79 | Description: | ||
80 | Allows users to manually start Session Request Protocol. | ||
81 | Users: | ||
82 | |||
83 | What: /sys/class/udc/<udc>/state | ||
84 | Date: June 2011 | ||
85 | KernelVersion: 3.1 | ||
86 | Contact: Felipe Balbi <balbi@kernel.org> | ||
87 | Description: | ||
88 | Indicates current state of the USB Device Controller. Valid | ||
89 | states are: 'not-attached', 'attached', 'powered', | ||
90 | 'reconnecting', 'unauthenticated', 'default', 'addressed', | ||
91 | 'configured', and 'suspended'; however not all USB Device | ||
92 | Controllers support reporting all states. | ||
93 | Users: | ||
diff --git a/Documentation/ABI/stable/sysfs-driver-ib_srp b/Documentation/ABI/stable/sysfs-driver-ib_srp index b9688de8455b..7049a2b50359 100644 --- a/Documentation/ABI/stable/sysfs-driver-ib_srp +++ b/Documentation/ABI/stable/sysfs-driver-ib_srp | |||
@@ -55,12 +55,12 @@ Description: Interface for making ib_srp connect to a new target. | |||
55 | only safe with partial memory descriptor list support enabled | 55 | only safe with partial memory descriptor list support enabled |
56 | (allow_ext_sg=1). | 56 | (allow_ext_sg=1). |
57 | * comp_vector, a number in the range 0..n-1 specifying the | 57 | * comp_vector, a number in the range 0..n-1 specifying the |
58 | MSI-X completion vector. Some HCA's allocate multiple (n) | 58 | MSI-X completion vector of the first RDMA channel. Some |
59 | MSI-X vectors per HCA port. If the IRQ affinity masks of | 59 | HCA's allocate multiple (n) MSI-X vectors per HCA port. If |
60 | these interrupts have been configured such that each MSI-X | 60 | the IRQ affinity masks of these interrupts have been |
61 | interrupt is handled by a different CPU then the comp_vector | 61 | configured such that each MSI-X interrupt is handled by a |
62 | parameter can be used to spread the SRP completion workload | 62 | different CPU then the comp_vector parameter can be used to |
63 | over multiple CPU's. | 63 | spread the SRP completion workload over multiple CPU's. |
64 | * tl_retry_count, a number in the range 2..7 specifying the | 64 | * tl_retry_count, a number in the range 2..7 specifying the |
65 | IB RC retry count. | 65 | IB RC retry count. |
66 | * queue_size, the maximum number of commands that the | 66 | * queue_size, the maximum number of commands that the |
@@ -88,6 +88,13 @@ Description: Whether ib_srp is allowed to include a partial memory | |||
88 | descriptor list in an SRP_CMD when communicating with an SRP | 88 | descriptor list in an SRP_CMD when communicating with an SRP |
89 | target. | 89 | target. |
90 | 90 | ||
91 | What: /sys/class/scsi_host/host<n>/ch_count | ||
92 | Date: April 1, 2015 | ||
93 | KernelVersion: 3.19 | ||
94 | Contact: linux-rdma@vger.kernel.org | ||
95 | Description: Number of RDMA channels used for communication with the SRP | ||
96 | target. | ||
97 | |||
91 | What: /sys/class/scsi_host/host<n>/cmd_sg_entries | 98 | What: /sys/class/scsi_host/host<n>/cmd_sg_entries |
92 | Date: May 19, 2011 | 99 | Date: May 19, 2011 |
93 | KernelVersion: 2.6.39 | 100 | KernelVersion: 2.6.39 |
@@ -95,6 +102,12 @@ Contact: linux-rdma@vger.kernel.org | |||
95 | Description: Maximum number of data buffer descriptors that may be sent to | 102 | Description: Maximum number of data buffer descriptors that may be sent to |
96 | the target in a single SRP_CMD request. | 103 | the target in a single SRP_CMD request. |
97 | 104 | ||
105 | What: /sys/class/scsi_host/host<n>/comp_vector | ||
106 | Date: September 2, 2013 | ||
107 | KernelVersion: 3.11 | ||
108 | Contact: linux-rdma@vger.kernel.org | ||
109 | Description: Completion vector used for the first RDMA channel. | ||
110 | |||
98 | What: /sys/class/scsi_host/host<n>/dgid | 111 | What: /sys/class/scsi_host/host<n>/dgid |
99 | Date: June 17, 2006 | 112 | Date: June 17, 2006 |
100 | KernelVersion: 2.6.17 | 113 | KernelVersion: 2.6.17 |
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-hid b/Documentation/ABI/testing/configfs-usb-gadget-hid new file mode 100644 index 000000000000..f12e00e6baa3 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-hid | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/hid.name | ||
2 | Date: Nov 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | protocol - HID protocol to use | ||
8 | report_desc - blob corresponding to HID report descriptors | ||
9 | except the data passed through /dev/hidg<N> | ||
10 | report_length - HID report length | ||
11 | subclass - HID device subclass to use | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-midi b/Documentation/ABI/testing/configfs-usb-gadget-midi new file mode 100644 index 000000000000..6b341df7249c --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-midi | |||
@@ -0,0 +1,12 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/midi.name | ||
2 | Date: Nov 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | index - index value for the USB MIDI adapter | ||
8 | id - ID string for the USB MIDI adapter | ||
9 | buflen - MIDI buffer length | ||
10 | qlen - USB read request queue length | ||
11 | in_ports - number of MIDI input ports | ||
12 | out_ports - number of MIDI output ports | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 new file mode 100644 index 000000000000..4b8d6ec92e2b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 | |||
@@ -0,0 +1,24 @@ | |||
1 | What: /sys/bus/coresight/devices/<memory_map>.etb/enable_sink | ||
2 | Date: November 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
5 | Description: (RW) Add/remove a sink from a trace path. There can be multiple | ||
6 | source for a single sink. | ||
7 | ex: echo 1 > /sys/bus/coresight/devices/20010000.etb/enable_sink | ||
8 | |||
9 | What: /sys/bus/coresight/devices/<memory_map>.etb/status | ||
10 | Date: November 2014 | ||
11 | KernelVersion: 3.19 | ||
12 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
13 | Description: (R) List various control and status registers. The specific | ||
14 | layout and content is driver specific. | ||
15 | |||
16 | What: /sys/bus/coresight/devices/<memory_map>.etb/trigger_cntr | ||
17 | Date: November 2014 | ||
18 | KernelVersion: 3.19 | ||
19 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
20 | Description: (RW) Disables write access to the Trace RAM by stopping the | ||
21 | formatter after a defined number of words have been stored | ||
22 | following the trigger event. The number of 32-bit words written | ||
23 | into the Trace RAM following the trigger event is equal to the | ||
24 | value stored in this register+1 (from ARM ETB-TRM). | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x new file mode 100644 index 000000000000..b4d0b99afffb --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x | |||
@@ -0,0 +1,253 @@ | |||
1 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/enable_source | ||
2 | Date: November 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
5 | Description: (RW) Enable/disable tracing on this specific trace entiry. | ||
6 | Enabling a source implies the source has been configured | ||
7 | properly and a sink has been identidifed for it. The path | ||
8 | of coresight components linking the source to the sink is | ||
9 | configured and managed automatically by the coresight framework. | ||
10 | |||
11 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/status | ||
12 | Date: November 2014 | ||
13 | KernelVersion: 3.19 | ||
14 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
15 | Description: (R) List various control and status registers. The specific | ||
16 | layout and content is driver specific. | ||
17 | |||
18 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx | ||
19 | Date: November 2014 | ||
20 | KernelVersion: 3.19 | ||
21 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
22 | Description: Select which address comparator or pair (of comparators) to | ||
23 | work with. | ||
24 | |||
25 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_acctype | ||
26 | Date: November 2014 | ||
27 | KernelVersion: 3.19 | ||
28 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
29 | Description: (RW) Used in conjunction with @addr_idx. Specifies | ||
30 | characteristics about the address comparator being configure, | ||
31 | for example the access type, the kind of instruction to trace, | ||
32 | processor contect ID to trigger on, etc. Individual fields in | ||
33 | the access type register may vary on the version of the trace | ||
34 | entity. | ||
35 | |||
36 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_range | ||
37 | Date: November 2014 | ||
38 | KernelVersion: 3.19 | ||
39 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
40 | Description: (RW) Used in conjunction with @addr_idx. Specifies the range of | ||
41 | addresses to trigger on. Inclusion or exclusion is specificed | ||
42 | in the corresponding access type register. | ||
43 | |||
44 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_single | ||
45 | Date: November 2014 | ||
46 | KernelVersion: 3.19 | ||
47 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
48 | Description: (RW) Used in conjunction with @addr_idx. Specifies the single | ||
49 | address to trigger on, highly influenced by the configuration | ||
50 | options of the corresponding access type register. | ||
51 | |||
52 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_start | ||
53 | Date: November 2014 | ||
54 | KernelVersion: 3.19 | ||
55 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
56 | Description: (RW) Used in conjunction with @addr_idx. Specifies the single | ||
57 | address to start tracing on, highly influenced by the | ||
58 | configuration options of the corresponding access type register. | ||
59 | |||
60 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_stop | ||
61 | Date: November 2014 | ||
62 | KernelVersion: 3.19 | ||
63 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
64 | Description: (RW) Used in conjunction with @addr_idx. Specifies the single | ||
65 | address to stop tracing on, highly influenced by the | ||
66 | configuration options of the corresponding access type register. | ||
67 | |||
68 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_idx | ||
69 | Date: November 2014 | ||
70 | KernelVersion: 3.19 | ||
71 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
72 | Description: (RW) Specifies the counter to work on. | ||
73 | |||
74 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_event | ||
75 | Date: November 2014 | ||
76 | KernelVersion: 3.19 | ||
77 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
78 | Description: (RW) Used in conjunction with cntr_idx, give access to the | ||
79 | counter event register. | ||
80 | |||
81 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_val | ||
82 | Date: November 2014 | ||
83 | KernelVersion: 3.19 | ||
84 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
85 | Description: (RW) Used in conjunction with cntr_idx, give access to the | ||
86 | counter value register. | ||
87 | |||
88 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_rld_val | ||
89 | Date: November 2014 | ||
90 | KernelVersion: 3.19 | ||
91 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
92 | Description: (RW) Used in conjunction with cntr_idx, give access to the | ||
93 | counter reload value register. | ||
94 | |||
95 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_rld_event | ||
96 | Date: November 2014 | ||
97 | KernelVersion: 3.19 | ||
98 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
99 | Description: (RW) Used in conjunction with cntr_idx, give access to the | ||
100 | counter reload event register. | ||
101 | |||
102 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_idx | ||
103 | Date: November 2014 | ||
104 | KernelVersion: 3.19 | ||
105 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
106 | Description: (RW) Specifies the index of the context ID register to be | ||
107 | selected. | ||
108 | |||
109 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_mask | ||
110 | Date: November 2014 | ||
111 | KernelVersion: 3.19 | ||
112 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
113 | Description: (RW) Mask to apply to all the context ID comparator. | ||
114 | |||
115 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_val | ||
116 | Date: November 2014 | ||
117 | KernelVersion: 3.19 | ||
118 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
119 | Description: (RW) Used with the ctxid_idx, specify with context ID to trigger | ||
120 | on. | ||
121 | |||
122 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/enable_event | ||
123 | Date: November 2014 | ||
124 | KernelVersion: 3.19 | ||
125 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
126 | Description: (RW) Defines which event triggers a trace. | ||
127 | |||
128 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/etmsr | ||
129 | Date: November 2014 | ||
130 | KernelVersion: 3.19 | ||
131 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
132 | Description: (RW) Gives access to the ETM status register, which holds | ||
133 | programming information and status on certains events. | ||
134 | |||
135 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/fifofull_level | ||
136 | Date: November 2014 | ||
137 | KernelVersion: 3.19 | ||
138 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
139 | Description: (RW) Number of byte left in the fifo before considering it full. | ||
140 | Depending on the tracer's version, can also hold threshold for | ||
141 | data suppression. | ||
142 | |||
143 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mode | ||
144 | Date: November 2014 | ||
145 | KernelVersion: 3.19 | ||
146 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
147 | Description: (RW) Interface with the driver's 'mode' field, controlling | ||
148 | various aspect of the trace entity such as time stamping, | ||
149 | context ID size and cycle accurate tracing. Driver specific | ||
150 | and bound to change depending on the driver. | ||
151 | |||
152 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_addr_cmp | ||
153 | Date: November 2014 | ||
154 | KernelVersion: 3.19 | ||
155 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
156 | Description: (R) Provides the number of address comparators pairs accessible | ||
157 | on a trace unit, as specified by bit 3:0 of register ETMCCR. | ||
158 | |||
159 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_cntr | ||
160 | Date: November 2014 | ||
161 | KernelVersion: 3.19 | ||
162 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
163 | Description: (R) Provides the number of counters accessible on a trace unit, | ||
164 | as specified by bit 15:13 of register ETMCCR. | ||
165 | |||
166 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_ctxid_cmp | ||
167 | Date: November 2014 | ||
168 | KernelVersion: 3.19 | ||
169 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
170 | Description: (R) Provides the number of context ID comparator available on a | ||
171 | trace unit, as specified by bit 25:24 of register ETMCCR. | ||
172 | |||
173 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/reset | ||
174 | Date: November 2014 | ||
175 | KernelVersion: 3.19 | ||
176 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
177 | Description: (W) Cancels all configuration on a trace unit and set it back | ||
178 | to its boot configuration. | ||
179 | |||
180 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_12_event | ||
181 | Date: November 2014 | ||
182 | KernelVersion: 3.19 | ||
183 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
184 | Description: (RW) Defines the event that causes the sequencer to transition | ||
185 | from state 1 to state 2. | ||
186 | |||
187 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_13_event | ||
188 | Date: November 2014 | ||
189 | KernelVersion: 3.19 | ||
190 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
191 | Description: (RW) Defines the event that causes the sequencer to transition | ||
192 | from state 1 to state 3. | ||
193 | |||
194 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_21_event | ||
195 | Date: November 2014 | ||
196 | KernelVersion: 3.19 | ||
197 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
198 | Description: (RW) Defines the event that causes the sequencer to transition | ||
199 | from state 2 to state 1. | ||
200 | |||
201 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_23_event | ||
202 | Date: November 2014 | ||
203 | KernelVersion: 3.19 | ||
204 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
205 | Description: (RW) Defines the event that causes the sequencer to transition | ||
206 | from state 2 to state 3. | ||
207 | |||
208 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_31_event | ||
209 | Date: November 2014 | ||
210 | KernelVersion: 3.19 | ||
211 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
212 | Description: (RW) Defines the event that causes the sequencer to transition | ||
213 | from state 3 to state 1. | ||
214 | |||
215 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_32_event | ||
216 | Date: November 2014 | ||
217 | KernelVersion: 3.19 | ||
218 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
219 | Description: (RW) Defines the event that causes the sequencer to transition | ||
220 | from state 3 to state 2. | ||
221 | |||
222 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/curr_seq_state | ||
223 | Date: November 2014 | ||
224 | KernelVersion: 3.19 | ||
225 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
226 | Description: (R) Holds the current state of the sequencer. | ||
227 | |||
228 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/sync_freq | ||
229 | Date: November 2014 | ||
230 | KernelVersion: 3.19 | ||
231 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
232 | Description: (RW) Holds the trace synchronization frequency value - must be | ||
233 | programmed with the various implementation behavior in mind. | ||
234 | |||
235 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/timestamp_event | ||
236 | Date: November 2014 | ||
237 | KernelVersion: 3.19 | ||
238 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
239 | Description: (RW) Defines an event that requests the insertion of a timestamp | ||
240 | into the trace stream. | ||
241 | |||
242 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/traceid | ||
243 | Date: November 2014 | ||
244 | KernelVersion: 3.19 | ||
245 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
246 | Description: (RW) Holds the trace ID that will appear in the trace stream | ||
247 | coming from this trace entity. | ||
248 | |||
249 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/trigger_event | ||
250 | Date: November 2014 | ||
251 | KernelVersion: 3.19 | ||
252 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
253 | Description: (RW) Define the event that controls the trigger. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel b/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel new file mode 100644 index 000000000000..d75acda5e1b3 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel | |||
@@ -0,0 +1,12 @@ | |||
1 | What: /sys/bus/coresight/devices/<memory_map>.funnel/funnel_ctrl | ||
2 | Date: November 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
5 | Description: (RW) Enables the slave ports and defines the hold time of the | ||
6 | slave ports. | ||
7 | |||
8 | What: /sys/bus/coresight/devices/<memory_map>.funnel/priority | ||
9 | Date: November 2014 | ||
10 | KernelVersion: 3.19 | ||
11 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
12 | Description: (RW) Defines input port priority order. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc new file mode 100644 index 000000000000..f38cded5fa22 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc | |||
@@ -0,0 +1,8 @@ | |||
1 | What: /sys/bus/coresight/devices/<memory_map>.tmc/trigger_cntr | ||
2 | Date: November 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
5 | Description: (RW) Disables write access to the Trace RAM by stopping the | ||
6 | formatter after a defined number of words have been stored | ||
7 | following the trigger event. Additional interface for this | ||
8 | driver are expected to be added as it matures. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index d760b0224ef7..117521dbf2b3 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -200,6 +200,13 @@ Description: | |||
200 | Raw pressure measurement from channel Y. Units after | 200 | Raw pressure measurement from channel Y. Units after |
201 | application of scale and offset are kilopascal. | 201 | application of scale and offset are kilopascal. |
202 | 202 | ||
203 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_input | ||
204 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_input | ||
205 | KernelVersion: 3.8 | ||
206 | Contact: linux-iio@vger.kernel.org | ||
207 | Description: | ||
208 | Scaled pressure measurement from channel Y, in kilopascal. | ||
209 | |||
203 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw | 210 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw |
204 | KernelVersion: 3.14 | 211 | KernelVersion: 3.14 |
205 | Contact: linux-iio@vger.kernel.org | 212 | Contact: linux-iio@vger.kernel.org |
@@ -231,6 +238,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset | |||
231 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset | 238 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset |
232 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset | 239 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset |
233 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset | 240 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset |
241 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset | ||
234 | KernelVersion: 2.6.35 | 242 | KernelVersion: 2.6.35 |
235 | Contact: linux-iio@vger.kernel.org | 243 | Contact: linux-iio@vger.kernel.org |
236 | Description: | 244 | Description: |
@@ -251,6 +259,7 @@ Description: | |||
251 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale | 259 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale |
252 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale | 260 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale |
253 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale | 261 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale |
262 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_scale | ||
254 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale | 263 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale |
255 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale | 264 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale |
256 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale | 265 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale |
@@ -266,6 +275,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_tilt_comp_sca | |||
266 | What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_scale | 275 | What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_scale |
267 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale | 276 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale |
268 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale | 277 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale |
278 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale | ||
269 | KernelVersion: 2.6.35 | 279 | KernelVersion: 2.6.35 |
270 | Contact: linux-iio@vger.kernel.org | 280 | Contact: linux-iio@vger.kernel.org |
271 | Description: | 281 | Description: |
@@ -328,6 +338,10 @@ Description: | |||
328 | are listed in this attribute. | 338 | are listed in this attribute. |
329 | 339 | ||
330 | What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain | 340 | What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain |
341 | What: /sys/bus/iio/devices/iio:deviceX/in_intensity_red_hardwaregain | ||
342 | What: /sys/bus/iio/devices/iio:deviceX/in_intensity_green_hardwaregain | ||
343 | What: /sys/bus/iio/devices/iio:deviceX/in_intensity_blue_hardwaregain | ||
344 | What: /sys/bus/iio/devices/iio:deviceX/in_intensity_clear_hardwaregain | ||
331 | KernelVersion: 2.6.35 | 345 | KernelVersion: 2.6.35 |
332 | Contact: linux-iio@vger.kernel.org | 346 | Contact: linux-iio@vger.kernel.org |
333 | Description: | 347 | Description: |
@@ -1028,3 +1042,12 @@ Contact: linux-iio@vger.kernel.org | |||
1028 | Description: | 1042 | Description: |
1029 | Raw value of rotation from true/magnetic north measured with | 1043 | Raw value of rotation from true/magnetic north measured with |
1030 | or without compensation from tilt sensors. | 1044 | or without compensation from tilt sensors. |
1045 | |||
1046 | What: /sys/bus/iio/devices/iio:deviceX/in_currentX_raw | ||
1047 | KernelVersion: 3.18 | ||
1048 | Contact: linux-iio@vger.kernel.org | ||
1049 | Description: | ||
1050 | Raw current measurement from channel X. Units are in milliamps | ||
1051 | after application of scale and offset. If no offset or scale is | ||
1052 | present, output should be considered as processed with the | ||
1053 | unit in milliamps. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index ee6c04036492..b3bc50f650ee 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -281,3 +281,16 @@ Description: | |||
281 | opt-out of driver binding using a driver_override name such as | 281 | opt-out of driver binding using a driver_override name such as |
282 | "none". Only a single driver may be specified in the override, | 282 | "none". Only a single driver may be specified in the override, |
283 | there is no support for parsing delimiters. | 283 | there is no support for parsing delimiters. |
284 | |||
285 | What: /sys/bus/pci/devices/.../numa_node | ||
286 | Date: Oct 2014 | ||
287 | Contact: Prarit Bhargava <prarit@redhat.com> | ||
288 | Description: | ||
289 | This file contains the NUMA node to which the PCI device is | ||
290 | attached, or -1 if the node is unknown. The initial value | ||
291 | comes from an ACPI _PXM method or a similar firmware | ||
292 | source. If that is missing or incorrect, this file can be | ||
293 | written to override the node. In that case, please report | ||
294 | a firmware bug to the system vendor. Writing to this file | ||
295 | taints the kernel with TAINT_FIRMWARE_WORKAROUND, which | ||
296 | reduces the supportability of your system. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 614d451cee41..e5cc7633d013 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -104,16 +104,15 @@ What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm | |||
104 | Date: September 2011 | 104 | Date: September 2011 |
105 | Contact: Andiry Xu <andiry.xu@amd.com> | 105 | Contact: Andiry Xu <andiry.xu@amd.com> |
106 | Description: | 106 | Description: |
107 | If CONFIG_PM_RUNTIME is set and a USB 2.0 lpm-capable device | 107 | If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged |
108 | is plugged in to a xHCI host which support link PM, it will | 108 | in to a xHCI host which support link PM, it will perform a LPM |
109 | perform a LPM test; if the test is passed and host supports | 109 | test; if the test is passed and host supports USB2 hardware LPM |
110 | USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will | 110 | (xHCI 1.0 feature), USB2 hardware LPM will be enabled for the |
111 | be enabled for the device and the USB device directory will | 111 | device and the USB device directory will contain a file named |
112 | contain a file named power/usb2_hardware_lpm. The file holds | 112 | power/usb2_hardware_lpm. The file holds a string value (enable |
113 | a string value (enable or disable) indicating whether or not | 113 | or disable) indicating whether or not USB2 hardware LPM is |
114 | USB2 hardware LPM is enabled for the device. Developer can | 114 | enabled for the device. Developer can write y/Y/1 or n/N/0 to |
115 | write y/Y/1 or n/N/0 to the file to enable/disable the | 115 | the file to enable/disable the feature. |
116 | feature. | ||
117 | 116 | ||
118 | What: /sys/bus/usb/devices/.../removable | 117 | What: /sys/bus/usb/devices/.../removable |
119 | Date: February 2012 | 118 | Date: February 2012 |
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net index e1b2e785bba8..beb8ec4dabbc 100644 --- a/Documentation/ABI/testing/sysfs-class-net +++ b/Documentation/ABI/testing/sysfs-class-net | |||
@@ -216,3 +216,11 @@ Contact: netdev@vger.kernel.org | |||
216 | Description: | 216 | Description: |
217 | Indicates the interface protocol type as a decimal value. See | 217 | Indicates the interface protocol type as a decimal value. See |
218 | include/uapi/linux/if_arp.h for all possible values. | 218 | include/uapi/linux/if_arp.h for all possible values. |
219 | |||
220 | What: /sys/class/net/<iface>/phys_switch_id | ||
221 | Date: November 2014 | ||
222 | KernelVersion: 3.19 | ||
223 | Contact: netdev@vger.kernel.org | ||
224 | Description: | ||
225 | Indicates the unique physical switch identifier of a switch this | ||
226 | port belongs to, as a string. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index acb9bfc89b48..99983e67c13c 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
@@ -224,3 +224,50 @@ Description: Parameters for the Intel P-state driver | |||
224 | frequency range. | 224 | frequency range. |
225 | 225 | ||
226 | More details can be found in Documentation/cpu-freq/intel-pstate.txt | 226 | More details can be found in Documentation/cpu-freq/intel-pstate.txt |
227 | |||
228 | What: /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below> | ||
229 | Date: July 2014(documented, existed before August 2008) | ||
230 | Contact: Sudeep Holla <sudeep.holla@arm.com> | ||
231 | Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
232 | Description: Parameters for the CPU cache attributes | ||
233 | |||
234 | allocation_policy: | ||
235 | - WriteAllocate: allocate a memory location to a cache line | ||
236 | on a cache miss because of a write | ||
237 | - ReadAllocate: allocate a memory location to a cache line | ||
238 | on a cache miss because of a read | ||
239 | - ReadWriteAllocate: both writeallocate and readallocate | ||
240 | |||
241 | attributes: LEGACY used only on IA64 and is same as write_policy | ||
242 | |||
243 | coherency_line_size: the minimum amount of data in bytes that gets | ||
244 | transferred from memory to cache | ||
245 | |||
246 | level: the cache hierarcy in the multi-level cache configuration | ||
247 | |||
248 | number_of_sets: total number of sets in the cache, a set is a | ||
249 | collection of cache lines with the same cache index | ||
250 | |||
251 | physical_line_partition: number of physical cache line per cache tag | ||
252 | |||
253 | shared_cpu_list: the list of logical cpus sharing the cache | ||
254 | |||
255 | shared_cpu_map: logical cpu mask containing the list of cpus sharing | ||
256 | the cache | ||
257 | |||
258 | size: the total cache size in kB | ||
259 | |||
260 | type: | ||
261 | - Instruction: cache that only holds instructions | ||
262 | - Data: cache that only caches data | ||
263 | - Unified: cache that holds both data and instructions | ||
264 | |||
265 | ways_of_associativity: degree of freedom in placing a particular block | ||
266 | of memory in the cache | ||
267 | |||
268 | write_policy: | ||
269 | - WriteThrough: data is written to both the cache line | ||
270 | and to the block in the lower-level memory | ||
271 | - WriteBack: data is written only to the cache line and | ||
272 | the modified cache line is written to main | ||
273 | memory only when it is replaced | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-dell-laptop b/Documentation/ABI/testing/sysfs-platform-dell-laptop new file mode 100644 index 000000000000..7969443ef0ef --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-dell-laptop | |||
@@ -0,0 +1,60 @@ | |||
1 | What: /sys/class/leds/dell::kbd_backlight/als_setting | ||
2 | Date: December 2014 | ||
3 | KernelVersion: 3.19 | ||
4 | Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>, | ||
5 | Pali Rohár <pali.rohar@gmail.com> | ||
6 | Description: | ||
7 | This file allows to control the automatic keyboard | ||
8 | illumination mode on some systems that have an ambient | ||
9 | light sensor. Write 1 to this file to enable the auto | ||
10 | mode, 0 to disable it. | ||
11 | |||
12 | What: /sys/class/leds/dell::kbd_backlight/start_triggers | ||
13 | Date: December 2014 | ||
14 | KernelVersion: 3.19 | ||
15 | Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>, | ||
16 | Pali Rohár <pali.rohar@gmail.com> | ||
17 | Description: | ||
18 | This file allows to control the input triggers that | ||
19 | turn on the keyboard backlight illumination that is | ||
20 | disabled because of inactivity. | ||
21 | Read the file to see the triggers available. The ones | ||
22 | enabled are preceded by '+', those disabled by '-'. | ||
23 | |||
24 | To enable a trigger, write its name preceded by '+' to | ||
25 | this file. To disable a trigger, write its name preceded | ||
26 | by '-' instead. | ||
27 | |||
28 | For example, to enable the keyboard as trigger run: | ||
29 | echo +keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers | ||
30 | To disable it: | ||
31 | echo -keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers | ||
32 | |||
33 | Note that not all the available triggers can be configured. | ||
34 | |||
35 | What: /sys/class/leds/dell::kbd_backlight/stop_timeout | ||
36 | Date: December 2014 | ||
37 | KernelVersion: 3.19 | ||
38 | Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>, | ||
39 | Pali Rohár <pali.rohar@gmail.com> | ||
40 | Description: | ||
41 | This file allows to specify the interval after which the | ||
42 | keyboard illumination is disabled because of inactivity. | ||
43 | The timeouts are expressed in seconds, minutes, hours and | ||
44 | days, for which the symbols are 's', 'm', 'h' and 'd' | ||
45 | respectively. | ||
46 | |||
47 | To configure the timeout, write to this file a value along | ||
48 | with any the above units. If no unit is specified, the value | ||
49 | is assumed to be expressed in seconds. | ||
50 | |||
51 | For example, to set the timeout to 10 minutes run: | ||
52 | echo 10m > /sys/class/leds/dell::kbd_backlight/stop_timeout | ||
53 | |||
54 | Note that when this file is read, the returned value might be | ||
55 | expressed in a different unit than the one used when the timeout | ||
56 | was set. | ||
57 | |||
58 | Also note that only some timeouts are supported and that | ||
59 | some systems might fall back to a specific timeout in case | ||
60 | an invalid timeout is written to this file. | ||
diff --git a/Documentation/Changes b/Documentation/Changes index 1de131bb49fb..74bdda9272a4 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -383,7 +383,7 @@ o <http://www.iptables.org/downloads.html> | |||
383 | 383 | ||
384 | Ip-route2 | 384 | Ip-route2 |
385 | --------- | 385 | --------- |
386 | o <ftp://ftp.tux.org/pub/net/ip-routing/iproute2-2.2.4-now-ss991023.tar.gz> | 386 | o <https://www.kernel.org/pub/linux/utils/net/iproute2/> |
387 | 387 | ||
388 | OProfile | 388 | OProfile |
389 | -------- | 389 | -------- |
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 3171822c22a5..618a33c940df 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -392,7 +392,12 @@ The goto statement comes in handy when a function exits from multiple | |||
392 | locations and some common work such as cleanup has to be done. If there is no | 392 | locations and some common work such as cleanup has to be done. If there is no |
393 | cleanup needed then just return directly. | 393 | cleanup needed then just return directly. |
394 | 394 | ||
395 | The rationale is: | 395 | Choose label names which say what the goto does or why the goto exists. An |
396 | example of a good name could be "out_buffer:" if the goto frees "buffer". Avoid | ||
397 | using GW-BASIC names like "err1:" and "err2:". Also don't name them after the | ||
398 | goto location like "err_kmalloc_failed:" | ||
399 | |||
400 | The rationale for using gotos is: | ||
396 | 401 | ||
397 | - unconditional statements are easier to understand and follow | 402 | - unconditional statements are easier to understand and follow |
398 | - nesting is reduced | 403 | - nesting is reduced |
@@ -403,9 +408,10 @@ The rationale is: | |||
403 | int fun(int a) | 408 | int fun(int a) |
404 | { | 409 | { |
405 | int result = 0; | 410 | int result = 0; |
406 | char *buffer = kmalloc(SIZE); | 411 | char *buffer; |
407 | 412 | ||
408 | if (buffer == NULL) | 413 | buffer = kmalloc(SIZE, GFP_KERNEL); |
414 | if (!buffer) | ||
409 | return -ENOMEM; | 415 | return -ENOMEM; |
410 | 416 | ||
411 | if (condition1) { | 417 | if (condition1) { |
@@ -413,14 +419,25 @@ int fun(int a) | |||
413 | ... | 419 | ... |
414 | } | 420 | } |
415 | result = 1; | 421 | result = 1; |
416 | goto out; | 422 | goto out_buffer; |
417 | } | 423 | } |
418 | ... | 424 | ... |
419 | out: | 425 | out_buffer: |
420 | kfree(buffer); | 426 | kfree(buffer); |
421 | return result; | 427 | return result; |
422 | } | 428 | } |
423 | 429 | ||
430 | A common type of bug to be aware of it "one err bugs" which look like this: | ||
431 | |||
432 | err: | ||
433 | kfree(foo->bar); | ||
434 | kfree(foo); | ||
435 | return ret; | ||
436 | |||
437 | The bug in this code is that on some exit paths "foo" is NULL. Normally the | ||
438 | fix for this is to split it up into two error labels "err_bar:" and "err_foo:". | ||
439 | |||
440 | |||
424 | Chapter 8: Commenting | 441 | Chapter 8: Commenting |
425 | 442 | ||
426 | Comments are good, but there is also a danger of over-commenting. NEVER | 443 | Comments are good, but there is also a danger of over-commenting. NEVER |
@@ -845,6 +862,49 @@ next instruction in the assembly output: | |||
845 | : /* outputs */ : /* inputs */ : /* clobbers */); | 862 | : /* outputs */ : /* inputs */ : /* clobbers */); |
846 | 863 | ||
847 | 864 | ||
865 | Chapter 20: Conditional Compilation | ||
866 | |||
867 | Wherever possible, don't use preprocessor conditionals (#if, #ifdef) in .c | ||
868 | files; doing so makes code harder to read and logic harder to follow. Instead, | ||
869 | use such conditionals in a header file defining functions for use in those .c | ||
870 | files, providing no-op stub versions in the #else case, and then call those | ||
871 | functions unconditionally from .c files. The compiler will avoid generating | ||
872 | any code for the stub calls, producing identical results, but the logic will | ||
873 | remain easy to follow. | ||
874 | |||
875 | Prefer to compile out entire functions, rather than portions of functions or | ||
876 | portions of expressions. Rather than putting an ifdef in an expression, factor | ||
877 | out part or all of the expression into a separate helper function and apply the | ||
878 | conditional to that function. | ||
879 | |||
880 | If you have a function or variable which may potentially go unused in a | ||
881 | particular configuration, and the compiler would warn about its definition | ||
882 | going unused, mark the definition as __maybe_unused rather than wrapping it in | ||
883 | a preprocessor conditional. (However, if a function or variable *always* goes | ||
884 | unused, delete it.) | ||
885 | |||
886 | Within code, where possible, use the IS_ENABLED macro to convert a Kconfig | ||
887 | symbol into a C boolean expression, and use it in a normal C conditional: | ||
888 | |||
889 | if (IS_ENABLED(CONFIG_SOMETHING)) { | ||
890 | ... | ||
891 | } | ||
892 | |||
893 | The compiler will constant-fold the conditional away, and include or exclude | ||
894 | the block of code just as with an #ifdef, so this will not add any runtime | ||
895 | overhead. However, this approach still allows the C compiler to see the code | ||
896 | inside the block, and check it for correctness (syntax, types, symbol | ||
897 | references, etc). Thus, you still have to use an #ifdef if the code inside the | ||
898 | block references symbols that will not exist if the condition is not met. | ||
899 | |||
900 | At the end of any non-trivial #if or #ifdef block (more than a few lines), | ||
901 | place a comment after the #endif on the same line, noting the conditional | ||
902 | expression used. For instance: | ||
903 | |||
904 | #ifdef CONFIG_SOMETHING | ||
905 | ... | ||
906 | #endif /* CONFIG_SOMETHING */ | ||
907 | |||
848 | 908 | ||
849 | Appendix I: References | 909 | Appendix I: References |
850 | 910 | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index bec06659e0eb..9c7d92d03f62 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -15,7 +15,7 @@ DOCBOOKS := z8530book.xml device-drivers.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 w1.xml \ | 17 | tracepoint.xml drm.xml media_api.xml w1.xml \ |
18 | writing_musb_glue_layer.xml | 18 | writing_musb_glue_layer.xml crypto-API.xml |
19 | 19 | ||
20 | include Documentation/DocBook/media/Makefile | 20 | include Documentation/DocBook/media/Makefile |
21 | 21 | ||
diff --git a/Documentation/DocBook/alsa-driver-api.tmpl b/Documentation/DocBook/alsa-driver-api.tmpl index 0230a96f0564..71f9246127ec 100644 --- a/Documentation/DocBook/alsa-driver-api.tmpl +++ b/Documentation/DocBook/alsa-driver-api.tmpl | |||
@@ -57,6 +57,7 @@ | |||
57 | !Esound/core/pcm.c | 57 | !Esound/core/pcm.c |
58 | !Esound/core/pcm_lib.c | 58 | !Esound/core/pcm_lib.c |
59 | !Esound/core/pcm_native.c | 59 | !Esound/core/pcm_native.c |
60 | !Iinclude/sound/pcm.h | ||
60 | </sect1> | 61 | </sect1> |
61 | <sect1><title>PCM Format Helpers</title> | 62 | <sect1><title>PCM Format Helpers</title> |
62 | !Esound/core/pcm_misc.c | 63 | !Esound/core/pcm_misc.c |
@@ -64,6 +65,10 @@ | |||
64 | <sect1><title>PCM Memory Management</title> | 65 | <sect1><title>PCM Memory Management</title> |
65 | !Esound/core/pcm_memory.c | 66 | !Esound/core/pcm_memory.c |
66 | </sect1> | 67 | </sect1> |
68 | <sect1><title>PCM DMA Engine API</title> | ||
69 | !Esound/core/pcm_dmaengine.c | ||
70 | !Iinclude/sound/dmaengine_pcm.h | ||
71 | </sect1> | ||
67 | </chapter> | 72 | </chapter> |
68 | <chapter><title>Control/Mixer API</title> | 73 | <chapter><title>Control/Mixer API</title> |
69 | <sect1><title>General Control Interface</title> | 74 | <sect1><title>General Control Interface</title> |
@@ -91,12 +96,38 @@ | |||
91 | !Esound/core/info.c | 96 | !Esound/core/info.c |
92 | </sect1> | 97 | </sect1> |
93 | </chapter> | 98 | </chapter> |
99 | <chapter><title>Compress Offload</title> | ||
100 | <sect1><title>Compress Offload API</title> | ||
101 | !Esound/core/compress_offload.c | ||
102 | !Iinclude/uapi/sound/compress_offload.h | ||
103 | !Iinclude/uapi/sound/compress_params.h | ||
104 | !Iinclude/sound/compress_driver.h | ||
105 | </sect1> | ||
106 | </chapter> | ||
107 | <chapter><title>ASoC</title> | ||
108 | <sect1><title>ASoC Core API</title> | ||
109 | !Iinclude/sound/soc.h | ||
110 | !Esound/soc/soc-core.c | ||
111 | !Esound/soc/soc-cache.c | ||
112 | !Esound/soc/soc-devres.c | ||
113 | !Esound/soc/soc-io.c | ||
114 | !Esound/soc/soc-pcm.c | ||
115 | </sect1> | ||
116 | <sect1><title>ASoC DAPM API</title> | ||
117 | !Esound/soc/soc-dapm.c | ||
118 | </sect1> | ||
119 | <sect1><title>ASoC DMA Engine API</title> | ||
120 | !Esound/soc/soc-generic-dmaengine-pcm.c | ||
121 | </sect1> | ||
122 | </chapter> | ||
94 | <chapter><title>Miscellaneous Functions</title> | 123 | <chapter><title>Miscellaneous Functions</title> |
95 | <sect1><title>Hardware-Dependent Devices API</title> | 124 | <sect1><title>Hardware-Dependent Devices API</title> |
96 | !Esound/core/hwdep.c | 125 | !Esound/core/hwdep.c |
97 | </sect1> | 126 | </sect1> |
98 | <sect1><title>Jack Abstraction Layer API</title> | 127 | <sect1><title>Jack Abstraction Layer API</title> |
128 | !Iinclude/sound/jack.h | ||
99 | !Esound/core/jack.c | 129 | !Esound/core/jack.c |
130 | !Esound/soc/soc-jack.c | ||
100 | </sect1> | 131 | </sect1> |
101 | <sect1><title>ISA DMA Helpers</title> | 132 | <sect1><title>ISA DMA Helpers</title> |
102 | !Esound/core/isadma.c | 133 | !Esound/core/isadma.c |
diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl new file mode 100644 index 000000000000..c763d30f4893 --- /dev/null +++ b/Documentation/DocBook/crypto-API.tmpl | |||
@@ -0,0 +1,1253 @@ | |||
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="KernelCryptoAPI"> | ||
6 | <bookinfo> | ||
7 | <title>Linux Kernel Crypto API</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Stephan</firstname> | ||
12 | <surname>Mueller</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>smueller@chronox.de</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | <author> | ||
20 | <firstname>Marek</firstname> | ||
21 | <surname>Vasut</surname> | ||
22 | <affiliation> | ||
23 | <address> | ||
24 | <email>marek@denx.de</email> | ||
25 | </address> | ||
26 | </affiliation> | ||
27 | </author> | ||
28 | </authorgroup> | ||
29 | |||
30 | <copyright> | ||
31 | <year>2014</year> | ||
32 | <holder>Stephan Mueller</holder> | ||
33 | </copyright> | ||
34 | |||
35 | |||
36 | <legalnotice> | ||
37 | <para> | ||
38 | This documentation is free software; you can redistribute | ||
39 | it and/or modify it under the terms of the GNU General Public | ||
40 | License as published by the Free Software Foundation; either | ||
41 | version 2 of the License, or (at your option) any later | ||
42 | version. | ||
43 | </para> | ||
44 | |||
45 | <para> | ||
46 | This program is distributed in the hope that it will be | ||
47 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
48 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
49 | See the GNU General Public License for more details. | ||
50 | </para> | ||
51 | |||
52 | <para> | ||
53 | You should have received a copy of the GNU General Public | ||
54 | License along with this program; if not, write to the Free | ||
55 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
56 | MA 02111-1307 USA | ||
57 | </para> | ||
58 | |||
59 | <para> | ||
60 | For more details see the file COPYING in the source | ||
61 | distribution of Linux. | ||
62 | </para> | ||
63 | </legalnotice> | ||
64 | </bookinfo> | ||
65 | |||
66 | <toc></toc> | ||
67 | |||
68 | <chapter id="Intro"> | ||
69 | <title>Kernel Crypto API Interface Specification</title> | ||
70 | |||
71 | <sect1><title>Introduction</title> | ||
72 | |||
73 | <para> | ||
74 | The kernel crypto API offers a rich set of cryptographic ciphers as | ||
75 | well as other data transformation mechanisms and methods to invoke | ||
76 | these. This document contains a description of the API and provides | ||
77 | example code. | ||
78 | </para> | ||
79 | |||
80 | <para> | ||
81 | To understand and properly use the kernel crypto API a brief | ||
82 | explanation of its structure is given. Based on the architecture, | ||
83 | the API can be separated into different components. Following the | ||
84 | architecture specification, hints to developers of ciphers are | ||
85 | provided. Pointers to the API function call documentation are | ||
86 | given at the end. | ||
87 | </para> | ||
88 | |||
89 | <para> | ||
90 | The kernel crypto API refers to all algorithms as "transformations". | ||
91 | Therefore, a cipher handle variable usually has the name "tfm". | ||
92 | Besides cryptographic operations, the kernel crypto API also knows | ||
93 | compression transformations and handles them the same way as ciphers. | ||
94 | </para> | ||
95 | |||
96 | <para> | ||
97 | The kernel crypto API serves the following entity types: | ||
98 | |||
99 | <itemizedlist> | ||
100 | <listitem> | ||
101 | <para>consumers requesting cryptographic services</para> | ||
102 | </listitem> | ||
103 | <listitem> | ||
104 | <para>data transformation implementations (typically ciphers) | ||
105 | that can be called by consumers using the kernel crypto | ||
106 | API</para> | ||
107 | </listitem> | ||
108 | </itemizedlist> | ||
109 | </para> | ||
110 | |||
111 | <para> | ||
112 | This specification is intended for consumers of the kernel crypto | ||
113 | API as well as for developers implementing ciphers. This API | ||
114 | specification, however, does not discusses all API calls available | ||
115 | to data transformation implementations (i.e. implementations of | ||
116 | ciphers and other transformations (such as CRC or even compression | ||
117 | algorithms) that can register with the kernel crypto API). | ||
118 | </para> | ||
119 | |||
120 | <para> | ||
121 | Note: The terms "transformation" and cipher algorithm are used | ||
122 | interchangably. | ||
123 | </para> | ||
124 | </sect1> | ||
125 | |||
126 | <sect1><title>Terminology</title> | ||
127 | <para> | ||
128 | The transformation implementation is an actual code or interface | ||
129 | to hardware which implements a certain transformation with precisely | ||
130 | defined behavior. | ||
131 | </para> | ||
132 | |||
133 | <para> | ||
134 | The transformation object (TFM) is an instance of a transformation | ||
135 | implementation. There can be multiple transformation objects | ||
136 | associated with a single transformation implementation. Each of | ||
137 | those transformation objects is held by a crypto API consumer or | ||
138 | another transformation. Transformation object is allocated when a | ||
139 | crypto API consumer requests a transformation implementation. | ||
140 | The consumer is then provided with a structure, which contains | ||
141 | a transformation object (TFM). | ||
142 | </para> | ||
143 | |||
144 | <para> | ||
145 | The structure that contains transformation objects may also be | ||
146 | referred to as a "cipher handle". Such a cipher handle is always | ||
147 | subject to the following phases that are reflected in the API calls | ||
148 | applicable to such a cipher handle: | ||
149 | </para> | ||
150 | |||
151 | <orderedlist> | ||
152 | <listitem> | ||
153 | <para>Initialization of a cipher handle.</para> | ||
154 | </listitem> | ||
155 | <listitem> | ||
156 | <para>Execution of all intended cipher operations applicable | ||
157 | for the handle where the cipher handle must be furnished to | ||
158 | every API call.</para> | ||
159 | </listitem> | ||
160 | <listitem> | ||
161 | <para>Destruction of a cipher handle.</para> | ||
162 | </listitem> | ||
163 | </orderedlist> | ||
164 | |||
165 | <para> | ||
166 | When using the initialization API calls, a cipher handle is | ||
167 | created and returned to the consumer. Therefore, please refer | ||
168 | to all initialization API calls that refer to the data | ||
169 | structure type a consumer is expected to receive and subsequently | ||
170 | to use. The initialization API calls have all the same naming | ||
171 | conventions of crypto_alloc_*. | ||
172 | </para> | ||
173 | |||
174 | <para> | ||
175 | The transformation context is private data associated with | ||
176 | the transformation object. | ||
177 | </para> | ||
178 | </sect1> | ||
179 | </chapter> | ||
180 | |||
181 | <chapter id="Architecture"><title>Kernel Crypto API Architecture</title> | ||
182 | <sect1><title>Cipher algorithm types</title> | ||
183 | <para> | ||
184 | The kernel crypto API provides different API calls for the | ||
185 | following cipher types: | ||
186 | |||
187 | <itemizedlist> | ||
188 | <listitem><para>Symmetric ciphers</para></listitem> | ||
189 | <listitem><para>AEAD ciphers</para></listitem> | ||
190 | <listitem><para>Message digest, including keyed message digest</para></listitem> | ||
191 | <listitem><para>Random number generation</para></listitem> | ||
192 | <listitem><para>User space interface</para></listitem> | ||
193 | </itemizedlist> | ||
194 | </para> | ||
195 | </sect1> | ||
196 | |||
197 | <sect1><title>Ciphers And Templates</title> | ||
198 | <para> | ||
199 | The kernel crypto API provides implementations of single block | ||
200 | ciphers and message digests. In addition, the kernel crypto API | ||
201 | provides numerous "templates" that can be used in conjunction | ||
202 | with the single block ciphers and message digests. Templates | ||
203 | include all types of block chaining mode, the HMAC mechanism, etc. | ||
204 | </para> | ||
205 | |||
206 | <para> | ||
207 | Single block ciphers and message digests can either be directly | ||
208 | used by a caller or invoked together with a template to form | ||
209 | multi-block ciphers or keyed message digests. | ||
210 | </para> | ||
211 | |||
212 | <para> | ||
213 | A single block cipher may even be called with multiple templates. | ||
214 | However, templates cannot be used without a single cipher. | ||
215 | </para> | ||
216 | |||
217 | <para> | ||
218 | See /proc/crypto and search for "name". For example: | ||
219 | |||
220 | <itemizedlist> | ||
221 | <listitem><para>aes</para></listitem> | ||
222 | <listitem><para>ecb(aes)</para></listitem> | ||
223 | <listitem><para>cmac(aes)</para></listitem> | ||
224 | <listitem><para>ccm(aes)</para></listitem> | ||
225 | <listitem><para>rfc4106(gcm(aes))</para></listitem> | ||
226 | <listitem><para>sha1</para></listitem> | ||
227 | <listitem><para>hmac(sha1)</para></listitem> | ||
228 | <listitem><para>authenc(hmac(sha1),cbc(aes))</para></listitem> | ||
229 | </itemizedlist> | ||
230 | </para> | ||
231 | |||
232 | <para> | ||
233 | In these examples, "aes" and "sha1" are the ciphers and all | ||
234 | others are the templates. | ||
235 | </para> | ||
236 | </sect1> | ||
237 | |||
238 | <sect1><title>Synchronous And Asynchronous Operation</title> | ||
239 | <para> | ||
240 | The kernel crypto API provides synchronous and asynchronous | ||
241 | API operations. | ||
242 | </para> | ||
243 | |||
244 | <para> | ||
245 | When using the synchronous API operation, the caller invokes | ||
246 | a cipher operation which is performed synchronously by the | ||
247 | kernel crypto API. That means, the caller waits until the | ||
248 | cipher operation completes. Therefore, the kernel crypto API | ||
249 | calls work like regular function calls. For synchronous | ||
250 | operation, the set of API calls is small and conceptually | ||
251 | similar to any other crypto library. | ||
252 | </para> | ||
253 | |||
254 | <para> | ||
255 | Asynchronous operation is provided by the kernel crypto API | ||
256 | which implies that the invocation of a cipher operation will | ||
257 | complete almost instantly. That invocation triggers the | ||
258 | cipher operation but it does not signal its completion. Before | ||
259 | invoking a cipher operation, the caller must provide a callback | ||
260 | function the kernel crypto API can invoke to signal the | ||
261 | completion of the cipher operation. Furthermore, the caller | ||
262 | must ensure it can handle such asynchronous events by applying | ||
263 | appropriate locking around its data. The kernel crypto API | ||
264 | does not perform any special serialization operation to protect | ||
265 | the caller's data integrity. | ||
266 | </para> | ||
267 | </sect1> | ||
268 | |||
269 | <sect1><title>Crypto API Cipher References And Priority</title> | ||
270 | <para> | ||
271 | A cipher is referenced by the caller with a string. That string | ||
272 | has the following semantics: | ||
273 | |||
274 | <programlisting> | ||
275 | template(single block cipher) | ||
276 | </programlisting> | ||
277 | |||
278 | where "template" and "single block cipher" is the aforementioned | ||
279 | template and single block cipher, respectively. If applicable, | ||
280 | additional templates may enclose other templates, such as | ||
281 | |||
282 | <programlisting> | ||
283 | template1(template2(single block cipher))) | ||
284 | </programlisting> | ||
285 | </para> | ||
286 | |||
287 | <para> | ||
288 | The kernel crypto API may provide multiple implementations of a | ||
289 | template or a single block cipher. For example, AES on newer | ||
290 | Intel hardware has the following implementations: AES-NI, | ||
291 | assembler implementation, or straight C. Now, when using the | ||
292 | string "aes" with the kernel crypto API, which cipher | ||
293 | implementation is used? The answer to that question is the | ||
294 | priority number assigned to each cipher implementation by the | ||
295 | kernel crypto API. When a caller uses the string to refer to a | ||
296 | cipher during initialization of a cipher handle, the kernel | ||
297 | crypto API looks up all implementations providing an | ||
298 | implementation with that name and selects the implementation | ||
299 | with the highest priority. | ||
300 | </para> | ||
301 | |||
302 | <para> | ||
303 | Now, a caller may have the need to refer to a specific cipher | ||
304 | implementation and thus does not want to rely on the | ||
305 | priority-based selection. To accommodate this scenario, the | ||
306 | kernel crypto API allows the cipher implementation to register | ||
307 | a unique name in addition to common names. When using that | ||
308 | unique name, a caller is therefore always sure to refer to | ||
309 | the intended cipher implementation. | ||
310 | </para> | ||
311 | |||
312 | <para> | ||
313 | The list of available ciphers is given in /proc/crypto. However, | ||
314 | that list does not specify all possible permutations of | ||
315 | templates and ciphers. Each block listed in /proc/crypto may | ||
316 | contain the following information -- if one of the components | ||
317 | listed as follows are not applicable to a cipher, it is not | ||
318 | displayed: | ||
319 | </para> | ||
320 | |||
321 | <itemizedlist> | ||
322 | <listitem> | ||
323 | <para>name: the generic name of the cipher that is subject | ||
324 | to the priority-based selection -- this name can be used by | ||
325 | the cipher allocation API calls (all names listed above are | ||
326 | examples for such generic names)</para> | ||
327 | </listitem> | ||
328 | <listitem> | ||
329 | <para>driver: the unique name of the cipher -- this name can | ||
330 | be used by the cipher allocation API calls</para> | ||
331 | </listitem> | ||
332 | <listitem> | ||
333 | <para>module: the kernel module providing the cipher | ||
334 | implementation (or "kernel" for statically linked ciphers)</para> | ||
335 | </listitem> | ||
336 | <listitem> | ||
337 | <para>priority: the priority value of the cipher implementation</para> | ||
338 | </listitem> | ||
339 | <listitem> | ||
340 | <para>refcnt: the reference count of the respective cipher | ||
341 | (i.e. the number of current consumers of this cipher)</para> | ||
342 | </listitem> | ||
343 | <listitem> | ||
344 | <para>selftest: specification whether the self test for the | ||
345 | cipher passed</para> | ||
346 | </listitem> | ||
347 | <listitem> | ||
348 | <para>type: | ||
349 | <itemizedlist> | ||
350 | <listitem> | ||
351 | <para>blkcipher for synchronous block ciphers</para> | ||
352 | </listitem> | ||
353 | <listitem> | ||
354 | <para>ablkcipher for asynchronous block ciphers</para> | ||
355 | </listitem> | ||
356 | <listitem> | ||
357 | <para>cipher for single block ciphers that may be used with | ||
358 | an additional template</para> | ||
359 | </listitem> | ||
360 | <listitem> | ||
361 | <para>shash for synchronous message digest</para> | ||
362 | </listitem> | ||
363 | <listitem> | ||
364 | <para>ahash for asynchronous message digest</para> | ||
365 | </listitem> | ||
366 | <listitem> | ||
367 | <para>aead for AEAD cipher type</para> | ||
368 | </listitem> | ||
369 | <listitem> | ||
370 | <para>compression for compression type transformations</para> | ||
371 | </listitem> | ||
372 | <listitem> | ||
373 | <para>rng for random number generator</para> | ||
374 | </listitem> | ||
375 | <listitem> | ||
376 | <para>givcipher for cipher with associated IV generator | ||
377 | (see the geniv entry below for the specification of the | ||
378 | IV generator type used by the cipher implementation)</para> | ||
379 | </listitem> | ||
380 | </itemizedlist> | ||
381 | </para> | ||
382 | </listitem> | ||
383 | <listitem> | ||
384 | <para>blocksize: blocksize of cipher in bytes</para> | ||
385 | </listitem> | ||
386 | <listitem> | ||
387 | <para>keysize: key size in bytes</para> | ||
388 | </listitem> | ||
389 | <listitem> | ||
390 | <para>ivsize: IV size in bytes</para> | ||
391 | </listitem> | ||
392 | <listitem> | ||
393 | <para>seedsize: required size of seed data for random number | ||
394 | generator</para> | ||
395 | </listitem> | ||
396 | <listitem> | ||
397 | <para>digestsize: output size of the message digest</para> | ||
398 | </listitem> | ||
399 | <listitem> | ||
400 | <para>geniv: IV generation type: | ||
401 | <itemizedlist> | ||
402 | <listitem> | ||
403 | <para>eseqiv for encrypted sequence number based IV | ||
404 | generation</para> | ||
405 | </listitem> | ||
406 | <listitem> | ||
407 | <para>seqiv for sequence number based IV generation</para> | ||
408 | </listitem> | ||
409 | <listitem> | ||
410 | <para>chainiv for chain iv generation</para> | ||
411 | </listitem> | ||
412 | <listitem> | ||
413 | <para><builtin> is a marker that the cipher implements | ||
414 | IV generation and handling as it is specific to the given | ||
415 | cipher</para> | ||
416 | </listitem> | ||
417 | </itemizedlist> | ||
418 | </para> | ||
419 | </listitem> | ||
420 | </itemizedlist> | ||
421 | </sect1> | ||
422 | |||
423 | <sect1><title>Key Sizes</title> | ||
424 | <para> | ||
425 | When allocating a cipher handle, the caller only specifies the | ||
426 | cipher type. Symmetric ciphers, however, typically support | ||
427 | multiple key sizes (e.g. AES-128 vs. AES-192 vs. AES-256). | ||
428 | These key sizes are determined with the length of the provided | ||
429 | key. Thus, the kernel crypto API does not provide a separate | ||
430 | way to select the particular symmetric cipher key size. | ||
431 | </para> | ||
432 | </sect1> | ||
433 | |||
434 | <sect1><title>Cipher Allocation Type And Masks</title> | ||
435 | <para> | ||
436 | The different cipher handle allocation functions allow the | ||
437 | specification of a type and mask flag. Both parameters have | ||
438 | the following meaning (and are therefore not covered in the | ||
439 | subsequent sections). | ||
440 | </para> | ||
441 | |||
442 | <para> | ||
443 | The type flag specifies the type of the cipher algorithm. | ||
444 | The caller usually provides a 0 when the caller wants the | ||
445 | default handling. Otherwise, the caller may provide the | ||
446 | following selections which match the the aforementioned | ||
447 | cipher types: | ||
448 | </para> | ||
449 | |||
450 | <itemizedlist> | ||
451 | <listitem> | ||
452 | <para>CRYPTO_ALG_TYPE_CIPHER Single block cipher</para> | ||
453 | </listitem> | ||
454 | <listitem> | ||
455 | <para>CRYPTO_ALG_TYPE_COMPRESS Compression</para> | ||
456 | </listitem> | ||
457 | <listitem> | ||
458 | <para>CRYPTO_ALG_TYPE_AEAD Authenticated Encryption with | ||
459 | Associated Data (MAC)</para> | ||
460 | </listitem> | ||
461 | <listitem> | ||
462 | <para>CRYPTO_ALG_TYPE_BLKCIPHER Synchronous multi-block cipher</para> | ||
463 | </listitem> | ||
464 | <listitem> | ||
465 | <para>CRYPTO_ALG_TYPE_ABLKCIPHER Asynchronous multi-block cipher</para> | ||
466 | </listitem> | ||
467 | <listitem> | ||
468 | <para>CRYPTO_ALG_TYPE_GIVCIPHER Asynchronous multi-block | ||
469 | cipher packed together with an IV generator (see geniv field | ||
470 | in the /proc/crypto listing for the known IV generators)</para> | ||
471 | </listitem> | ||
472 | <listitem> | ||
473 | <para>CRYPTO_ALG_TYPE_DIGEST Raw message digest</para> | ||
474 | </listitem> | ||
475 | <listitem> | ||
476 | <para>CRYPTO_ALG_TYPE_HASH Alias for CRYPTO_ALG_TYPE_DIGEST</para> | ||
477 | </listitem> | ||
478 | <listitem> | ||
479 | <para>CRYPTO_ALG_TYPE_SHASH Synchronous multi-block hash</para> | ||
480 | </listitem> | ||
481 | <listitem> | ||
482 | <para>CRYPTO_ALG_TYPE_AHASH Asynchronous multi-block hash</para> | ||
483 | </listitem> | ||
484 | <listitem> | ||
485 | <para>CRYPTO_ALG_TYPE_RNG Random Number Generation</para> | ||
486 | </listitem> | ||
487 | <listitem> | ||
488 | <para>CRYPTO_ALG_TYPE_PCOMPRESS Enhanced version of | ||
489 | CRYPTO_ALG_TYPE_COMPRESS allowing for segmented compression / | ||
490 | decompression instead of performing the operation on one | ||
491 | segment only. CRYPTO_ALG_TYPE_PCOMPRESS is intended to replace | ||
492 | CRYPTO_ALG_TYPE_COMPRESS once existing consumers are converted.</para> | ||
493 | </listitem> | ||
494 | </itemizedlist> | ||
495 | |||
496 | <para> | ||
497 | The mask flag restricts the type of cipher. The only allowed | ||
498 | flag is CRYPTO_ALG_ASYNC to restrict the cipher lookup function | ||
499 | to asynchronous ciphers. Usually, a caller provides a 0 for the | ||
500 | mask flag. | ||
501 | </para> | ||
502 | |||
503 | <para> | ||
504 | When the caller provides a mask and type specification, the | ||
505 | caller limits the search the kernel crypto API can perform for | ||
506 | a suitable cipher implementation for the given cipher name. | ||
507 | That means, even when a caller uses a cipher name that exists | ||
508 | during its initialization call, the kernel crypto API may not | ||
509 | select it due to the used type and mask field. | ||
510 | </para> | ||
511 | </sect1> | ||
512 | </chapter> | ||
513 | |||
514 | <chapter id="Development"><title>Developing Cipher Algorithms</title> | ||
515 | <sect1><title>Registering And Unregistering Transformation</title> | ||
516 | <para> | ||
517 | There are three distinct types of registration functions in | ||
518 | the Crypto API. One is used to register a generic cryptographic | ||
519 | transformation, while the other two are specific to HASH | ||
520 | transformations and COMPRESSion. We will discuss the latter | ||
521 | two in a separate chapter, here we will only look at the | ||
522 | generic ones. | ||
523 | </para> | ||
524 | |||
525 | <para> | ||
526 | Before discussing the register functions, the data structure | ||
527 | to be filled with each, struct crypto_alg, must be considered | ||
528 | -- see below for a description of this data structure. | ||
529 | </para> | ||
530 | |||
531 | <para> | ||
532 | The generic registration functions can be found in | ||
533 | include/linux/crypto.h and their definition can be seen below. | ||
534 | The former function registers a single transformation, while | ||
535 | the latter works on an array of transformation descriptions. | ||
536 | The latter is useful when registering transformations in bulk. | ||
537 | </para> | ||
538 | |||
539 | <programlisting> | ||
540 | int crypto_register_alg(struct crypto_alg *alg); | ||
541 | int crypto_register_algs(struct crypto_alg *algs, int count); | ||
542 | </programlisting> | ||
543 | |||
544 | <para> | ||
545 | The counterparts to those functions are listed below. | ||
546 | </para> | ||
547 | |||
548 | <programlisting> | ||
549 | int crypto_unregister_alg(struct crypto_alg *alg); | ||
550 | int crypto_unregister_algs(struct crypto_alg *algs, int count); | ||
551 | </programlisting> | ||
552 | |||
553 | <para> | ||
554 | Notice that both registration and unregistration functions | ||
555 | do return a value, so make sure to handle errors. A return | ||
556 | code of zero implies success. Any return code < 0 implies | ||
557 | an error. | ||
558 | </para> | ||
559 | |||
560 | <para> | ||
561 | The bulk registration / unregistration functions require | ||
562 | that struct crypto_alg is an array of count size. These | ||
563 | functions simply loop over that array and register / | ||
564 | unregister each individual algorithm. If an error occurs, | ||
565 | the loop is terminated at the offending algorithm definition. | ||
566 | That means, the algorithms prior to the offending algorithm | ||
567 | are successfully registered. Note, the caller has no way of | ||
568 | knowing which cipher implementations have successfully | ||
569 | registered. If this is important to know, the caller should | ||
570 | loop through the different implementations using the single | ||
571 | instance *_alg functions for each individual implementation. | ||
572 | </para> | ||
573 | </sect1> | ||
574 | |||
575 | <sect1><title>Single-Block Symmetric Ciphers [CIPHER]</title> | ||
576 | <para> | ||
577 | Example of transformations: aes, arc4, ... | ||
578 | </para> | ||
579 | |||
580 | <para> | ||
581 | This section describes the simplest of all transformation | ||
582 | implementations, that being the CIPHER type used for symmetric | ||
583 | ciphers. The CIPHER type is used for transformations which | ||
584 | operate on exactly one block at a time and there are no | ||
585 | dependencies between blocks at all. | ||
586 | </para> | ||
587 | |||
588 | <sect2><title>Registration specifics</title> | ||
589 | <para> | ||
590 | The registration of [CIPHER] algorithm is specific in that | ||
591 | struct crypto_alg field .cra_type is empty. The .cra_u.cipher | ||
592 | has to be filled in with proper callbacks to implement this | ||
593 | transformation. | ||
594 | </para> | ||
595 | |||
596 | <para> | ||
597 | See struct cipher_alg below. | ||
598 | </para> | ||
599 | </sect2> | ||
600 | |||
601 | <sect2><title>Cipher Definition With struct cipher_alg</title> | ||
602 | <para> | ||
603 | Struct cipher_alg defines a single block cipher. | ||
604 | </para> | ||
605 | |||
606 | <para> | ||
607 | Here are schematics of how these functions are called when | ||
608 | operated from other part of the kernel. Note that the | ||
609 | .cia_setkey() call might happen before or after any of these | ||
610 | schematics happen, but must not happen during any of these | ||
611 | are in-flight. | ||
612 | </para> | ||
613 | |||
614 | <para> | ||
615 | <programlisting> | ||
616 | KEY ---. PLAINTEXT ---. | ||
617 | v v | ||
618 | .cia_setkey() -> .cia_encrypt() | ||
619 | | | ||
620 | '-----> CIPHERTEXT | ||
621 | </programlisting> | ||
622 | </para> | ||
623 | |||
624 | <para> | ||
625 | Please note that a pattern where .cia_setkey() is called | ||
626 | multiple times is also valid: | ||
627 | </para> | ||
628 | |||
629 | <para> | ||
630 | <programlisting> | ||
631 | |||
632 | KEY1 --. PLAINTEXT1 --. KEY2 --. PLAINTEXT2 --. | ||
633 | v v v v | ||
634 | .cia_setkey() -> .cia_encrypt() -> .cia_setkey() -> .cia_encrypt() | ||
635 | | | | ||
636 | '---> CIPHERTEXT1 '---> CIPHERTEXT2 | ||
637 | </programlisting> | ||
638 | </para> | ||
639 | |||
640 | </sect2> | ||
641 | </sect1> | ||
642 | |||
643 | <sect1><title>Multi-Block Ciphers [BLKCIPHER] [ABLKCIPHER]</title> | ||
644 | <para> | ||
645 | Example of transformations: cbc(aes), ecb(arc4), ... | ||
646 | </para> | ||
647 | |||
648 | <para> | ||
649 | This section describes the multi-block cipher transformation | ||
650 | implementations for both synchronous [BLKCIPHER] and | ||
651 | asynchronous [ABLKCIPHER] case. The multi-block ciphers are | ||
652 | used for transformations which operate on scatterlists of | ||
653 | data supplied to the transformation functions. They output | ||
654 | the result into a scatterlist of data as well. | ||
655 | </para> | ||
656 | |||
657 | <sect2><title>Registration Specifics</title> | ||
658 | |||
659 | <para> | ||
660 | The registration of [BLKCIPHER] or [ABLKCIPHER] algorithms | ||
661 | is one of the most standard procedures throughout the crypto API. | ||
662 | </para> | ||
663 | |||
664 | <para> | ||
665 | Note, if a cipher implementation requires a proper alignment | ||
666 | of data, the caller should use the functions of | ||
667 | crypto_blkcipher_alignmask() or crypto_ablkcipher_alignmask() | ||
668 | respectively to identify a memory alignment mask. The kernel | ||
669 | crypto API is able to process requests that are unaligned. | ||
670 | This implies, however, additional overhead as the kernel | ||
671 | crypto API needs to perform the realignment of the data which | ||
672 | may imply moving of data. | ||
673 | </para> | ||
674 | </sect2> | ||
675 | |||
676 | <sect2><title>Cipher Definition With struct blkcipher_alg and ablkcipher_alg</title> | ||
677 | <para> | ||
678 | Struct blkcipher_alg defines a synchronous block cipher whereas | ||
679 | struct ablkcipher_alg defines an asynchronous block cipher. | ||
680 | </para> | ||
681 | |||
682 | <para> | ||
683 | Please refer to the single block cipher description for schematics | ||
684 | of the block cipher usage. The usage patterns are exactly the same | ||
685 | for [ABLKCIPHER] and [BLKCIPHER] as they are for plain [CIPHER]. | ||
686 | </para> | ||
687 | </sect2> | ||
688 | |||
689 | <sect2><title>Specifics Of Asynchronous Multi-Block Cipher</title> | ||
690 | <para> | ||
691 | There are a couple of specifics to the [ABLKCIPHER] interface. | ||
692 | </para> | ||
693 | |||
694 | <para> | ||
695 | First of all, some of the drivers will want to use the | ||
696 | Generic ScatterWalk in case the hardware needs to be fed | ||
697 | separate chunks of the scatterlist which contains the | ||
698 | plaintext and will contain the ciphertext. Please refer | ||
699 | to the ScatterWalk interface offered by the Linux kernel | ||
700 | scatter / gather list implementation. | ||
701 | </para> | ||
702 | </sect2> | ||
703 | </sect1> | ||
704 | |||
705 | <sect1><title>Hashing [HASH]</title> | ||
706 | |||
707 | <para> | ||
708 | Example of transformations: crc32, md5, sha1, sha256,... | ||
709 | </para> | ||
710 | |||
711 | <sect2><title>Registering And Unregistering The Transformation</title> | ||
712 | |||
713 | <para> | ||
714 | There are multiple ways to register a HASH transformation, | ||
715 | depending on whether the transformation is synchronous [SHASH] | ||
716 | or asynchronous [AHASH] and the amount of HASH transformations | ||
717 | we are registering. You can find the prototypes defined in | ||
718 | include/crypto/internal/hash.h: | ||
719 | </para> | ||
720 | |||
721 | <programlisting> | ||
722 | int crypto_register_ahash(struct ahash_alg *alg); | ||
723 | |||
724 | int crypto_register_shash(struct shash_alg *alg); | ||
725 | int crypto_register_shashes(struct shash_alg *algs, int count); | ||
726 | </programlisting> | ||
727 | |||
728 | <para> | ||
729 | The respective counterparts for unregistering the HASH | ||
730 | transformation are as follows: | ||
731 | </para> | ||
732 | |||
733 | <programlisting> | ||
734 | int crypto_unregister_ahash(struct ahash_alg *alg); | ||
735 | |||
736 | int crypto_unregister_shash(struct shash_alg *alg); | ||
737 | int crypto_unregister_shashes(struct shash_alg *algs, int count); | ||
738 | </programlisting> | ||
739 | </sect2> | ||
740 | |||
741 | <sect2><title>Cipher Definition With struct shash_alg and ahash_alg</title> | ||
742 | <para> | ||
743 | Here are schematics of how these functions are called when | ||
744 | operated from other part of the kernel. Note that the .setkey() | ||
745 | call might happen before or after any of these schematics happen, | ||
746 | but must not happen during any of these are in-flight. Please note | ||
747 | that calling .init() followed immediately by .finish() is also a | ||
748 | perfectly valid transformation. | ||
749 | </para> | ||
750 | |||
751 | <programlisting> | ||
752 | I) DATA -----------. | ||
753 | v | ||
754 | .init() -> .update() -> .final() ! .update() might not be called | ||
755 | ^ | | at all in this scenario. | ||
756 | '----' '---> HASH | ||
757 | |||
758 | II) DATA -----------.-----------. | ||
759 | v v | ||
760 | .init() -> .update() -> .finup() ! .update() may not be called | ||
761 | ^ | | at all in this scenario. | ||
762 | '----' '---> HASH | ||
763 | |||
764 | III) DATA -----------. | ||
765 | v | ||
766 | .digest() ! The entire process is handled | ||
767 | | by the .digest() call. | ||
768 | '---------------> HASH | ||
769 | </programlisting> | ||
770 | |||
771 | <para> | ||
772 | Here is a schematic of how the .export()/.import() functions are | ||
773 | called when used from another part of the kernel. | ||
774 | </para> | ||
775 | |||
776 | <programlisting> | ||
777 | KEY--. DATA--. | ||
778 | v v ! .update() may not be called | ||
779 | .setkey() -> .init() -> .update() -> .export() at all in this scenario. | ||
780 | ^ | | | ||
781 | '-----' '--> PARTIAL_HASH | ||
782 | |||
783 | ----------- other transformations happen here ----------- | ||
784 | |||
785 | PARTIAL_HASH--. DATA1--. | ||
786 | v v | ||
787 | .import -> .update() -> .final() ! .update() may not be called | ||
788 | ^ | | at all in this scenario. | ||
789 | '----' '--> HASH1 | ||
790 | |||
791 | PARTIAL_HASH--. DATA2-. | ||
792 | v v | ||
793 | .import -> .finup() | ||
794 | | | ||
795 | '---------------> HASH2 | ||
796 | </programlisting> | ||
797 | </sect2> | ||
798 | |||
799 | <sect2><title>Specifics Of Asynchronous HASH Transformation</title> | ||
800 | <para> | ||
801 | Some of the drivers will want to use the Generic ScatterWalk | ||
802 | in case the implementation needs to be fed separate chunks of the | ||
803 | scatterlist which contains the input data. The buffer containing | ||
804 | the resulting hash will always be properly aligned to | ||
805 | .cra_alignmask so there is no need to worry about this. | ||
806 | </para> | ||
807 | </sect2> | ||
808 | </sect1> | ||
809 | </chapter> | ||
810 | |||
811 | <chapter id="API"><title>Programming Interface</title> | ||
812 | <sect1><title>Block Cipher Context Data Structures</title> | ||
813 | !Pinclude/linux/crypto.h Block Cipher Context Data Structures | ||
814 | !Finclude/linux/crypto.h aead_request | ||
815 | </sect1> | ||
816 | <sect1><title>Block Cipher Algorithm Definitions</title> | ||
817 | !Pinclude/linux/crypto.h Block Cipher Algorithm Definitions | ||
818 | !Finclude/linux/crypto.h crypto_alg | ||
819 | !Finclude/linux/crypto.h ablkcipher_alg | ||
820 | !Finclude/linux/crypto.h aead_alg | ||
821 | !Finclude/linux/crypto.h blkcipher_alg | ||
822 | !Finclude/linux/crypto.h cipher_alg | ||
823 | !Finclude/linux/crypto.h rng_alg | ||
824 | </sect1> | ||
825 | <sect1><title>Asynchronous Block Cipher API</title> | ||
826 | !Pinclude/linux/crypto.h Asynchronous Block Cipher API | ||
827 | !Finclude/linux/crypto.h crypto_alloc_ablkcipher | ||
828 | !Finclude/linux/crypto.h crypto_free_ablkcipher | ||
829 | !Finclude/linux/crypto.h crypto_has_ablkcipher | ||
830 | !Finclude/linux/crypto.h crypto_ablkcipher_ivsize | ||
831 | !Finclude/linux/crypto.h crypto_ablkcipher_blocksize | ||
832 | !Finclude/linux/crypto.h crypto_ablkcipher_setkey | ||
833 | !Finclude/linux/crypto.h crypto_ablkcipher_reqtfm | ||
834 | !Finclude/linux/crypto.h crypto_ablkcipher_encrypt | ||
835 | !Finclude/linux/crypto.h crypto_ablkcipher_decrypt | ||
836 | </sect1> | ||
837 | <sect1><title>Asynchronous Cipher Request Handle</title> | ||
838 | !Pinclude/linux/crypto.h Asynchronous Cipher Request Handle | ||
839 | !Finclude/linux/crypto.h crypto_ablkcipher_reqsize | ||
840 | !Finclude/linux/crypto.h ablkcipher_request_set_tfm | ||
841 | !Finclude/linux/crypto.h ablkcipher_request_alloc | ||
842 | !Finclude/linux/crypto.h ablkcipher_request_free | ||
843 | !Finclude/linux/crypto.h ablkcipher_request_set_callback | ||
844 | !Finclude/linux/crypto.h ablkcipher_request_set_crypt | ||
845 | </sect1> | ||
846 | <sect1><title>Authenticated Encryption With Associated Data (AEAD) Cipher API</title> | ||
847 | !Pinclude/linux/crypto.h Authenticated Encryption With Associated Data (AEAD) Cipher API | ||
848 | !Finclude/linux/crypto.h crypto_alloc_aead | ||
849 | !Finclude/linux/crypto.h crypto_free_aead | ||
850 | !Finclude/linux/crypto.h crypto_aead_ivsize | ||
851 | !Finclude/linux/crypto.h crypto_aead_authsize | ||
852 | !Finclude/linux/crypto.h crypto_aead_blocksize | ||
853 | !Finclude/linux/crypto.h crypto_aead_setkey | ||
854 | !Finclude/linux/crypto.h crypto_aead_setauthsize | ||
855 | !Finclude/linux/crypto.h crypto_aead_encrypt | ||
856 | !Finclude/linux/crypto.h crypto_aead_decrypt | ||
857 | </sect1> | ||
858 | <sect1><title>Asynchronous AEAD Request Handle</title> | ||
859 | !Pinclude/linux/crypto.h Asynchronous AEAD Request Handle | ||
860 | !Finclude/linux/crypto.h crypto_aead_reqsize | ||
861 | !Finclude/linux/crypto.h aead_request_set_tfm | ||
862 | !Finclude/linux/crypto.h aead_request_alloc | ||
863 | !Finclude/linux/crypto.h aead_request_free | ||
864 | !Finclude/linux/crypto.h aead_request_set_callback | ||
865 | !Finclude/linux/crypto.h aead_request_set_crypt | ||
866 | !Finclude/linux/crypto.h aead_request_set_assoc | ||
867 | </sect1> | ||
868 | <sect1><title>Synchronous Block Cipher API</title> | ||
869 | !Pinclude/linux/crypto.h Synchronous Block Cipher API | ||
870 | !Finclude/linux/crypto.h crypto_alloc_blkcipher | ||
871 | !Finclude/linux/crypto.h crypto_free_blkcipher | ||
872 | !Finclude/linux/crypto.h crypto_has_blkcipher | ||
873 | !Finclude/linux/crypto.h crypto_blkcipher_name | ||
874 | !Finclude/linux/crypto.h crypto_blkcipher_ivsize | ||
875 | !Finclude/linux/crypto.h crypto_blkcipher_blocksize | ||
876 | !Finclude/linux/crypto.h crypto_blkcipher_setkey | ||
877 | !Finclude/linux/crypto.h crypto_blkcipher_encrypt | ||
878 | !Finclude/linux/crypto.h crypto_blkcipher_encrypt_iv | ||
879 | !Finclude/linux/crypto.h crypto_blkcipher_decrypt | ||
880 | !Finclude/linux/crypto.h crypto_blkcipher_decrypt_iv | ||
881 | !Finclude/linux/crypto.h crypto_blkcipher_set_iv | ||
882 | !Finclude/linux/crypto.h crypto_blkcipher_get_iv | ||
883 | </sect1> | ||
884 | <sect1><title>Single Block Cipher API</title> | ||
885 | !Pinclude/linux/crypto.h Single Block Cipher API | ||
886 | !Finclude/linux/crypto.h crypto_alloc_cipher | ||
887 | !Finclude/linux/crypto.h crypto_free_cipher | ||
888 | !Finclude/linux/crypto.h crypto_has_cipher | ||
889 | !Finclude/linux/crypto.h crypto_cipher_blocksize | ||
890 | !Finclude/linux/crypto.h crypto_cipher_setkey | ||
891 | !Finclude/linux/crypto.h crypto_cipher_encrypt_one | ||
892 | !Finclude/linux/crypto.h crypto_cipher_decrypt_one | ||
893 | </sect1> | ||
894 | <sect1><title>Synchronous Message Digest API</title> | ||
895 | !Pinclude/linux/crypto.h Synchronous Message Digest API | ||
896 | !Finclude/linux/crypto.h crypto_alloc_hash | ||
897 | !Finclude/linux/crypto.h crypto_free_hash | ||
898 | !Finclude/linux/crypto.h crypto_has_hash | ||
899 | !Finclude/linux/crypto.h crypto_hash_blocksize | ||
900 | !Finclude/linux/crypto.h crypto_hash_digestsize | ||
901 | !Finclude/linux/crypto.h crypto_hash_init | ||
902 | !Finclude/linux/crypto.h crypto_hash_update | ||
903 | !Finclude/linux/crypto.h crypto_hash_final | ||
904 | !Finclude/linux/crypto.h crypto_hash_digest | ||
905 | !Finclude/linux/crypto.h crypto_hash_setkey | ||
906 | </sect1> | ||
907 | <sect1><title>Message Digest Algorithm Definitions</title> | ||
908 | !Pinclude/crypto/hash.h Message Digest Algorithm Definitions | ||
909 | !Finclude/crypto/hash.h hash_alg_common | ||
910 | !Finclude/crypto/hash.h ahash_alg | ||
911 | !Finclude/crypto/hash.h shash_alg | ||
912 | </sect1> | ||
913 | <sect1><title>Asynchronous Message Digest API</title> | ||
914 | !Pinclude/crypto/hash.h Asynchronous Message Digest API | ||
915 | !Finclude/crypto/hash.h crypto_alloc_ahash | ||
916 | !Finclude/crypto/hash.h crypto_free_ahash | ||
917 | !Finclude/crypto/hash.h crypto_ahash_init | ||
918 | !Finclude/crypto/hash.h crypto_ahash_digestsize | ||
919 | !Finclude/crypto/hash.h crypto_ahash_reqtfm | ||
920 | !Finclude/crypto/hash.h crypto_ahash_reqsize | ||
921 | !Finclude/crypto/hash.h crypto_ahash_setkey | ||
922 | !Finclude/crypto/hash.h crypto_ahash_finup | ||
923 | !Finclude/crypto/hash.h crypto_ahash_final | ||
924 | !Finclude/crypto/hash.h crypto_ahash_digest | ||
925 | !Finclude/crypto/hash.h crypto_ahash_export | ||
926 | !Finclude/crypto/hash.h crypto_ahash_import | ||
927 | </sect1> | ||
928 | <sect1><title>Asynchronous Hash Request Handle</title> | ||
929 | !Pinclude/crypto/hash.h Asynchronous Hash Request Handle | ||
930 | !Finclude/crypto/hash.h ahash_request_set_tfm | ||
931 | !Finclude/crypto/hash.h ahash_request_alloc | ||
932 | !Finclude/crypto/hash.h ahash_request_free | ||
933 | !Finclude/crypto/hash.h ahash_request_set_callback | ||
934 | !Finclude/crypto/hash.h ahash_request_set_crypt | ||
935 | </sect1> | ||
936 | <sect1><title>Synchronous Message Digest API</title> | ||
937 | !Pinclude/crypto/hash.h Synchronous Message Digest API | ||
938 | !Finclude/crypto/hash.h crypto_alloc_shash | ||
939 | !Finclude/crypto/hash.h crypto_free_shash | ||
940 | !Finclude/crypto/hash.h crypto_shash_blocksize | ||
941 | !Finclude/crypto/hash.h crypto_shash_digestsize | ||
942 | !Finclude/crypto/hash.h crypto_shash_descsize | ||
943 | !Finclude/crypto/hash.h crypto_shash_setkey | ||
944 | !Finclude/crypto/hash.h crypto_shash_digest | ||
945 | !Finclude/crypto/hash.h crypto_shash_export | ||
946 | !Finclude/crypto/hash.h crypto_shash_import | ||
947 | !Finclude/crypto/hash.h crypto_shash_init | ||
948 | !Finclude/crypto/hash.h crypto_shash_update | ||
949 | !Finclude/crypto/hash.h crypto_shash_final | ||
950 | !Finclude/crypto/hash.h crypto_shash_finup | ||
951 | </sect1> | ||
952 | <sect1><title>Crypto API Random Number API</title> | ||
953 | !Pinclude/crypto/rng.h Random number generator API | ||
954 | !Finclude/crypto/rng.h crypto_alloc_rng | ||
955 | !Finclude/crypto/rng.h crypto_rng_alg | ||
956 | !Finclude/crypto/rng.h crypto_free_rng | ||
957 | !Finclude/crypto/rng.h crypto_rng_get_bytes | ||
958 | !Finclude/crypto/rng.h crypto_rng_reset | ||
959 | !Finclude/crypto/rng.h crypto_rng_seedsize | ||
960 | !Cinclude/crypto/rng.h | ||
961 | </sect1> | ||
962 | </chapter> | ||
963 | |||
964 | <chapter id="Code"><title>Code Examples</title> | ||
965 | <sect1><title>Code Example For Asynchronous Block Cipher Operation</title> | ||
966 | <programlisting> | ||
967 | |||
968 | struct tcrypt_result { | ||
969 | struct completion completion; | ||
970 | int err; | ||
971 | }; | ||
972 | |||
973 | /* tie all data structures together */ | ||
974 | struct ablkcipher_def { | ||
975 | struct scatterlist sg; | ||
976 | struct crypto_ablkcipher *tfm; | ||
977 | struct ablkcipher_request *req; | ||
978 | struct tcrypt_result result; | ||
979 | }; | ||
980 | |||
981 | /* Callback function */ | ||
982 | static void test_ablkcipher_cb(struct crypto_async_request *req, int error) | ||
983 | { | ||
984 | struct tcrypt_result *result = req->data; | ||
985 | |||
986 | if (error == -EINPROGRESS) | ||
987 | return; | ||
988 | result->err = error; | ||
989 | complete(&result->completion); | ||
990 | pr_info("Encryption finished successfully\n"); | ||
991 | } | ||
992 | |||
993 | /* Perform cipher operation */ | ||
994 | static unsigned int test_ablkcipher_encdec(struct ablkcipher_def *ablk, | ||
995 | int enc) | ||
996 | { | ||
997 | int rc = 0; | ||
998 | |||
999 | if (enc) | ||
1000 | rc = crypto_ablkcipher_encrypt(ablk->req); | ||
1001 | else | ||
1002 | rc = crypto_ablkcipher_decrypt(ablk->req); | ||
1003 | |||
1004 | switch (rc) { | ||
1005 | case 0: | ||
1006 | break; | ||
1007 | case -EINPROGRESS: | ||
1008 | case -EBUSY: | ||
1009 | rc = wait_for_completion_interruptible( | ||
1010 | &ablk->result.completion); | ||
1011 | if (!rc && !ablk->result.err) { | ||
1012 | reinit_completion(&ablk->result.completion); | ||
1013 | break; | ||
1014 | } | ||
1015 | default: | ||
1016 | pr_info("ablkcipher encrypt returned with %d result %d\n", | ||
1017 | rc, ablk->result.err); | ||
1018 | break; | ||
1019 | } | ||
1020 | init_completion(&ablk->result.completion); | ||
1021 | |||
1022 | return rc; | ||
1023 | } | ||
1024 | |||
1025 | /* Initialize and trigger cipher operation */ | ||
1026 | static int test_ablkcipher(void) | ||
1027 | { | ||
1028 | struct ablkcipher_def ablk; | ||
1029 | struct crypto_ablkcipher *ablkcipher = NULL; | ||
1030 | struct ablkcipher_request *req = NULL; | ||
1031 | char *scratchpad = NULL; | ||
1032 | char *ivdata = NULL; | ||
1033 | unsigned char key[32]; | ||
1034 | int ret = -EFAULT; | ||
1035 | |||
1036 | ablkcipher = crypto_alloc_ablkcipher("cbc-aes-aesni", 0, 0); | ||
1037 | if (IS_ERR(ablkcipher)) { | ||
1038 | pr_info("could not allocate ablkcipher handle\n"); | ||
1039 | return PTR_ERR(ablkcipher); | ||
1040 | } | ||
1041 | |||
1042 | req = ablkcipher_request_alloc(ablkcipher, GFP_KERNEL); | ||
1043 | if (IS_ERR(req)) { | ||
1044 | pr_info("could not allocate request queue\n"); | ||
1045 | ret = PTR_ERR(req); | ||
1046 | goto out; | ||
1047 | } | ||
1048 | |||
1049 | ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, | ||
1050 | test_ablkcipher_cb, | ||
1051 | &ablk.result); | ||
1052 | |||
1053 | /* AES 256 with random key */ | ||
1054 | get_random_bytes(&key, 32); | ||
1055 | if (crypto_ablkcipher_setkey(ablkcipher, key, 32)) { | ||
1056 | pr_info("key could not be set\n"); | ||
1057 | ret = -EAGAIN; | ||
1058 | goto out; | ||
1059 | } | ||
1060 | |||
1061 | /* IV will be random */ | ||
1062 | ivdata = kmalloc(16, GFP_KERNEL); | ||
1063 | if (!ivdata) { | ||
1064 | pr_info("could not allocate ivdata\n"); | ||
1065 | goto out; | ||
1066 | } | ||
1067 | get_random_bytes(ivdata, 16); | ||
1068 | |||
1069 | /* Input data will be random */ | ||
1070 | scratchpad = kmalloc(16, GFP_KERNEL); | ||
1071 | if (!scratchpad) { | ||
1072 | pr_info("could not allocate scratchpad\n"); | ||
1073 | goto out; | ||
1074 | } | ||
1075 | get_random_bytes(scratchpad, 16); | ||
1076 | |||
1077 | ablk.tfm = ablkcipher; | ||
1078 | ablk.req = req; | ||
1079 | |||
1080 | /* We encrypt one block */ | ||
1081 | sg_init_one(&ablk.sg, scratchpad, 16); | ||
1082 | ablkcipher_request_set_crypt(req, &ablk.sg, &ablk.sg, 16, ivdata); | ||
1083 | init_completion(&ablk.result.completion); | ||
1084 | |||
1085 | /* encrypt data */ | ||
1086 | ret = test_ablkcipher_encdec(&ablk, 1); | ||
1087 | if (ret) | ||
1088 | goto out; | ||
1089 | |||
1090 | pr_info("Encryption triggered successfully\n"); | ||
1091 | |||
1092 | out: | ||
1093 | if (ablkcipher) | ||
1094 | crypto_free_ablkcipher(ablkcipher); | ||
1095 | if (req) | ||
1096 | ablkcipher_request_free(req); | ||
1097 | if (ivdata) | ||
1098 | kfree(ivdata); | ||
1099 | if (scratchpad) | ||
1100 | kfree(scratchpad); | ||
1101 | return ret; | ||
1102 | } | ||
1103 | </programlisting> | ||
1104 | </sect1> | ||
1105 | |||
1106 | <sect1><title>Code Example For Synchronous Block Cipher Operation</title> | ||
1107 | <programlisting> | ||
1108 | |||
1109 | static int test_blkcipher(void) | ||
1110 | { | ||
1111 | struct crypto_blkcipher *blkcipher = NULL; | ||
1112 | char *cipher = "cbc(aes)"; | ||
1113 | // AES 128 | ||
1114 | charkey = | ||
1115 | "\x12\x34\x56\x78\x90\xab\xcd\xef\x12\x34\x56\x78\x90\xab\xcd\xef"; | ||
1116 | chariv = | ||
1117 | "\x12\x34\x56\x78\x90\xab\xcd\xef\x12\x34\x56\x78\x90\xab\xcd\xef"; | ||
1118 | unsigned int ivsize = 0; | ||
1119 | char *scratchpad = NULL; // holds plaintext and ciphertext | ||
1120 | struct scatterlist sg; | ||
1121 | struct blkcipher_desc desc; | ||
1122 | int ret = -EFAULT; | ||
1123 | |||
1124 | blkcipher = crypto_alloc_blkcipher(cipher, 0, 0); | ||
1125 | if (IS_ERR(blkcipher)) { | ||
1126 | printk("could not allocate blkcipher handle for %s\n", cipher); | ||
1127 | return -PTR_ERR(blkcipher); | ||
1128 | } | ||
1129 | |||
1130 | if (crypto_blkcipher_setkey(blkcipher, key, strlen(key))) { | ||
1131 | printk("key could not be set\n"); | ||
1132 | ret = -EAGAIN; | ||
1133 | goto out; | ||
1134 | } | ||
1135 | |||
1136 | ivsize = crypto_blkcipher_ivsize(blkcipher); | ||
1137 | if (ivsize) { | ||
1138 | if (ivsize != strlen(iv)) | ||
1139 | printk("IV length differs from expected length\n"); | ||
1140 | crypto_blkcipher_set_iv(blkcipher, iv, ivsize); | ||
1141 | } | ||
1142 | |||
1143 | scratchpad = kmalloc(crypto_blkcipher_blocksize(blkcipher), GFP_KERNEL); | ||
1144 | if (!scratchpad) { | ||
1145 | printk("could not allocate scratchpad for %s\n", cipher); | ||
1146 | goto out; | ||
1147 | } | ||
1148 | /* get some random data that we want to encrypt */ | ||
1149 | get_random_bytes(scratchpad, crypto_blkcipher_blocksize(blkcipher)); | ||
1150 | |||
1151 | desc.flags = 0; | ||
1152 | desc.tfm = blkcipher; | ||
1153 | sg_init_one(&sg, scratchpad, crypto_blkcipher_blocksize(blkcipher)); | ||
1154 | |||
1155 | /* encrypt data in place */ | ||
1156 | crypto_blkcipher_encrypt(&desc, &sg, &sg, | ||
1157 | crypto_blkcipher_blocksize(blkcipher)); | ||
1158 | |||
1159 | /* decrypt data in place | ||
1160 | * crypto_blkcipher_decrypt(&desc, &sg, &sg, | ||
1161 | */ crypto_blkcipher_blocksize(blkcipher)); | ||
1162 | |||
1163 | |||
1164 | printk("Cipher operation completed\n"); | ||
1165 | return 0; | ||
1166 | |||
1167 | out: | ||
1168 | if (blkcipher) | ||
1169 | crypto_free_blkcipher(blkcipher); | ||
1170 | if (scratchpad) | ||
1171 | kzfree(scratchpad); | ||
1172 | return ret; | ||
1173 | } | ||
1174 | </programlisting> | ||
1175 | </sect1> | ||
1176 | |||
1177 | <sect1><title>Code Example For Use of Operational State Memory With SHASH</title> | ||
1178 | <programlisting> | ||
1179 | |||
1180 | struct sdesc { | ||
1181 | struct shash_desc shash; | ||
1182 | char ctx[]; | ||
1183 | }; | ||
1184 | |||
1185 | static struct sdescinit_sdesc(struct crypto_shash *alg) | ||
1186 | { | ||
1187 | struct sdescsdesc; | ||
1188 | int size; | ||
1189 | |||
1190 | size = sizeof(struct shash_desc) + crypto_shash_descsize(alg); | ||
1191 | sdesc = kmalloc(size, GFP_KERNEL); | ||
1192 | if (!sdesc) | ||
1193 | return ERR_PTR(-ENOMEM); | ||
1194 | sdesc->shash.tfm = alg; | ||
1195 | sdesc->shash.flags = 0x0; | ||
1196 | return sdesc; | ||
1197 | } | ||
1198 | |||
1199 | static int calc_hash(struct crypto_shashalg, | ||
1200 | const unsigned chardata, unsigned int datalen, | ||
1201 | unsigned chardigest) { | ||
1202 | struct sdescsdesc; | ||
1203 | int ret; | ||
1204 | |||
1205 | sdesc = init_sdesc(alg); | ||
1206 | if (IS_ERR(sdesc)) { | ||
1207 | pr_info("trusted_key: can't alloc %s\n", hash_alg); | ||
1208 | return PTR_ERR(sdesc); | ||
1209 | } | ||
1210 | |||
1211 | ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); | ||
1212 | kfree(sdesc); | ||
1213 | return ret; | ||
1214 | } | ||
1215 | </programlisting> | ||
1216 | </sect1> | ||
1217 | |||
1218 | <sect1><title>Code Example For Random Number Generator Usage</title> | ||
1219 | <programlisting> | ||
1220 | |||
1221 | static int get_random_numbers(u8 *buf, unsigned int len) | ||
1222 | { | ||
1223 | struct crypto_rngrng = NULL; | ||
1224 | chardrbg = "drbg_nopr_sha256"; /* Hash DRBG with SHA-256, no PR */ | ||
1225 | int ret; | ||
1226 | |||
1227 | if (!buf || !len) { | ||
1228 | pr_debug("No output buffer provided\n"); | ||
1229 | return -EINVAL; | ||
1230 | } | ||
1231 | |||
1232 | rng = crypto_alloc_rng(drbg, 0, 0); | ||
1233 | if (IS_ERR(rng)) { | ||
1234 | pr_debug("could not allocate RNG handle for %s\n", drbg); | ||
1235 | return -PTR_ERR(rng); | ||
1236 | } | ||
1237 | |||
1238 | ret = crypto_rng_get_bytes(rng, buf, len); | ||
1239 | if (ret < 0) | ||
1240 | pr_debug("generation of random numbers failed\n"); | ||
1241 | else if (ret == 0) | ||
1242 | pr_debug("RNG returned no data"); | ||
1243 | else | ||
1244 | pr_debug("RNG returned %d bytes of data\n", ret); | ||
1245 | |||
1246 | out: | ||
1247 | crypto_free_rng(rng); | ||
1248 | return ret; | ||
1249 | } | ||
1250 | </programlisting> | ||
1251 | </sect1> | ||
1252 | </chapter> | ||
1253 | </book> | ||
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index be35bc328b77..4b592ffbafee 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -492,10 +492,10 @@ char *date;</synopsis> | |||
492 | <sect2> | 492 | <sect2> |
493 | <title>The Translation Table Manager (TTM)</title> | 493 | <title>The Translation Table Manager (TTM)</title> |
494 | <para> | 494 | <para> |
495 | TTM design background and information belongs here. | 495 | TTM design background and information belongs here. |
496 | </para> | 496 | </para> |
497 | <sect3> | 497 | <sect3> |
498 | <title>TTM initialization</title> | 498 | <title>TTM initialization</title> |
499 | <warning><para>This section is outdated.</para></warning> | 499 | <warning><para>This section is outdated.</para></warning> |
500 | <para> | 500 | <para> |
501 | Drivers wishing to support TTM must fill out a drm_bo_driver | 501 | Drivers wishing to support TTM must fill out a drm_bo_driver |
@@ -503,42 +503,42 @@ char *date;</synopsis> | |||
503 | pointers for initializing the TTM, allocating and freeing memory, | 503 | pointers for initializing the TTM, allocating and freeing memory, |
504 | waiting for command completion and fence synchronization, and memory | 504 | waiting for command completion and fence synchronization, and memory |
505 | migration. See the radeon_ttm.c file for an example of usage. | 505 | migration. See the radeon_ttm.c file for an example of usage. |
506 | </para> | 506 | </para> |
507 | <para> | 507 | <para> |
508 | The ttm_global_reference structure is made up of several fields: | 508 | The ttm_global_reference structure is made up of several fields: |
509 | </para> | 509 | </para> |
510 | <programlisting> | 510 | <programlisting> |
511 | struct ttm_global_reference { | 511 | struct ttm_global_reference { |
512 | enum ttm_global_types global_type; | 512 | enum ttm_global_types global_type; |
513 | size_t size; | 513 | size_t size; |
514 | void *object; | 514 | void *object; |
515 | int (*init) (struct ttm_global_reference *); | 515 | int (*init) (struct ttm_global_reference *); |
516 | void (*release) (struct ttm_global_reference *); | 516 | void (*release) (struct ttm_global_reference *); |
517 | }; | 517 | }; |
518 | </programlisting> | 518 | </programlisting> |
519 | <para> | 519 | <para> |
520 | There should be one global reference structure for your memory | 520 | There should be one global reference structure for your memory |
521 | manager as a whole, and there will be others for each object | 521 | manager as a whole, and there will be others for each object |
522 | created by the memory manager at runtime. Your global TTM should | 522 | created by the memory manager at runtime. Your global TTM should |
523 | have a type of TTM_GLOBAL_TTM_MEM. The size field for the global | 523 | have a type of TTM_GLOBAL_TTM_MEM. The size field for the global |
524 | object should be sizeof(struct ttm_mem_global), and the init and | 524 | object should be sizeof(struct ttm_mem_global), and the init and |
525 | release hooks should point at your driver-specific init and | 525 | release hooks should point at your driver-specific init and |
526 | release routines, which probably eventually call | 526 | release routines, which probably eventually call |
527 | ttm_mem_global_init and ttm_mem_global_release, respectively. | 527 | ttm_mem_global_init and ttm_mem_global_release, respectively. |
528 | </para> | 528 | </para> |
529 | <para> | 529 | <para> |
530 | Once your global TTM accounting structure is set up and initialized | 530 | Once your global TTM accounting structure is set up and initialized |
531 | by calling ttm_global_item_ref() on it, | 531 | by calling ttm_global_item_ref() on it, |
532 | you need to create a buffer object TTM to | 532 | you need to create a buffer object TTM to |
533 | provide a pool for buffer object allocation by clients and the | 533 | provide a pool for buffer object allocation by clients and the |
534 | kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, | 534 | kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, |
535 | and its size should be sizeof(struct ttm_bo_global). Again, | 535 | and its size should be sizeof(struct ttm_bo_global). Again, |
536 | driver-specific init and release functions may be provided, | 536 | driver-specific init and release functions may be provided, |
537 | likely eventually calling ttm_bo_global_init() and | 537 | likely eventually calling ttm_bo_global_init() and |
538 | ttm_bo_global_release(), respectively. Also, like the previous | 538 | ttm_bo_global_release(), respectively. Also, like the previous |
539 | object, ttm_global_item_ref() is used to create an initial reference | 539 | object, ttm_global_item_ref() is used to create an initial reference |
540 | count for the TTM, which will call your initialization function. | 540 | count for the TTM, which will call your initialization function. |
541 | </para> | 541 | </para> |
542 | </sect3> | 542 | </sect3> |
543 | </sect2> | 543 | </sect2> |
544 | <sect2 id="drm-gem"> | 544 | <sect2 id="drm-gem"> |
@@ -566,19 +566,19 @@ char *date;</synopsis> | |||
566 | using driver-specific ioctls. | 566 | using driver-specific ioctls. |
567 | </para> | 567 | </para> |
568 | <para> | 568 | <para> |
569 | On a fundamental level, GEM involves several operations: | 569 | On a fundamental level, GEM involves several operations: |
570 | <itemizedlist> | 570 | <itemizedlist> |
571 | <listitem>Memory allocation and freeing</listitem> | 571 | <listitem>Memory allocation and freeing</listitem> |
572 | <listitem>Command execution</listitem> | 572 | <listitem>Command execution</listitem> |
573 | <listitem>Aperture management at command execution time</listitem> | 573 | <listitem>Aperture management at command execution time</listitem> |
574 | </itemizedlist> | 574 | </itemizedlist> |
575 | Buffer object allocation is relatively straightforward and largely | 575 | Buffer object allocation is relatively straightforward and largely |
576 | provided by Linux's shmem layer, which provides memory to back each | 576 | provided by Linux's shmem layer, which provides memory to back each |
577 | object. | 577 | object. |
578 | </para> | 578 | </para> |
579 | <para> | 579 | <para> |
580 | Device-specific operations, such as command execution, pinning, buffer | 580 | Device-specific operations, such as command execution, pinning, buffer |
581 | read & write, mapping, and domain ownership transfers are left to | 581 | read & write, mapping, and domain ownership transfers are left to |
582 | driver-specific ioctls. | 582 | driver-specific ioctls. |
583 | </para> | 583 | </para> |
584 | <sect3> | 584 | <sect3> |
@@ -738,16 +738,16 @@ char *date;</synopsis> | |||
738 | respectively. The conversion is handled by the DRM core without any | 738 | respectively. The conversion is handled by the DRM core without any |
739 | driver-specific support. | 739 | driver-specific support. |
740 | </para> | 740 | </para> |
741 | <para> | 741 | <para> |
742 | GEM also supports buffer sharing with dma-buf file descriptors through | 742 | GEM also supports buffer sharing with dma-buf file descriptors through |
743 | PRIME. GEM-based drivers must use the provided helpers functions to | 743 | PRIME. GEM-based drivers must use the provided helpers functions to |
744 | implement the exporting and importing correctly. See <xref linkend="drm-prime-support" />. | 744 | implement the exporting and importing correctly. See <xref linkend="drm-prime-support" />. |
745 | Since sharing file descriptors is inherently more secure than the | 745 | Since sharing file descriptors is inherently more secure than the |
746 | easily guessable and global GEM names it is the preferred buffer | 746 | easily guessable and global GEM names it is the preferred buffer |
747 | sharing mechanism. Sharing buffers through GEM names is only supported | 747 | sharing mechanism. Sharing buffers through GEM names is only supported |
748 | for legacy userspace. Furthermore PRIME also allows cross-device | 748 | for legacy userspace. Furthermore PRIME also allows cross-device |
749 | buffer sharing since it is based on dma-bufs. | 749 | buffer sharing since it is based on dma-bufs. |
750 | </para> | 750 | </para> |
751 | </sect3> | 751 | </sect3> |
752 | <sect3 id="drm-gem-objects-mapping"> | 752 | <sect3 id="drm-gem-objects-mapping"> |
753 | <title>GEM Objects Mapping</title> | 753 | <title>GEM Objects Mapping</title> |
@@ -852,7 +852,7 @@ char *date;</synopsis> | |||
852 | <sect3> | 852 | <sect3> |
853 | <title>Command Execution</title> | 853 | <title>Command Execution</title> |
854 | <para> | 854 | <para> |
855 | Perhaps the most important GEM function for GPU devices is providing a | 855 | Perhaps the most important GEM function for GPU devices is providing a |
856 | command execution interface to clients. Client programs construct | 856 | command execution interface to clients. Client programs construct |
857 | command buffers containing references to previously allocated memory | 857 | command buffers containing references to previously allocated memory |
858 | objects, and then submit them to GEM. At that point, GEM takes care to | 858 | objects, and then submit them to GEM. At that point, GEM takes care to |
@@ -874,95 +874,101 @@ char *date;</synopsis> | |||
874 | <title>GEM Function Reference</title> | 874 | <title>GEM Function Reference</title> |
875 | !Edrivers/gpu/drm/drm_gem.c | 875 | !Edrivers/gpu/drm/drm_gem.c |
876 | </sect3> | 876 | </sect3> |
877 | </sect2> | 877 | </sect2> |
878 | <sect2> | 878 | <sect2> |
879 | <title>VMA Offset Manager</title> | 879 | <title>VMA Offset Manager</title> |
880 | !Pdrivers/gpu/drm/drm_vma_manager.c vma offset manager | 880 | !Pdrivers/gpu/drm/drm_vma_manager.c vma offset manager |
881 | !Edrivers/gpu/drm/drm_vma_manager.c | 881 | !Edrivers/gpu/drm/drm_vma_manager.c |
882 | !Iinclude/drm/drm_vma_manager.h | 882 | !Iinclude/drm/drm_vma_manager.h |
883 | </sect2> | 883 | </sect2> |
884 | <sect2 id="drm-prime-support"> | 884 | <sect2 id="drm-prime-support"> |
885 | <title>PRIME Buffer Sharing</title> | 885 | <title>PRIME Buffer Sharing</title> |
886 | <para> | 886 | <para> |
887 | PRIME is the cross device buffer sharing framework in drm, originally | 887 | PRIME is the cross device buffer sharing framework in drm, originally |
888 | created for the OPTIMUS range of multi-gpu platforms. To userspace | 888 | created for the OPTIMUS range of multi-gpu platforms. To userspace |
889 | PRIME buffers are dma-buf based file descriptors. | 889 | PRIME buffers are dma-buf based file descriptors. |
890 | </para> | 890 | </para> |
891 | <sect3> | 891 | <sect3> |
892 | <title>Overview and Driver Interface</title> | 892 | <title>Overview and Driver Interface</title> |
893 | <para> | 893 | <para> |
894 | Similar to GEM global names, PRIME file descriptors are | 894 | Similar to GEM global names, PRIME file descriptors are |
895 | also used to share buffer objects across processes. They offer | 895 | also used to share buffer objects across processes. They offer |
896 | additional security: as file descriptors must be explicitly sent over | 896 | additional security: as file descriptors must be explicitly sent over |
897 | UNIX domain sockets to be shared between applications, they can't be | 897 | UNIX domain sockets to be shared between applications, they can't be |
898 | guessed like the globally unique GEM names. | 898 | guessed like the globally unique GEM names. |
899 | </para> | 899 | </para> |
900 | <para> | 900 | <para> |
901 | Drivers that support the PRIME | 901 | Drivers that support the PRIME |
902 | API must set the DRIVER_PRIME bit in the struct | 902 | API must set the DRIVER_PRIME bit in the struct |
903 | <structname>drm_driver</structname> | 903 | <structname>drm_driver</structname> |
904 | <structfield>driver_features</structfield> field, and implement the | 904 | <structfield>driver_features</structfield> field, and implement the |
905 | <methodname>prime_handle_to_fd</methodname> and | 905 | <methodname>prime_handle_to_fd</methodname> and |
906 | <methodname>prime_fd_to_handle</methodname> operations. | 906 | <methodname>prime_fd_to_handle</methodname> operations. |
907 | </para> | 907 | </para> |
908 | <para> | 908 | <para> |
909 | <synopsis>int (*prime_handle_to_fd)(struct drm_device *dev, | 909 | <synopsis>int (*prime_handle_to_fd)(struct drm_device *dev, |
910 | struct drm_file *file_priv, uint32_t handle, | 910 | struct drm_file *file_priv, uint32_t handle, |
911 | uint32_t flags, int *prime_fd); | 911 | uint32_t flags, int *prime_fd); |
912 | int (*prime_fd_to_handle)(struct drm_device *dev, | 912 | int (*prime_fd_to_handle)(struct drm_device *dev, |
913 | struct drm_file *file_priv, int prime_fd, | 913 | struct drm_file *file_priv, int prime_fd, |
914 | uint32_t *handle);</synopsis> | 914 | uint32_t *handle);</synopsis> |
915 | Those two operations convert a handle to a PRIME file descriptor and | 915 | Those two operations convert a handle to a PRIME file descriptor and |
916 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework | 916 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework |
917 | to manage the PRIME file descriptors. Similar to the mode setting | 917 | to manage the PRIME file descriptors. Similar to the mode setting |
918 | API PRIME is agnostic to the underlying buffer object manager, as | 918 | API PRIME is agnostic to the underlying buffer object manager, as |
919 | long as handles are 32bit unsigned integers. | 919 | long as handles are 32bit unsigned integers. |
920 | </para> | 920 | </para> |
921 | <para> | 921 | <para> |
922 | While non-GEM drivers must implement the operations themselves, GEM | 922 | While non-GEM drivers must implement the operations themselves, GEM |
923 | drivers must use the <function>drm_gem_prime_handle_to_fd</function> | 923 | drivers must use the <function>drm_gem_prime_handle_to_fd</function> |
924 | and <function>drm_gem_prime_fd_to_handle</function> helper functions. | 924 | and <function>drm_gem_prime_fd_to_handle</function> helper functions. |
925 | Those helpers rely on the driver | 925 | Those helpers rely on the driver |
926 | <methodname>gem_prime_export</methodname> and | 926 | <methodname>gem_prime_export</methodname> and |
927 | <methodname>gem_prime_import</methodname> operations to create a dma-buf | 927 | <methodname>gem_prime_import</methodname> operations to create a dma-buf |
928 | instance from a GEM object (dma-buf exporter role) and to create a GEM | 928 | instance from a GEM object (dma-buf exporter role) and to create a GEM |
929 | object from a dma-buf instance (dma-buf importer role). | 929 | object from a dma-buf instance (dma-buf importer role). |
930 | </para> | 930 | </para> |
931 | <para> | 931 | <para> |
932 | <synopsis>struct dma_buf * (*gem_prime_export)(struct drm_device *dev, | 932 | <synopsis>struct dma_buf * (*gem_prime_export)(struct drm_device *dev, |
933 | struct drm_gem_object *obj, | 933 | struct drm_gem_object *obj, |
934 | int flags); | 934 | int flags); |
935 | struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev, | 935 | struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev, |
936 | struct dma_buf *dma_buf);</synopsis> | 936 | struct dma_buf *dma_buf);</synopsis> |
937 | These two operations are mandatory for GEM drivers that support | 937 | These two operations are mandatory for GEM drivers that support |
938 | PRIME. | 938 | PRIME. |
939 | </para> | 939 | </para> |
940 | </sect3> | ||
941 | <sect3> | ||
942 | <title>PRIME Helper Functions</title> | ||
943 | !Pdrivers/gpu/drm/drm_prime.c PRIME Helpers | ||
944 | </sect3> | 940 | </sect3> |
945 | </sect2> | 941 | <sect3> |
946 | <sect2> | 942 | <title>PRIME Helper Functions</title> |
947 | <title>PRIME Function References</title> | 943 | !Pdrivers/gpu/drm/drm_prime.c PRIME Helpers |
944 | </sect3> | ||
945 | </sect2> | ||
946 | <sect2> | ||
947 | <title>PRIME Function References</title> | ||
948 | !Edrivers/gpu/drm/drm_prime.c | 948 | !Edrivers/gpu/drm/drm_prime.c |
949 | </sect2> | 949 | </sect2> |
950 | <sect2> | 950 | <sect2> |
951 | <title>DRM MM Range Allocator</title> | 951 | <title>DRM MM Range Allocator</title> |
952 | <sect3> | 952 | <sect3> |
953 | <title>Overview</title> | 953 | <title>Overview</title> |
954 | !Pdrivers/gpu/drm/drm_mm.c Overview | 954 | !Pdrivers/gpu/drm/drm_mm.c Overview |
955 | </sect3> | 955 | </sect3> |
956 | <sect3> | 956 | <sect3> |
957 | <title>LRU Scan/Eviction Support</title> | 957 | <title>LRU Scan/Eviction Support</title> |
958 | !Pdrivers/gpu/drm/drm_mm.c lru scan roaster | 958 | !Pdrivers/gpu/drm/drm_mm.c lru scan roaster |
959 | </sect3> | 959 | </sect3> |
960 | </sect2> | 960 | </sect2> |
961 | <sect2> | 961 | <sect2> |
962 | <title>DRM MM Range Allocator Function References</title> | 962 | <title>DRM MM Range Allocator Function References</title> |
963 | !Edrivers/gpu/drm/drm_mm.c | 963 | !Edrivers/gpu/drm/drm_mm.c |
964 | !Iinclude/drm/drm_mm.h | 964 | !Iinclude/drm/drm_mm.h |
965 | </sect2> | 965 | </sect2> |
966 | <sect2> | ||
967 | <title>CMA Helper Functions Reference</title> | ||
968 | !Pdrivers/gpu/drm/drm_gem_cma_helper.c cma helpers | ||
969 | !Edrivers/gpu/drm/drm_gem_cma_helper.c | ||
970 | !Iinclude/drm/drm_gem_cma_helper.h | ||
971 | </sect2> | ||
966 | </sect1> | 972 | </sect1> |
967 | 973 | ||
968 | <!-- Internals: mode setting --> | 974 | <!-- Internals: mode setting --> |
@@ -996,6 +1002,10 @@ int max_width, max_height;</synopsis> | |||
996 | !Edrivers/gpu/drm/drm_modes.c | 1002 | !Edrivers/gpu/drm/drm_modes.c |
997 | </sect2> | 1003 | </sect2> |
998 | <sect2> | 1004 | <sect2> |
1005 | <title>Atomic Mode Setting Function Reference</title> | ||
1006 | !Edrivers/gpu/drm/drm_atomic.c | ||
1007 | </sect2> | ||
1008 | <sect2> | ||
999 | <title>Frame Buffer Creation</title> | 1009 | <title>Frame Buffer Creation</title> |
1000 | <synopsis>struct drm_framebuffer *(*fb_create)(struct drm_device *dev, | 1010 | <synopsis>struct drm_framebuffer *(*fb_create)(struct drm_device *dev, |
1001 | struct drm_file *file_priv, | 1011 | struct drm_file *file_priv, |
@@ -1827,6 +1837,10 @@ void intel_crt_init(struct drm_device *dev) | |||
1827 | !Edrivers/gpu/drm/drm_crtc.c | 1837 | !Edrivers/gpu/drm/drm_crtc.c |
1828 | </sect2> | 1838 | </sect2> |
1829 | <sect2> | 1839 | <sect2> |
1840 | <title>KMS Data Structures</title> | ||
1841 | !Iinclude/drm/drm_crtc.h | ||
1842 | </sect2> | ||
1843 | <sect2> | ||
1830 | <title>KMS Locking</title> | 1844 | <title>KMS Locking</title> |
1831 | !Pdrivers/gpu/drm/drm_modeset_lock.c kms locking | 1845 | !Pdrivers/gpu/drm/drm_modeset_lock.c kms locking |
1832 | !Iinclude/drm/drm_modeset_lock.h | 1846 | !Iinclude/drm/drm_modeset_lock.h |
@@ -1933,10 +1947,16 @@ void intel_crt_init(struct drm_device *dev) | |||
1933 | and then retrieves a list of modes by calling the connector | 1947 | and then retrieves a list of modes by calling the connector |
1934 | <methodname>get_modes</methodname> helper operation. | 1948 | <methodname>get_modes</methodname> helper operation. |
1935 | </para> | 1949 | </para> |
1950 | <para> | ||
1951 | If the helper operation returns no mode, and if the connector status | ||
1952 | is connector_status_connected, standard VESA DMT modes up to | ||
1953 | 1024x768 are automatically added to the modes list by a call to | ||
1954 | <function>drm_add_modes_noedid</function>. | ||
1955 | </para> | ||
1936 | <para> | 1956 | <para> |
1937 | The function filters out modes larger than | 1957 | The function then filters out modes larger than |
1938 | <parameter>max_width</parameter> and <parameter>max_height</parameter> | 1958 | <parameter>max_width</parameter> and <parameter>max_height</parameter> |
1939 | if specified. It then calls the optional connector | 1959 | if specified. It finally calls the optional connector |
1940 | <methodname>mode_valid</methodname> helper operation for each mode in | 1960 | <methodname>mode_valid</methodname> helper operation for each mode in |
1941 | the probed list to check whether the mode is valid for the connector. | 1961 | the probed list to check whether the mode is valid for the connector. |
1942 | </para> | 1962 | </para> |
@@ -2076,12 +2096,20 @@ void intel_crt_init(struct drm_device *dev) | |||
2076 | <synopsis>int (*get_modes)(struct drm_connector *connector);</synopsis> | 2096 | <synopsis>int (*get_modes)(struct drm_connector *connector);</synopsis> |
2077 | <para> | 2097 | <para> |
2078 | Fill the connector's <structfield>probed_modes</structfield> list | 2098 | Fill the connector's <structfield>probed_modes</structfield> list |
2079 | by parsing EDID data with <function>drm_add_edid_modes</function> or | 2099 | by parsing EDID data with <function>drm_add_edid_modes</function>, |
2080 | calling <function>drm_mode_probed_add</function> directly for every | 2100 | adding standard VESA DMT modes with <function>drm_add_modes_noedid</function>, |
2101 | or calling <function>drm_mode_probed_add</function> directly for every | ||
2081 | supported mode and return the number of modes it has detected. This | 2102 | supported mode and return the number of modes it has detected. This |
2082 | operation is mandatory. | 2103 | operation is mandatory. |
2083 | </para> | 2104 | </para> |
2084 | <para> | 2105 | <para> |
2106 | Note that the caller function will automatically add standard VESA | ||
2107 | DMT modes up to 1024x768 if the <methodname>get_modes</methodname> | ||
2108 | helper operation returns no mode and if the connector status is | ||
2109 | connector_status_connected. There is no need to call | ||
2110 | <function>drm_add_edid_modes</function> manually in that case. | ||
2111 | </para> | ||
2112 | <para> | ||
2085 | When adding modes manually the driver creates each mode with a call to | 2113 | When adding modes manually the driver creates each mode with a call to |
2086 | <function>drm_mode_create</function> and must fill the following fields. | 2114 | <function>drm_mode_create</function> and must fill the following fields. |
2087 | <itemizedlist> | 2115 | <itemizedlist> |
@@ -2278,7 +2306,7 @@ void intel_crt_init(struct drm_device *dev) | |||
2278 | <function>drm_helper_probe_single_connector_modes</function>. | 2306 | <function>drm_helper_probe_single_connector_modes</function>. |
2279 | </para> | 2307 | </para> |
2280 | <para> | 2308 | <para> |
2281 | When parsing EDID data, <function>drm_add_edid_modes</function> fill the | 2309 | When parsing EDID data, <function>drm_add_edid_modes</function> fills the |
2282 | connector <structfield>display_info</structfield> | 2310 | connector <structfield>display_info</structfield> |
2283 | <structfield>width_mm</structfield> and | 2311 | <structfield>width_mm</structfield> and |
2284 | <structfield>height_mm</structfield> fields. When creating modes | 2312 | <structfield>height_mm</structfield> fields. When creating modes |
@@ -2316,8 +2344,26 @@ void intel_crt_init(struct drm_device *dev) | |||
2316 | </itemizedlist> | 2344 | </itemizedlist> |
2317 | </sect2> | 2345 | </sect2> |
2318 | <sect2> | 2346 | <sect2> |
2347 | <title>Atomic Modeset Helper Functions Reference</title> | ||
2348 | <sect3> | ||
2349 | <title>Overview</title> | ||
2350 | !Pdrivers/gpu/drm/drm_atomic_helper.c overview | ||
2351 | </sect3> | ||
2352 | <sect3> | ||
2353 | <title>Implementing Asynchronous Atomic Commit</title> | ||
2354 | !Pdrivers/gpu/drm/drm_atomic_helper.c implementing async commit | ||
2355 | </sect3> | ||
2356 | <sect3> | ||
2357 | <title>Atomic State Reset and Initialization</title> | ||
2358 | !Pdrivers/gpu/drm/drm_atomic_helper.c atomic state reset and initialization | ||
2359 | </sect3> | ||
2360 | !Iinclude/drm/drm_atomic_helper.h | ||
2361 | !Edrivers/gpu/drm/drm_atomic_helper.c | ||
2362 | </sect2> | ||
2363 | <sect2> | ||
2319 | <title>Modeset Helper Functions Reference</title> | 2364 | <title>Modeset Helper Functions Reference</title> |
2320 | !Edrivers/gpu/drm/drm_crtc_helper.c | 2365 | !Edrivers/gpu/drm/drm_crtc_helper.c |
2366 | !Pdrivers/gpu/drm/drm_crtc_helper.c overview | ||
2321 | </sect2> | 2367 | </sect2> |
2322 | <sect2> | 2368 | <sect2> |
2323 | <title>Output Probing Helper Functions Reference</title> | 2369 | <title>Output Probing Helper Functions Reference</title> |
@@ -2343,6 +2389,12 @@ void intel_crt_init(struct drm_device *dev) | |||
2343 | !Edrivers/gpu/drm/drm_dp_mst_topology.c | 2389 | !Edrivers/gpu/drm/drm_dp_mst_topology.c |
2344 | </sect2> | 2390 | </sect2> |
2345 | <sect2> | 2391 | <sect2> |
2392 | <title>MIPI DSI Helper Functions Reference</title> | ||
2393 | !Pdrivers/gpu/drm/drm_mipi_dsi.c dsi helpers | ||
2394 | !Iinclude/drm/drm_mipi_dsi.h | ||
2395 | !Edrivers/gpu/drm/drm_mipi_dsi.c | ||
2396 | </sect2> | ||
2397 | <sect2> | ||
2346 | <title>EDID Helper Functions Reference</title> | 2398 | <title>EDID Helper Functions Reference</title> |
2347 | !Edrivers/gpu/drm/drm_edid.c | 2399 | !Edrivers/gpu/drm/drm_edid.c |
2348 | </sect2> | 2400 | </sect2> |
@@ -2371,7 +2423,12 @@ void intel_crt_init(struct drm_device *dev) | |||
2371 | </sect2> | 2423 | </sect2> |
2372 | <sect2> | 2424 | <sect2> |
2373 | <title id="drm-kms-planehelpers">Plane Helper Reference</title> | 2425 | <title id="drm-kms-planehelpers">Plane Helper Reference</title> |
2374 | !Edrivers/gpu/drm/drm_plane_helper.c Plane Helpers | 2426 | !Edrivers/gpu/drm/drm_plane_helper.c |
2427 | !Pdrivers/gpu/drm/drm_plane_helper.c overview | ||
2428 | </sect2> | ||
2429 | <sect2> | ||
2430 | <title>Tile group</title> | ||
2431 | !Pdrivers/gpu/drm/drm_crtc.c Tile group | ||
2375 | </sect2> | 2432 | </sect2> |
2376 | </sect1> | 2433 | </sect1> |
2377 | 2434 | ||
@@ -2507,8 +2564,8 @@ void intel_crt_init(struct drm_device *dev) | |||
2507 | <td valign="top" >Description/Restrictions</td> | 2564 | <td valign="top" >Description/Restrictions</td> |
2508 | </tr> | 2565 | </tr> |
2509 | <tr> | 2566 | <tr> |
2510 | <td rowspan="21" valign="top" >DRM</td> | 2567 | <td rowspan="25" valign="top" >DRM</td> |
2511 | <td rowspan="2" valign="top" >Generic</td> | 2568 | <td rowspan="4" valign="top" >Generic</td> |
2512 | <td valign="top" >“EDID”</td> | 2569 | <td valign="top" >“EDID”</td> |
2513 | <td valign="top" >BLOB | IMMUTABLE</td> | 2570 | <td valign="top" >BLOB | IMMUTABLE</td> |
2514 | <td valign="top" >0</td> | 2571 | <td valign="top" >0</td> |
@@ -2523,6 +2580,20 @@ void intel_crt_init(struct drm_device *dev) | |||
2523 | <td valign="top" >Contains DPMS operation mode value.</td> | 2580 | <td valign="top" >Contains DPMS operation mode value.</td> |
2524 | </tr> | 2581 | </tr> |
2525 | <tr> | 2582 | <tr> |
2583 | <td valign="top" >“PATH”</td> | ||
2584 | <td valign="top" >BLOB | IMMUTABLE</td> | ||
2585 | <td valign="top" >0</td> | ||
2586 | <td valign="top" >Connector</td> | ||
2587 | <td valign="top" >Contains topology path to a connector.</td> | ||
2588 | </tr> | ||
2589 | <tr> | ||
2590 | <td valign="top" >“TILE”</td> | ||
2591 | <td valign="top" >BLOB | IMMUTABLE</td> | ||
2592 | <td valign="top" >0</td> | ||
2593 | <td valign="top" >Connector</td> | ||
2594 | <td valign="top" >Contains tiling information for a connector.</td> | ||
2595 | </tr> | ||
2596 | <tr> | ||
2526 | <td rowspan="1" valign="top" >Plane</td> | 2597 | <td rowspan="1" valign="top" >Plane</td> |
2527 | <td valign="top" >“type”</td> | 2598 | <td valign="top" >“type”</td> |
2528 | <td valign="top" >ENUM | IMMUTABLE</td> | 2599 | <td valign="top" >ENUM | IMMUTABLE</td> |
@@ -2638,6 +2709,21 @@ void intel_crt_init(struct drm_device *dev) | |||
2638 | <td valign="top" >TBD</td> | 2709 | <td valign="top" >TBD</td> |
2639 | </tr> | 2710 | </tr> |
2640 | <tr> | 2711 | <tr> |
2712 | <td rowspan="2" valign="top" >Virtual GPU</td> | ||
2713 | <td valign="top" >“suggested X”</td> | ||
2714 | <td valign="top" >RANGE</td> | ||
2715 | <td valign="top" >Min=0, Max=0xffffffff</td> | ||
2716 | <td valign="top" >Connector</td> | ||
2717 | <td valign="top" >property to suggest an X offset for a connector</td> | ||
2718 | </tr> | ||
2719 | <tr> | ||
2720 | <td valign="top" >“suggested Y”</td> | ||
2721 | <td valign="top" >RANGE</td> | ||
2722 | <td valign="top" >Min=0, Max=0xffffffff</td> | ||
2723 | <td valign="top" >Connector</td> | ||
2724 | <td valign="top" >property to suggest an Y offset for a connector</td> | ||
2725 | </tr> | ||
2726 | <tr> | ||
2641 | <td rowspan="3" valign="top" >Optional</td> | 2727 | <td rowspan="3" valign="top" >Optional</td> |
2642 | <td valign="top" >“scaling mode”</td> | 2728 | <td valign="top" >“scaling mode”</td> |
2643 | <td valign="top" >ENUM</td> | 2729 | <td valign="top" >ENUM</td> |
@@ -3788,6 +3874,26 @@ int num_ioctls;</synopsis> | |||
3788 | those have basic support through the gma500 drm driver. | 3874 | those have basic support through the gma500 drm driver. |
3789 | </para> | 3875 | </para> |
3790 | <sect1> | 3876 | <sect1> |
3877 | <title>Core Driver Infrastructure</title> | ||
3878 | <para> | ||
3879 | This section covers core driver infrastructure used by both the display | ||
3880 | and the GEM parts of the driver. | ||
3881 | </para> | ||
3882 | <sect2> | ||
3883 | <title>Runtime Power Management</title> | ||
3884 | !Pdrivers/gpu/drm/i915/intel_runtime_pm.c runtime pm | ||
3885 | !Idrivers/gpu/drm/i915/intel_runtime_pm.c | ||
3886 | </sect2> | ||
3887 | <sect2> | ||
3888 | <title>Interrupt Handling</title> | ||
3889 | !Pdrivers/gpu/drm/i915/i915_irq.c interrupt handling | ||
3890 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_irq_init intel_irq_init_hw intel_hpd_init | ||
3891 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_irq_fini | ||
3892 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_disable_interrupts | ||
3893 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_enable_interrupts | ||
3894 | </sect2> | ||
3895 | </sect1> | ||
3896 | <sect1> | ||
3791 | <title>Display Hardware Handling</title> | 3897 | <title>Display Hardware Handling</title> |
3792 | <para> | 3898 | <para> |
3793 | This section covers everything related to the display hardware including | 3899 | This section covers everything related to the display hardware including |
@@ -3804,6 +3910,18 @@ int num_ioctls;</synopsis> | |||
3804 | </para> | 3910 | </para> |
3805 | </sect2> | 3911 | </sect2> |
3806 | <sect2> | 3912 | <sect2> |
3913 | <title>Frontbuffer Tracking</title> | ||
3914 | !Pdrivers/gpu/drm/i915/intel_frontbuffer.c frontbuffer tracking | ||
3915 | !Idrivers/gpu/drm/i915/intel_frontbuffer.c | ||
3916 | !Fdrivers/gpu/drm/i915/intel_drv.h intel_frontbuffer_flip | ||
3917 | !Fdrivers/gpu/drm/i915/i915_gem.c i915_gem_track_fb | ||
3918 | </sect2> | ||
3919 | <sect2> | ||
3920 | <title>Display FIFO Underrun Reporting</title> | ||
3921 | !Pdrivers/gpu/drm/i915/intel_fifo_underrun.c fifo underrun handling | ||
3922 | !Idrivers/gpu/drm/i915/intel_fifo_underrun.c | ||
3923 | </sect2> | ||
3924 | <sect2> | ||
3807 | <title>Plane Configuration</title> | 3925 | <title>Plane Configuration</title> |
3808 | <para> | 3926 | <para> |
3809 | This section covers plane configuration and composition with the | 3927 | This section covers plane configuration and composition with the |
@@ -3823,6 +3941,16 @@ int num_ioctls;</synopsis> | |||
3823 | </para> | 3941 | </para> |
3824 | </sect2> | 3942 | </sect2> |
3825 | <sect2> | 3943 | <sect2> |
3944 | <title>High Definition Audio</title> | ||
3945 | !Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port | ||
3946 | !Idrivers/gpu/drm/i915/intel_audio.c | ||
3947 | </sect2> | ||
3948 | <sect2> | ||
3949 | <title>Panel Self Refresh PSR (PSR/SRD)</title> | ||
3950 | !Pdrivers/gpu/drm/i915/intel_psr.c Panel Self Refresh (PSR/SRD) | ||
3951 | !Idrivers/gpu/drm/i915/intel_psr.c | ||
3952 | </sect2> | ||
3953 | <sect2> | ||
3826 | <title>DPIO</title> | 3954 | <title>DPIO</title> |
3827 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO | 3955 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO |
3828 | <table id="dpiox2"> | 3956 | <table id="dpiox2"> |
@@ -3931,6 +4059,28 @@ int num_ioctls;</synopsis> | |||
3931 | !Idrivers/gpu/drm/i915/intel_lrc.c | 4059 | !Idrivers/gpu/drm/i915/intel_lrc.c |
3932 | </sect2> | 4060 | </sect2> |
3933 | </sect1> | 4061 | </sect1> |
4062 | |||
4063 | <sect1> | ||
4064 | <title> Tracing </title> | ||
4065 | <para> | ||
4066 | This sections covers all things related to the tracepoints implemented in | ||
4067 | the i915 driver. | ||
4068 | </para> | ||
4069 | <sect2> | ||
4070 | <title> i915_ppgtt_create and i915_ppgtt_release </title> | ||
4071 | !Pdrivers/gpu/drm/i915/i915_trace.h i915_ppgtt_create and i915_ppgtt_release tracepoints | ||
4072 | </sect2> | ||
4073 | <sect2> | ||
4074 | <title> i915_context_create and i915_context_free </title> | ||
4075 | !Pdrivers/gpu/drm/i915/i915_trace.h i915_context_create and i915_context_free tracepoints | ||
4076 | </sect2> | ||
4077 | <sect2> | ||
4078 | <title> switch_mm </title> | ||
4079 | !Pdrivers/gpu/drm/i915/i915_trace.h switch_mm tracepoint | ||
4080 | </sect2> | ||
4081 | </sect1> | ||
4082 | |||
3934 | </chapter> | 4083 | </chapter> |
4084 | !Cdrivers/gpu/drm/i915/i915_irq.c | ||
3935 | </part> | 4085 | </part> |
3936 | </book> | 4086 | </book> |
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml index 948ddaab592e..3018564ddfd9 100644 --- a/Documentation/DocBook/media/dvb/dvbproperty.xml +++ b/Documentation/DocBook/media/dvb/dvbproperty.xml | |||
@@ -120,8 +120,8 @@ struct dtv_properties { | |||
120 | </para> | 120 | </para> |
121 | <informaltable><tgroup cols="1"><tbody><row><entry | 121 | <informaltable><tgroup cols="1"><tbody><row><entry |
122 | align="char"> | 122 | align="char"> |
123 | <para>This ioctl call sets one or more frontend properties. This call only | 123 | <para>This ioctl call sets one or more frontend properties. This call |
124 | requires read-only access to the device.</para> | 124 | requires read/write access to the device.</para> |
125 | </entry> | 125 | </entry> |
126 | </row></tbody></tgroup></informaltable> | 126 | </row></tbody></tgroup></informaltable> |
127 | <para>SYNOPSIS | 127 | <para>SYNOPSIS |
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml index d2eb79e41a01..7ff01a23c2fe 100644 --- a/Documentation/DocBook/media/v4l/biblio.xml +++ b/Documentation/DocBook/media/v4l/biblio.xml | |||
@@ -178,6 +178,75 @@ Signal - NTSC for Studio Applications"</title> | |||
178 | 1125-Line High-Definition Production"</title> | 178 | 1125-Line High-Definition Production"</title> |
179 | </biblioentry> | 179 | </biblioentry> |
180 | 180 | ||
181 | <biblioentry id="srgb"> | ||
182 | <abbrev>sRGB</abbrev> | ||
183 | <authorgroup> | ||
184 | <corpauthor>International Electrotechnical Commission | ||
185 | (<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor> | ||
186 | </authorgroup> | ||
187 | <title>IEC 61966-2-1 ed1.0 "Multimedia systems and equipment - Colour measurement | ||
188 | and management - Part 2-1: Colour management - Default RGB colour space - sRGB"</title> | ||
189 | </biblioentry> | ||
190 | |||
191 | <biblioentry id="sycc"> | ||
192 | <abbrev>sYCC</abbrev> | ||
193 | <authorgroup> | ||
194 | <corpauthor>International Electrotechnical Commission | ||
195 | (<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor> | ||
196 | </authorgroup> | ||
197 | <title>IEC 61966-2-1-am1 ed1.0 "Amendment 1 - Multimedia systems and equipment - Colour measurement | ||
198 | and management - Part 2-1: Colour management - Default RGB colour space - sRGB"</title> | ||
199 | </biblioentry> | ||
200 | |||
201 | <biblioentry id="xvycc"> | ||
202 | <abbrev>xvYCC</abbrev> | ||
203 | <authorgroup> | ||
204 | <corpauthor>International Electrotechnical Commission | ||
205 | (<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor> | ||
206 | </authorgroup> | ||
207 | <title>IEC 61966-2-4 ed1.0 "Multimedia systems and equipment - Colour measurement | ||
208 | and management - Part 2-4: Colour management - Extended-gamut YCC colour space for video | ||
209 | applications - xvYCC"</title> | ||
210 | </biblioentry> | ||
211 | |||
212 | <biblioentry id="adobergb"> | ||
213 | <abbrev>AdobeRGB</abbrev> | ||
214 | <authorgroup> | ||
215 | <corpauthor>Adobe Systems Incorporated (<ulink url="http://www.adobe.com">http://www.adobe.com</ulink>)</corpauthor> | ||
216 | </authorgroup> | ||
217 | <title>Adobe© RGB (1998) Color Image Encoding Version 2005-05</title> | ||
218 | </biblioentry> | ||
219 | |||
220 | <biblioentry id="oprgb"> | ||
221 | <abbrev>opRGB</abbrev> | ||
222 | <authorgroup> | ||
223 | <corpauthor>International Electrotechnical Commission | ||
224 | (<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor> | ||
225 | </authorgroup> | ||
226 | <title>IEC 61966-2-5 "Multimedia systems and equipment - Colour measurement | ||
227 | and management - Part 2-5: Colour management - Optional RGB colour space - opRGB"</title> | ||
228 | </biblioentry> | ||
229 | |||
230 | <biblioentry id="itu2020"> | ||
231 | <abbrev>ITU BT.2020</abbrev> | ||
232 | <authorgroup> | ||
233 | <corpauthor>International Telecommunication Union (<ulink | ||
234 | url="http://www.itu.ch">http://www.itu.ch</ulink>)</corpauthor> | ||
235 | </authorgroup> | ||
236 | <title>ITU-R Recommendation BT.2020 (08/2012) "Parameter values for ultra-high | ||
237 | definition television systems for production and international programme exchange" | ||
238 | </title> | ||
239 | </biblioentry> | ||
240 | |||
241 | <biblioentry id="tech3213"> | ||
242 | <abbrev>EBU Tech 3213</abbrev> | ||
243 | <authorgroup> | ||
244 | <corpauthor>European Broadcast Union (<ulink | ||
245 | url="http://www.ebu.ch">http://www.ebu.ch</ulink>)</corpauthor> | ||
246 | </authorgroup> | ||
247 | <title>E.B.U. Standard for Chromaticity Tolerances for Studio Monitors"</title> | ||
248 | </biblioentry> | ||
249 | |||
181 | <biblioentry id="iec62106"> | 250 | <biblioentry id="iec62106"> |
182 | <abbrev>IEC 62106</abbrev> | 251 | <abbrev>IEC 62106</abbrev> |
183 | <authorgroup> | 252 | <authorgroup> |
@@ -266,4 +335,20 @@ in the frequency range from 87,5 to 108,0 MHz</title> | |||
266 | <subtitle>Version 1, Revision 2</subtitle> | 335 | <subtitle>Version 1, Revision 2</subtitle> |
267 | </biblioentry> | 336 | </biblioentry> |
268 | 337 | ||
338 | <biblioentry id="poynton"> | ||
339 | <abbrev>poynton</abbrev> | ||
340 | <authorgroup> | ||
341 | <corpauthor>Charles Poynton</corpauthor> | ||
342 | </authorgroup> | ||
343 | <title>Digital Video and HDTV, Algorithms and Interfaces</title> | ||
344 | </biblioentry> | ||
345 | |||
346 | <biblioentry id="colimg"> | ||
347 | <abbrev>colimg</abbrev> | ||
348 | <authorgroup> | ||
349 | <corpauthor>Erik Reinhard et al.</corpauthor> | ||
350 | </authorgroup> | ||
351 | <title>Color Imaging: Fundamentals and Applications</title> | ||
352 | </biblioentry> | ||
353 | |||
269 | </bibliography> | 354 | </bibliography> |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 0a2debfa68f6..350dfb3d71ea 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2579,6 +2579,18 @@ fields changed from _s32 to _u32. | |||
2579 | </orderedlist> | 2579 | </orderedlist> |
2580 | </section> | 2580 | </section> |
2581 | 2581 | ||
2582 | <section> | ||
2583 | <title>V4L2 in Linux 3.19</title> | ||
2584 | <orderedlist> | ||
2585 | <listitem> | ||
2586 | <para>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding; | ||
2587 | and &v4l2-quantization; fields to &v4l2-pix-format;, &v4l2-pix-format-mplane; | ||
2588 | and &v4l2-mbus-framefmt;. | ||
2589 | </para> | ||
2590 | </listitem> | ||
2591 | </orderedlist> | ||
2592 | </section> | ||
2593 | |||
2582 | <section id="other"> | 2594 | <section id="other"> |
2583 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2595 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2584 | 2596 | ||
diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml index d15aaf83f56f..4f0ba58c9bd9 100644 --- a/Documentation/DocBook/media/v4l/dev-subdev.xml +++ b/Documentation/DocBook/media/v4l/dev-subdev.xml | |||
@@ -195,53 +195,59 @@ | |||
195 | <title>Sample Pipeline Configuration</title> | 195 | <title>Sample Pipeline Configuration</title> |
196 | <tgroup cols="3"> | 196 | <tgroup cols="3"> |
197 | <colspec colname="what"/> | 197 | <colspec colname="what"/> |
198 | <colspec colname="sensor-0" /> | 198 | <colspec colname="sensor-0 format" /> |
199 | <colspec colname="frontend-0" /> | 199 | <colspec colname="frontend-0 format" /> |
200 | <colspec colname="frontend-1" /> | 200 | <colspec colname="frontend-1 format" /> |
201 | <colspec colname="scaler-0" /> | 201 | <colspec colname="scaler-0 format" /> |
202 | <colspec colname="scaler-1" /> | 202 | <colspec colname="scaler-0 compose" /> |
203 | <colspec colname="scaler-1 format" /> | ||
203 | <thead> | 204 | <thead> |
204 | <row> | 205 | <row> |
205 | <entry></entry> | 206 | <entry></entry> |
206 | <entry>Sensor/0</entry> | 207 | <entry>Sensor/0 format</entry> |
207 | <entry>Frontend/0</entry> | 208 | <entry>Frontend/0 format</entry> |
208 | <entry>Frontend/1</entry> | 209 | <entry>Frontend/1 format</entry> |
209 | <entry>Scaler/0</entry> | 210 | <entry>Scaler/0 format</entry> |
210 | <entry>Scaler/1</entry> | 211 | <entry>Scaler/0 compose selection rectangle</entry> |
212 | <entry>Scaler/1 format</entry> | ||
211 | </row> | 213 | </row> |
212 | </thead> | 214 | </thead> |
213 | <tbody valign="top"> | 215 | <tbody valign="top"> |
214 | <row> | 216 | <row> |
215 | <entry>Initial state</entry> | 217 | <entry>Initial state</entry> |
216 | <entry>2048x1536</entry> | 218 | <entry>2048x1536/SGRBG8_1X8</entry> |
217 | <entry>-</entry> | 219 | <entry>(default)</entry> |
218 | <entry>-</entry> | 220 | <entry>(default)</entry> |
219 | <entry>-</entry> | 221 | <entry>(default)</entry> |
220 | <entry>-</entry> | 222 | <entry>(default)</entry> |
223 | <entry>(default)</entry> | ||
221 | </row> | 224 | </row> |
222 | <row> | 225 | <row> |
223 | <entry>Configure frontend input</entry> | 226 | <entry>Configure frontend sink format</entry> |
224 | <entry>2048x1536</entry> | 227 | <entry>2048x1536/SGRBG8_1X8</entry> |
225 | <entry><emphasis>2048x1536</emphasis></entry> | 228 | <entry><emphasis>2048x1536/SGRBG8_1X8</emphasis></entry> |
226 | <entry><emphasis>2046x1534</emphasis></entry> | 229 | <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry> |
227 | <entry>-</entry> | 230 | <entry>(default)</entry> |
228 | <entry>-</entry> | 231 | <entry>(default)</entry> |
232 | <entry>(default)</entry> | ||
229 | </row> | 233 | </row> |
230 | <row> | 234 | <row> |
231 | <entry>Configure scaler input</entry> | 235 | <entry>Configure scaler sink format</entry> |
232 | <entry>2048x1536</entry> | 236 | <entry>2048x1536/SGRBG8_1X8</entry> |
233 | <entry>2048x1536</entry> | 237 | <entry>2048x1536/SGRBG8_1X8</entry> |
234 | <entry>2046x1534</entry> | 238 | <entry>2046x1534/SGRBG8_1X8</entry> |
235 | <entry><emphasis>2046x1534</emphasis></entry> | 239 | <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry> |
236 | <entry><emphasis>2046x1534</emphasis></entry> | 240 | <entry><emphasis>0,0/2046x1534</emphasis></entry> |
241 | <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry> | ||
237 | </row> | 242 | </row> |
238 | <row> | 243 | <row> |
239 | <entry>Configure scaler output</entry> | 244 | <entry>Configure scaler sink compose selection</entry> |
240 | <entry>2048x1536</entry> | 245 | <entry>2048x1536/SGRBG8_1X8</entry> |
241 | <entry>2048x1536</entry> | 246 | <entry>2048x1536/SGRBG8_1X8</entry> |
242 | <entry>2046x1534</entry> | 247 | <entry>2046x1534/SGRBG8_1X8</entry> |
243 | <entry>2046x1534</entry> | 248 | <entry>2046x1534/SGRBG8_1X8</entry> |
244 | <entry><emphasis>1280x960</emphasis></entry> | 249 | <entry><emphasis>0,0/1280x960</emphasis></entry> |
250 | <entry><emphasis>1280x960/SGRBG8_1X8</emphasis></entry> | ||
245 | </row> | 251 | </row> |
246 | </tbody> | 252 | </tbody> |
247 | </tgroup> | 253 | </tgroup> |
@@ -249,19 +255,30 @@ | |||
249 | 255 | ||
250 | <para> | 256 | <para> |
251 | <orderedlist> | 257 | <orderedlist> |
252 | <listitem><para>Initial state. The sensor output is set to its native 3MP | 258 | <listitem><para>Initial state. The sensor source pad format is |
253 | resolution. Resolutions on the host frontend and scaler input and output | 259 | set to its native 3MP size and V4L2_MBUS_FMT_SGRBG8_1X8 |
254 | pads are undefined.</para></listitem> | 260 | media bus code. Formats on the host frontend and scaler sink |
255 | <listitem><para>The application configures the frontend input pad resolution to | 261 | and source pads have the default values, as well as the |
256 | 2048x1536. The driver propagates the format to the frontend output pad. | 262 | compose rectangle on the scaler's sink pad.</para></listitem> |
257 | Note that the propagated output format can be different, as in this case, | 263 | |
258 | than the input format, as the hardware might need to crop pixels (for | 264 | <listitem><para>The application configures the frontend sink |
259 | instance when converting a Bayer filter pattern to RGB or YUV).</para></listitem> | 265 | pad format's size to 2048x1536 and its media bus code to |
260 | <listitem><para>The application configures the scaler input pad resolution to | 266 | V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the format to |
261 | 2046x1534 to match the frontend output resolution. The driver propagates | 267 | the frontend source pad.</para></listitem> |
262 | the format to the scaler output pad.</para></listitem> | 268 | |
263 | <listitem><para>The application configures the scaler output pad resolution to | 269 | <listitem><para>The application configures the scaler sink pad |
264 | 1280x960.</para></listitem> | 270 | format's size to 2046x1534 and the media bus code to |
271 | V4L2_MBUS_FMT_SGRBG_1X8 to match the frontend source size and | ||
272 | media bus code. The media bus code on the sink pad is set to | ||
273 | V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the size to the | ||
274 | compose selection rectangle on the scaler's sink pad, and the | ||
275 | format to the scaler source pad.</para></listitem> | ||
276 | |||
277 | <listitem><para>The application configures the size of the compose | ||
278 | selection rectangle of the scaler's sink pad 1280x960. The driver | ||
279 | propagates the size to the scaler's source pad | ||
280 | format.</para></listitem> | ||
281 | |||
265 | </orderedlist> | 282 | </orderedlist> |
266 | </para> | 283 | </para> |
267 | 284 | ||
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index e5e8325aa3d7..1c17f802b471 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -1422,7 +1422,10 @@ one of the <constant>V4L2_FIELD_NONE</constant>, | |||
1422 | <constant>V4L2_FIELD_BOTTOM</constant>, or | 1422 | <constant>V4L2_FIELD_BOTTOM</constant>, or |
1423 | <constant>V4L2_FIELD_INTERLACED</constant> formats is acceptable. | 1423 | <constant>V4L2_FIELD_INTERLACED</constant> formats is acceptable. |
1424 | Drivers choose depending on hardware capabilities or e. g. the | 1424 | Drivers choose depending on hardware capabilities or e. g. the |
1425 | requested image size, and return the actual field order. &v4l2-buffer; | 1425 | requested image size, and return the actual field order. Drivers must |
1426 | never return <constant>V4L2_FIELD_ANY</constant>. If multiple | ||
1427 | field orders are possible the driver must choose one of the possible | ||
1428 | field orders during &VIDIOC-S-FMT; or &VIDIOC-TRY-FMT;. &v4l2-buffer; | ||
1426 | <structfield>field</structfield> can never be | 1429 | <structfield>field</structfield> can never be |
1427 | <constant>V4L2_FIELD_ANY</constant>.</entry> | 1430 | <constant>V4L2_FIELD_ANY</constant>.</entry> |
1428 | </row> | 1431 | </row> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index df5b23d46552..d5eca4b8f74b 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
@@ -138,9 +138,25 @@ applicable values.</para></entry> | |||
138 | <row> | 138 | <row> |
139 | <entry>__u32</entry> | 139 | <entry>__u32</entry> |
140 | <entry><structfield>flags</structfield></entry> | 140 | <entry><structfield>flags</structfield></entry> |
141 | <entry>Flags set by the application or driver, see <xref | 141 | <entry>Flags set by the application or driver, see <xref |
142 | linkend="format-flags" />.</entry> | 142 | linkend="format-flags" />.</entry> |
143 | </row> | 143 | </row> |
144 | <row> | ||
145 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
146 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
147 | <entry>This information supplements the | ||
148 | <structfield>colorspace</structfield> and must be set by the driver for | ||
149 | capture streams and by the application for output streams, | ||
150 | see <xref linkend="colorspaces" />.</entry> | ||
151 | </row> | ||
152 | <row> | ||
153 | <entry>&v4l2-quantization;</entry> | ||
154 | <entry><structfield>quantization</structfield></entry> | ||
155 | <entry>This information supplements the | ||
156 | <structfield>colorspace</structfield> and must be set by the driver for | ||
157 | capture streams and by the application for output streams, | ||
158 | see <xref linkend="colorspaces" />.</entry> | ||
159 | </row> | ||
144 | </tbody> | 160 | </tbody> |
145 | </tgroup> | 161 | </tgroup> |
146 | </table> | 162 | </table> |
@@ -232,9 +248,25 @@ codes can be used.</entry> | |||
232 | <entry>Flags set by the application or driver, see <xref | 248 | <entry>Flags set by the application or driver, see <xref |
233 | linkend="format-flags" />.</entry> | 249 | linkend="format-flags" />.</entry> |
234 | </row> | 250 | </row> |
251 | <row> | ||
252 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
253 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
254 | <entry>This information supplements the | ||
255 | <structfield>colorspace</structfield> and must be set by the driver for | ||
256 | capture streams and by the application for output streams, | ||
257 | see <xref linkend="colorspaces" />.</entry> | ||
258 | </row> | ||
259 | <row> | ||
260 | <entry>&v4l2-quantization;</entry> | ||
261 | <entry><structfield>quantization</structfield></entry> | ||
262 | <entry>This information supplements the | ||
263 | <structfield>colorspace</structfield> and must be set by the driver for | ||
264 | capture streams and by the application for output streams, | ||
265 | see <xref linkend="colorspaces" />.</entry> | ||
266 | </row> | ||
235 | <row> | 267 | <row> |
236 | <entry>__u8</entry> | 268 | <entry>__u8</entry> |
237 | <entry><structfield>reserved[10]</structfield></entry> | 269 | <entry><structfield>reserved[8]</structfield></entry> |
238 | <entry>Reserved for future extensions. Should be zeroed by the | 270 | <entry>Reserved for future extensions. Should be zeroed by the |
239 | application.</entry> | 271 | application.</entry> |
240 | </row> | 272 | </row> |
@@ -296,345 +328,1005 @@ in the 2-planar version or with each component in its own buffer in the | |||
296 | <section id="colorspaces"> | 328 | <section id="colorspaces"> |
297 | <title>Colorspaces</title> | 329 | <title>Colorspaces</title> |
298 | 330 | ||
299 | <para>[intro]</para> | 331 | <para>'Color' is a very complex concept and depends on physics, chemistry and |
332 | biology. Just because you have three numbers that describe the 'red', 'green' | ||
333 | and 'blue' components of the color of a pixel does not mean that you can accurately | ||
334 | display that color. A colorspace defines what it actually <emphasis>means</emphasis> | ||
335 | to have an RGB value of e.g. (255, 0, 0). That is, which color should be | ||
336 | reproduced on the screen in a perfectly calibrated environment.</para> | ||
300 | 337 | ||
301 | <!-- See proposal by Billy Biggs, video4linux-list@redhat.com | 338 | <para>In order to do that we first need to have a good definition of |
302 | on 11 Oct 2002, subject: "Re: [V4L] Re: v4l2 api", and | 339 | color, i.e. some way to uniquely and unambiguously define a color so that someone |
303 | http://vektor.theorem.ca/graphics/ycbcr/ and | 340 | else can reproduce it. Human color vision is trichromatic since the human eye has |
304 | http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html --> | 341 | color receptors that are sensitive to three different wavelengths of light. Hence |
342 | the need to use three numbers to describe color. Be glad you are not a mantis shrimp | ||
343 | as those are sensitive to 12 different wavelengths, so instead of RGB we would be | ||
344 | using the ABCDEFGHIJKL colorspace...</para> | ||
305 | 345 | ||
306 | <para> | 346 | <para>Color exists only in the eye and brain and is the result of how strongly |
307 | <variablelist> | 347 | color receptors are stimulated. This is based on the Spectral |
308 | <varlistentry> | 348 | Power Distribution (SPD) which is a graph showing the intensity (radiant power) |
309 | <term>Gamma Correction</term> | 349 | of the light at wavelengths covering the visible spectrum as it enters the eye. |
310 | <listitem> | 350 | The science of colorimetry is about the relationship between the SPD and color as |
311 | <para>[to do]</para> | 351 | perceived by the human brain.</para> |
312 | <para>E'<subscript>R</subscript> = f(R)</para> | 352 | |
313 | <para>E'<subscript>G</subscript> = f(G)</para> | 353 | <para>Since the human eye has only three color receptors it is perfectly |
314 | <para>E'<subscript>B</subscript> = f(B)</para> | 354 | possible that different SPDs will result in the same stimulation of those receptors |
315 | </listitem> | 355 | and are perceived as the same color, even though the SPD of the light is |
316 | </varlistentry> | 356 | different.</para> |
317 | <varlistentry> | 357 | |
318 | <term>Construction of luminance and color-difference | 358 | <para>In the 1920s experiments were devised to determine the relationship |
319 | signals</term> | 359 | between SPDs and the perceived color and that resulted in the CIE 1931 standard |
320 | <listitem> | 360 | that defines spectral weighting functions that model the perception of color. |
321 | <para>[to do]</para> | 361 | Specifically that standard defines functions that can take an SPD and calculate |
322 | <para>E'<subscript>Y</subscript> = | 362 | the stimulus for each color receptor. After some further mathematical transforms |
323 | Coeff<subscript>R</subscript> E'<subscript>R</subscript> | 363 | these stimuli are known as the <emphasis>CIE XYZ tristimulus</emphasis> values |
324 | + Coeff<subscript>G</subscript> E'<subscript>G</subscript> | 364 | and these X, Y and Z values describe a color as perceived by a human unambiguously. |
325 | + Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> | 365 | These X, Y and Z values are all in the range [0…1].</para> |
326 | <para>(E'<subscript>R</subscript> - E'<subscript>Y</subscript>) = E'<subscript>R</subscript> | 366 | |
327 | - Coeff<subscript>R</subscript> E'<subscript>R</subscript> | 367 | <para>The Y value in the CIE XYZ colorspace corresponds to luminance. Often |
328 | - Coeff<subscript>G</subscript> E'<subscript>G</subscript> | 368 | the CIE XYZ colorspace is transformed to the normalized CIE xyY colorspace:</para> |
329 | - Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> | 369 | |
330 | <para>(E'<subscript>B</subscript> - E'<subscript>Y</subscript>) = E'<subscript>B</subscript> | 370 | <para>x = X / (X + Y + Z)</para> |
331 | - Coeff<subscript>R</subscript> E'<subscript>R</subscript> | 371 | <para>y = Y / (X + Y + Z)</para> |
332 | - Coeff<subscript>G</subscript> E'<subscript>G</subscript> | 372 | |
333 | - Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> | 373 | <para>The x and y values are the chromaticity coordinates and can be used to |
334 | </listitem> | 374 | define a color without the luminance component Y. It is very confusing to |
335 | </varlistentry> | 375 | have such similar names for these colorspaces. Just be aware that if colors |
336 | <varlistentry> | 376 | are specified with lower case 'x' and 'y', then the CIE xyY colorspace is |
337 | <term>Re-normalized color-difference signals</term> | 377 | used. Upper case 'X' and 'Y' refer to the CIE XYZ colorspace. Also, y has nothing |
338 | <listitem> | 378 | to do with luminance. Together x and y specify a color, and Y the luminance. |
339 | <para>The color-difference signals are scaled back to unity | 379 | That is really all you need to remember from a practical point of view. At |
340 | range [-0.5;+0.5]:</para> | 380 | the end of this section you will find reading resources that go into much more |
341 | <para>K<subscript>B</subscript> = 0.5 / (1 - Coeff<subscript>B</subscript>)</para> | 381 | detail if you are interested. |
342 | <para>K<subscript>R</subscript> = 0.5 / (1 - Coeff<subscript>R</subscript>)</para> | 382 | </para> |
343 | <para>P<subscript>B</subscript> = | 383 | |
344 | K<subscript>B</subscript> (E'<subscript>B</subscript> - E'<subscript>Y</subscript>) = | 384 | <para>A monitor or TV will reproduce colors by emitting light at three |
345 | 0.5 (Coeff<subscript>R</subscript> / Coeff<subscript>B</subscript>) E'<subscript>R</subscript> | 385 | different wavelengths, the combination of which will stimulate the color receptors |
346 | + 0.5 (Coeff<subscript>G</subscript> / Coeff<subscript>B</subscript>) E'<subscript>G</subscript> | 386 | in the eye and thus cause the perception of color. Historically these wavelengths |
347 | + 0.5 E'<subscript>B</subscript></para> | 387 | were defined by the red, green and blue phosphors used in the displays. These |
348 | <para>P<subscript>R</subscript> = | 388 | <emphasis>color primaries</emphasis> are part of what defines a colorspace.</para> |
349 | K<subscript>R</subscript> (E'<subscript>R</subscript> - E'<subscript>Y</subscript>) = | 389 | |
350 | 0.5 E'<subscript>R</subscript> | 390 | <para>Different display devices will have different primaries and some |
351 | + 0.5 (Coeff<subscript>G</subscript> / Coeff<subscript>R</subscript>) E'<subscript>G</subscript> | 391 | primaries are more suitable for some display technologies than others. This has |
352 | + 0.5 (Coeff<subscript>B</subscript> / Coeff<subscript>R</subscript>) E'<subscript>B</subscript></para> | 392 | resulted in a variety of colorspaces that are used for different display |
353 | </listitem> | 393 | technologies or uses. To define a colorspace you need to define the three |
354 | </varlistentry> | 394 | color primaries (these are typically defined as x, y chromaticity coordinates |
355 | <varlistentry> | 395 | from the CIE xyY colorspace) but also the white reference: that is the color obtained |
356 | <term>Quantization</term> | 396 | when all three primaries are at maximum power. This determines the relative power |
357 | <listitem> | 397 | or energy of the primaries. This is usually chosen to be close to daylight which has |
358 | <para>[to do]</para> | 398 | been defined as the CIE D65 Illuminant.</para> |
359 | <para>Y' = (Lum. Levels - 1) · E'<subscript>Y</subscript> + Lum. Offset</para> | 399 | |
360 | <para>C<subscript>B</subscript> = (Chrom. Levels - 1) | 400 | <para>To recapitulate: the CIE XYZ colorspace uniquely identifies colors. |
361 | · P<subscript>B</subscript> + Chrom. Offset</para> | 401 | Other colorspaces are defined by three chromaticity coordinates defined in the |
362 | <para>C<subscript>R</subscript> = (Chrom. Levels - 1) | 402 | CIE xyY colorspace. Based on those a 3x3 matrix can be constructed that |
363 | · P<subscript>R</subscript> + Chrom. Offset</para> | 403 | transforms CIE XYZ colors to colors in the new colorspace. |
364 | <para>Rounding to the nearest integer and clamping to the range | 404 | </para> |
365 | [0;255] finally yields the digital color components Y'CbCr | 405 | |
366 | stored in YUV images.</para> | 406 | <para>Both the CIE XYZ and the RGB colorspace that are derived from the |
367 | </listitem> | 407 | specific chromaticity primaries are linear colorspaces. But neither the eye, |
368 | </varlistentry> | 408 | nor display technology is linear. Doubling the values of all components in |
369 | </variablelist> | 409 | the linear colorspace will not be perceived as twice the intensity of the color. |
370 | </para> | 410 | So each colorspace also defines a transfer function that takes a linear color |
371 | 411 | component value and transforms it to the non-linear component value, which is a | |
372 | <example> | 412 | closer match to the non-linear performance of both the eye and displays. Linear |
373 | <title>ITU-R Rec. BT.601 color conversion</title> | 413 | component values are denoted RGB, non-linear are denoted as R'G'B'. In general |
374 | 414 | colors used in graphics are all R'G'B', except in openGL which uses linear RGB. | |
375 | <para>Forward Transformation</para> | 415 | Special care should be taken when dealing with openGL to provide linear RGB colors |
376 | 416 | or to use the built-in openGL support to apply the inverse transfer function.</para> | |
377 | <programlisting> | 417 | |
378 | int ER, EG, EB; /* gamma corrected RGB input [0;255] */ | 418 | <para>The final piece that defines a colorspace is a function that |
379 | int Y1, Cb, Cr; /* output [0;255] */ | 419 | transforms non-linear R'G'B' to non-linear Y'CbCr. This function is determined |
380 | 420 | by the so-called luma coefficients. There may be multiple possible Y'CbCr | |
381 | double r, g, b; /* temporaries */ | 421 | encodings allowed for the same colorspace. Many encodings of color |
382 | double y1, pb, pr; | 422 | prefer to use luma (Y') and chroma (CbCr) instead of R'G'B'. Since the human |
383 | 423 | eye is more sensitive to differences in luminance than in color this encoding | |
384 | int | 424 | allows one to reduce the amount of color information compared to the luma |
385 | clamp (double x) | 425 | data. Note that the luma (Y') is unrelated to the Y in the CIE XYZ colorspace. |
386 | { | 426 | Also note that Y'CbCr is often called YCbCr or YUV even though these are |
387 | int r = x; /* round to nearest */ | 427 | strictly speaking wrong.</para> |
388 | 428 | ||
389 | if (r < 0) return 0; | 429 | <para>Sometimes people confuse Y'CbCr as being a colorspace. This is not |
390 | else if (r > 255) return 255; | 430 | correct, it is just an encoding of an R'G'B' color into luma and chroma |
391 | else return r; | 431 | values. The underlying colorspace that is associated with the R'G'B' color |
392 | } | 432 | is also associated with the Y'CbCr color.</para> |
393 | 433 | ||
394 | r = ER / 255.0; | 434 | <para>The final step is how the RGB, R'G'B' or Y'CbCr values are |
395 | g = EG / 255.0; | 435 | quantized. The CIE XYZ colorspace where X, Y and Z are in the range |
396 | b = EB / 255.0; | 436 | [0…1] describes all colors that humans can perceive, but the transform to |
397 | 437 | another colorspace will produce colors that are outside the [0…1] range. | |
398 | y1 = 0.299 * r + 0.587 * g + 0.114 * b; | 438 | Once clamped to the [0…1] range those colors can no longer be reproduced |
399 | pb = -0.169 * r - 0.331 * g + 0.5 * b; | 439 | in that colorspace. This clamping is what reduces the extent or gamut of the |
400 | pr = 0.5 * r - 0.419 * g - 0.081 * b; | 440 | colorspace. How the range of [0…1] is translated to integer values in the |
401 | 441 | range of [0…255] (or higher, depending on the color depth) is called the | |
402 | Y1 = clamp (219 * y1 + 16); | 442 | quantization. This is <emphasis>not</emphasis> part of the colorspace |
403 | Cb = clamp (224 * pb + 128); | 443 | definition. In practice RGB or R'G'B' values are full range, i.e. they |
404 | Cr = clamp (224 * pr + 128); | 444 | use the full [0…255] range. Y'CbCr values on the other hand are limited |
405 | 445 | range with Y' using [16…235] and Cb and Cr using [16…240].</para> | |
406 | /* or shorter */ | 446 | |
407 | 447 | <para>Unfortunately, in some cases limited range RGB is also used | |
408 | y1 = 0.299 * ER + 0.587 * EG + 0.114 * EB; | 448 | where the components use the range [16…235]. And full range Y'CbCr also exists |
409 | 449 | using the [0…255] range.</para> | |
410 | Y1 = clamp ( (219 / 255.0) * y1 + 16); | 450 | |
411 | Cb = clamp (((224 / 255.0) / (2 - 2 * 0.114)) * (EB - y1) + 128); | 451 | <para>In order to correctly interpret a color you need to know the |
412 | Cr = clamp (((224 / 255.0) / (2 - 2 * 0.299)) * (ER - y1) + 128); | 452 | quantization range, whether it is R'G'B' or Y'CbCr, the used Y'CbCr encoding |
413 | </programlisting> | 453 | and the colorspace. |
414 | 454 | From that information you can calculate the corresponding CIE XYZ color | |
415 | <para>Inverse Transformation</para> | 455 | and map that again to whatever colorspace your display device uses.</para> |
416 | 456 | ||
417 | <programlisting> | 457 | <para>The colorspace definition itself consists of the three |
418 | int Y1, Cb, Cr; /* gamma pre-corrected input [0;255] */ | 458 | chromaticity primaries, the white reference chromaticity, a transfer |
419 | int ER, EG, EB; /* output [0;255] */ | 459 | function and the luma coefficients needed to transform R'G'B' to Y'CbCr. While |
420 | 460 | some colorspace standards correctly define all four, quite often the colorspace | |
421 | double r, g, b; /* temporaries */ | 461 | standard only defines some, and you have to rely on other standards for |
422 | double y1, pb, pr; | 462 | the missing pieces. The fact that colorspaces are often a mix of different |
423 | 463 | standards also led to very confusing naming conventions where the name of | |
424 | int | 464 | a standard was used to name a colorspace when in fact that standard was |
425 | clamp (double x) | 465 | part of various other colorspaces as well.</para> |
426 | { | 466 | |
427 | int r = x; /* round to nearest */ | 467 | <para>If you want to read more about colors and colorspaces, then the |
428 | 468 | following resources are useful: <xref linkend="poynton" /> is a good practical | |
429 | if (r < 0) return 0; | 469 | book for video engineers, <xref linkend="colimg" /> has a much broader scope and |
430 | else if (r > 255) return 255; | 470 | describes many more aspects of color (physics, chemistry, biology, etc.). |
431 | else return r; | 471 | The <ulink url="http://www.brucelindbloom.com">http://www.brucelindbloom.com</ulink> |
432 | } | 472 | website is an excellent resource, especially with respect to the mathematics behind |
433 | 473 | colorspace conversions. The wikipedia <ulink url="http://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space">CIE 1931 colorspace</ulink> article | |
434 | y1 = (Y1 - 16) / 219.0; | 474 | is also very useful.</para> |
435 | pb = (Cb - 128) / 224.0; | 475 | </section> |
436 | pr = (Cr - 128) / 224.0; | 476 | |
437 | 477 | <section> | |
438 | r = 1.0 * y1 + 0 * pb + 1.402 * pr; | 478 | <title>Defining Colorspaces in V4L2</title> |
439 | g = 1.0 * y1 - 0.344 * pb - 0.714 * pr; | 479 | <para>In V4L2 colorspaces are defined by three values. The first is the colorspace |
440 | b = 1.0 * y1 + 1.772 * pb + 0 * pr; | 480 | identifier (&v4l2-colorspace;) which defines the chromaticities, the transfer |
441 | 481 | function, the default Y'CbCr encoding and the default quantization method. The second | |
442 | ER = clamp (r * 255); /* [ok? one should prob. limit y1,pb,pr] */ | 482 | is the Y'CbCr encoding identifier (&v4l2-ycbcr-encoding;) to specify non-standard |
443 | EG = clamp (g * 255); | 483 | Y'CbCr encodings and the third is the quantization identifier (&v4l2-quantization;) |
444 | EB = clamp (b * 255); | 484 | to specify non-standard quantization methods. Most of the time only the colorspace |
445 | </programlisting> | 485 | field of &v4l2-pix-format; or &v4l2-pix-format-mplane; needs to be filled in. Note |
446 | </example> | 486 | that the default R'G'B' quantization is always full range for all colorspaces, |
447 | 487 | so this won't be mentioned explicitly for each colorspace description.</para> | |
448 | <table pgwide="1" id="v4l2-colorspace" orient="land"> | 488 | |
449 | <title>enum v4l2_colorspace</title> | 489 | <table pgwide="1" frame="none" id="v4l2-colorspace"> |
450 | <tgroup cols="11" align="center"> | 490 | <title>V4L2 Colorspaces</title> |
451 | <colspec align="left" /> | 491 | <tgroup cols="2" align="left"> |
452 | <colspec align="center" /> | 492 | &cs-def; |
453 | <colspec align="left" /> | ||
454 | <colspec colname="cr" /> | ||
455 | <colspec colname="cg" /> | ||
456 | <colspec colname="cb" /> | ||
457 | <colspec colname="wp" /> | ||
458 | <colspec colname="gc" /> | ||
459 | <colspec colname="lum" /> | ||
460 | <colspec colname="qy" /> | ||
461 | <colspec colname="qc" /> | ||
462 | <spanspec namest="cr" nameend="cb" spanname="chrom" /> | ||
463 | <spanspec namest="qy" nameend="qc" spanname="quant" /> | ||
464 | <spanspec namest="lum" nameend="qc" spanname="spam" /> | ||
465 | <thead> | 493 | <thead> |
466 | <row> | 494 | <row> |
467 | <entry morerows="1">Identifier</entry> | 495 | <entry>Identifier</entry> |
468 | <entry morerows="1">Value</entry> | 496 | <entry>Details</entry> |
469 | <entry morerows="1">Description</entry> | ||
470 | <entry spanname="chrom">Chromaticities<footnote> | ||
471 | <para>The coordinates of the color primaries are | ||
472 | given in the CIE system (1931)</para> | ||
473 | </footnote></entry> | ||
474 | <entry morerows="1">White Point</entry> | ||
475 | <entry morerows="1">Gamma Correction</entry> | ||
476 | <entry morerows="1">Luminance E'<subscript>Y</subscript></entry> | ||
477 | <entry spanname="quant">Quantization</entry> | ||
478 | </row> | ||
479 | <row> | ||
480 | <entry>Red</entry> | ||
481 | <entry>Green</entry> | ||
482 | <entry>Blue</entry> | ||
483 | <entry>Y'</entry> | ||
484 | <entry>Cb, Cr</entry> | ||
485 | </row> | 497 | </row> |
486 | </thead> | 498 | </thead> |
487 | <tbody valign="top"> | 499 | <tbody valign="top"> |
488 | <row> | 500 | <row> |
489 | <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry> | 501 | <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry> |
490 | <entry>1</entry> | 502 | <entry>See <xref linkend="col-smpte-170m" />.</entry> |
491 | <entry>NTSC/PAL according to <xref linkend="smpte170m" />, | ||
492 | <xref linkend="itu601" /></entry> | ||
493 | <entry>x = 0.630, y = 0.340</entry> | ||
494 | <entry>x = 0.310, y = 0.595</entry> | ||
495 | <entry>x = 0.155, y = 0.070</entry> | ||
496 | <entry>x = 0.3127, y = 0.3290, | ||
497 | Illuminant D<subscript>65</subscript></entry> | ||
498 | <entry>E' = 4.5 I for I ≤0.018, | ||
499 | 1.099 I<superscript>0.45</superscript> - 0.099 for 0.018 < I</entry> | ||
500 | <entry>0.299 E'<subscript>R</subscript> | ||
501 | + 0.587 E'<subscript>G</subscript> | ||
502 | + 0.114 E'<subscript>B</subscript></entry> | ||
503 | <entry>219 E'<subscript>Y</subscript> + 16</entry> | ||
504 | <entry>224 P<subscript>B,R</subscript> + 128</entry> | ||
505 | </row> | 503 | </row> |
506 | <row> | 504 | <row> |
507 | <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> | 505 | <entry><constant>V4L2_COLORSPACE_REC709</constant></entry> |
508 | <entry>2</entry> | 506 | <entry>See <xref linkend="col-rec709" />.</entry> |
509 | <entry>1125-Line (US) HDTV, see <xref | ||
510 | linkend="smpte240m" /></entry> | ||
511 | <entry>x = 0.630, y = 0.340</entry> | ||
512 | <entry>x = 0.310, y = 0.595</entry> | ||
513 | <entry>x = 0.155, y = 0.070</entry> | ||
514 | <entry>x = 0.3127, y = 0.3290, | ||
515 | Illuminant D<subscript>65</subscript></entry> | ||
516 | <entry>E' = 4 I for I ≤0.0228, | ||
517 | 1.1115 I<superscript>0.45</superscript> - 0.1115 for 0.0228 < I</entry> | ||
518 | <entry>0.212 E'<subscript>R</subscript> | ||
519 | + 0.701 E'<subscript>G</subscript> | ||
520 | + 0.087 E'<subscript>B</subscript></entry> | ||
521 | <entry>219 E'<subscript>Y</subscript> + 16</entry> | ||
522 | <entry>224 P<subscript>B,R</subscript> + 128</entry> | ||
523 | </row> | 507 | </row> |
524 | <row> | 508 | <row> |
525 | <entry><constant>V4L2_COLORSPACE_REC709</constant></entry> | 509 | <entry><constant>V4L2_COLORSPACE_SRGB</constant></entry> |
526 | <entry>3</entry> | 510 | <entry>See <xref linkend="col-srgb" />.</entry> |
527 | <entry>HDTV and modern devices, see <xref | ||
528 | linkend="itu709" /></entry> | ||
529 | <entry>x = 0.640, y = 0.330</entry> | ||
530 | <entry>x = 0.300, y = 0.600</entry> | ||
531 | <entry>x = 0.150, y = 0.060</entry> | ||
532 | <entry>x = 0.3127, y = 0.3290, | ||
533 | Illuminant D<subscript>65</subscript></entry> | ||
534 | <entry>E' = 4.5 I for I ≤0.018, | ||
535 | 1.099 I<superscript>0.45</superscript> - 0.099 for 0.018 < I</entry> | ||
536 | <entry>0.2125 E'<subscript>R</subscript> | ||
537 | + 0.7154 E'<subscript>G</subscript> | ||
538 | + 0.0721 E'<subscript>B</subscript></entry> | ||
539 | <entry>219 E'<subscript>Y</subscript> + 16</entry> | ||
540 | <entry>224 P<subscript>B,R</subscript> + 128</entry> | ||
541 | </row> | 511 | </row> |
542 | <row> | 512 | <row> |
543 | <entry><constant>V4L2_COLORSPACE_BT878</constant></entry> | 513 | <entry><constant>V4L2_COLORSPACE_ADOBERGB</constant></entry> |
544 | <entry>4</entry> | 514 | <entry>See <xref linkend="col-adobergb" />.</entry> |
545 | <entry>Broken Bt878 extents<footnote> | 515 | </row> |
546 | <para>The ubiquitous Bt878 video capture chip | 516 | <row> |
547 | quantizes E'<subscript>Y</subscript> to 238 levels, yielding a range | 517 | <entry><constant>V4L2_COLORSPACE_BT2020</constant></entry> |
548 | of Y' = 16 … 253, unlike Rec. 601 Y' = 16 … | 518 | <entry>See <xref linkend="col-bt2020" />.</entry> |
549 | 235. This is not a typo in the Bt878 documentation, it has been | 519 | </row> |
550 | implemented in silicon. The chroma extents are unclear.</para> | 520 | <row> |
551 | </footnote>, <xref linkend="itu601" /></entry> | 521 | <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> |
552 | <entry>?</entry> | 522 | <entry>See <xref linkend="col-smpte-240m" />.</entry> |
553 | <entry>?</entry> | ||
554 | <entry>?</entry> | ||
555 | <entry>?</entry> | ||
556 | <entry>?</entry> | ||
557 | <entry>0.299 E'<subscript>R</subscript> | ||
558 | + 0.587 E'<subscript>G</subscript> | ||
559 | + 0.114 E'<subscript>B</subscript></entry> | ||
560 | <entry><emphasis>237</emphasis> E'<subscript>Y</subscript> + 16</entry> | ||
561 | <entry>224 P<subscript>B,R</subscript> + 128 (probably)</entry> | ||
562 | </row> | 523 | </row> |
563 | <row> | 524 | <row> |
564 | <entry><constant>V4L2_COLORSPACE_470_SYSTEM_M</constant></entry> | 525 | <entry><constant>V4L2_COLORSPACE_470_SYSTEM_M</constant></entry> |
565 | <entry>5</entry> | 526 | <entry>See <xref linkend="col-sysm" />.</entry> |
566 | <entry>M/NTSC<footnote> | ||
567 | <para>No identifier exists for M/PAL which uses | ||
568 | the chromaticities of M/NTSC, the remaining parameters are equal to B and | ||
569 | G/PAL.</para> | ||
570 | </footnote> according to <xref linkend="itu470" />, <xref | ||
571 | linkend="itu601" /></entry> | ||
572 | <entry>x = 0.67, y = 0.33</entry> | ||
573 | <entry>x = 0.21, y = 0.71</entry> | ||
574 | <entry>x = 0.14, y = 0.08</entry> | ||
575 | <entry>x = 0.310, y = 0.316, Illuminant C</entry> | ||
576 | <entry>?</entry> | ||
577 | <entry>0.299 E'<subscript>R</subscript> | ||
578 | + 0.587 E'<subscript>G</subscript> | ||
579 | + 0.114 E'<subscript>B</subscript></entry> | ||
580 | <entry>219 E'<subscript>Y</subscript> + 16</entry> | ||
581 | <entry>224 P<subscript>B,R</subscript> + 128</entry> | ||
582 | </row> | 527 | </row> |
583 | <row> | 528 | <row> |
584 | <entry><constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant></entry> | 529 | <entry><constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant></entry> |
585 | <entry>6</entry> | 530 | <entry>See <xref linkend="col-sysbg" />.</entry> |
586 | <entry>625-line PAL and SECAM systems according to <xref | ||
587 | linkend="itu470" />, <xref linkend="itu601" /></entry> | ||
588 | <entry>x = 0.64, y = 0.33</entry> | ||
589 | <entry>x = 0.29, y = 0.60</entry> | ||
590 | <entry>x = 0.15, y = 0.06</entry> | ||
591 | <entry>x = 0.313, y = 0.329, | ||
592 | Illuminant D<subscript>65</subscript></entry> | ||
593 | <entry>?</entry> | ||
594 | <entry>0.299 E'<subscript>R</subscript> | ||
595 | + 0.587 E'<subscript>G</subscript> | ||
596 | + 0.114 E'<subscript>B</subscript></entry> | ||
597 | <entry>219 E'<subscript>Y</subscript> + 16</entry> | ||
598 | <entry>224 P<subscript>B,R</subscript> + 128</entry> | ||
599 | </row> | 531 | </row> |
600 | <row> | 532 | <row> |
601 | <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry> | 533 | <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry> |
602 | <entry>7</entry> | 534 | <entry>See <xref linkend="col-jpeg" />.</entry> |
603 | <entry>JPEG Y'CbCr, see <xref linkend="jfif" />, <xref linkend="itu601" /></entry> | ||
604 | <entry>?</entry> | ||
605 | <entry>?</entry> | ||
606 | <entry>?</entry> | ||
607 | <entry>?</entry> | ||
608 | <entry>?</entry> | ||
609 | <entry>0.299 E'<subscript>R</subscript> | ||
610 | + 0.587 E'<subscript>G</subscript> | ||
611 | + 0.114 E'<subscript>B</subscript></entry> | ||
612 | <entry>256 E'<subscript>Y</subscript> + 16<footnote> | ||
613 | <para>Note JFIF quantizes | ||
614 | Y'P<subscript>B</subscript>P<subscript>R</subscript> in range [0;+1] and | ||
615 | [-0.5;+0.5] to <emphasis>257</emphasis> levels, however Y'CbCr signals | ||
616 | are still clamped to [0;255].</para> | ||
617 | </footnote></entry> | ||
618 | <entry>256 P<subscript>B,R</subscript> + 128</entry> | ||
619 | </row> | 535 | </row> |
536 | </tbody> | ||
537 | </tgroup> | ||
538 | </table> | ||
539 | |||
540 | <table pgwide="1" frame="none" id="v4l2-ycbcr-encoding"> | ||
541 | <title>V4L2 Y'CbCr Encodings</title> | ||
542 | <tgroup cols="2" align="left"> | ||
543 | &cs-def; | ||
544 | <thead> | ||
620 | <row> | 545 | <row> |
621 | <entry><constant>V4L2_COLORSPACE_SRGB</constant></entry> | 546 | <entry>Identifier</entry> |
622 | <entry>8</entry> | 547 | <entry>Details</entry> |
623 | <entry>[?]</entry> | 548 | </row> |
624 | <entry>x = 0.640, y = 0.330</entry> | 549 | </thead> |
625 | <entry>x = 0.300, y = 0.600</entry> | 550 | <tbody valign="top"> |
626 | <entry>x = 0.150, y = 0.060</entry> | 551 | <row> |
627 | <entry>x = 0.3127, y = 0.3290, | 552 | <entry><constant>V4L2_YCBCR_ENC_DEFAULT</constant></entry> |
628 | Illuminant D<subscript>65</subscript></entry> | 553 | <entry>Use the default Y'CbCr encoding as defined by the colorspace.</entry> |
629 | <entry>E' = 4.5 I for I ≤0.018, | 554 | </row> |
630 | 1.099 I<superscript>0.45</superscript> - 0.099 for 0.018 < I</entry> | 555 | <row> |
631 | <entry spanname="spam">n/a</entry> | 556 | <entry><constant>V4L2_YCBCR_ENC_601</constant></entry> |
557 | <entry>Use the BT.601 Y'CbCr encoding.</entry> | ||
558 | </row> | ||
559 | <row> | ||
560 | <entry><constant>V4L2_YCBCR_ENC_709</constant></entry> | ||
561 | <entry>Use the Rec. 709 Y'CbCr encoding.</entry> | ||
562 | </row> | ||
563 | <row> | ||
564 | <entry><constant>V4L2_YCBCR_ENC_XV601</constant></entry> | ||
565 | <entry>Use the extended gamut xvYCC BT.601 encoding.</entry> | ||
566 | </row> | ||
567 | <row> | ||
568 | <entry><constant>V4L2_YCBCR_ENC_XV709</constant></entry> | ||
569 | <entry>Use the extended gamut xvYCC Rec. 709 encoding.</entry> | ||
570 | </row> | ||
571 | <row> | ||
572 | <entry><constant>V4L2_YCBCR_ENC_SYCC</constant></entry> | ||
573 | <entry>Use the extended gamut sYCC encoding.</entry> | ||
574 | </row> | ||
575 | <row> | ||
576 | <entry><constant>V4L2_YCBCR_ENC_BT2020</constant></entry> | ||
577 | <entry>Use the default non-constant luminance BT.2020 Y'CbCr encoding.</entry> | ||
578 | </row> | ||
579 | <row> | ||
580 | <entry><constant>V4L2_YCBCR_ENC_BT2020_CONST_LUM</constant></entry> | ||
581 | <entry>Use the constant luminance BT.2020 Yc'CbcCrc encoding.</entry> | ||
582 | </row> | ||
583 | </tbody> | ||
584 | </tgroup> | ||
585 | </table> | ||
586 | |||
587 | <table pgwide="1" frame="none" id="v4l2-quantization"> | ||
588 | <title>V4L2 Quantization Methods</title> | ||
589 | <tgroup cols="2" align="left"> | ||
590 | &cs-def; | ||
591 | <thead> | ||
592 | <row> | ||
593 | <entry>Identifier</entry> | ||
594 | <entry>Details</entry> | ||
595 | </row> | ||
596 | </thead> | ||
597 | <tbody valign="top"> | ||
598 | <row> | ||
599 | <entry><constant>V4L2_QUANTIZATION_DEFAULT</constant></entry> | ||
600 | <entry>Use the default quantization encoding as defined by the colorspace. | ||
601 | This is always full range for R'G'B' and usually limited range for Y'CbCr.</entry> | ||
602 | </row> | ||
603 | <row> | ||
604 | <entry><constant>V4L2_QUANTIZATION_FULL_RANGE</constant></entry> | ||
605 | <entry>Use the full range quantization encoding. I.e. the range [0…1] | ||
606 | is mapped to [0…255] (with possible clipping to [1…254] to avoid the | ||
607 | 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to [0…255] | ||
608 | (with possible clipping to [1…254] to avoid the 0x00 and 0xff values).</entry> | ||
609 | </row> | ||
610 | <row> | ||
611 | <entry><constant>V4L2_QUANTIZATION_LIM_RANGE</constant></entry> | ||
612 | <entry>Use the limited range quantization encoding. I.e. the range [0…1] | ||
613 | is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to [16…240]. | ||
614 | </entry> | ||
632 | </row> | 615 | </row> |
633 | </tbody> | 616 | </tbody> |
634 | </tgroup> | 617 | </tgroup> |
635 | </table> | 618 | </table> |
636 | </section> | 619 | </section> |
637 | 620 | ||
621 | <section> | ||
622 | <title>Detailed Colorspace Descriptions</title> | ||
623 | <section> | ||
624 | <title id="col-smpte-170m">Colorspace SMPTE 170M (<constant>V4L2_COLORSPACE_SMPTE170M</constant>)</title> | ||
625 | <para>The <xref linkend="smpte170m" /> standard defines the colorspace used by NTSC and PAL and by SDTV | ||
626 | in general. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. | ||
627 | The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and | ||
628 | the white reference are:</para> | ||
629 | <table frame="none"> | ||
630 | <title>SMPTE 170M Chromaticities</title> | ||
631 | <tgroup cols="3" align="left"> | ||
632 | &cs-str; | ||
633 | <thead> | ||
634 | <row> | ||
635 | <entry>Color</entry> | ||
636 | <entry>x</entry> | ||
637 | <entry>y</entry> | ||
638 | </row> | ||
639 | </thead> | ||
640 | <tbody valign="top"> | ||
641 | <row> | ||
642 | <entry>Red</entry> | ||
643 | <entry>0.630</entry> | ||
644 | <entry>0.340</entry> | ||
645 | </row> | ||
646 | <row> | ||
647 | <entry>Green</entry> | ||
648 | <entry>0.310</entry> | ||
649 | <entry>0.595</entry> | ||
650 | </row> | ||
651 | <row> | ||
652 | <entry>Blue</entry> | ||
653 | <entry>0.155</entry> | ||
654 | <entry>0.070</entry> | ||
655 | </row> | ||
656 | <row> | ||
657 | <entry>White Reference (D65)</entry> | ||
658 | <entry>0.3127</entry> | ||
659 | <entry>0.3290</entry> | ||
660 | </row> | ||
661 | </tbody> | ||
662 | </tgroup> | ||
663 | </table> | ||
664 | <para>The red, green and blue chromaticities are also often referred to | ||
665 | as the SMPTE C set, so this colorspace is sometimes called SMPTE C as well.</para> | ||
666 | <variablelist> | ||
667 | <varlistentry> | ||
668 | <term>The transfer function defined for SMPTE 170M is the same as the | ||
669 | one defined in Rec. 709. Normally L is in the range [0…1], but for the extended | ||
670 | gamut xvYCC encoding values outside that range are allowed.</term> | ||
671 | <listitem> | ||
672 | <para>L' = -1.099(-L)<superscript>0.45</superscript> + 0.099 for L ≤ -0.018</para> | ||
673 | <para>L' = 4.5L for -0.018 < L < 0.018</para> | ||
674 | <para>L' = 1.099L<superscript>0.45</superscript> - 0.099 for L ≥ 0.018</para> | ||
675 | </listitem> | ||
676 | </varlistentry> | ||
677 | </variablelist> | ||
678 | <variablelist> | ||
679 | <varlistentry> | ||
680 | <term>Inverse Transfer function:</term> | ||
681 | <listitem> | ||
682 | <para>L = -((L' - 0.099) / -1.099)<superscript>1/0.45</superscript> for L' ≤ -0.081</para> | ||
683 | <para>L = L' / 4.5 for -0.081 < L' < 0.081</para> | ||
684 | <para>L = ((L' + 0.099) / 1.099)<superscript>1/0.45</superscript> for L' ≥ 0.081</para> | ||
685 | </listitem> | ||
686 | </varlistentry> | ||
687 | </variablelist> | ||
688 | <variablelist> | ||
689 | <varlistentry> | ||
690 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with | ||
691 | the following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term> | ||
692 | <listitem> | ||
693 | <para>Y' = 0.299R' + 0.587G' + 0.114B'</para> | ||
694 | <para>Cb = -0.169R' - 0.331G' + 0.5B'</para> | ||
695 | <para>Cr = 0.5R' - 0.419G' - 0.081B'</para> | ||
696 | </listitem> | ||
697 | </varlistentry> | ||
698 | </variablelist> | ||
699 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
700 | clamped to the range [-0.5…0.5]. This conversion to Y'CbCr is identical to the one | ||
701 | defined in the <xref linkend="itu601" /> standard and this colorspace is sometimes called BT.601 as well, even | ||
702 | though BT.601 does not mention any color primaries.</para> | ||
703 | <para>The default quantization is limited range, but full range is possible although | ||
704 | rarely seen.</para> | ||
705 | <para>The <constant>V4L2_YCBCR_ENC_601</constant> encoding as described above is the | ||
706 | default for this colorspace, but it can be overridden with <constant>V4L2_YCBCR_ENC_709</constant>, | ||
707 | in which case the Rec. 709 Y'CbCr encoding is used.</para> | ||
708 | <variablelist> | ||
709 | <varlistentry> | ||
710 | <term>The xvYCC 601 encoding (<constant>V4L2_YCBCR_ENC_XV601</constant>, <xref linkend="xvycc" />) is similar | ||
711 | to the BT.601 encoding, but it allows for R', G' and B' values that are outside the range | ||
712 | [0…1]. The resulting Y', Cb and Cr values are scaled and offset:</term> | ||
713 | <listitem> | ||
714 | <para>Y' = (219 / 255) * (0.299R' + 0.587G' + 0.114B') + (16 / 255)</para> | ||
715 | <para>Cb = (224 / 255) * (-0.169R' - 0.331G' + 0.5B')</para> | ||
716 | <para>Cr = (224 / 255) * (0.5R' - 0.419G' - 0.081B')</para> | ||
717 | </listitem> | ||
718 | </varlistentry> | ||
719 | </variablelist> | ||
720 | <para>Y' is clamped to the range [0…1] and Cb and Cr are clamped | ||
721 | to the range [-0.5…0.5]. The non-standard xvYCC 709 encoding can also be used by selecting | ||
722 | <constant>V4L2_YCBCR_ENC_XV709</constant>. The xvYCC encodings always use full range | ||
723 | quantization.</para> | ||
724 | </section> | ||
725 | |||
726 | <section> | ||
727 | <title id="col-rec709">Colorspace Rec. 709 (<constant>V4L2_COLORSPACE_REC709</constant>)</title> | ||
728 | <para>The <xref linkend="itu709" /> standard defines the colorspace used by HDTV in general. The default | ||
729 | Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. The default Y'CbCr quantization is | ||
730 | limited range. The chromaticities of the primary colors and the white reference are:</para> | ||
731 | <table frame="none"> | ||
732 | <title>Rec. 709 Chromaticities</title> | ||
733 | <tgroup cols="3" align="left"> | ||
734 | &cs-str; | ||
735 | <thead> | ||
736 | <row> | ||
737 | <entry>Color</entry> | ||
738 | <entry>x</entry> | ||
739 | <entry>y</entry> | ||
740 | </row> | ||
741 | </thead> | ||
742 | <tbody valign="top"> | ||
743 | <row> | ||
744 | <entry>Red</entry> | ||
745 | <entry>0.640</entry> | ||
746 | <entry>0.330</entry> | ||
747 | </row> | ||
748 | <row> | ||
749 | <entry>Green</entry> | ||
750 | <entry>0.300</entry> | ||
751 | <entry>0.600</entry> | ||
752 | </row> | ||
753 | <row> | ||
754 | <entry>Blue</entry> | ||
755 | <entry>0.150</entry> | ||
756 | <entry>0.060</entry> | ||
757 | </row> | ||
758 | <row> | ||
759 | <entry>White Reference (D65)</entry> | ||
760 | <entry>0.3127</entry> | ||
761 | <entry>0.3290</entry> | ||
762 | </row> | ||
763 | </tbody> | ||
764 | </tgroup> | ||
765 | </table> | ||
766 | <para>The full name of this standard is Rec. ITU-R BT.709-5.</para> | ||
767 | <variablelist> | ||
768 | <varlistentry> | ||
769 | <term>Transfer function. Normally L is in the range [0…1], but for the extended | ||
770 | gamut xvYCC encoding values outside that range are allowed.</term> | ||
771 | <listitem> | ||
772 | <para>L' = -1.099(-L)<superscript>0.45</superscript> + 0.099 for L ≤ -0.018</para> | ||
773 | <para>L' = 4.5L for -0.018 < L < 0.018</para> | ||
774 | <para>L' = 1.099L<superscript>0.45</superscript> - 0.099 for L ≥ 0.018</para> | ||
775 | </listitem> | ||
776 | </varlistentry> | ||
777 | </variablelist> | ||
778 | <variablelist> | ||
779 | <varlistentry> | ||
780 | <term>Inverse Transfer function:</term> | ||
781 | <listitem> | ||
782 | <para>L = -((L' - 0.099) / -1.099)<superscript>1/0.45</superscript> for L' ≤ -0.081</para> | ||
783 | <para>L = L' / 4.5 for -0.081 < L' < 0.081</para> | ||
784 | <para>L = ((L' + 0.099) / 1.099)<superscript>1/0.45</superscript> for L' ≥ 0.081</para> | ||
785 | </listitem> | ||
786 | </varlistentry> | ||
787 | </variablelist> | ||
788 | <variablelist> | ||
789 | <varlistentry> | ||
790 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the following | ||
791 | <constant>V4L2_YCBCR_ENC_709</constant> encoding:</term> | ||
792 | <listitem> | ||
793 | <para>Y' = 0.2126R' + 0.7152G' + 0.0722B'</para> | ||
794 | <para>Cb = -0.1146R' - 0.3854G' + 0.5B'</para> | ||
795 | <para>Cr = 0.5R' - 0.4542G' - 0.0458B'</para> | ||
796 | </listitem> | ||
797 | </varlistentry> | ||
798 | </variablelist> | ||
799 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
800 | clamped to the range [-0.5…0.5].</para> | ||
801 | <para>The default quantization is limited range, but full range is possible although | ||
802 | rarely seen.</para> | ||
803 | <para>The <constant>V4L2_YCBCR_ENC_709</constant> encoding described above is the default | ||
804 | for this colorspace, but it can be overridden with <constant>V4L2_YCBCR_ENC_601</constant>, in which | ||
805 | case the BT.601 Y'CbCr encoding is used.</para> | ||
806 | <variablelist> | ||
807 | <varlistentry> | ||
808 | <term>The xvYCC 709 encoding (<constant>V4L2_YCBCR_ENC_XV709</constant>, <xref linkend="xvycc" />) | ||
809 | is similar to the Rec. 709 encoding, but it allows for R', G' and B' values that are outside the range | ||
810 | [0…1]. The resulting Y', Cb and Cr values are scaled and offset:</term> | ||
811 | <listitem> | ||
812 | <para>Y' = (219 / 255) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 255)</para> | ||
813 | <para>Cb = (224 / 255) * (-0.1146R' - 0.3854G' + 0.5B')</para> | ||
814 | <para>Cr = (224 / 255) * (0.5R' - 0.4542G' - 0.0458B')</para> | ||
815 | </listitem> | ||
816 | </varlistentry> | ||
817 | </variablelist> | ||
818 | <para>Y' is clamped to the range [0…1] and Cb and Cr are clamped | ||
819 | to the range [-0.5…0.5]. The non-standard xvYCC 601 encoding can also be used by | ||
820 | selecting <constant>V4L2_YCBCR_ENC_XV601</constant>. The xvYCC encodings always use full | ||
821 | range quantization.</para> | ||
822 | </section> | ||
823 | |||
824 | <section> | ||
825 | <title id="col-srgb">Colorspace sRGB (<constant>V4L2_COLORSPACE_SRGB</constant>)</title> | ||
826 | <para>The <xref linkend="srgb" /> standard defines the colorspace used by most webcams and computer graphics. The | ||
827 | default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SYCC</constant>. The default Y'CbCr quantization | ||
828 | is full range. The chromaticities of the primary colors and the white reference are:</para> | ||
829 | <table frame="none"> | ||
830 | <title>sRGB Chromaticities</title> | ||
831 | <tgroup cols="3" align="left"> | ||
832 | &cs-str; | ||
833 | <thead> | ||
834 | <row> | ||
835 | <entry>Color</entry> | ||
836 | <entry>x</entry> | ||
837 | <entry>y</entry> | ||
838 | </row> | ||
839 | </thead> | ||
840 | <tbody valign="top"> | ||
841 | <row> | ||
842 | <entry>Red</entry> | ||
843 | <entry>0.640</entry> | ||
844 | <entry>0.330</entry> | ||
845 | </row> | ||
846 | <row> | ||
847 | <entry>Green</entry> | ||
848 | <entry>0.300</entry> | ||
849 | <entry>0.600</entry> | ||
850 | </row> | ||
851 | <row> | ||
852 | <entry>Blue</entry> | ||
853 | <entry>0.150</entry> | ||
854 | <entry>0.060</entry> | ||
855 | </row> | ||
856 | <row> | ||
857 | <entry>White Reference (D65)</entry> | ||
858 | <entry>0.3127</entry> | ||
859 | <entry>0.3290</entry> | ||
860 | </row> | ||
861 | </tbody> | ||
862 | </tgroup> | ||
863 | </table> | ||
864 | <para>These chromaticities are identical to the Rec. 709 colorspace.</para> | ||
865 | <variablelist> | ||
866 | <varlistentry> | ||
867 | <term>Transfer function. Note that negative values for L are only used by the Y'CbCr conversion.</term> | ||
868 | <listitem> | ||
869 | <para>L' = -1.055(-L)<superscript>1/2.4</superscript> + 0.055 for L < -0.0031308</para> | ||
870 | <para>L' = 12.92L for -0.0031308 ≤ L ≤ 0.0031308</para> | ||
871 | <para>L' = 1.055L<superscript>1/2.4</superscript> - 0.055 for 0.0031308 < L ≤ 1</para> | ||
872 | </listitem> | ||
873 | </varlistentry> | ||
874 | <varlistentry> | ||
875 | <term>Inverse Transfer function:</term> | ||
876 | <listitem> | ||
877 | <para>L = -((-L' + 0.055) / 1.055)<superscript>2.4</superscript> for L' < -0.04045</para> | ||
878 | <para>L = L' / 12.92 for -0.04045 ≤ L' ≤ 0.04045</para> | ||
879 | <para>L = ((L' + 0.055) / 1.055)<superscript>2.4</superscript> for L' > 0.04045</para> | ||
880 | </listitem> | ||
881 | </varlistentry> | ||
882 | </variablelist> | ||
883 | <variablelist> | ||
884 | <varlistentry> | ||
885 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the following | ||
886 | <constant>V4L2_YCBCR_ENC_SYCC</constant> encoding as defined by <xref linkend="sycc" />:</term> | ||
887 | <listitem> | ||
888 | <para>Y' = 0.2990R' + 0.5870G' + 0.1140B'</para> | ||
889 | <para>Cb = -0.1687R' - 0.3313G' + 0.5B'</para> | ||
890 | <para>Cr = 0.5R' - 0.4187G' - 0.0813B'</para> | ||
891 | </listitem> | ||
892 | </varlistentry> | ||
893 | </variablelist> | ||
894 | <para>Y' is clamped to the range [0…1] and Cb and Cr are clamped | ||
895 | to the range [-0.5…0.5]. The <constant>V4L2_YCBCR_ENC_SYCC</constant> quantization is always | ||
896 | full range. Although this Y'CbCr encoding looks very similar to the <constant>V4L2_YCBCR_ENC_XV601</constant> | ||
897 | encoding, it is not. The <constant>V4L2_YCBCR_ENC_XV601</constant> scales and offsets the Y'CbCr | ||
898 | values before quantization, but this encoding does not do that.</para> | ||
899 | </section> | ||
900 | |||
901 | <section> | ||
902 | <title id="col-adobergb">Colorspace Adobe RGB (<constant>V4L2_COLORSPACE_ADOBERGB</constant>)</title> | ||
903 | <para>The <xref linkend="adobergb" /> standard defines the colorspace used by computer graphics | ||
904 | that use the AdobeRGB colorspace. This is also known as the <xref linkend="oprgb" /> standard. | ||
905 | The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr | ||
906 | quantization is limited range. The chromaticities of the primary colors and the white reference | ||
907 | are:</para> | ||
908 | <table frame="none"> | ||
909 | <title>Adobe RGB Chromaticities</title> | ||
910 | <tgroup cols="3" align="left"> | ||
911 | &cs-str; | ||
912 | <thead> | ||
913 | <row> | ||
914 | <entry>Color</entry> | ||
915 | <entry>x</entry> | ||
916 | <entry>y</entry> | ||
917 | </row> | ||
918 | </thead> | ||
919 | <tbody valign="top"> | ||
920 | <row> | ||
921 | <entry>Red</entry> | ||
922 | <entry>0.6400</entry> | ||
923 | <entry>0.3300</entry> | ||
924 | </row> | ||
925 | <row> | ||
926 | <entry>Green</entry> | ||
927 | <entry>0.2100</entry> | ||
928 | <entry>0.7100</entry> | ||
929 | </row> | ||
930 | <row> | ||
931 | <entry>Blue</entry> | ||
932 | <entry>0.1500</entry> | ||
933 | <entry>0.0600</entry> | ||
934 | </row> | ||
935 | <row> | ||
936 | <entry>White Reference (D65)</entry> | ||
937 | <entry>0.3127</entry> | ||
938 | <entry>0.3290</entry> | ||
939 | </row> | ||
940 | </tbody> | ||
941 | </tgroup> | ||
942 | </table> | ||
943 | <variablelist> | ||
944 | <varlistentry> | ||
945 | <term>Transfer function:</term> | ||
946 | <listitem> | ||
947 | <para>L' = L<superscript>1/2.19921875</superscript></para> | ||
948 | </listitem> | ||
949 | </varlistentry> | ||
950 | <varlistentry> | ||
951 | <term>Inverse Transfer function:</term> | ||
952 | <listitem> | ||
953 | <para>L = L'<superscript>2.19921875</superscript></para> | ||
954 | </listitem> | ||
955 | </varlistentry> | ||
956 | </variablelist> | ||
957 | <variablelist> | ||
958 | <varlistentry> | ||
959 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the | ||
960 | following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term> | ||
961 | <listitem> | ||
962 | <para>Y' = 0.299R' + 0.587G' + 0.114B'</para> | ||
963 | <para>Cb = -0.169R' - 0.331G' + 0.5B'</para> | ||
964 | <para>Cr = 0.5R' - 0.419G' - 0.081B'</para> | ||
965 | </listitem> | ||
966 | </varlistentry> | ||
967 | </variablelist> | ||
968 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
969 | clamped to the range [-0.5…0.5]. This transform is identical to one defined in | ||
970 | SMPTE 170M/BT.601. The Y'CbCr quantization is limited range.</para> | ||
971 | </section> | ||
972 | |||
973 | <section> | ||
974 | <title id="col-bt2020">Colorspace BT.2020 (<constant>V4L2_COLORSPACE_BT2020</constant>)</title> | ||
975 | <para>The <xref linkend="itu2020" /> standard defines the colorspace used by Ultra-high definition | ||
976 | television (UHDTV). The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_BT2020</constant>. | ||
977 | The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and | ||
978 | the white reference are:</para> | ||
979 | <table frame="none"> | ||
980 | <title>BT.2020 Chromaticities</title> | ||
981 | <tgroup cols="3" align="left"> | ||
982 | &cs-str; | ||
983 | <thead> | ||
984 | <row> | ||
985 | <entry>Color</entry> | ||
986 | <entry>x</entry> | ||
987 | <entry>y</entry> | ||
988 | </row> | ||
989 | </thead> | ||
990 | <tbody valign="top"> | ||
991 | <row> | ||
992 | <entry>Red</entry> | ||
993 | <entry>0.708</entry> | ||
994 | <entry>0.292</entry> | ||
995 | </row> | ||
996 | <row> | ||
997 | <entry>Green</entry> | ||
998 | <entry>0.170</entry> | ||
999 | <entry>0.797</entry> | ||
1000 | </row> | ||
1001 | <row> | ||
1002 | <entry>Blue</entry> | ||
1003 | <entry>0.131</entry> | ||
1004 | <entry>0.046</entry> | ||
1005 | </row> | ||
1006 | <row> | ||
1007 | <entry>White Reference (D65)</entry> | ||
1008 | <entry>0.3127</entry> | ||
1009 | <entry>0.3290</entry> | ||
1010 | </row> | ||
1011 | </tbody> | ||
1012 | </tgroup> | ||
1013 | </table> | ||
1014 | <variablelist> | ||
1015 | <varlistentry> | ||
1016 | <term>Transfer function (same as Rec. 709):</term> | ||
1017 | <listitem> | ||
1018 | <para>L' = 4.5L for 0 ≤ L < 0.018</para> | ||
1019 | <para>L' = 1.099L<superscript>0.45</superscript> - 0.099 for 0.018 ≤ L ≤ 1</para> | ||
1020 | </listitem> | ||
1021 | </varlistentry> | ||
1022 | <varlistentry> | ||
1023 | <term>Inverse Transfer function:</term> | ||
1024 | <listitem> | ||
1025 | <para>L = L' / 4.5 for L' < 0.081</para> | ||
1026 | <para>L = ((L' + 0.099) / 1.099)<superscript>1/0.45</superscript> for L' ≥ 0.081</para> | ||
1027 | </listitem> | ||
1028 | </varlistentry> | ||
1029 | </variablelist> | ||
1030 | <variablelist> | ||
1031 | <varlistentry> | ||
1032 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the | ||
1033 | following <constant>V4L2_YCBCR_ENC_BT2020</constant> encoding:</term> | ||
1034 | <listitem> | ||
1035 | <para>Y' = 0.2627R' + 0.6789G' + 0.0593B'</para> | ||
1036 | <para>Cb = -0.1396R' - 0.3604G' + 0.5B'</para> | ||
1037 | <para>Cr = 0.5R' - 0.4598G' - 0.0402B'</para> | ||
1038 | </listitem> | ||
1039 | </varlistentry> | ||
1040 | </variablelist> | ||
1041 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
1042 | clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range.</para> | ||
1043 | <para>There is also an alternate constant luminance R'G'B' to Yc'CbcCrc | ||
1044 | (<constant>V4L2_YCBCR_ENC_BT2020_CONST_LUM</constant>) encoding:</para> | ||
1045 | <variablelist> | ||
1046 | <varlistentry> | ||
1047 | <term>Luma:</term> | ||
1048 | <listitem> | ||
1049 | <para>Yc' = (0.2627R + 0.6789G + 0.0593B)'</para> | ||
1050 | </listitem> | ||
1051 | </varlistentry> | ||
1052 | </variablelist> | ||
1053 | <variablelist> | ||
1054 | <varlistentry> | ||
1055 | <term>B' - Yc' ≤ 0:</term> | ||
1056 | <listitem> | ||
1057 | <para>Cbc = (B' - Y') / 1.9404</para> | ||
1058 | </listitem> | ||
1059 | </varlistentry> | ||
1060 | </variablelist> | ||
1061 | <variablelist> | ||
1062 | <varlistentry> | ||
1063 | <term>B' - Yc' > 0:</term> | ||
1064 | <listitem> | ||
1065 | <para>Cbc = (B' - Y') / 1.5816</para> | ||
1066 | </listitem> | ||
1067 | </varlistentry> | ||
1068 | </variablelist> | ||
1069 | <variablelist> | ||
1070 | <varlistentry> | ||
1071 | <term>R' - Yc' ≤ 0:</term> | ||
1072 | <listitem> | ||
1073 | <para>Crc = (R' - Y') / 1.7184</para> | ||
1074 | </listitem> | ||
1075 | </varlistentry> | ||
1076 | </variablelist> | ||
1077 | <variablelist> | ||
1078 | <varlistentry> | ||
1079 | <term>R' - Yc' > 0:</term> | ||
1080 | <listitem> | ||
1081 | <para>Crc = (R' - Y') / 0.9936</para> | ||
1082 | </listitem> | ||
1083 | </varlistentry> | ||
1084 | </variablelist> | ||
1085 | <para>Yc' is clamped to the range [0…1] and Cbc and Crc are | ||
1086 | clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.</para> | ||
1087 | </section> | ||
1088 | |||
1089 | <section> | ||
1090 | <title id="col-smpte-240m">Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title> | ||
1091 | <para>The <xref linkend="smpte240m" /> standard was an interim standard used during the early days of HDTV (1988-1998). | ||
1092 | It has been superseded by Rec. 709. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SMPTE240M</constant>. | ||
1093 | The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the | ||
1094 | white reference are:</para> | ||
1095 | <table frame="none"> | ||
1096 | <title>SMPTE 240M Chromaticities</title> | ||
1097 | <tgroup cols="3" align="left"> | ||
1098 | &cs-str; | ||
1099 | <thead> | ||
1100 | <row> | ||
1101 | <entry>Color</entry> | ||
1102 | <entry>x</entry> | ||
1103 | <entry>y</entry> | ||
1104 | </row> | ||
1105 | </thead> | ||
1106 | <tbody valign="top"> | ||
1107 | <row> | ||
1108 | <entry>Red</entry> | ||
1109 | <entry>0.630</entry> | ||
1110 | <entry>0.340</entry> | ||
1111 | </row> | ||
1112 | <row> | ||
1113 | <entry>Green</entry> | ||
1114 | <entry>0.310</entry> | ||
1115 | <entry>0.595</entry> | ||
1116 | </row> | ||
1117 | <row> | ||
1118 | <entry>Blue</entry> | ||
1119 | <entry>0.155</entry> | ||
1120 | <entry>0.070</entry> | ||
1121 | </row> | ||
1122 | <row> | ||
1123 | <entry>White Reference (D65)</entry> | ||
1124 | <entry>0.3127</entry> | ||
1125 | <entry>0.3290</entry> | ||
1126 | </row> | ||
1127 | </tbody> | ||
1128 | </tgroup> | ||
1129 | </table> | ||
1130 | <para>These chromaticities are identical to the SMPTE 170M colorspace.</para> | ||
1131 | <variablelist> | ||
1132 | <varlistentry> | ||
1133 | <term>Transfer function:</term> | ||
1134 | <listitem> | ||
1135 | <para>L' = 4L for 0 ≤ L < 0.0228</para> | ||
1136 | <para>L' = 1.1115L<superscript>0.45</superscript> - 0.1115 for 0.0228 ≤ L ≤ 1</para> | ||
1137 | </listitem> | ||
1138 | </varlistentry> | ||
1139 | <varlistentry> | ||
1140 | <term>Inverse Transfer function:</term> | ||
1141 | <listitem> | ||
1142 | <para>L = L' / 4 for 0 ≤ L' < 0.0913</para> | ||
1143 | <para>L = ((L' + 0.1115) / 1.1115)<superscript>1/0.45</superscript> for L' ≥ 0.0913</para> | ||
1144 | </listitem> | ||
1145 | </varlistentry> | ||
1146 | </variablelist> | ||
1147 | <variablelist> | ||
1148 | <varlistentry> | ||
1149 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the | ||
1150 | following <constant>V4L2_YCBCR_ENC_SMPTE240M</constant> encoding:</term> | ||
1151 | <listitem> | ||
1152 | <para>Y' = 0.2122R' + 0.7013G' + 0.0865B'</para> | ||
1153 | <para>Cb = -0.1161R' - 0.3839G' + 0.5B'</para> | ||
1154 | <para>Cr = 0.5R' - 0.4451G' - 0.0549B'</para> | ||
1155 | </listitem> | ||
1156 | </varlistentry> | ||
1157 | </variablelist> | ||
1158 | <para>Yc' is clamped to the range [0…1] and Cbc and Crc are | ||
1159 | clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range.</para> | ||
1160 | </section> | ||
1161 | |||
1162 | <section> | ||
1163 | <title id="col-sysm">Colorspace NTSC 1953 (<constant>V4L2_COLORSPACE_470_SYSTEM_M</constant>)</title> | ||
1164 | <para>This standard defines the colorspace used by NTSC in 1953. In practice this | ||
1165 | colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding | ||
1166 | is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range. | ||
1167 | The chromaticities of the primary colors and the white reference are:</para> | ||
1168 | <table frame="none"> | ||
1169 | <title>NTSC 1953 Chromaticities</title> | ||
1170 | <tgroup cols="3" align="left"> | ||
1171 | &cs-str; | ||
1172 | <thead> | ||
1173 | <row> | ||
1174 | <entry>Color</entry> | ||
1175 | <entry>x</entry> | ||
1176 | <entry>y</entry> | ||
1177 | </row> | ||
1178 | </thead> | ||
1179 | <tbody valign="top"> | ||
1180 | <row> | ||
1181 | <entry>Red</entry> | ||
1182 | <entry>0.67</entry> | ||
1183 | <entry>0.33</entry> | ||
1184 | </row> | ||
1185 | <row> | ||
1186 | <entry>Green</entry> | ||
1187 | <entry>0.21</entry> | ||
1188 | <entry>0.71</entry> | ||
1189 | </row> | ||
1190 | <row> | ||
1191 | <entry>Blue</entry> | ||
1192 | <entry>0.14</entry> | ||
1193 | <entry>0.08</entry> | ||
1194 | </row> | ||
1195 | <row> | ||
1196 | <entry>White Reference (C)</entry> | ||
1197 | <entry>0.310</entry> | ||
1198 | <entry>0.316</entry> | ||
1199 | </row> | ||
1200 | </tbody> | ||
1201 | </tgroup> | ||
1202 | </table> | ||
1203 | <para>Note that this colorspace uses Illuminant C instead of D65 as the | ||
1204 | white reference. To correctly convert an image in this colorspace to another | ||
1205 | that uses D65 you need to apply a chromatic adaptation algorithm such as the | ||
1206 | Bradford method.</para> | ||
1207 | <variablelist> | ||
1208 | <varlistentry> | ||
1209 | <term>The transfer function was never properly defined for NTSC 1953. The | ||
1210 | Rec. 709 transfer function is recommended in the literature:</term> | ||
1211 | <listitem> | ||
1212 | <para>L' = 4.5L for 0 ≤ L < 0.018</para> | ||
1213 | <para>L' = 1.099L<superscript>0.45</superscript> - 0.099 for 0.018 ≤ L ≤ 1</para> | ||
1214 | </listitem> | ||
1215 | </varlistentry> | ||
1216 | <varlistentry> | ||
1217 | <term>Inverse Transfer function:</term> | ||
1218 | <listitem> | ||
1219 | <para>L = L' / 4.5 for L' < 0.081</para> | ||
1220 | <para>L = ((L' + 0.099) / 1.099)<superscript>1/0.45</superscript> for L' ≥ 0.081</para> | ||
1221 | </listitem> | ||
1222 | </varlistentry> | ||
1223 | </variablelist> | ||
1224 | <variablelist> | ||
1225 | <varlistentry> | ||
1226 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the | ||
1227 | following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term> | ||
1228 | <listitem> | ||
1229 | <para>Y' = 0.299R' + 0.587G' + 0.114B'</para> | ||
1230 | <para>Cb = -0.169R' - 0.331G' + 0.5B'</para> | ||
1231 | <para>Cr = 0.5R' - 0.419G' - 0.081B'</para> | ||
1232 | </listitem> | ||
1233 | </varlistentry> | ||
1234 | </variablelist> | ||
1235 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
1236 | clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. | ||
1237 | This transform is identical to one defined in SMPTE 170M/BT.601.</para> | ||
1238 | </section> | ||
1239 | |||
1240 | <section> | ||
1241 | <title id="col-sysbg">Colorspace EBU Tech. 3213 (<constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant>)</title> | ||
1242 | <para>The <xref linkend="tech3213" /> standard defines the colorspace used by PAL/SECAM in 1975. In practice this | ||
1243 | colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding | ||
1244 | is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range. | ||
1245 | The chromaticities of the primary colors and the white reference are:</para> | ||
1246 | <table frame="none"> | ||
1247 | <title>EBU Tech. 3213 Chromaticities</title> | ||
1248 | <tgroup cols="3" align="left"> | ||
1249 | &cs-str; | ||
1250 | <thead> | ||
1251 | <row> | ||
1252 | <entry>Color</entry> | ||
1253 | <entry>x</entry> | ||
1254 | <entry>y</entry> | ||
1255 | </row> | ||
1256 | </thead> | ||
1257 | <tbody valign="top"> | ||
1258 | <row> | ||
1259 | <entry>Red</entry> | ||
1260 | <entry>0.64</entry> | ||
1261 | <entry>0.33</entry> | ||
1262 | </row> | ||
1263 | <row> | ||
1264 | <entry>Green</entry> | ||
1265 | <entry>0.29</entry> | ||
1266 | <entry>0.60</entry> | ||
1267 | </row> | ||
1268 | <row> | ||
1269 | <entry>Blue</entry> | ||
1270 | <entry>0.15</entry> | ||
1271 | <entry>0.06</entry> | ||
1272 | </row> | ||
1273 | <row> | ||
1274 | <entry>White Reference (D65)</entry> | ||
1275 | <entry>0.3127</entry> | ||
1276 | <entry>0.3290</entry> | ||
1277 | </row> | ||
1278 | </tbody> | ||
1279 | </tgroup> | ||
1280 | </table> | ||
1281 | <variablelist> | ||
1282 | <varlistentry> | ||
1283 | <term>The transfer function was never properly defined for this colorspace. | ||
1284 | The Rec. 709 transfer function is recommended in the literature:</term> | ||
1285 | <listitem> | ||
1286 | <para>L' = 4.5L for 0 ≤ L < 0.018</para> | ||
1287 | <para>L' = 1.099L<superscript>0.45</superscript> - 0.099 for 0.018 ≤ L ≤ 1</para> | ||
1288 | </listitem> | ||
1289 | </varlistentry> | ||
1290 | <varlistentry> | ||
1291 | <term>Inverse Transfer function:</term> | ||
1292 | <listitem> | ||
1293 | <para>L = L' / 4.5 for L' < 0.081</para> | ||
1294 | <para>L = ((L' + 0.099) / 1.099)<superscript>1/0.45</superscript> for L' ≥ 0.081</para> | ||
1295 | </listitem> | ||
1296 | </varlistentry> | ||
1297 | </variablelist> | ||
1298 | <variablelist> | ||
1299 | <varlistentry> | ||
1300 | <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the | ||
1301 | following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term> | ||
1302 | <listitem> | ||
1303 | <para>Y' = 0.299R' + 0.587G' + 0.114B'</para> | ||
1304 | <para>Cb = -0.169R' - 0.331G' + 0.5B'</para> | ||
1305 | <para>Cr = 0.5R' - 0.419G' - 0.081B'</para> | ||
1306 | </listitem> | ||
1307 | </varlistentry> | ||
1308 | </variablelist> | ||
1309 | <para>Y' is clamped to the range [0…1] and Cb and Cr are | ||
1310 | clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. | ||
1311 | This transform is identical to one defined in SMPTE 170M/BT.601.</para> | ||
1312 | </section> | ||
1313 | |||
1314 | <section> | ||
1315 | <title id="col-jpeg">Colorspace JPEG (<constant>V4L2_COLORSPACE_JPEG</constant>)</title> | ||
1316 | <para>This colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities | ||
1317 | of the primary colors and the white reference are identical to sRGB. The Y'CbCr encoding is | ||
1318 | <constant>V4L2_YCBCR_ENC_601</constant> with full range quantization where | ||
1319 | Y' is scaled to [0…255] and Cb/Cr are scaled to [-128…128] and | ||
1320 | then clipped to [-128…127].</para> | ||
1321 | <para>Note that the JPEG standard does not actually store colorspace information. | ||
1322 | So if something other than sRGB is used, then the driver will have to set that information | ||
1323 | explicitly. Effectively <constant>V4L2_COLORSPACE_JPEG</constant> can be considered to be | ||
1324 | an abbreviation for <constant>V4L2_COLORSPACE_SRGB</constant>, <constant>V4L2_YCBCR_ENC_601</constant> | ||
1325 | and <constant>V4L2_QUANTIZATION_FULL_RANGE</constant>.</para> | ||
1326 | </section> | ||
1327 | |||
1328 | </section> | ||
1329 | |||
638 | <section id="pixfmt-indexed"> | 1330 | <section id="pixfmt-indexed"> |
639 | <title>Indexed Format</title> | 1331 | <title>Indexed Format</title> |
640 | 1332 | ||
diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml index 7502f784b8cc..d6d56fb6f9c0 100644 --- a/Documentation/DocBook/media/v4l/selections-common.xml +++ b/Documentation/DocBook/media/v4l/selections-common.xml | |||
@@ -63,6 +63,22 @@ | |||
63 | <entry>Yes</entry> | 63 | <entry>Yes</entry> |
64 | </row> | 64 | </row> |
65 | <row> | 65 | <row> |
66 | <entry><constant>V4L2_SEL_TGT_NATIVE_SIZE</constant></entry> | ||
67 | <entry>0x0003</entry> | ||
68 | <entry>The native size of the device, e.g. a sensor's | ||
69 | pixel array. <structfield>left</structfield> and | ||
70 | <structfield>top</structfield> fields are zero for this | ||
71 | target. Setting the native size will generally only make | ||
72 | sense for memory to memory devices where the software can | ||
73 | create a canvas of a given size in which for example a | ||
74 | video frame can be composed. In that case | ||
75 | V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size | ||
76 | of that canvas. | ||
77 | </entry> | ||
78 | <entry>Yes</entry> | ||
79 | <entry>Yes</entry> | ||
80 | </row> | ||
81 | <row> | ||
66 | <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> | 82 | <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> |
67 | <entry>0x0100</entry> | 83 | <entry>0x0100</entry> |
68 | <entry>Compose rectangle. Used to configure scaling | 84 | <entry>Compose rectangle. Used to configure scaling |
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index b2d5a0363cba..c5ea868e3909 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml | |||
@@ -34,8 +34,24 @@ | |||
34 | <xref linkend="colorspaces" /> for details.</entry> | 34 | <xref linkend="colorspaces" /> for details.</entry> |
35 | </row> | 35 | </row> |
36 | <row> | 36 | <row> |
37 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
38 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
39 | <entry>This information supplements the | ||
40 | <structfield>colorspace</structfield> and must be set by the driver for | ||
41 | capture streams and by the application for output streams, | ||
42 | see <xref linkend="colorspaces" />.</entry> | ||
43 | </row> | ||
44 | <row> | ||
45 | <entry>&v4l2-quantization;</entry> | ||
46 | <entry><structfield>quantization</structfield></entry> | ||
47 | <entry>This information supplements the | ||
48 | <structfield>colorspace</structfield> and must be set by the driver for | ||
49 | capture streams and by the application for output streams, | ||
50 | see <xref linkend="colorspaces" />.</entry> | ||
51 | </row> | ||
52 | <row> | ||
37 | <entry>__u32</entry> | 53 | <entry>__u32</entry> |
38 | <entry><structfield>reserved</structfield>[7]</entry> | 54 | <entry><structfield>reserved</structfield>[6]</entry> |
39 | <entry>Reserved for future extensions. Applications and drivers must | 55 | <entry>Reserved for future extensions. Applications and drivers must |
40 | set the array to zero.</entry> | 56 | set the array to zero.</entry> |
41 | </row> | 57 | </row> |
@@ -86,7 +102,7 @@ | |||
86 | green and 5-bit blue values padded on the high bit, transferred as 2 8-bit | 102 | green and 5-bit blue values padded on the high bit, transferred as 2 8-bit |
87 | samples per pixel with the most significant bits (padding, red and half of | 103 | samples per pixel with the most significant bits (padding, red and half of |
88 | the green value) transferred first will be named | 104 | the green value) transferred first will be named |
89 | <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>. | 105 | <constant>MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE</constant>. |
90 | </para> | 106 | </para> |
91 | 107 | ||
92 | <para>The following tables list existing packed RGB formats.</para> | 108 | <para>The following tables list existing packed RGB formats.</para> |
@@ -176,8 +192,8 @@ | |||
176 | </row> | 192 | </row> |
177 | </thead> | 193 | </thead> |
178 | <tbody valign="top"> | 194 | <tbody valign="top"> |
179 | <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-BE"> | 195 | <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE"> |
180 | <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE</entry> | 196 | <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE</entry> |
181 | <entry>0x1001</entry> | 197 | <entry>0x1001</entry> |
182 | <entry></entry> | 198 | <entry></entry> |
183 | &dash-ent-24; | 199 | &dash-ent-24; |
@@ -204,8 +220,8 @@ | |||
204 | <entry>b<subscript>1</subscript></entry> | 220 | <entry>b<subscript>1</subscript></entry> |
205 | <entry>b<subscript>0</subscript></entry> | 221 | <entry>b<subscript>0</subscript></entry> |
206 | </row> | 222 | </row> |
207 | <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-LE"> | 223 | <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-LE"> |
208 | <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE</entry> | 224 | <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE</entry> |
209 | <entry>0x1002</entry> | 225 | <entry>0x1002</entry> |
210 | <entry></entry> | 226 | <entry></entry> |
211 | &dash-ent-24; | 227 | &dash-ent-24; |
@@ -232,8 +248,8 @@ | |||
232 | <entry>r<subscript>1</subscript></entry> | 248 | <entry>r<subscript>1</subscript></entry> |
233 | <entry>r<subscript>0</subscript></entry> | 249 | <entry>r<subscript>0</subscript></entry> |
234 | </row> | 250 | </row> |
235 | <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-BE"> | 251 | <row id="MEDIA-BUS-FMT-RGB555-2X8-PADHI-BE"> |
236 | <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</entry> | 252 | <entry>MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE</entry> |
237 | <entry>0x1003</entry> | 253 | <entry>0x1003</entry> |
238 | <entry></entry> | 254 | <entry></entry> |
239 | &dash-ent-24; | 255 | &dash-ent-24; |
@@ -260,8 +276,8 @@ | |||
260 | <entry>b<subscript>1</subscript></entry> | 276 | <entry>b<subscript>1</subscript></entry> |
261 | <entry>b<subscript>0</subscript></entry> | 277 | <entry>b<subscript>0</subscript></entry> |
262 | </row> | 278 | </row> |
263 | <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-LE"> | 279 | <row id="MEDIA-BUS-FMT-RGB555-2X8-PADHI-LE"> |
264 | <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE</entry> | 280 | <entry>MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE</entry> |
265 | <entry>0x1004</entry> | 281 | <entry>0x1004</entry> |
266 | <entry></entry> | 282 | <entry></entry> |
267 | &dash-ent-24; | 283 | &dash-ent-24; |
@@ -288,8 +304,8 @@ | |||
288 | <entry>g<subscript>4</subscript></entry> | 304 | <entry>g<subscript>4</subscript></entry> |
289 | <entry>g<subscript>3</subscript></entry> | 305 | <entry>g<subscript>3</subscript></entry> |
290 | </row> | 306 | </row> |
291 | <row id="V4L2-MBUS-FMT-BGR565-2X8-BE"> | 307 | <row id="MEDIA-BUS-FMT-BGR565-2X8-BE"> |
292 | <entry>V4L2_MBUS_FMT_BGR565_2X8_BE</entry> | 308 | <entry>MEDIA_BUS_FMT_BGR565_2X8_BE</entry> |
293 | <entry>0x1005</entry> | 309 | <entry>0x1005</entry> |
294 | <entry></entry> | 310 | <entry></entry> |
295 | &dash-ent-24; | 311 | &dash-ent-24; |
@@ -316,8 +332,8 @@ | |||
316 | <entry>r<subscript>1</subscript></entry> | 332 | <entry>r<subscript>1</subscript></entry> |
317 | <entry>r<subscript>0</subscript></entry> | 333 | <entry>r<subscript>0</subscript></entry> |
318 | </row> | 334 | </row> |
319 | <row id="V4L2-MBUS-FMT-BGR565-2X8-LE"> | 335 | <row id="MEDIA-BUS-FMT-BGR565-2X8-LE"> |
320 | <entry>V4L2_MBUS_FMT_BGR565_2X8_LE</entry> | 336 | <entry>MEDIA_BUS_FMT_BGR565_2X8_LE</entry> |
321 | <entry>0x1006</entry> | 337 | <entry>0x1006</entry> |
322 | <entry></entry> | 338 | <entry></entry> |
323 | &dash-ent-24; | 339 | &dash-ent-24; |
@@ -344,8 +360,8 @@ | |||
344 | <entry>g<subscript>4</subscript></entry> | 360 | <entry>g<subscript>4</subscript></entry> |
345 | <entry>g<subscript>3</subscript></entry> | 361 | <entry>g<subscript>3</subscript></entry> |
346 | </row> | 362 | </row> |
347 | <row id="V4L2-MBUS-FMT-RGB565-2X8-BE"> | 363 | <row id="MEDIA-BUS-FMT-RGB565-2X8-BE"> |
348 | <entry>V4L2_MBUS_FMT_RGB565_2X8_BE</entry> | 364 | <entry>MEDIA_BUS_FMT_RGB565_2X8_BE</entry> |
349 | <entry>0x1007</entry> | 365 | <entry>0x1007</entry> |
350 | <entry></entry> | 366 | <entry></entry> |
351 | &dash-ent-24; | 367 | &dash-ent-24; |
@@ -372,8 +388,8 @@ | |||
372 | <entry>b<subscript>1</subscript></entry> | 388 | <entry>b<subscript>1</subscript></entry> |
373 | <entry>b<subscript>0</subscript></entry> | 389 | <entry>b<subscript>0</subscript></entry> |
374 | </row> | 390 | </row> |
375 | <row id="V4L2-MBUS-FMT-RGB565-2X8-LE"> | 391 | <row id="MEDIA-BUS-FMT-RGB565-2X8-LE"> |
376 | <entry>V4L2_MBUS_FMT_RGB565_2X8_LE</entry> | 392 | <entry>MEDIA_BUS_FMT_RGB565_2X8_LE</entry> |
377 | <entry>0x1008</entry> | 393 | <entry>0x1008</entry> |
378 | <entry></entry> | 394 | <entry></entry> |
379 | &dash-ent-24; | 395 | &dash-ent-24; |
@@ -400,8 +416,8 @@ | |||
400 | <entry>g<subscript>4</subscript></entry> | 416 | <entry>g<subscript>4</subscript></entry> |
401 | <entry>g<subscript>3</subscript></entry> | 417 | <entry>g<subscript>3</subscript></entry> |
402 | </row> | 418 | </row> |
403 | <row id="V4L2-MBUS-FMT-RGB666-1X18"> | 419 | <row id="MEDIA-BUS-FMT-RGB666-1X18"> |
404 | <entry>V4L2_MBUS_FMT_RGB666_1X18</entry> | 420 | <entry>MEDIA_BUS_FMT_RGB666_1X18</entry> |
405 | <entry>0x1009</entry> | 421 | <entry>0x1009</entry> |
406 | <entry></entry> | 422 | <entry></entry> |
407 | &dash-ent-14; | 423 | &dash-ent-14; |
@@ -424,8 +440,8 @@ | |||
424 | <entry>b<subscript>1</subscript></entry> | 440 | <entry>b<subscript>1</subscript></entry> |
425 | <entry>b<subscript>0</subscript></entry> | 441 | <entry>b<subscript>0</subscript></entry> |
426 | </row> | 442 | </row> |
427 | <row id="V4L2-MBUS-FMT-RGB888-1X24"> | 443 | <row id="MEDIA-BUS-FMT-RGB888-1X24"> |
428 | <entry>V4L2_MBUS_FMT_RGB888_1X24</entry> | 444 | <entry>MEDIA_BUS_FMT_RGB888_1X24</entry> |
429 | <entry>0x100a</entry> | 445 | <entry>0x100a</entry> |
430 | <entry></entry> | 446 | <entry></entry> |
431 | &dash-ent-8; | 447 | &dash-ent-8; |
@@ -454,8 +470,8 @@ | |||
454 | <entry>b<subscript>1</subscript></entry> | 470 | <entry>b<subscript>1</subscript></entry> |
455 | <entry>b<subscript>0</subscript></entry> | 471 | <entry>b<subscript>0</subscript></entry> |
456 | </row> | 472 | </row> |
457 | <row id="V4L2-MBUS-FMT-RGB888-2X12-BE"> | 473 | <row id="MEDIA-BUS-FMT-RGB888-2X12-BE"> |
458 | <entry>V4L2_MBUS_FMT_RGB888_2X12_BE</entry> | 474 | <entry>MEDIA_BUS_FMT_RGB888_2X12_BE</entry> |
459 | <entry>0x100b</entry> | 475 | <entry>0x100b</entry> |
460 | <entry></entry> | 476 | <entry></entry> |
461 | &dash-ent-20; | 477 | &dash-ent-20; |
@@ -490,8 +506,8 @@ | |||
490 | <entry>b<subscript>1</subscript></entry> | 506 | <entry>b<subscript>1</subscript></entry> |
491 | <entry>b<subscript>0</subscript></entry> | 507 | <entry>b<subscript>0</subscript></entry> |
492 | </row> | 508 | </row> |
493 | <row id="V4L2-MBUS-FMT-RGB888-2X12-LE"> | 509 | <row id="MEDIA-BUS-FMT-RGB888-2X12-LE"> |
494 | <entry>V4L2_MBUS_FMT_RGB888_2X12_LE</entry> | 510 | <entry>MEDIA_BUS_FMT_RGB888_2X12_LE</entry> |
495 | <entry>0x100c</entry> | 511 | <entry>0x100c</entry> |
496 | <entry></entry> | 512 | <entry></entry> |
497 | &dash-ent-20; | 513 | &dash-ent-20; |
@@ -526,8 +542,8 @@ | |||
526 | <entry>g<subscript>5</subscript></entry> | 542 | <entry>g<subscript>5</subscript></entry> |
527 | <entry>g<subscript>4</subscript></entry> | 543 | <entry>g<subscript>4</subscript></entry> |
528 | </row> | 544 | </row> |
529 | <row id="V4L2-MBUS-FMT-ARGB888-1X32"> | 545 | <row id="MEDIA-BUS-FMT-ARGB888-1X32"> |
530 | <entry>V4L2_MBUS_FMT_ARGB888_1X32</entry> | 546 | <entry>MEDIA_BUS_FMT_ARGB888_1X32</entry> |
531 | <entry>0x100d</entry> | 547 | <entry>0x100d</entry> |
532 | <entry></entry> | 548 | <entry></entry> |
533 | <entry>a<subscript>7</subscript></entry> | 549 | <entry>a<subscript>7</subscript></entry> |
@@ -600,7 +616,7 @@ | |||
600 | <para>For instance, a format with uncompressed 10-bit Bayer components | 616 | <para>For instance, a format with uncompressed 10-bit Bayer components |
601 | arranged in a red, green, green, blue pattern transferred as 2 8-bit | 617 | arranged in a red, green, green, blue pattern transferred as 2 8-bit |
602 | samples per pixel with the least significant bits transferred first will | 618 | samples per pixel with the least significant bits transferred first will |
603 | be named <constant>V4L2_MBUS_FMT_SRGGB10_2X8_PADHI_LE</constant>. | 619 | be named <constant>MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE</constant>. |
604 | </para> | 620 | </para> |
605 | 621 | ||
606 | <figure id="bayer-patterns"> | 622 | <figure id="bayer-patterns"> |
@@ -663,8 +679,8 @@ | |||
663 | </row> | 679 | </row> |
664 | </thead> | 680 | </thead> |
665 | <tbody valign="top"> | 681 | <tbody valign="top"> |
666 | <row id="V4L2-MBUS-FMT-SBGGR8-1X8"> | 682 | <row id="MEDIA-BUS-FMT-SBGGR8-1X8"> |
667 | <entry>V4L2_MBUS_FMT_SBGGR8_1X8</entry> | 683 | <entry>MEDIA_BUS_FMT_SBGGR8_1X8</entry> |
668 | <entry>0x3001</entry> | 684 | <entry>0x3001</entry> |
669 | <entry></entry> | 685 | <entry></entry> |
670 | <entry>-</entry> | 686 | <entry>-</entry> |
@@ -680,8 +696,8 @@ | |||
680 | <entry>b<subscript>1</subscript></entry> | 696 | <entry>b<subscript>1</subscript></entry> |
681 | <entry>b<subscript>0</subscript></entry> | 697 | <entry>b<subscript>0</subscript></entry> |
682 | </row> | 698 | </row> |
683 | <row id="V4L2-MBUS-FMT-SGBRG8-1X8"> | 699 | <row id="MEDIA-BUS-FMT-SGBRG8-1X8"> |
684 | <entry>V4L2_MBUS_FMT_SGBRG8_1X8</entry> | 700 | <entry>MEDIA_BUS_FMT_SGBRG8_1X8</entry> |
685 | <entry>0x3013</entry> | 701 | <entry>0x3013</entry> |
686 | <entry></entry> | 702 | <entry></entry> |
687 | <entry>-</entry> | 703 | <entry>-</entry> |
@@ -697,8 +713,8 @@ | |||
697 | <entry>g<subscript>1</subscript></entry> | 713 | <entry>g<subscript>1</subscript></entry> |
698 | <entry>g<subscript>0</subscript></entry> | 714 | <entry>g<subscript>0</subscript></entry> |
699 | </row> | 715 | </row> |
700 | <row id="V4L2-MBUS-FMT-SGRBG8-1X8"> | 716 | <row id="MEDIA-BUS-FMT-SGRBG8-1X8"> |
701 | <entry>V4L2_MBUS_FMT_SGRBG8_1X8</entry> | 717 | <entry>MEDIA_BUS_FMT_SGRBG8_1X8</entry> |
702 | <entry>0x3002</entry> | 718 | <entry>0x3002</entry> |
703 | <entry></entry> | 719 | <entry></entry> |
704 | <entry>-</entry> | 720 | <entry>-</entry> |
@@ -714,8 +730,8 @@ | |||
714 | <entry>g<subscript>1</subscript></entry> | 730 | <entry>g<subscript>1</subscript></entry> |
715 | <entry>g<subscript>0</subscript></entry> | 731 | <entry>g<subscript>0</subscript></entry> |
716 | </row> | 732 | </row> |
717 | <row id="V4L2-MBUS-FMT-SRGGB8-1X8"> | 733 | <row id="MEDIA-BUS-FMT-SRGGB8-1X8"> |
718 | <entry>V4L2_MBUS_FMT_SRGGB8_1X8</entry> | 734 | <entry>MEDIA_BUS_FMT_SRGGB8_1X8</entry> |
719 | <entry>0x3014</entry> | 735 | <entry>0x3014</entry> |
720 | <entry></entry> | 736 | <entry></entry> |
721 | <entry>-</entry> | 737 | <entry>-</entry> |
@@ -731,8 +747,8 @@ | |||
731 | <entry>r<subscript>1</subscript></entry> | 747 | <entry>r<subscript>1</subscript></entry> |
732 | <entry>r<subscript>0</subscript></entry> | 748 | <entry>r<subscript>0</subscript></entry> |
733 | </row> | 749 | </row> |
734 | <row id="V4L2-MBUS-FMT-SBGGR10-ALAW8-1X8"> | 750 | <row id="MEDIA-BUS-FMT-SBGGR10-ALAW8-1X8"> |
735 | <entry>V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8</entry> | 751 | <entry>MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8</entry> |
736 | <entry>0x3015</entry> | 752 | <entry>0x3015</entry> |
737 | <entry></entry> | 753 | <entry></entry> |
738 | <entry>-</entry> | 754 | <entry>-</entry> |
@@ -748,8 +764,8 @@ | |||
748 | <entry>b<subscript>1</subscript></entry> | 764 | <entry>b<subscript>1</subscript></entry> |
749 | <entry>b<subscript>0</subscript></entry> | 765 | <entry>b<subscript>0</subscript></entry> |
750 | </row> | 766 | </row> |
751 | <row id="V4L2-MBUS-FMT-SGBRG10-ALAW8-1X8"> | 767 | <row id="MEDIA-BUS-FMT-SGBRG10-ALAW8-1X8"> |
752 | <entry>V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8</entry> | 768 | <entry>MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8</entry> |
753 | <entry>0x3016</entry> | 769 | <entry>0x3016</entry> |
754 | <entry></entry> | 770 | <entry></entry> |
755 | <entry>-</entry> | 771 | <entry>-</entry> |
@@ -765,8 +781,8 @@ | |||
765 | <entry>g<subscript>1</subscript></entry> | 781 | <entry>g<subscript>1</subscript></entry> |
766 | <entry>g<subscript>0</subscript></entry> | 782 | <entry>g<subscript>0</subscript></entry> |
767 | </row> | 783 | </row> |
768 | <row id="V4L2-MBUS-FMT-SGRBG10-ALAW8-1X8"> | 784 | <row id="MEDIA-BUS-FMT-SGRBG10-ALAW8-1X8"> |
769 | <entry>V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8</entry> | 785 | <entry>MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8</entry> |
770 | <entry>0x3017</entry> | 786 | <entry>0x3017</entry> |
771 | <entry></entry> | 787 | <entry></entry> |
772 | <entry>-</entry> | 788 | <entry>-</entry> |
@@ -782,8 +798,8 @@ | |||
782 | <entry>g<subscript>1</subscript></entry> | 798 | <entry>g<subscript>1</subscript></entry> |
783 | <entry>g<subscript>0</subscript></entry> | 799 | <entry>g<subscript>0</subscript></entry> |
784 | </row> | 800 | </row> |
785 | <row id="V4L2-MBUS-FMT-SRGGB10-ALAW8-1X8"> | 801 | <row id="MEDIA-BUS-FMT-SRGGB10-ALAW8-1X8"> |
786 | <entry>V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8</entry> | 802 | <entry>MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8</entry> |
787 | <entry>0x3018</entry> | 803 | <entry>0x3018</entry> |
788 | <entry></entry> | 804 | <entry></entry> |
789 | <entry>-</entry> | 805 | <entry>-</entry> |
@@ -799,8 +815,8 @@ | |||
799 | <entry>r<subscript>1</subscript></entry> | 815 | <entry>r<subscript>1</subscript></entry> |
800 | <entry>r<subscript>0</subscript></entry> | 816 | <entry>r<subscript>0</subscript></entry> |
801 | </row> | 817 | </row> |
802 | <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8"> | 818 | <row id="MEDIA-BUS-FMT-SBGGR10-DPCM8-1X8"> |
803 | <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry> | 819 | <entry>MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8</entry> |
804 | <entry>0x300b</entry> | 820 | <entry>0x300b</entry> |
805 | <entry></entry> | 821 | <entry></entry> |
806 | <entry>-</entry> | 822 | <entry>-</entry> |
@@ -816,8 +832,8 @@ | |||
816 | <entry>b<subscript>1</subscript></entry> | 832 | <entry>b<subscript>1</subscript></entry> |
817 | <entry>b<subscript>0</subscript></entry> | 833 | <entry>b<subscript>0</subscript></entry> |
818 | </row> | 834 | </row> |
819 | <row id="V4L2-MBUS-FMT-SGBRG10-DPCM8-1X8"> | 835 | <row id="MEDIA-BUS-FMT-SGBRG10-DPCM8-1X8"> |
820 | <entry>V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8</entry> | 836 | <entry>MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8</entry> |
821 | <entry>0x300c</entry> | 837 | <entry>0x300c</entry> |
822 | <entry></entry> | 838 | <entry></entry> |
823 | <entry>-</entry> | 839 | <entry>-</entry> |
@@ -833,8 +849,8 @@ | |||
833 | <entry>g<subscript>1</subscript></entry> | 849 | <entry>g<subscript>1</subscript></entry> |
834 | <entry>g<subscript>0</subscript></entry> | 850 | <entry>g<subscript>0</subscript></entry> |
835 | </row> | 851 | </row> |
836 | <row id="V4L2-MBUS-FMT-SGRBG10-DPCM8-1X8"> | 852 | <row id="MEDIA-BUS-FMT-SGRBG10-DPCM8-1X8"> |
837 | <entry>V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8</entry> | 853 | <entry>MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8</entry> |
838 | <entry>0x3009</entry> | 854 | <entry>0x3009</entry> |
839 | <entry></entry> | 855 | <entry></entry> |
840 | <entry>-</entry> | 856 | <entry>-</entry> |
@@ -850,8 +866,8 @@ | |||
850 | <entry>g<subscript>1</subscript></entry> | 866 | <entry>g<subscript>1</subscript></entry> |
851 | <entry>g<subscript>0</subscript></entry> | 867 | <entry>g<subscript>0</subscript></entry> |
852 | </row> | 868 | </row> |
853 | <row id="V4L2-MBUS-FMT-SRGGB10-DPCM8-1X8"> | 869 | <row id="MEDIA-BUS-FMT-SRGGB10-DPCM8-1X8"> |
854 | <entry>V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8</entry> | 870 | <entry>MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8</entry> |
855 | <entry>0x300d</entry> | 871 | <entry>0x300d</entry> |
856 | <entry></entry> | 872 | <entry></entry> |
857 | <entry>-</entry> | 873 | <entry>-</entry> |
@@ -867,8 +883,8 @@ | |||
867 | <entry>r<subscript>1</subscript></entry> | 883 | <entry>r<subscript>1</subscript></entry> |
868 | <entry>r<subscript>0</subscript></entry> | 884 | <entry>r<subscript>0</subscript></entry> |
869 | </row> | 885 | </row> |
870 | <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-BE"> | 886 | <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-BE"> |
871 | <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE</entry> | 887 | <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE</entry> |
872 | <entry>0x3003</entry> | 888 | <entry>0x3003</entry> |
873 | <entry></entry> | 889 | <entry></entry> |
874 | <entry>-</entry> | 890 | <entry>-</entry> |
@@ -901,8 +917,8 @@ | |||
901 | <entry>b<subscript>1</subscript></entry> | 917 | <entry>b<subscript>1</subscript></entry> |
902 | <entry>b<subscript>0</subscript></entry> | 918 | <entry>b<subscript>0</subscript></entry> |
903 | </row> | 919 | </row> |
904 | <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-LE"> | 920 | <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-LE"> |
905 | <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE</entry> | 921 | <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE</entry> |
906 | <entry>0x3004</entry> | 922 | <entry>0x3004</entry> |
907 | <entry></entry> | 923 | <entry></entry> |
908 | <entry>-</entry> | 924 | <entry>-</entry> |
@@ -935,8 +951,8 @@ | |||
935 | <entry>b<subscript>9</subscript></entry> | 951 | <entry>b<subscript>9</subscript></entry> |
936 | <entry>b<subscript>8</subscript></entry> | 952 | <entry>b<subscript>8</subscript></entry> |
937 | </row> | 953 | </row> |
938 | <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-BE"> | 954 | <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-BE"> |
939 | <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE</entry> | 955 | <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE</entry> |
940 | <entry>0x3005</entry> | 956 | <entry>0x3005</entry> |
941 | <entry></entry> | 957 | <entry></entry> |
942 | <entry>-</entry> | 958 | <entry>-</entry> |
@@ -969,8 +985,8 @@ | |||
969 | <entry>0</entry> | 985 | <entry>0</entry> |
970 | <entry>0</entry> | 986 | <entry>0</entry> |
971 | </row> | 987 | </row> |
972 | <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-LE"> | 988 | <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-LE"> |
973 | <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE</entry> | 989 | <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE</entry> |
974 | <entry>0x3006</entry> | 990 | <entry>0x3006</entry> |
975 | <entry></entry> | 991 | <entry></entry> |
976 | <entry>-</entry> | 992 | <entry>-</entry> |
@@ -1003,8 +1019,8 @@ | |||
1003 | <entry>b<subscript>3</subscript></entry> | 1019 | <entry>b<subscript>3</subscript></entry> |
1004 | <entry>b<subscript>2</subscript></entry> | 1020 | <entry>b<subscript>2</subscript></entry> |
1005 | </row> | 1021 | </row> |
1006 | <row id="V4L2-MBUS-FMT-SBGGR10-1X10"> | 1022 | <row id="MEDIA-BUS-FMT-SBGGR10-1X10"> |
1007 | <entry>V4L2_MBUS_FMT_SBGGR10_1X10</entry> | 1023 | <entry>MEDIA_BUS_FMT_SBGGR10_1X10</entry> |
1008 | <entry>0x3007</entry> | 1024 | <entry>0x3007</entry> |
1009 | <entry></entry> | 1025 | <entry></entry> |
1010 | <entry>-</entry> | 1026 | <entry>-</entry> |
@@ -1020,8 +1036,8 @@ | |||
1020 | <entry>b<subscript>1</subscript></entry> | 1036 | <entry>b<subscript>1</subscript></entry> |
1021 | <entry>b<subscript>0</subscript></entry> | 1037 | <entry>b<subscript>0</subscript></entry> |
1022 | </row> | 1038 | </row> |
1023 | <row id="V4L2-MBUS-FMT-SGBRG10-1X10"> | 1039 | <row id="MEDIA-BUS-FMT-SGBRG10-1X10"> |
1024 | <entry>V4L2_MBUS_FMT_SGBRG10_1X10</entry> | 1040 | <entry>MEDIA_BUS_FMT_SGBRG10_1X10</entry> |
1025 | <entry>0x300e</entry> | 1041 | <entry>0x300e</entry> |
1026 | <entry></entry> | 1042 | <entry></entry> |
1027 | <entry>-</entry> | 1043 | <entry>-</entry> |
@@ -1037,8 +1053,8 @@ | |||
1037 | <entry>g<subscript>1</subscript></entry> | 1053 | <entry>g<subscript>1</subscript></entry> |
1038 | <entry>g<subscript>0</subscript></entry> | 1054 | <entry>g<subscript>0</subscript></entry> |
1039 | </row> | 1055 | </row> |
1040 | <row id="V4L2-MBUS-FMT-SGRBG10-1X10"> | 1056 | <row id="MEDIA-BUS-FMT-SGRBG10-1X10"> |
1041 | <entry>V4L2_MBUS_FMT_SGRBG10_1X10</entry> | 1057 | <entry>MEDIA_BUS_FMT_SGRBG10_1X10</entry> |
1042 | <entry>0x300a</entry> | 1058 | <entry>0x300a</entry> |
1043 | <entry></entry> | 1059 | <entry></entry> |
1044 | <entry>-</entry> | 1060 | <entry>-</entry> |
@@ -1054,8 +1070,8 @@ | |||
1054 | <entry>g<subscript>1</subscript></entry> | 1070 | <entry>g<subscript>1</subscript></entry> |
1055 | <entry>g<subscript>0</subscript></entry> | 1071 | <entry>g<subscript>0</subscript></entry> |
1056 | </row> | 1072 | </row> |
1057 | <row id="V4L2-MBUS-FMT-SRGGB10-1X10"> | 1073 | <row id="MEDIA-BUS-FMT-SRGGB10-1X10"> |
1058 | <entry>V4L2_MBUS_FMT_SRGGB10_1X10</entry> | 1074 | <entry>MEDIA_BUS_FMT_SRGGB10_1X10</entry> |
1059 | <entry>0x300f</entry> | 1075 | <entry>0x300f</entry> |
1060 | <entry></entry> | 1076 | <entry></entry> |
1061 | <entry>-</entry> | 1077 | <entry>-</entry> |
@@ -1071,8 +1087,8 @@ | |||
1071 | <entry>r<subscript>1</subscript></entry> | 1087 | <entry>r<subscript>1</subscript></entry> |
1072 | <entry>r<subscript>0</subscript></entry> | 1088 | <entry>r<subscript>0</subscript></entry> |
1073 | </row> | 1089 | </row> |
1074 | <row id="V4L2-MBUS-FMT-SBGGR12-1X12"> | 1090 | <row id="MEDIA-BUS-FMT-SBGGR12-1X12"> |
1075 | <entry>V4L2_MBUS_FMT_SBGGR12_1X12</entry> | 1091 | <entry>MEDIA_BUS_FMT_SBGGR12_1X12</entry> |
1076 | <entry>0x3008</entry> | 1092 | <entry>0x3008</entry> |
1077 | <entry></entry> | 1093 | <entry></entry> |
1078 | <entry>b<subscript>11</subscript></entry> | 1094 | <entry>b<subscript>11</subscript></entry> |
@@ -1088,8 +1104,8 @@ | |||
1088 | <entry>b<subscript>1</subscript></entry> | 1104 | <entry>b<subscript>1</subscript></entry> |
1089 | <entry>b<subscript>0</subscript></entry> | 1105 | <entry>b<subscript>0</subscript></entry> |
1090 | </row> | 1106 | </row> |
1091 | <row id="V4L2-MBUS-FMT-SGBRG12-1X12"> | 1107 | <row id="MEDIA-BUS-FMT-SGBRG12-1X12"> |
1092 | <entry>V4L2_MBUS_FMT_SGBRG12_1X12</entry> | 1108 | <entry>MEDIA_BUS_FMT_SGBRG12_1X12</entry> |
1093 | <entry>0x3010</entry> | 1109 | <entry>0x3010</entry> |
1094 | <entry></entry> | 1110 | <entry></entry> |
1095 | <entry>g<subscript>11</subscript></entry> | 1111 | <entry>g<subscript>11</subscript></entry> |
@@ -1105,8 +1121,8 @@ | |||
1105 | <entry>g<subscript>1</subscript></entry> | 1121 | <entry>g<subscript>1</subscript></entry> |
1106 | <entry>g<subscript>0</subscript></entry> | 1122 | <entry>g<subscript>0</subscript></entry> |
1107 | </row> | 1123 | </row> |
1108 | <row id="V4L2-MBUS-FMT-SGRBG12-1X12"> | 1124 | <row id="MEDIA-BUS-FMT-SGRBG12-1X12"> |
1109 | <entry>V4L2_MBUS_FMT_SGRBG12_1X12</entry> | 1125 | <entry>MEDIA_BUS_FMT_SGRBG12_1X12</entry> |
1110 | <entry>0x3011</entry> | 1126 | <entry>0x3011</entry> |
1111 | <entry></entry> | 1127 | <entry></entry> |
1112 | <entry>g<subscript>11</subscript></entry> | 1128 | <entry>g<subscript>11</subscript></entry> |
@@ -1122,8 +1138,8 @@ | |||
1122 | <entry>g<subscript>1</subscript></entry> | 1138 | <entry>g<subscript>1</subscript></entry> |
1123 | <entry>g<subscript>0</subscript></entry> | 1139 | <entry>g<subscript>0</subscript></entry> |
1124 | </row> | 1140 | </row> |
1125 | <row id="V4L2-MBUS-FMT-SRGGB12-1X12"> | 1141 | <row id="MEDIA-BUS-FMT-SRGGB12-1X12"> |
1126 | <entry>V4L2_MBUS_FMT_SRGGB12_1X12</entry> | 1142 | <entry>MEDIA_BUS_FMT_SRGGB12_1X12</entry> |
1127 | <entry>0x3012</entry> | 1143 | <entry>0x3012</entry> |
1128 | <entry></entry> | 1144 | <entry></entry> |
1129 | <entry>r<subscript>11</subscript></entry> | 1145 | <entry>r<subscript>11</subscript></entry> |
@@ -1175,7 +1191,7 @@ | |||
1175 | 1191 | ||
1176 | <para>For instance, a format where pixels are encoded as 8-bit YUV values | 1192 | <para>For instance, a format where pixels are encoded as 8-bit YUV values |
1177 | downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the | 1193 | downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the |
1178 | U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>. | 1194 | U, Y, V, Y order will be named <constant>MEDIA_BUS_FMT_UYVY8_2X8</constant>. |
1179 | </para> | 1195 | </para> |
1180 | 1196 | ||
1181 | <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> lists existing packed YUV | 1197 | <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> lists existing packed YUV |
@@ -1280,8 +1296,8 @@ | |||
1280 | </row> | 1296 | </row> |
1281 | </thead> | 1297 | </thead> |
1282 | <tbody valign="top"> | 1298 | <tbody valign="top"> |
1283 | <row id="V4L2-MBUS-FMT-Y8-1X8"> | 1299 | <row id="MEDIA-BUS-FMT-Y8-1X8"> |
1284 | <entry>V4L2_MBUS_FMT_Y8_1X8</entry> | 1300 | <entry>MEDIA_BUS_FMT_Y8_1X8</entry> |
1285 | <entry>0x2001</entry> | 1301 | <entry>0x2001</entry> |
1286 | <entry></entry> | 1302 | <entry></entry> |
1287 | &dash-ent-24; | 1303 | &dash-ent-24; |
@@ -1294,8 +1310,8 @@ | |||
1294 | <entry>y<subscript>1</subscript></entry> | 1310 | <entry>y<subscript>1</subscript></entry> |
1295 | <entry>y<subscript>0</subscript></entry> | 1311 | <entry>y<subscript>0</subscript></entry> |
1296 | </row> | 1312 | </row> |
1297 | <row id="V4L2-MBUS-FMT-UV8-1X8"> | 1313 | <row id="MEDIA-BUS-FMT-UV8-1X8"> |
1298 | <entry>V4L2_MBUS_FMT_UV8_1X8</entry> | 1314 | <entry>MEDIA_BUS_FMT_UV8_1X8</entry> |
1299 | <entry>0x2015</entry> | 1315 | <entry>0x2015</entry> |
1300 | <entry></entry> | 1316 | <entry></entry> |
1301 | &dash-ent-24; | 1317 | &dash-ent-24; |
@@ -1322,8 +1338,8 @@ | |||
1322 | <entry>v<subscript>1</subscript></entry> | 1338 | <entry>v<subscript>1</subscript></entry> |
1323 | <entry>v<subscript>0</subscript></entry> | 1339 | <entry>v<subscript>0</subscript></entry> |
1324 | </row> | 1340 | </row> |
1325 | <row id="V4L2-MBUS-FMT-UYVY8-1_5X8"> | 1341 | <row id="MEDIA-BUS-FMT-UYVY8-1_5X8"> |
1326 | <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry> | 1342 | <entry>MEDIA_BUS_FMT_UYVY8_1_5X8</entry> |
1327 | <entry>0x2002</entry> | 1343 | <entry>0x2002</entry> |
1328 | <entry></entry> | 1344 | <entry></entry> |
1329 | &dash-ent-24; | 1345 | &dash-ent-24; |
@@ -1406,8 +1422,8 @@ | |||
1406 | <entry>y<subscript>1</subscript></entry> | 1422 | <entry>y<subscript>1</subscript></entry> |
1407 | <entry>y<subscript>0</subscript></entry> | 1423 | <entry>y<subscript>0</subscript></entry> |
1408 | </row> | 1424 | </row> |
1409 | <row id="V4L2-MBUS-FMT-VYUY8-1_5X8"> | 1425 | <row id="MEDIA-BUS-FMT-VYUY8-1_5X8"> |
1410 | <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry> | 1426 | <entry>MEDIA_BUS_FMT_VYUY8_1_5X8</entry> |
1411 | <entry>0x2003</entry> | 1427 | <entry>0x2003</entry> |
1412 | <entry></entry> | 1428 | <entry></entry> |
1413 | &dash-ent-24; | 1429 | &dash-ent-24; |
@@ -1490,8 +1506,8 @@ | |||
1490 | <entry>y<subscript>1</subscript></entry> | 1506 | <entry>y<subscript>1</subscript></entry> |
1491 | <entry>y<subscript>0</subscript></entry> | 1507 | <entry>y<subscript>0</subscript></entry> |
1492 | </row> | 1508 | </row> |
1493 | <row id="V4L2-MBUS-FMT-YUYV8-1_5X8"> | 1509 | <row id="MEDIA-BUS-FMT-YUYV8-1_5X8"> |
1494 | <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry> | 1510 | <entry>MEDIA_BUS_FMT_YUYV8_1_5X8</entry> |
1495 | <entry>0x2004</entry> | 1511 | <entry>0x2004</entry> |
1496 | <entry></entry> | 1512 | <entry></entry> |
1497 | &dash-ent-24; | 1513 | &dash-ent-24; |
@@ -1574,8 +1590,8 @@ | |||
1574 | <entry>v<subscript>1</subscript></entry> | 1590 | <entry>v<subscript>1</subscript></entry> |
1575 | <entry>v<subscript>0</subscript></entry> | 1591 | <entry>v<subscript>0</subscript></entry> |
1576 | </row> | 1592 | </row> |
1577 | <row id="V4L2-MBUS-FMT-YVYU8-1_5X8"> | 1593 | <row id="MEDIA-BUS-FMT-YVYU8-1_5X8"> |
1578 | <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry> | 1594 | <entry>MEDIA_BUS_FMT_YVYU8_1_5X8</entry> |
1579 | <entry>0x2005</entry> | 1595 | <entry>0x2005</entry> |
1580 | <entry></entry> | 1596 | <entry></entry> |
1581 | &dash-ent-24; | 1597 | &dash-ent-24; |
@@ -1658,8 +1674,8 @@ | |||
1658 | <entry>u<subscript>1</subscript></entry> | 1674 | <entry>u<subscript>1</subscript></entry> |
1659 | <entry>u<subscript>0</subscript></entry> | 1675 | <entry>u<subscript>0</subscript></entry> |
1660 | </row> | 1676 | </row> |
1661 | <row id="V4L2-MBUS-FMT-UYVY8-2X8"> | 1677 | <row id="MEDIA-BUS-FMT-UYVY8-2X8"> |
1662 | <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry> | 1678 | <entry>MEDIA_BUS_FMT_UYVY8_2X8</entry> |
1663 | <entry>0x2006</entry> | 1679 | <entry>0x2006</entry> |
1664 | <entry></entry> | 1680 | <entry></entry> |
1665 | &dash-ent-24; | 1681 | &dash-ent-24; |
@@ -1714,8 +1730,8 @@ | |||
1714 | <entry>y<subscript>1</subscript></entry> | 1730 | <entry>y<subscript>1</subscript></entry> |
1715 | <entry>y<subscript>0</subscript></entry> | 1731 | <entry>y<subscript>0</subscript></entry> |
1716 | </row> | 1732 | </row> |
1717 | <row id="V4L2-MBUS-FMT-VYUY8-2X8"> | 1733 | <row id="MEDIA-BUS-FMT-VYUY8-2X8"> |
1718 | <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry> | 1734 | <entry>MEDIA_BUS_FMT_VYUY8_2X8</entry> |
1719 | <entry>0x2007</entry> | 1735 | <entry>0x2007</entry> |
1720 | <entry></entry> | 1736 | <entry></entry> |
1721 | &dash-ent-24; | 1737 | &dash-ent-24; |
@@ -1770,8 +1786,8 @@ | |||
1770 | <entry>y<subscript>1</subscript></entry> | 1786 | <entry>y<subscript>1</subscript></entry> |
1771 | <entry>y<subscript>0</subscript></entry> | 1787 | <entry>y<subscript>0</subscript></entry> |
1772 | </row> | 1788 | </row> |
1773 | <row id="V4L2-MBUS-FMT-YUYV8-2X8"> | 1789 | <row id="MEDIA-BUS-FMT-YUYV8-2X8"> |
1774 | <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry> | 1790 | <entry>MEDIA_BUS_FMT_YUYV8_2X8</entry> |
1775 | <entry>0x2008</entry> | 1791 | <entry>0x2008</entry> |
1776 | <entry></entry> | 1792 | <entry></entry> |
1777 | &dash-ent-24; | 1793 | &dash-ent-24; |
@@ -1826,8 +1842,8 @@ | |||
1826 | <entry>v<subscript>1</subscript></entry> | 1842 | <entry>v<subscript>1</subscript></entry> |
1827 | <entry>v<subscript>0</subscript></entry> | 1843 | <entry>v<subscript>0</subscript></entry> |
1828 | </row> | 1844 | </row> |
1829 | <row id="V4L2-MBUS-FMT-YVYU8-2X8"> | 1845 | <row id="MEDIA-BUS-FMT-YVYU8-2X8"> |
1830 | <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry> | 1846 | <entry>MEDIA_BUS_FMT_YVYU8_2X8</entry> |
1831 | <entry>0x2009</entry> | 1847 | <entry>0x2009</entry> |
1832 | <entry></entry> | 1848 | <entry></entry> |
1833 | &dash-ent-24; | 1849 | &dash-ent-24; |
@@ -1882,8 +1898,8 @@ | |||
1882 | <entry>u<subscript>1</subscript></entry> | 1898 | <entry>u<subscript>1</subscript></entry> |
1883 | <entry>u<subscript>0</subscript></entry> | 1899 | <entry>u<subscript>0</subscript></entry> |
1884 | </row> | 1900 | </row> |
1885 | <row id="V4L2-MBUS-FMT-Y10-1X10"> | 1901 | <row id="MEDIA-BUS-FMT-Y10-1X10"> |
1886 | <entry>V4L2_MBUS_FMT_Y10_1X10</entry> | 1902 | <entry>MEDIA_BUS_FMT_Y10_1X10</entry> |
1887 | <entry>0x200a</entry> | 1903 | <entry>0x200a</entry> |
1888 | <entry></entry> | 1904 | <entry></entry> |
1889 | &dash-ent-22; | 1905 | &dash-ent-22; |
@@ -1898,8 +1914,8 @@ | |||
1898 | <entry>y<subscript>1</subscript></entry> | 1914 | <entry>y<subscript>1</subscript></entry> |
1899 | <entry>y<subscript>0</subscript></entry> | 1915 | <entry>y<subscript>0</subscript></entry> |
1900 | </row> | 1916 | </row> |
1901 | <row id="V4L2-MBUS-FMT-UYVY10-2X10"> | 1917 | <row id="MEDIA-BUS-FMT-UYVY10-2X10"> |
1902 | <entry>V4L2_MBUS_FMT_UYVY10_2X10</entry> | 1918 | <entry>MEDIA_BUS_FMT_UYVY10_2X10</entry> |
1903 | <entry>0x2018</entry> | 1919 | <entry>0x2018</entry> |
1904 | <entry></entry> | 1920 | <entry></entry> |
1905 | &dash-ent-22; | 1921 | &dash-ent-22; |
@@ -1962,8 +1978,8 @@ | |||
1962 | <entry>y<subscript>1</subscript></entry> | 1978 | <entry>y<subscript>1</subscript></entry> |
1963 | <entry>y<subscript>0</subscript></entry> | 1979 | <entry>y<subscript>0</subscript></entry> |
1964 | </row> | 1980 | </row> |
1965 | <row id="V4L2-MBUS-FMT-VYUY10-2X10"> | 1981 | <row id="MEDIA-BUS-FMT-VYUY10-2X10"> |
1966 | <entry>V4L2_MBUS_FMT_VYUY10_2X10</entry> | 1982 | <entry>MEDIA_BUS_FMT_VYUY10_2X10</entry> |
1967 | <entry>0x2019</entry> | 1983 | <entry>0x2019</entry> |
1968 | <entry></entry> | 1984 | <entry></entry> |
1969 | &dash-ent-22; | 1985 | &dash-ent-22; |
@@ -2026,8 +2042,8 @@ | |||
2026 | <entry>y<subscript>1</subscript></entry> | 2042 | <entry>y<subscript>1</subscript></entry> |
2027 | <entry>y<subscript>0</subscript></entry> | 2043 | <entry>y<subscript>0</subscript></entry> |
2028 | </row> | 2044 | </row> |
2029 | <row id="V4L2-MBUS-FMT-YUYV10-2X10"> | 2045 | <row id="MEDIA-BUS-FMT-YUYV10-2X10"> |
2030 | <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> | 2046 | <entry>MEDIA_BUS_FMT_YUYV10_2X10</entry> |
2031 | <entry>0x200b</entry> | 2047 | <entry>0x200b</entry> |
2032 | <entry></entry> | 2048 | <entry></entry> |
2033 | &dash-ent-22; | 2049 | &dash-ent-22; |
@@ -2090,8 +2106,8 @@ | |||
2090 | <entry>v<subscript>1</subscript></entry> | 2106 | <entry>v<subscript>1</subscript></entry> |
2091 | <entry>v<subscript>0</subscript></entry> | 2107 | <entry>v<subscript>0</subscript></entry> |
2092 | </row> | 2108 | </row> |
2093 | <row id="V4L2-MBUS-FMT-YVYU10-2X10"> | 2109 | <row id="MEDIA-BUS-FMT-YVYU10-2X10"> |
2094 | <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry> | 2110 | <entry>MEDIA_BUS_FMT_YVYU10_2X10</entry> |
2095 | <entry>0x200c</entry> | 2111 | <entry>0x200c</entry> |
2096 | <entry></entry> | 2112 | <entry></entry> |
2097 | &dash-ent-22; | 2113 | &dash-ent-22; |
@@ -2154,8 +2170,8 @@ | |||
2154 | <entry>u<subscript>1</subscript></entry> | 2170 | <entry>u<subscript>1</subscript></entry> |
2155 | <entry>u<subscript>0</subscript></entry> | 2171 | <entry>u<subscript>0</subscript></entry> |
2156 | </row> | 2172 | </row> |
2157 | <row id="V4L2-MBUS-FMT-Y12-1X12"> | 2173 | <row id="MEDIA-BUS-FMT-Y12-1X12"> |
2158 | <entry>V4L2_MBUS_FMT_Y12_1X12</entry> | 2174 | <entry>MEDIA_BUS_FMT_Y12_1X12</entry> |
2159 | <entry>0x2013</entry> | 2175 | <entry>0x2013</entry> |
2160 | <entry></entry> | 2176 | <entry></entry> |
2161 | &dash-ent-20; | 2177 | &dash-ent-20; |
@@ -2172,8 +2188,8 @@ | |||
2172 | <entry>y<subscript>1</subscript></entry> | 2188 | <entry>y<subscript>1</subscript></entry> |
2173 | <entry>y<subscript>0</subscript></entry> | 2189 | <entry>y<subscript>0</subscript></entry> |
2174 | </row> | 2190 | </row> |
2175 | <row id="V4L2-MBUS-FMT-UYVY8-1X16"> | 2191 | <row id="MEDIA-BUS-FMT-UYVY8-1X16"> |
2176 | <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry> | 2192 | <entry>MEDIA_BUS_FMT_UYVY8_1X16</entry> |
2177 | <entry>0x200f</entry> | 2193 | <entry>0x200f</entry> |
2178 | <entry></entry> | 2194 | <entry></entry> |
2179 | &dash-ent-16; | 2195 | &dash-ent-16; |
@@ -2216,8 +2232,8 @@ | |||
2216 | <entry>y<subscript>1</subscript></entry> | 2232 | <entry>y<subscript>1</subscript></entry> |
2217 | <entry>y<subscript>0</subscript></entry> | 2233 | <entry>y<subscript>0</subscript></entry> |
2218 | </row> | 2234 | </row> |
2219 | <row id="V4L2-MBUS-FMT-VYUY8-1X16"> | 2235 | <row id="MEDIA-BUS-FMT-VYUY8-1X16"> |
2220 | <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry> | 2236 | <entry>MEDIA_BUS_FMT_VYUY8_1X16</entry> |
2221 | <entry>0x2010</entry> | 2237 | <entry>0x2010</entry> |
2222 | <entry></entry> | 2238 | <entry></entry> |
2223 | &dash-ent-16; | 2239 | &dash-ent-16; |
@@ -2260,8 +2276,8 @@ | |||
2260 | <entry>y<subscript>1</subscript></entry> | 2276 | <entry>y<subscript>1</subscript></entry> |
2261 | <entry>y<subscript>0</subscript></entry> | 2277 | <entry>y<subscript>0</subscript></entry> |
2262 | </row> | 2278 | </row> |
2263 | <row id="V4L2-MBUS-FMT-YUYV8-1X16"> | 2279 | <row id="MEDIA-BUS-FMT-YUYV8-1X16"> |
2264 | <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry> | 2280 | <entry>MEDIA_BUS_FMT_YUYV8_1X16</entry> |
2265 | <entry>0x2011</entry> | 2281 | <entry>0x2011</entry> |
2266 | <entry></entry> | 2282 | <entry></entry> |
2267 | &dash-ent-16; | 2283 | &dash-ent-16; |
@@ -2304,8 +2320,8 @@ | |||
2304 | <entry>v<subscript>1</subscript></entry> | 2320 | <entry>v<subscript>1</subscript></entry> |
2305 | <entry>v<subscript>0</subscript></entry> | 2321 | <entry>v<subscript>0</subscript></entry> |
2306 | </row> | 2322 | </row> |
2307 | <row id="V4L2-MBUS-FMT-YVYU8-1X16"> | 2323 | <row id="MEDIA-BUS-FMT-YVYU8-1X16"> |
2308 | <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry> | 2324 | <entry>MEDIA_BUS_FMT_YVYU8_1X16</entry> |
2309 | <entry>0x2012</entry> | 2325 | <entry>0x2012</entry> |
2310 | <entry></entry> | 2326 | <entry></entry> |
2311 | &dash-ent-16; | 2327 | &dash-ent-16; |
@@ -2348,8 +2364,8 @@ | |||
2348 | <entry>u<subscript>1</subscript></entry> | 2364 | <entry>u<subscript>1</subscript></entry> |
2349 | <entry>u<subscript>0</subscript></entry> | 2365 | <entry>u<subscript>0</subscript></entry> |
2350 | </row> | 2366 | </row> |
2351 | <row id="V4L2-MBUS-FMT-YDYUYDYV8-1X16"> | 2367 | <row id="MEDIA-BUS-FMT-YDYUYDYV8-1X16"> |
2352 | <entry>V4L2_MBUS_FMT_YDYUYDYV8_1X16</entry> | 2368 | <entry>MEDIA_BUS_FMT_YDYUYDYV8_1X16</entry> |
2353 | <entry>0x2014</entry> | 2369 | <entry>0x2014</entry> |
2354 | <entry></entry> | 2370 | <entry></entry> |
2355 | &dash-ent-16; | 2371 | &dash-ent-16; |
@@ -2436,8 +2452,8 @@ | |||
2436 | <entry>v<subscript>1</subscript></entry> | 2452 | <entry>v<subscript>1</subscript></entry> |
2437 | <entry>v<subscript>0</subscript></entry> | 2453 | <entry>v<subscript>0</subscript></entry> |
2438 | </row> | 2454 | </row> |
2439 | <row id="V4L2-MBUS-FMT-UYVY10-1X20"> | 2455 | <row id="MEDIA-BUS-FMT-UYVY10-1X20"> |
2440 | <entry>V4L2_MBUS_FMT_UYVY10_1X20</entry> | 2456 | <entry>MEDIA_BUS_FMT_UYVY10_1X20</entry> |
2441 | <entry>0x201a</entry> | 2457 | <entry>0x201a</entry> |
2442 | <entry></entry> | 2458 | <entry></entry> |
2443 | &dash-ent-12; | 2459 | &dash-ent-12; |
@@ -2488,8 +2504,8 @@ | |||
2488 | <entry>y<subscript>1</subscript></entry> | 2504 | <entry>y<subscript>1</subscript></entry> |
2489 | <entry>y<subscript>0</subscript></entry> | 2505 | <entry>y<subscript>0</subscript></entry> |
2490 | </row> | 2506 | </row> |
2491 | <row id="V4L2-MBUS-FMT-VYUY10-1X20"> | 2507 | <row id="MEDIA-BUS-FMT-VYUY10-1X20"> |
2492 | <entry>V4L2_MBUS_FMT_VYUY10_1X20</entry> | 2508 | <entry>MEDIA_BUS_FMT_VYUY10_1X20</entry> |
2493 | <entry>0x201b</entry> | 2509 | <entry>0x201b</entry> |
2494 | <entry></entry> | 2510 | <entry></entry> |
2495 | &dash-ent-12; | 2511 | &dash-ent-12; |
@@ -2540,8 +2556,8 @@ | |||
2540 | <entry>y<subscript>1</subscript></entry> | 2556 | <entry>y<subscript>1</subscript></entry> |
2541 | <entry>y<subscript>0</subscript></entry> | 2557 | <entry>y<subscript>0</subscript></entry> |
2542 | </row> | 2558 | </row> |
2543 | <row id="V4L2-MBUS-FMT-YUYV10-1X20"> | 2559 | <row id="MEDIA-BUS-FMT-YUYV10-1X20"> |
2544 | <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> | 2560 | <entry>MEDIA_BUS_FMT_YUYV10_1X20</entry> |
2545 | <entry>0x200d</entry> | 2561 | <entry>0x200d</entry> |
2546 | <entry></entry> | 2562 | <entry></entry> |
2547 | &dash-ent-12; | 2563 | &dash-ent-12; |
@@ -2592,8 +2608,8 @@ | |||
2592 | <entry>v<subscript>1</subscript></entry> | 2608 | <entry>v<subscript>1</subscript></entry> |
2593 | <entry>v<subscript>0</subscript></entry> | 2609 | <entry>v<subscript>0</subscript></entry> |
2594 | </row> | 2610 | </row> |
2595 | <row id="V4L2-MBUS-FMT-YVYU10-1X20"> | 2611 | <row id="MEDIA-BUS-FMT-YVYU10-1X20"> |
2596 | <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry> | 2612 | <entry>MEDIA_BUS_FMT_YVYU10_1X20</entry> |
2597 | <entry>0x200e</entry> | 2613 | <entry>0x200e</entry> |
2598 | <entry></entry> | 2614 | <entry></entry> |
2599 | &dash-ent-12; | 2615 | &dash-ent-12; |
@@ -2644,8 +2660,8 @@ | |||
2644 | <entry>u<subscript>1</subscript></entry> | 2660 | <entry>u<subscript>1</subscript></entry> |
2645 | <entry>u<subscript>0</subscript></entry> | 2661 | <entry>u<subscript>0</subscript></entry> |
2646 | </row> | 2662 | </row> |
2647 | <row id="V4L2-MBUS-FMT-YUV10-1X30"> | 2663 | <row id="MEDIA-BUS-FMT-YUV10-1X30"> |
2648 | <entry>V4L2_MBUS_FMT_YUV10_1X30</entry> | 2664 | <entry>MEDIA_BUS_FMT_YUV10_1X30</entry> |
2649 | <entry>0x2016</entry> | 2665 | <entry>0x2016</entry> |
2650 | <entry></entry> | 2666 | <entry></entry> |
2651 | <entry>-</entry> | 2667 | <entry>-</entry> |
@@ -2681,8 +2697,8 @@ | |||
2681 | <entry>v<subscript>1</subscript></entry> | 2697 | <entry>v<subscript>1</subscript></entry> |
2682 | <entry>v<subscript>0</subscript></entry> | 2698 | <entry>v<subscript>0</subscript></entry> |
2683 | </row> | 2699 | </row> |
2684 | <row id="V4L2-MBUS-FMT-AYUV8-1X32"> | 2700 | <row id="MEDIA-BUS-FMT-AYUV8-1X32"> |
2685 | <entry>V4L2_MBUS_FMT_AYUV8_1X32</entry> | 2701 | <entry>MEDIA_BUS_FMT_AYUV8_1X32</entry> |
2686 | <entry>0x2017</entry> | 2702 | <entry>0x2017</entry> |
2687 | <entry></entry> | 2703 | <entry></entry> |
2688 | <entry>a<subscript>7</subscript></entry> | 2704 | <entry>a<subscript>7</subscript></entry> |
@@ -2718,8 +2734,8 @@ | |||
2718 | <entry>v<subscript>1</subscript></entry> | 2734 | <entry>v<subscript>1</subscript></entry> |
2719 | <entry>v<subscript>0</subscript></entry> | 2735 | <entry>v<subscript>0</subscript></entry> |
2720 | </row> | 2736 | </row> |
2721 | <row id="V4L2-MBUS-FMT-UYVY12-2X12"> | 2737 | <row id="MEDIA-BUS-FMT-UYVY12-2X12"> |
2722 | <entry>V4L2_MBUS_FMT_UYVY12_2X12</entry> | 2738 | <entry>MEDIA_BUS_FMT_UYVY12_2X12</entry> |
2723 | <entry>0x201c</entry> | 2739 | <entry>0x201c</entry> |
2724 | <entry></entry> | 2740 | <entry></entry> |
2725 | &dash-ent-20; | 2741 | &dash-ent-20; |
@@ -2790,8 +2806,8 @@ | |||
2790 | <entry>y<subscript>1</subscript></entry> | 2806 | <entry>y<subscript>1</subscript></entry> |
2791 | <entry>y<subscript>0</subscript></entry> | 2807 | <entry>y<subscript>0</subscript></entry> |
2792 | </row> | 2808 | </row> |
2793 | <row id="V4L2-MBUS-FMT-VYUY12-2X12"> | 2809 | <row id="MEDIA-BUS-FMT-VYUY12-2X12"> |
2794 | <entry>V4L2_MBUS_FMT_VYUY12_2X12</entry> | 2810 | <entry>MEDIA_BUS_FMT_VYUY12_2X12</entry> |
2795 | <entry>0x201d</entry> | 2811 | <entry>0x201d</entry> |
2796 | <entry></entry> | 2812 | <entry></entry> |
2797 | &dash-ent-20; | 2813 | &dash-ent-20; |
@@ -2862,8 +2878,8 @@ | |||
2862 | <entry>y<subscript>1</subscript></entry> | 2878 | <entry>y<subscript>1</subscript></entry> |
2863 | <entry>y<subscript>0</subscript></entry> | 2879 | <entry>y<subscript>0</subscript></entry> |
2864 | </row> | 2880 | </row> |
2865 | <row id="V4L2-MBUS-FMT-YUYV12-2X12"> | 2881 | <row id="MEDIA-BUS-FMT-YUYV12-2X12"> |
2866 | <entry>V4L2_MBUS_FMT_YUYV12_2X12</entry> | 2882 | <entry>MEDIA_BUS_FMT_YUYV12_2X12</entry> |
2867 | <entry>0x201e</entry> | 2883 | <entry>0x201e</entry> |
2868 | <entry></entry> | 2884 | <entry></entry> |
2869 | &dash-ent-20; | 2885 | &dash-ent-20; |
@@ -2934,8 +2950,8 @@ | |||
2934 | <entry>v<subscript>1</subscript></entry> | 2950 | <entry>v<subscript>1</subscript></entry> |
2935 | <entry>v<subscript>0</subscript></entry> | 2951 | <entry>v<subscript>0</subscript></entry> |
2936 | </row> | 2952 | </row> |
2937 | <row id="V4L2-MBUS-FMT-YVYU12-2X12"> | 2953 | <row id="MEDIA-BUS-FMT-YVYU12-2X12"> |
2938 | <entry>V4L2_MBUS_FMT_YVYU12_2X12</entry> | 2954 | <entry>MEDIA_BUS_FMT_YVYU12_2X12</entry> |
2939 | <entry>0x201f</entry> | 2955 | <entry>0x201f</entry> |
2940 | <entry></entry> | 2956 | <entry></entry> |
2941 | &dash-ent-20; | 2957 | &dash-ent-20; |
@@ -3006,8 +3022,8 @@ | |||
3006 | <entry>u<subscript>1</subscript></entry> | 3022 | <entry>u<subscript>1</subscript></entry> |
3007 | <entry>u<subscript>0</subscript></entry> | 3023 | <entry>u<subscript>0</subscript></entry> |
3008 | </row> | 3024 | </row> |
3009 | <row id="V4L2-MBUS-FMT-UYVY12-1X24"> | 3025 | <row id="MEDIA-BUS-FMT-UYVY12-1X24"> |
3010 | <entry>V4L2_MBUS_FMT_UYVY12_1X24</entry> | 3026 | <entry>MEDIA_BUS_FMT_UYVY12_1X24</entry> |
3011 | <entry>0x2020</entry> | 3027 | <entry>0x2020</entry> |
3012 | <entry></entry> | 3028 | <entry></entry> |
3013 | &dash-ent-8; | 3029 | &dash-ent-8; |
@@ -3066,8 +3082,8 @@ | |||
3066 | <entry>y<subscript>1</subscript></entry> | 3082 | <entry>y<subscript>1</subscript></entry> |
3067 | <entry>y<subscript>0</subscript></entry> | 3083 | <entry>y<subscript>0</subscript></entry> |
3068 | </row> | 3084 | </row> |
3069 | <row id="V4L2-MBUS-FMT-VYUY12-1X24"> | 3085 | <row id="MEDIA-BUS-FMT-VYUY12-1X24"> |
3070 | <entry>V4L2_MBUS_FMT_VYUY12_1X24</entry> | 3086 | <entry>MEDIA_BUS_FMT_VYUY12_1X24</entry> |
3071 | <entry>0x2021</entry> | 3087 | <entry>0x2021</entry> |
3072 | <entry></entry> | 3088 | <entry></entry> |
3073 | &dash-ent-8; | 3089 | &dash-ent-8; |
@@ -3126,8 +3142,8 @@ | |||
3126 | <entry>y<subscript>1</subscript></entry> | 3142 | <entry>y<subscript>1</subscript></entry> |
3127 | <entry>y<subscript>0</subscript></entry> | 3143 | <entry>y<subscript>0</subscript></entry> |
3128 | </row> | 3144 | </row> |
3129 | <row id="V4L2-MBUS-FMT-YUYV12-1X24"> | 3145 | <row id="MEDIA-BUS-FMT-YUYV12-1X24"> |
3130 | <entry>V4L2_MBUS_FMT_YUYV12_1X24</entry> | 3146 | <entry>MEDIA_BUS_FMT_YUYV12_1X24</entry> |
3131 | <entry>0x2022</entry> | 3147 | <entry>0x2022</entry> |
3132 | <entry></entry> | 3148 | <entry></entry> |
3133 | &dash-ent-8; | 3149 | &dash-ent-8; |
@@ -3186,8 +3202,8 @@ | |||
3186 | <entry>v<subscript>1</subscript></entry> | 3202 | <entry>v<subscript>1</subscript></entry> |
3187 | <entry>v<subscript>0</subscript></entry> | 3203 | <entry>v<subscript>0</subscript></entry> |
3188 | </row> | 3204 | </row> |
3189 | <row id="V4L2-MBUS-FMT-YVYU12-1X24"> | 3205 | <row id="MEDIA-BUS-FMT-YVYU12-1X24"> |
3190 | <entry>V4L2_MBUS_FMT_YVYU12_1X24</entry> | 3206 | <entry>MEDIA_BUS_FMT_YVYU12_1X24</entry> |
3191 | <entry>0x2023</entry> | 3207 | <entry>0x2023</entry> |
3192 | <entry></entry> | 3208 | <entry></entry> |
3193 | &dash-ent-8; | 3209 | &dash-ent-8; |
@@ -3366,8 +3382,8 @@ | |||
3366 | </row> | 3382 | </row> |
3367 | </thead> | 3383 | </thead> |
3368 | <tbody valign="top"> | 3384 | <tbody valign="top"> |
3369 | <row id="V4L2-MBUS-FMT-AHSV8888-1X32"> | 3385 | <row id="MEDIA-BUS-FMT-AHSV8888-1X32"> |
3370 | <entry>V4L2_MBUS_FMT_AHSV8888_1X32</entry> | 3386 | <entry>MEDIA_BUS_FMT_AHSV8888_1X32</entry> |
3371 | <entry>0x6001</entry> | 3387 | <entry>0x6001</entry> |
3372 | <entry></entry> | 3388 | <entry></entry> |
3373 | <entry>a<subscript>7</subscript></entry> | 3389 | <entry>a<subscript>7</subscript></entry> |
@@ -3422,7 +3438,7 @@ | |||
3422 | </para> | 3438 | </para> |
3423 | 3439 | ||
3424 | <para>For instance, for a JPEG baseline process and an 8-bit bus width | 3440 | <para>For instance, for a JPEG baseline process and an 8-bit bus width |
3425 | the format will be named <constant>V4L2_MBUS_FMT_JPEG_1X8</constant>. | 3441 | the format will be named <constant>MEDIA_BUS_FMT_JPEG_1X8</constant>. |
3426 | </para> | 3442 | </para> |
3427 | 3443 | ||
3428 | <para>The following table lists existing JPEG compressed formats.</para> | 3444 | <para>The following table lists existing JPEG compressed formats.</para> |
@@ -3441,8 +3457,8 @@ | |||
3441 | </row> | 3457 | </row> |
3442 | </thead> | 3458 | </thead> |
3443 | <tbody valign="top"> | 3459 | <tbody valign="top"> |
3444 | <row id="V4L2-MBUS-FMT-JPEG-1X8"> | 3460 | <row id="MEDIA-BUS-FMT-JPEG-1X8"> |
3445 | <entry>V4L2_MBUS_FMT_JPEG_1X8</entry> | 3461 | <entry>MEDIA_BUS_FMT_JPEG_1X8</entry> |
3446 | <entry>0x4001</entry> | 3462 | <entry>0x4001</entry> |
3447 | <entry>Besides of its usage for the parallel bus this format is | 3463 | <entry>Besides of its usage for the parallel bus this format is |
3448 | recommended for transmission of JPEG data over MIPI CSI bus | 3464 | recommended for transmission of JPEG data over MIPI CSI bus |
@@ -3484,8 +3500,8 @@ interface and may change in the future.</para> | |||
3484 | </row> | 3500 | </row> |
3485 | </thead> | 3501 | </thead> |
3486 | <tbody valign="top"> | 3502 | <tbody valign="top"> |
3487 | <row id="V4L2-MBUS-FMT-S5C-UYVY-JPEG-1X8"> | 3503 | <row id="MEDIA-BUS-FMT-S5C-UYVY-JPEG-1X8"> |
3488 | <entry>V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8</entry> | 3504 | <entry>MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8</entry> |
3489 | <entry>0x5001</entry> | 3505 | <entry>0x5001</entry> |
3490 | <entry> | 3506 | <entry> |
3491 | Interleaved raw UYVY and JPEG image format with embedded | 3507 | Interleaved raw UYVY and JPEG image format with embedded |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 7cfe618f754d..ac0f8d9d2a49 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -152,6 +152,15 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
152 | applications. --> | 152 | applications. --> |
153 | 153 | ||
154 | <revision> | 154 | <revision> |
155 | <revnumber>3.19</revnumber> | ||
156 | <date>2014-12-05</date> | ||
157 | <authorinitials>hv</authorinitials> | ||
158 | <revremark>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding; and &v4l2-quantization; fields | ||
159 | to &v4l2-pix-format;, &v4l2-pix-format-mplane; and &v4l2-mbus-framefmt;. | ||
160 | </revremark> | ||
161 | </revision> | ||
162 | |||
163 | <revision> | ||
155 | <revnumber>3.17</revnumber> | 164 | <revnumber>3.17</revnumber> |
156 | <date>2014-08-04</date> | 165 | <date>2014-08-04</date> |
157 | <authorinitials>lp, hv</authorinitials> | 166 | <authorinitials>lp, hv</authorinitials> |
@@ -539,7 +548,7 @@ and discussions on the V4L mailing list.</revremark> | |||
539 | </partinfo> | 548 | </partinfo> |
540 | 549 | ||
541 | <title>Video for Linux Two API Specification</title> | 550 | <title>Video for Linux Two API Specification</title> |
542 | <subtitle>Revision 3.17</subtitle> | 551 | <subtitle>Revision 3.19</subtitle> |
543 | 552 | ||
544 | <chapter id="common"> | 553 | <chapter id="common"> |
545 | &sub-common; | 554 | &sub-common; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml index 493a39a8ef21..603fecef9083 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml | |||
@@ -287,6 +287,14 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | |||
287 | <entry>0x00000004</entry> | 287 | <entry>0x00000004</entry> |
288 | <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry> | 288 | <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry> |
289 | </row> | 289 | </row> |
290 | <row> | ||
291 | <entry><constant>V4L2_IN_CAP_NATIVE_SIZE</constant></entry> | ||
292 | <entry>0x00000008</entry> | ||
293 | <entry>This input supports setting the native size using | ||
294 | the <constant>V4L2_SEL_TGT_NATIVE_SIZE</constant> | ||
295 | selection target, see <xref | ||
296 | linkend="v4l2-selections-common"/>.</entry> | ||
297 | </row> | ||
290 | </tbody> | 298 | </tbody> |
291 | </tgroup> | 299 | </tgroup> |
292 | </table> | 300 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml index 2654e097df39..773fb1258c24 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml | |||
@@ -172,6 +172,14 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | |||
172 | <entry>0x00000004</entry> | 172 | <entry>0x00000004</entry> |
173 | <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry> | 173 | <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry> |
174 | </row> | 174 | </row> |
175 | <row> | ||
176 | <entry><constant>V4L2_OUT_CAP_NATIVE_SIZE</constant></entry> | ||
177 | <entry>0x00000008</entry> | ||
178 | <entry>This output supports setting the native size using | ||
179 | the <constant>V4L2_SEL_TGT_NATIVE_SIZE</constant> | ||
180 | selection target, see <xref | ||
181 | linkend="v4l2-selections-common"/>.</entry> | ||
182 | </row> | ||
175 | </tbody> | 183 | </tbody> |
176 | </tgroup> | 184 | </tgroup> |
177 | </table> | 185 | </table> |
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index bbe9c1fd5cef..1fdc246e4256 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
@@ -540,7 +540,7 @@ appears in sysfs. | |||
540 | </para></listitem> | 540 | </para></listitem> |
541 | 541 | ||
542 | <listitem><para> | 542 | <listitem><para> |
543 | <varname>unsigned long size</varname>: Fill in the size of the | 543 | <varname>resource_size_t size</varname>: Fill in the size of the |
544 | memory block that <varname>addr</varname> points to. If <varname>size</varname> | 544 | memory block that <varname>addr</varname> points to. If <varname>size</varname> |
545 | is zero, the mapping is considered unused. Note that you | 545 | is zero, the mapping is considered unused. Note that you |
546 | <emphasis>must</emphasis> initialize <varname>size</varname> with zero for | 546 | <emphasis>must</emphasis> initialize <varname>size</varname> with zero for |
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 784793df81ed..84ef6a90131c 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -3658,6 +3658,29 @@ struct _snd_pcm_runtime { | |||
3658 | </para> | 3658 | </para> |
3659 | 3659 | ||
3660 | <para> | 3660 | <para> |
3661 | The above callback can be simplified with a helper function, | ||
3662 | <function>snd_ctl_enum_info</function>. The final code | ||
3663 | looks like below. | ||
3664 | (You can pass ARRAY_SIZE(texts) instead of 4 in the third | ||
3665 | argument; it's a matter of taste.) | ||
3666 | |||
3667 | <informalexample> | ||
3668 | <programlisting> | ||
3669 | <![CDATA[ | ||
3670 | static int snd_myctl_enum_info(struct snd_kcontrol *kcontrol, | ||
3671 | struct snd_ctl_elem_info *uinfo) | ||
3672 | { | ||
3673 | static char *texts[4] = { | ||
3674 | "First", "Second", "Third", "Fourth" | ||
3675 | }; | ||
3676 | return snd_ctl_enum_info(uinfo, 1, 4, texts); | ||
3677 | } | ||
3678 | ]]> | ||
3679 | </programlisting> | ||
3680 | </informalexample> | ||
3681 | </para> | ||
3682 | |||
3683 | <para> | ||
3661 | Some common info callbacks are available for your convenience: | 3684 | Some common info callbacks are available for your convenience: |
3662 | <function>snd_ctl_boolean_mono_info()</function> and | 3685 | <function>snd_ctl_boolean_mono_info()</function> and |
3663 | <function>snd_ctl_boolean_stereo_info()</function>. | 3686 | <function>snd_ctl_boolean_stereo_info()</function>. |
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index f13c9132e9f2..653d5d739d7f 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -42,7 +42,13 @@ The driver interface depends on your hardware. If your system | |||
42 | properly provides the SMBIOS info for IPMI, the driver will detect it | 42 | properly provides the SMBIOS info for IPMI, the driver will detect it |
43 | and just work. If you have a board with a standard interface (These | 43 | and just work. If you have a board with a standard interface (These |
44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware | 44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware |
45 | manual), choose the 'IPMI SI handler' option. | 45 | manual), choose the 'IPMI SI handler' option. A driver also exists |
46 | for direct I2C access to the IPMI management controller. Some boards | ||
47 | support this, but it is unknown if it will work on every board. For | ||
48 | this, choose 'IPMI SMBus handler', but be ready to try to do some | ||
49 | figuring to see if it will work on your system if the SMBIOS/APCI | ||
50 | information is wrong or not present. It is fairly safe to have both | ||
51 | these enabled and let the drivers auto-detect what is present. | ||
46 | 52 | ||
47 | You should generally enable ACPI on your system, as systems with IPMI | 53 | You should generally enable ACPI on your system, as systems with IPMI |
48 | can have ACPI tables describing them. | 54 | can have ACPI tables describing them. |
@@ -52,7 +58,8 @@ their job correctly, the IPMI controller should be automatically | |||
52 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, | 58 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, |
53 | many boards do not have this information. The driver attempts | 59 | many boards do not have this information. The driver attempts |
54 | standard defaults, but they may not work. If you fall into this | 60 | standard defaults, but they may not work. If you fall into this |
55 | situation, you need to read the section below named 'The SI Driver'. | 61 | situation, you need to read the section below named 'The SI Driver' or |
62 | "The SMBus Driver" on how to hand-configure your system. | ||
56 | 63 | ||
57 | IPMI defines a standard watchdog timer. You can enable this with the | 64 | IPMI defines a standard watchdog timer. You can enable this with the |
58 | 'IPMI Watchdog Timer' config option. If you compile the driver into | 65 | 'IPMI Watchdog Timer' config option. If you compile the driver into |
@@ -97,7 +104,12 @@ driver, each open file for this device ties in to the message handler | |||
97 | as an IPMI user. | 104 | as an IPMI user. |
98 | 105 | ||
99 | ipmi_si - A driver for various system interfaces. This supports KCS, | 106 | ipmi_si - A driver for various system interfaces. This supports KCS, |
100 | SMIC, and BT interfaces. | 107 | SMIC, and BT interfaces. Unless you have an SMBus interface or your |
108 | own custom interface, you probably need to use this. | ||
109 | |||
110 | ipmi_ssif - A driver for accessing BMCs on the SMBus. It uses the | ||
111 | I2C kernel driver's SMBus interfaces to send and receive IPMI messages | ||
112 | over the SMBus. | ||
101 | 113 | ||
102 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog | 114 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog |
103 | timer. This driver implements the standard Linux watchdog timer | 115 | timer. This driver implements the standard Linux watchdog timer |
@@ -476,6 +488,62 @@ for specifying an interface. Note that when removing an interface, | |||
476 | only the first three parameters (si type, address type, and address) | 488 | only the first three parameters (si type, address type, and address) |
477 | are used for the comparison. Any options are ignored for removing. | 489 | are used for the comparison. Any options are ignored for removing. |
478 | 490 | ||
491 | The SMBus Driver (SSIF) | ||
492 | ----------------------- | ||
493 | |||
494 | The SMBus driver allows up to 4 SMBus devices to be configured in the | ||
495 | system. By default, the driver will only register with something it | ||
496 | finds in DMI or ACPI tables. You can change this | ||
497 | at module load time (for a module) with: | ||
498 | |||
499 | modprobe ipmi_ssif.o | ||
500 | addr=<i2caddr1>[,<i2caddr2>[,...]] | ||
501 | adapter=<adapter1>[,<adapter2>[...]] | ||
502 | dbg=<flags1>,<flags2>... | ||
503 | slave_addrs=<addr1>,<addr2>,... | ||
504 | [dbg_probe=1] | ||
505 | |||
506 | The addresses are normal I2C addresses. The adapter is the string | ||
507 | name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name. | ||
508 | It is *NOT* i2c-<n> itself. | ||
509 | |||
510 | The debug flags are bit flags for each BMC found, they are: | ||
511 | IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 | ||
512 | |||
513 | Setting dbg_probe to 1 will enable debugging of the probing and | ||
514 | detection process for BMCs on the SMBusses. | ||
515 | |||
516 | The slave_addrs specifies the IPMI address of the local BMC. This is | ||
517 | usually 0x20 and the driver defaults to that, but in case it's not, it | ||
518 | can be specified when the driver starts up. | ||
519 | |||
520 | Discovering the IPMI compliant BMC on the SMBus can cause devices on | ||
521 | the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI | ||
522 | message as a block write to the I2C bus and waits for a response. | ||
523 | This action can be detrimental to some I2C devices. It is highly | ||
524 | recommended that the known I2C address be given to the SMBus driver in | ||
525 | the smb_addr parameter unless you have DMI or ACPI data to tell the | ||
526 | driver what to use. | ||
527 | |||
528 | When compiled into the kernel, the addresses can be specified on the | ||
529 | kernel command line as: | ||
530 | |||
531 | ipmb_ssif.addr=<i2caddr1>[,<i2caddr2>[...]] | ||
532 | ipmi_ssif.adapter=<adapter1>[,<adapter2>[...]] | ||
533 | ipmi_ssif.dbg=<flags1>[,<flags2>[...]] | ||
534 | ipmi_ssif.dbg_probe=1 | ||
535 | ipmi_ssif.slave_addrs=<addr1>[,<addr2>[...]] | ||
536 | |||
537 | These are the same options as on the module command line. | ||
538 | |||
539 | The I2C driver does not support non-blocking access or polling, so | ||
540 | this driver cannod to IPMI panic events, extend the watchdog at panic | ||
541 | time, or other panic-related IPMI functions without special kernel | ||
542 | patches and driver modifications. You can get those at the openipmi | ||
543 | web page. | ||
544 | |||
545 | The driver supports a hot add and remove of interfaces through the I2C | ||
546 | sysfs interface. | ||
479 | 547 | ||
480 | Other Pieces | 548 | Other Pieces |
481 | ------------ | 549 | ------------ |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 8a8b82c9ca53..39cfa72732ff 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
@@ -151,3 +151,74 @@ used and no descriptor gets allocated it is very important to make sure | |||
151 | that the driver using the simple domain call irq_create_mapping() | 151 | that the driver using the simple domain call irq_create_mapping() |
152 | before any irq_find_mapping() since the latter will actually work | 152 | before any irq_find_mapping() since the latter will actually work |
153 | for the static IRQ assignment case. | 153 | for the static IRQ assignment case. |
154 | |||
155 | ==== Hierarchy IRQ domain ==== | ||
156 | On some architectures, there may be multiple interrupt controllers | ||
157 | involved in delivering an interrupt from the device to the target CPU. | ||
158 | Let's look at a typical interrupt delivering path on x86 platforms: | ||
159 | |||
160 | Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU | ||
161 | |||
162 | There are three interrupt controllers involved: | ||
163 | 1) IOAPIC controller | ||
164 | 2) Interrupt remapping controller | ||
165 | 3) Local APIC controller | ||
166 | |||
167 | To support such a hardware topology and make software architecture match | ||
168 | hardware architecture, an irq_domain data structure is built for each | ||
169 | interrupt controller and those irq_domains are organized into hierarchy. | ||
170 | When building irq_domain hierarchy, the irq_domain near to the device is | ||
171 | child and the irq_domain near to CPU is parent. So a hierarchy structure | ||
172 | as below will be built for the example above. | ||
173 | CPU Vector irq_domain (root irq_domain to manage CPU vectors) | ||
174 | ^ | ||
175 | | | ||
176 | Interrupt Remapping irq_domain (manage irq_remapping entries) | ||
177 | ^ | ||
178 | | | ||
179 | IOAPIC irq_domain (manage IOAPIC delivery entries/pins) | ||
180 | |||
181 | There are four major interfaces to use hierarchy irq_domain: | ||
182 | 1) irq_domain_alloc_irqs(): allocate IRQ descriptors and interrupt | ||
183 | controller related resources to deliver these interrupts. | ||
184 | 2) irq_domain_free_irqs(): free IRQ descriptors and interrupt controller | ||
185 | related resources associated with these interrupts. | ||
186 | 3) irq_domain_activate_irq(): activate interrupt controller hardware to | ||
187 | deliver the interrupt. | ||
188 | 3) irq_domain_deactivate_irq(): deactivate interrupt controller hardware | ||
189 | to stop delivering the interrupt. | ||
190 | |||
191 | Following changes are needed to support hierarchy irq_domain. | ||
192 | 1) a new field 'parent' is added to struct irq_domain; it's used to | ||
193 | maintain irq_domain hierarchy information. | ||
194 | 2) a new field 'parent_data' is added to struct irq_data; it's used to | ||
195 | build hierarchy irq_data to match hierarchy irq_domains. The irq_data | ||
196 | is used to store irq_domain pointer and hardware irq number. | ||
197 | 3) new callbacks are added to struct irq_domain_ops to support hierarchy | ||
198 | irq_domain operations. | ||
199 | |||
200 | With support of hierarchy irq_domain and hierarchy irq_data ready, an | ||
201 | irq_domain structure is built for each interrupt controller, and an | ||
202 | irq_data structure is allocated for each irq_domain associated with an | ||
203 | IRQ. Now we could go one step further to support stacked(hierarchy) | ||
204 | irq_chip. That is, an irq_chip is associated with each irq_data along | ||
205 | the hierarchy. A child irq_chip may implement a required action by | ||
206 | itself or by cooperating with its parent irq_chip. | ||
207 | |||
208 | With stacked irq_chip, interrupt controller driver only needs to deal | ||
209 | with the hardware managed by itself and may ask for services from its | ||
210 | parent irq_chip when needed. So we could achieve a much cleaner | ||
211 | software architecture. | ||
212 | |||
213 | For an interrupt controller driver to support hierarchy irq_domain, it | ||
214 | needs to: | ||
215 | 1) Implement irq_domain_ops.alloc and irq_domain_ops.free | ||
216 | 2) Optionally implement irq_domain_ops.activate and | ||
217 | irq_domain_ops.deactivate. | ||
218 | 3) Optionally implement an irq_chip to manage the interrupt controller | ||
219 | hardware. | ||
220 | 4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap, | ||
221 | they are unused with hierarchy irq_domain. | ||
222 | |||
223 | Hierarchy irq_domain may also be used to support other architectures, | ||
224 | such as ARM, ARM64 etc. | ||
diff --git a/Documentation/RCU/rcu.txt b/Documentation/RCU/rcu.txt index bf778332a28f..745f429fda79 100644 --- a/Documentation/RCU/rcu.txt +++ b/Documentation/RCU/rcu.txt | |||
@@ -36,7 +36,7 @@ o How can the updater tell when a grace period has completed | |||
36 | executed in user mode, or executed in the idle loop, we can | 36 | executed in user mode, or executed in the idle loop, we can |
37 | safely free up that item. | 37 | safely free up that item. |
38 | 38 | ||
39 | Preemptible variants of RCU (CONFIG_TREE_PREEMPT_RCU) get the | 39 | Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the |
40 | same effect, but require that the readers manipulate CPU-local | 40 | same effect, but require that the readers manipulate CPU-local |
41 | counters. These counters allow limited types of blocking within | 41 | counters. These counters allow limited types of blocking within |
42 | RCU read-side critical sections. SRCU also uses CPU-local | 42 | RCU read-side critical sections. SRCU also uses CPU-local |
@@ -81,7 +81,7 @@ o I hear that RCU is patented? What is with that? | |||
81 | o I hear that RCU needs work in order to support realtime kernels? | 81 | o I hear that RCU needs work in order to support realtime kernels? |
82 | 82 | ||
83 | This work is largely completed. Realtime-friendly RCU can be | 83 | This work is largely completed. Realtime-friendly RCU can be |
84 | enabled via the CONFIG_TREE_PREEMPT_RCU kernel configuration | 84 | enabled via the CONFIG_PREEMPT_RCU kernel configuration |
85 | parameter. However, work is in progress for enabling priority | 85 | parameter. However, work is in progress for enabling priority |
86 | boosting of preempted RCU read-side critical sections. This is | 86 | boosting of preempted RCU read-side critical sections. This is |
87 | needed if you have CPU-bound realtime threads. | 87 | needed if you have CPU-bound realtime threads. |
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index ef5a2fd4ff70..ed186a902d31 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -26,12 +26,6 @@ CONFIG_RCU_CPU_STALL_TIMEOUT | |||
26 | Stall-warning messages may be enabled and disabled completely via | 26 | Stall-warning messages may be enabled and disabled completely via |
27 | /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress. | 27 | /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress. |
28 | 28 | ||
29 | CONFIG_RCU_CPU_STALL_VERBOSE | ||
30 | |||
31 | This kernel configuration parameter causes the stall warning to | ||
32 | also dump the stacks of any tasks that are blocking the current | ||
33 | RCU-preempt grace period. | ||
34 | |||
35 | CONFIG_RCU_CPU_STALL_INFO | 29 | CONFIG_RCU_CPU_STALL_INFO |
36 | 30 | ||
37 | This kernel configuration parameter causes the stall warning to | 31 | This kernel configuration parameter causes the stall warning to |
@@ -77,7 +71,7 @@ This message indicates that CPU 5 detected that it was causing a stall, | |||
77 | and that the stall was affecting RCU-sched. This message will normally be | 71 | and that the stall was affecting RCU-sched. This message will normally be |
78 | followed by a stack dump of the offending CPU. On TREE_RCU kernel builds, | 72 | followed by a stack dump of the offending CPU. On TREE_RCU kernel builds, |
79 | RCU and RCU-sched are implemented by the same underlying mechanism, | 73 | RCU and RCU-sched are implemented by the same underlying mechanism, |
80 | while on TREE_PREEMPT_RCU kernel builds, RCU is instead implemented | 74 | while on PREEMPT_RCU kernel builds, RCU is instead implemented |
81 | by rcu_preempt_state. | 75 | by rcu_preempt_state. |
82 | 76 | ||
83 | On the other hand, if the offending CPU fails to print out a stall-warning | 77 | On the other hand, if the offending CPU fails to print out a stall-warning |
@@ -89,7 +83,7 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { 3 5 } (detected by 2, 2502 j | |||
89 | This message indicates that CPU 2 detected that CPUs 3 and 5 were both | 83 | This message indicates that CPU 2 detected that CPUs 3 and 5 were both |
90 | causing stalls, and that the stall was affecting RCU-bh. This message | 84 | causing stalls, and that the stall was affecting RCU-bh. This message |
91 | will normally be followed by stack dumps for each CPU. Please note that | 85 | will normally be followed by stack dumps for each CPU. Please note that |
92 | TREE_PREEMPT_RCU builds can be stalled by tasks as well as by CPUs, | 86 | PREEMPT_RCU builds can be stalled by tasks as well as by CPUs, |
93 | and that the tasks will be indicated by PID, for example, "P3421". | 87 | and that the tasks will be indicated by PID, for example, "P3421". |
94 | It is even possible for a rcu_preempt_state stall to be caused by both | 88 | It is even possible for a rcu_preempt_state stall to be caused by both |
95 | CPUs -and- tasks, in which case the offending CPUs and tasks will all | 89 | CPUs -and- tasks, in which case the offending CPUs and tasks will all |
@@ -205,10 +199,10 @@ o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might | |||
205 | o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that | 199 | o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that |
206 | is running at a higher priority than the RCU softirq threads. | 200 | is running at a higher priority than the RCU softirq threads. |
207 | This will prevent RCU callbacks from ever being invoked, | 201 | This will prevent RCU callbacks from ever being invoked, |
208 | and in a CONFIG_TREE_PREEMPT_RCU kernel will further prevent | 202 | and in a CONFIG_PREEMPT_RCU kernel will further prevent |
209 | RCU grace periods from ever completing. Either way, the | 203 | RCU grace periods from ever completing. Either way, the |
210 | system will eventually run out of memory and hang. In the | 204 | system will eventually run out of memory and hang. In the |
211 | CONFIG_TREE_PREEMPT_RCU case, you might see stall-warning | 205 | CONFIG_PREEMPT_RCU case, you might see stall-warning |
212 | messages. | 206 | messages. |
213 | 207 | ||
214 | o A hardware or software issue shuts off the scheduler-clock | 208 | o A hardware or software issue shuts off the scheduler-clock |
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index 910870b15acd..b63b9bb3bc0c 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -8,7 +8,7 @@ The following sections describe the debugfs files and formats, first | |||
8 | for rcutree and next for rcutiny. | 8 | for rcutree and next for rcutiny. |
9 | 9 | ||
10 | 10 | ||
11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats | 11 | CONFIG_TREE_RCU and CONFIG_PREEMPT_RCU debugfs Files and Formats |
12 | 12 | ||
13 | These implementations of RCU provide several debugfs directories under the | 13 | These implementations of RCU provide several debugfs directories under the |
14 | top-level directory "rcu": | 14 | top-level directory "rcu": |
@@ -18,7 +18,7 @@ rcu/rcu_preempt | |||
18 | rcu/rcu_sched | 18 | rcu/rcu_sched |
19 | 19 | ||
20 | Each directory contains files for the corresponding flavor of RCU. | 20 | Each directory contains files for the corresponding flavor of RCU. |
21 | Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU. | 21 | Note that rcu/rcu_preempt is only present for CONFIG_PREEMPT_RCU. |
22 | For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor, | 22 | For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor, |
23 | so that activity for both appears in rcu/rcu_sched. | 23 | so that activity for both appears in rcu/rcu_sched. |
24 | 24 | ||
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index e48c57f1943b..88dfce182f66 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -137,7 +137,7 @@ rcu_read_lock() | |||
137 | Used by a reader to inform the reclaimer that the reader is | 137 | Used by a reader to inform the reclaimer that the reader is |
138 | entering an RCU read-side critical section. It is illegal | 138 | entering an RCU read-side critical section. It is illegal |
139 | to block while in an RCU read-side critical section, though | 139 | to block while in an RCU read-side critical section, though |
140 | kernels built with CONFIG_TREE_PREEMPT_RCU can preempt RCU | 140 | kernels built with CONFIG_PREEMPT_RCU can preempt RCU |
141 | read-side critical sections. Any RCU-protected data structure | 141 | read-side critical sections. Any RCU-protected data structure |
142 | accessed during an RCU read-side critical section is guaranteed to | 142 | accessed during an RCU read-side critical section is guaranteed to |
143 | remain unreclaimed for the full duration of that critical section. | 143 | remain unreclaimed for the full duration of that critical section. |
diff --git a/Documentation/acpi/gpio-properties.txt b/Documentation/acpi/gpio-properties.txt new file mode 100644 index 000000000000..ae36fcf86dc7 --- /dev/null +++ b/Documentation/acpi/gpio-properties.txt | |||
@@ -0,0 +1,96 @@ | |||
1 | _DSD Device Properties Related to GPIO | ||
2 | -------------------------------------- | ||
3 | |||
4 | With the release of ACPI 5.1 and the _DSD configuration objecte names | ||
5 | can finally be given to GPIOs (and other things as well) returned by | ||
6 | _CRS. Previously, we were only able to use an integer index to find | ||
7 | the corresponding GPIO, which is pretty error prone (it depends on | ||
8 | the _CRS output ordering, for example). | ||
9 | |||
10 | With _DSD we can now query GPIOs using a name instead of an integer | ||
11 | index, like the ASL example below shows: | ||
12 | |||
13 | // Bluetooth device with reset and shutdown GPIOs | ||
14 | Device (BTH) | ||
15 | { | ||
16 | Name (_HID, ...) | ||
17 | |||
18 | Name (_CRS, ResourceTemplate () | ||
19 | { | ||
20 | GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, | ||
21 | "\\_SB.GPO0", 0, ResourceConsumer) {15} | ||
22 | GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, | ||
23 | "\\_SB.GPO0", 0, ResourceConsumer) {27, 31} | ||
24 | }) | ||
25 | |||
26 | Name (_DSD, Package () | ||
27 | { | ||
28 | ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | ||
29 | Package () | ||
30 | { | ||
31 | Package () {"reset-gpio", Package() {^BTH, 1, 1, 0 }}, | ||
32 | Package () {"shutdown-gpio", Package() {^BTH, 0, 0, 0 }}, | ||
33 | } | ||
34 | }) | ||
35 | } | ||
36 | |||
37 | The format of the supported GPIO property is: | ||
38 | |||
39 | Package () { "name", Package () { ref, index, pin, active_low }} | ||
40 | |||
41 | ref - The device that has _CRS containing GpioIo()/GpioInt() resources, | ||
42 | typically this is the device itself (BTH in our case). | ||
43 | index - Index of the GpioIo()/GpioInt() resource in _CRS starting from zero. | ||
44 | pin - Pin in the GpioIo()/GpioInt() resource. Typically this is zero. | ||
45 | active_low - If 1 the GPIO is marked as active_low. | ||
46 | |||
47 | Since ACPI GpioIo() resource does not have a field saying whether it is | ||
48 | active low or high, the "active_low" argument can be used here. Setting | ||
49 | it to 1 marks the GPIO as active low. | ||
50 | |||
51 | In our Bluetooth example the "reset-gpio" refers to the second GpioIo() | ||
52 | resource, second pin in that resource with the GPIO number of 31. | ||
53 | |||
54 | ACPI GPIO Mappings Provided by Drivers | ||
55 | -------------------------------------- | ||
56 | |||
57 | There are systems in which the ACPI tables do not contain _DSD but provide _CRS | ||
58 | with GpioIo()/GpioInt() resources and device drivers still need to work with | ||
59 | them. | ||
60 | |||
61 | In those cases ACPI device identification objects, _HID, _CID, _CLS, _SUB, _HRV, | ||
62 | available to the driver can be used to identify the device and that is supposed | ||
63 | to be sufficient to determine the meaning and purpose of all of the GPIO lines | ||
64 | listed by the GpioIo()/GpioInt() resources returned by _CRS. In other words, | ||
65 | the driver is supposed to know what to use the GpioIo()/GpioInt() resources for | ||
66 | once it has identified the device. Having done that, it can simply assign names | ||
67 | to the GPIO lines it is going to use and provide the GPIO subsystem with a | ||
68 | mapping between those names and the ACPI GPIO resources corresponding to them. | ||
69 | |||
70 | To do that, the driver needs to define a mapping table as a NULL-terminated | ||
71 | array of struct acpi_gpio_mapping objects that each contain a name, a pointer | ||
72 | to an array of line data (struct acpi_gpio_params) objects and the size of that | ||
73 | array. Each struct acpi_gpio_params object consists of three fields, | ||
74 | crs_entry_index, line_index, active_low, representing the index of the target | ||
75 | GpioIo()/GpioInt() resource in _CRS starting from zero, the index of the target | ||
76 | line in that resource starting from zero, and the active-low flag for that line, | ||
77 | respectively, in analogy with the _DSD GPIO property format specified above. | ||
78 | |||
79 | For the example Bluetooth device discussed previously the data structures in | ||
80 | question would look like this: | ||
81 | |||
82 | static const struct acpi_gpio_params reset_gpio = { 1, 1, false }; | ||
83 | static const struct acpi_gpio_params shutdown_gpio = { 0, 0, false }; | ||
84 | |||
85 | static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = { | ||
86 | { "reset-gpio", &reset_gpio, 1 }, | ||
87 | { "shutdown-gpio", &shutdown_gpio, 1 }, | ||
88 | { }, | ||
89 | }; | ||
90 | |||
91 | Next, the mapping table needs to be passed as the second argument to | ||
92 | acpi_dev_add_driver_gpios() that will register it with the ACPI device object | ||
93 | pointed to by its first argument. That should be done in the driver's .probe() | ||
94 | routine. On removal, the driver should unregister its GPIO mapping table by | ||
95 | calling acpi_dev_remove_driver_gpios() on the ACPI device object where that | ||
96 | table was previously registered. | ||
diff --git a/Documentation/arm/firmware.txt b/Documentation/arm/firmware.txt index c2e468fe7b0b..da6713adac8a 100644 --- a/Documentation/arm/firmware.txt +++ b/Documentation/arm/firmware.txt | |||
@@ -7,32 +7,14 @@ world, which changes the way some things have to be initialized. This makes | |||
7 | a need to provide an interface for such platforms to specify available firmware | 7 | a need to provide an interface for such platforms to specify available firmware |
8 | operations and call them when needed. | 8 | operations and call them when needed. |
9 | 9 | ||
10 | Firmware operations can be specified using struct firmware_ops | 10 | Firmware operations can be specified by filling in a struct firmware_ops |
11 | 11 | with appropriate callbacks and then registering it with register_firmware_ops() | |
12 | struct firmware_ops { | 12 | function. |
13 | /* | ||
14 | * Enters CPU idle mode | ||
15 | */ | ||
16 | int (*do_idle)(void); | ||
17 | /* | ||
18 | * Sets boot address of specified physical CPU | ||
19 | */ | ||
20 | int (*set_cpu_boot_addr)(int cpu, unsigned long boot_addr); | ||
21 | /* | ||
22 | * Boots specified physical CPU | ||
23 | */ | ||
24 | int (*cpu_boot)(int cpu); | ||
25 | /* | ||
26 | * Initializes L2 cache | ||
27 | */ | ||
28 | int (*l2x0_init)(void); | ||
29 | }; | ||
30 | |||
31 | and then registered with register_firmware_ops function | ||
32 | 13 | ||
33 | void register_firmware_ops(const struct firmware_ops *ops) | 14 | void register_firmware_ops(const struct firmware_ops *ops) |
34 | 15 | ||
35 | the ops pointer must be non-NULL. | 16 | The ops pointer must be non-NULL. More information about struct firmware_ops |
17 | and its members can be found in arch/arm/include/asm/firmware.h header. | ||
36 | 18 | ||
37 | There is a default, empty set of operations provided, so there is no need to | 19 | There is a default, empty set of operations provided, so there is no need to |
38 | set anything if platform does not require firmware operations. | 20 | set anything if platform does not require firmware operations. |
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 38dc06d0a791..4178ebda6e66 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -41,7 +41,7 @@ fffe8000 fffeffff DTCM mapping area for platforms with | |||
41 | fffe0000 fffe7fff ITCM mapping area for platforms with | 41 | fffe0000 fffe7fff ITCM mapping area for platforms with |
42 | ITCM mounted inside the CPU. | 42 | ITCM mounted inside the CPU. |
43 | 43 | ||
44 | ffc00000 ffdfffff Fixmap mapping region. Addresses provided | 44 | ffc00000 ffefffff Fixmap mapping region. Addresses provided |
45 | by fix_to_virt() will be located here. | 45 | by fix_to_virt() will be located here. |
46 | 46 | ||
47 | fee00000 feffffff Mapping of PCI I/O space. This is a static | 47 | fee00000 feffffff Mapping of PCI I/O space. This is a static |
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index 7945238453ed..e68d163df33d 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README | |||
@@ -37,16 +37,26 @@ SunXi family | |||
37 | http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf | 37 | http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf |
38 | 38 | ||
39 | - Allwinner A23 | 39 | - Allwinner A23 |
40 | + Not Supported | 40 | + Datasheet |
41 | http://dl.linux-sunxi.org/A23/A23%20Datasheet%20V1.0%2020130830.pdf | ||
42 | + User Manual | ||
43 | http://dl.linux-sunxi.org/A23/A23%20User%20Manual%20V1.0%2020130830.pdf | ||
41 | 44 | ||
42 | * Quad ARM Cortex-A7 based SoCs | 45 | * Quad ARM Cortex-A7 based SoCs |
43 | - Allwinner A31 (sun6i) | 46 | - Allwinner A31 (sun6i) |
44 | + Datasheet | 47 | + Datasheet |
45 | http://dl.linux-sunxi.org/A31/A31%20Datasheet%20-%20v1.00%20(2012-12-24).pdf | 48 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20datasheet%20V1.3%2020131106.pdf |
49 | + User Manual | ||
50 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20user%20manual%20V1.1%2020130630.pdf | ||
46 | 51 | ||
47 | - Allwinner A31s (sun6i) | 52 | - Allwinner A31s (sun6i) |
48 | + Not Supported | 53 | + Not Supported |
54 | + Datasheet | ||
55 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20datasheet%20V1.3%2020131106.pdf | ||
56 | + User Manual | ||
57 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20User%20Manual%20%20V1.0%2020130322.pdf | ||
49 | 58 | ||
50 | * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs | 59 | * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs |
51 | - Allwinner A80 | 60 | - Allwinner A80 |
52 | + Not Supported \ No newline at end of file | 61 | + Datasheet |
62 | http://dl.linux-sunxi.org/A80/A80_Datasheet_Revision_1.0_0404.pdf | ||
diff --git a/Documentation/arm64/legacy_instructions.txt b/Documentation/arm64/legacy_instructions.txt new file mode 100644 index 000000000000..a3b3da2ec6ed --- /dev/null +++ b/Documentation/arm64/legacy_instructions.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | The arm64 port of the Linux kernel provides infrastructure to support | ||
2 | emulation of instructions which have been deprecated, or obsoleted in | ||
3 | the architecture. The infrastructure code uses undefined instruction | ||
4 | hooks to support emulation. Where available it also allows turning on | ||
5 | the instruction execution in hardware. | ||
6 | |||
7 | The emulation mode can be controlled by writing to sysctl nodes | ||
8 | (/proc/sys/abi). The following explains the different execution | ||
9 | behaviours and the corresponding values of the sysctl nodes - | ||
10 | |||
11 | * Undef | ||
12 | Value: 0 | ||
13 | Generates undefined instruction abort. Default for instructions that | ||
14 | have been obsoleted in the architecture, e.g., SWP | ||
15 | |||
16 | * Emulate | ||
17 | Value: 1 | ||
18 | Uses software emulation. To aid migration of software, in this mode | ||
19 | usage of emulated instruction is traced as well as rate limited | ||
20 | warnings are issued. This is the default for deprecated | ||
21 | instructions, .e.g., CP15 barriers | ||
22 | |||
23 | * Hardware Execution | ||
24 | Value: 2 | ||
25 | Although marked as deprecated, some implementations may support the | ||
26 | enabling/disabling of hardware support for the execution of these | ||
27 | instructions. Using hardware execution generally provides better | ||
28 | performance, but at the loss of ability to gather runtime statistics | ||
29 | about the use of the deprecated instructions. | ||
30 | |||
31 | The default mode depends on the status of the instruction in the | ||
32 | architecture. Deprecated instructions should default to emulation | ||
33 | while obsolete instructions must be undefined by default. | ||
34 | |||
35 | Supported legacy instructions | ||
36 | ----------------------------- | ||
37 | * SWP{B} | ||
38 | Node: /proc/sys/abi/swp | ||
39 | Status: Obsolete | ||
40 | Default: Undef (0) | ||
41 | |||
42 | * CP15 Barriers | ||
43 | Node: /proc/sys/abi/cp15_barrier | ||
44 | Status: Deprecated | ||
45 | Default: Emulate (1) | ||
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 68542fe13b85..183e41bdcb69 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt | |||
@@ -7,12 +7,13 @@ | |||
7 | maintainers on how to implement atomic counter, bitops, and spinlock | 7 | maintainers on how to implement atomic counter, bitops, and spinlock |
8 | interfaces properly. | 8 | interfaces properly. |
9 | 9 | ||
10 | The atomic_t type should be defined as a signed integer. | 10 | The atomic_t type should be defined as a signed integer and |
11 | Also, it should be made opaque such that any kind of cast to a normal | 11 | the atomic_long_t type as a signed long integer. Also, they should |
12 | C integer type will fail. Something like the following should | 12 | be made opaque such that any kind of cast to a normal C integer type |
13 | suffice: | 13 | will fail. Something like the following should suffice: |
14 | 14 | ||
15 | typedef struct { int counter; } atomic_t; | 15 | typedef struct { int counter; } atomic_t; |
16 | typedef struct { long counter; } atomic_long_t; | ||
16 | 17 | ||
17 | Historically, counter has been declared volatile. This is now discouraged. | 18 | Historically, counter has been declared volatile. This is now discouraged. |
18 | See Documentation/volatile-considered-harmful.txt for the complete rationale. | 19 | See Documentation/volatile-considered-harmful.txt for the complete rationale. |
@@ -37,6 +38,9 @@ initializer is used before runtime. If the initializer is used at runtime, a | |||
37 | proper implicit or explicit read memory barrier is needed before reading the | 38 | proper implicit or explicit read memory barrier is needed before reading the |
38 | value with atomic_read from another thread. | 39 | value with atomic_read from another thread. |
39 | 40 | ||
41 | As with all of the atomic_ interfaces, replace the leading "atomic_" | ||
42 | with "atomic_long_" to operate on atomic_long_t. | ||
43 | |||
40 | The second interface can be used at runtime, as in: | 44 | The second interface can be used at runtime, as in: |
41 | 45 | ||
42 | struct foo { atomic_t counter; }; | 46 | struct foo { atomic_t counter; }; |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 2101e718670d..5aabc08de811 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -827,10 +827,6 @@ but in the event of any barrier requests in the tag queue we need to ensure | |||
827 | that requests are restarted in the order they were queue. This may happen | 827 | that requests are restarted in the order they were queue. This may happen |
828 | if the driver needs to use blk_queue_invalidate_tags(). | 828 | if the driver needs to use blk_queue_invalidate_tags(). |
829 | 829 | ||
830 | Tagging also defines a new request flag, REQ_QUEUED. This is set whenever | ||
831 | a request is currently tagged. You should not use this flag directly, | ||
832 | blk_rq_tagged(rq) is the portable way to do so. | ||
833 | |||
834 | 3.3 I/O Submission | 830 | 3.3 I/O Submission |
835 | 831 | ||
836 | The routine submit_bio() is used to submit a single io. Higher level i/o | 832 | The routine submit_bio() is used to submit a single io. Higher level i/o |
@@ -946,7 +942,11 @@ elevator_allow_merge_fn called whenever the block layer determines | |||
946 | request safely. The io scheduler may still | 942 | request safely. The io scheduler may still |
947 | want to stop a merge at this point if it | 943 | want to stop a merge at this point if it |
948 | results in some sort of conflict internally, | 944 | results in some sort of conflict internally, |
949 | this hook allows it to do that. | 945 | this hook allows it to do that. Note however |
946 | that two *requests* can still be merged at later | ||
947 | time. Currently the io scheduler has no way to | ||
948 | prevent that. It can only learn about the fact | ||
949 | from elevator_merge_req_fn callback. | ||
950 | 950 | ||
951 | elevator_dispatch_fn* fills the dispatch queue with ready requests. | 951 | elevator_dispatch_fn* fills the dispatch queue with ready requests. |
952 | I/O schedulers are free to postpone requests by | 952 | I/O schedulers are free to postpone requests by |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 10c949b293e4..f935fac1e73b 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -312,10 +312,10 @@ the "cpuset" cgroup subsystem, the steps are something like: | |||
312 | 2) mkdir /sys/fs/cgroup/cpuset | 312 | 2) mkdir /sys/fs/cgroup/cpuset |
313 | 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset | 313 | 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset |
314 | 4) Create the new cgroup by doing mkdir's and write's (or echo's) in | 314 | 4) Create the new cgroup by doing mkdir's and write's (or echo's) in |
315 | the /sys/fs/cgroup virtual file system. | 315 | the /sys/fs/cgroup/cpuset virtual file system. |
316 | 5) Start a task that will be the "founding father" of the new job. | 316 | 5) Start a task that will be the "founding father" of the new job. |
317 | 6) Attach that task to the new cgroup by writing its PID to the | 317 | 6) Attach that task to the new cgroup by writing its PID to the |
318 | /sys/fs/cgroup/cpuset/tasks file for that cgroup. | 318 | /sys/fs/cgroup/cpuset tasks file for that cgroup. |
319 | 7) fork, exec or clone the job tasks from this founding father task. | 319 | 7) fork, exec or clone the job tasks from this founding father task. |
320 | 320 | ||
321 | For example, the following sequence of commands will setup a cgroup | 321 | For example, the following sequence of commands will setup a cgroup |
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index 3c94ff3f9693..f2235a162529 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -445,7 +445,7 @@ across partially overlapping sets of CPUs would risk unstable dynamics | |||
445 | that would be beyond our understanding. So if each of two partially | 445 | that would be beyond our understanding. So if each of two partially |
446 | overlapping cpusets enables the flag 'cpuset.sched_load_balance', then we | 446 | overlapping cpusets enables the flag 'cpuset.sched_load_balance', then we |
447 | form a single sched domain that is a superset of both. We won't move | 447 | form a single sched domain that is a superset of both. We won't move |
448 | a task to a CPU outside it cpuset, but the scheduler load balancing | 448 | a task to a CPU outside its cpuset, but the scheduler load balancing |
449 | code might waste some compute cycles considering that possibility. | 449 | code might waste some compute cycles considering that possibility. |
450 | 450 | ||
451 | This mismatch is why there is not a simple one-to-one relation | 451 | This mismatch is why there is not a simple one-to-one relation |
@@ -552,8 +552,8 @@ otherwise initial value -1 that indicates the cpuset has no request. | |||
552 | 1 : search siblings (hyperthreads in a core). | 552 | 1 : search siblings (hyperthreads in a core). |
553 | 2 : search cores in a package. | 553 | 2 : search cores in a package. |
554 | 3 : search cpus in a node [= system wide on non-NUMA system] | 554 | 3 : search cpus in a node [= system wide on non-NUMA system] |
555 | ( 4 : search nodes in a chunk of node [on NUMA system] ) | 555 | 4 : search nodes in a chunk of node [on NUMA system] |
556 | ( 5 : search system wide [on NUMA system] ) | 556 | 5 : search system wide [on NUMA system] |
557 | 557 | ||
558 | The system default is architecture dependent. The system default | 558 | The system default is architecture dependent. The system default |
559 | can be changed using the relax_domain_level= boot parameter. | 559 | can be changed using the relax_domain_level= boot parameter. |
diff --git a/Documentation/cgroups/hugetlb.txt b/Documentation/cgroups/hugetlb.txt index a9faaca1f029..106245c3aecc 100644 --- a/Documentation/cgroups/hugetlb.txt +++ b/Documentation/cgroups/hugetlb.txt | |||
@@ -29,7 +29,7 @@ Brief summary of control files | |||
29 | 29 | ||
30 | hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage | 30 | hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage |
31 | hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded | 31 | hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded |
32 | hugetlb.<hugepagesize>.usage_in_bytes # show current res_counter usage for "hugepagesize" hugetlb | 32 | hugetlb.<hugepagesize>.usage_in_bytes # show current usage for "hugepagesize" hugetlb |
33 | hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit | 33 | hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit |
34 | 34 | ||
35 | For a system supporting two hugepage size (16M and 16G) the control | 35 | For a system supporting two hugepage size (16M and 16G) the control |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 02ab997a1ed2..a22df3ad35ff 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -1,5 +1,10 @@ | |||
1 | Memory Resource Controller | 1 | Memory Resource Controller |
2 | 2 | ||
3 | NOTE: This document is hopelessly outdated and it asks for a complete | ||
4 | rewrite. It still contains a useful information so we are keeping it | ||
5 | here but make sure to check the current code if you need a deeper | ||
6 | understanding. | ||
7 | |||
3 | NOTE: The Memory Resource Controller has generically been referred to as the | 8 | NOTE: The Memory Resource Controller has generically been referred to as the |
4 | memory controller in this document. Do not confuse memory controller | 9 | memory controller in this document. Do not confuse memory controller |
5 | used here with the memory controller that is used in hardware. | 10 | used here with the memory controller that is used in hardware. |
@@ -52,9 +57,9 @@ Brief summary of control files. | |||
52 | tasks # attach a task(thread) and show list of threads | 57 | tasks # attach a task(thread) and show list of threads |
53 | cgroup.procs # show list of processes | 58 | cgroup.procs # show list of processes |
54 | cgroup.event_control # an interface for event_fd() | 59 | cgroup.event_control # an interface for event_fd() |
55 | memory.usage_in_bytes # show current res_counter usage for memory | 60 | memory.usage_in_bytes # show current usage for memory |
56 | (See 5.5 for details) | 61 | (See 5.5 for details) |
57 | memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap | 62 | memory.memsw.usage_in_bytes # show current usage for memory+Swap |
58 | (See 5.5 for details) | 63 | (See 5.5 for details) |
59 | memory.limit_in_bytes # set/show limit of memory usage | 64 | memory.limit_in_bytes # set/show limit of memory usage |
60 | memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage | 65 | memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage |
@@ -116,16 +121,16 @@ The memory controller is the first controller developed. | |||
116 | 121 | ||
117 | 2.1. Design | 122 | 2.1. Design |
118 | 123 | ||
119 | The core of the design is a counter called the res_counter. The res_counter | 124 | The core of the design is a counter called the page_counter. The |
120 | tracks the current memory usage and limit of the group of processes associated | 125 | page_counter tracks the current memory usage and limit of the group of |
121 | with the controller. Each cgroup has a memory controller specific data | 126 | processes associated with the controller. Each cgroup has a memory controller |
122 | structure (mem_cgroup) associated with it. | 127 | specific data structure (mem_cgroup) associated with it. |
123 | 128 | ||
124 | 2.2. Accounting | 129 | 2.2. Accounting |
125 | 130 | ||
126 | +--------------------+ | 131 | +--------------------+ |
127 | | mem_cgroup | | 132 | | mem_cgroup | |
128 | | (res_counter) | | 133 | | (page_counter) | |
129 | +--------------------+ | 134 | +--------------------+ |
130 | / ^ \ | 135 | / ^ \ |
131 | / | \ | 136 | / | \ |
@@ -321,7 +326,7 @@ per cgroup, instead of globally. | |||
321 | 326 | ||
322 | * tcp memory pressure: sockets memory pressure for the tcp protocol. | 327 | * tcp memory pressure: sockets memory pressure for the tcp protocol. |
323 | 328 | ||
324 | 2.7.3 Common use cases | 329 | 2.7.2 Common use cases |
325 | 330 | ||
326 | Because the "kmem" counter is fed to the main user counter, kernel memory can | 331 | Because the "kmem" counter is fed to the main user counter, kernel memory can |
327 | never be limited completely independently of user memory. Say "U" is the user | 332 | never be limited completely independently of user memory. Say "U" is the user |
@@ -349,20 +354,19 @@ set: | |||
349 | 354 | ||
350 | 3. User Interface | 355 | 3. User Interface |
351 | 356 | ||
352 | 0. Configuration | 357 | 3.0. Configuration |
353 | 358 | ||
354 | a. Enable CONFIG_CGROUPS | 359 | a. Enable CONFIG_CGROUPS |
355 | b. Enable CONFIG_RESOURCE_COUNTERS | 360 | b. Enable CONFIG_MEMCG |
356 | c. Enable CONFIG_MEMCG | 361 | c. Enable CONFIG_MEMCG_SWAP (to use swap extension) |
357 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) | ||
358 | d. Enable CONFIG_MEMCG_KMEM (to use kmem extension) | 362 | d. Enable CONFIG_MEMCG_KMEM (to use kmem extension) |
359 | 363 | ||
360 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) | 364 | 3.1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) |
361 | # mount -t tmpfs none /sys/fs/cgroup | 365 | # mount -t tmpfs none /sys/fs/cgroup |
362 | # mkdir /sys/fs/cgroup/memory | 366 | # mkdir /sys/fs/cgroup/memory |
363 | # mount -t cgroup none /sys/fs/cgroup/memory -o memory | 367 | # mount -t cgroup none /sys/fs/cgroup/memory -o memory |
364 | 368 | ||
365 | 2. Make the new group and move bash into it | 369 | 3.2. Make the new group and move bash into it |
366 | # mkdir /sys/fs/cgroup/memory/0 | 370 | # mkdir /sys/fs/cgroup/memory/0 |
367 | # echo $$ > /sys/fs/cgroup/memory/0/tasks | 371 | # echo $$ > /sys/fs/cgroup/memory/0/tasks |
368 | 372 | ||
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt deleted file mode 100644 index 762ca54eb929..000000000000 --- a/Documentation/cgroups/resource_counter.txt +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | |||
2 | The Resource Counter | ||
3 | |||
4 | The resource counter, declared at include/linux/res_counter.h, | ||
5 | is supposed to facilitate the resource management by controllers | ||
6 | by providing common stuff for accounting. | ||
7 | |||
8 | This "stuff" includes the res_counter structure and routines | ||
9 | to work with it. | ||
10 | |||
11 | |||
12 | |||
13 | 1. Crucial parts of the res_counter structure | ||
14 | |||
15 | a. unsigned long long usage | ||
16 | |||
17 | The usage value shows the amount of a resource that is consumed | ||
18 | by a group at a given time. The units of measurement should be | ||
19 | determined by the controller that uses this counter. E.g. it can | ||
20 | be bytes, items or any other unit the controller operates on. | ||
21 | |||
22 | b. unsigned long long max_usage | ||
23 | |||
24 | The maximal value of the usage over time. | ||
25 | |||
26 | This value is useful when gathering statistical information about | ||
27 | the particular group, as it shows the actual resource requirements | ||
28 | for a particular group, not just some usage snapshot. | ||
29 | |||
30 | c. unsigned long long limit | ||
31 | |||
32 | The maximal allowed amount of resource to consume by the group. In | ||
33 | case the group requests for more resources, so that the usage value | ||
34 | would exceed the limit, the resource allocation is rejected (see | ||
35 | the next section). | ||
36 | |||
37 | d. unsigned long long failcnt | ||
38 | |||
39 | The failcnt stands for "failures counter". This is the number of | ||
40 | resource allocation attempts that failed. | ||
41 | |||
42 | c. spinlock_t lock | ||
43 | |||
44 | Protects changes of the above values. | ||
45 | |||
46 | |||
47 | |||
48 | 2. Basic accounting routines | ||
49 | |||
50 | a. void res_counter_init(struct res_counter *rc, | ||
51 | struct res_counter *rc_parent) | ||
52 | |||
53 | Initializes the resource counter. As usual, should be the first | ||
54 | routine called for a new counter. | ||
55 | |||
56 | The struct res_counter *parent can be used to define a hierarchical | ||
57 | child -> parent relationship directly in the res_counter structure, | ||
58 | NULL can be used to define no relationship. | ||
59 | |||
60 | c. int res_counter_charge(struct res_counter *rc, unsigned long val, | ||
61 | struct res_counter **limit_fail_at) | ||
62 | |||
63 | When a resource is about to be allocated it has to be accounted | ||
64 | with the appropriate resource counter (controller should determine | ||
65 | which one to use on its own). This operation is called "charging". | ||
66 | |||
67 | This is not very important which operation - resource allocation | ||
68 | or charging - is performed first, but | ||
69 | * if the allocation is performed first, this may create a | ||
70 | temporary resource over-usage by the time resource counter is | ||
71 | charged; | ||
72 | * if the charging is performed first, then it should be uncharged | ||
73 | on error path (if the one is called). | ||
74 | |||
75 | If the charging fails and a hierarchical dependency exists, the | ||
76 | limit_fail_at parameter is set to the particular res_counter element | ||
77 | where the charging failed. | ||
78 | |||
79 | d. u64 res_counter_uncharge(struct res_counter *rc, unsigned long val) | ||
80 | |||
81 | When a resource is released (freed) it should be de-accounted | ||
82 | from the resource counter it was accounted to. This is called | ||
83 | "uncharging". The return value of this function indicate the amount | ||
84 | of charges still present in the counter. | ||
85 | |||
86 | The _locked routines imply that the res_counter->lock is taken. | ||
87 | |||
88 | e. u64 res_counter_uncharge_until | ||
89 | (struct res_counter *rc, struct res_counter *top, | ||
90 | unsigned long val) | ||
91 | |||
92 | Almost same as res_counter_uncharge() but propagation of uncharge | ||
93 | stops when rc == top. This is useful when kill a res_counter in | ||
94 | child cgroup. | ||
95 | |||
96 | 2.1 Other accounting routines | ||
97 | |||
98 | There are more routines that may help you with common needs, like | ||
99 | checking whether the limit is reached or resetting the max_usage | ||
100 | value. They are all declared in include/linux/res_counter.h. | ||
101 | |||
102 | |||
103 | |||
104 | 3. Analyzing the resource counter registrations | ||
105 | |||
106 | a. If the failcnt value constantly grows, this means that the counter's | ||
107 | limit is too tight. Either the group is misbehaving and consumes too | ||
108 | many resources, or the configuration is not suitable for the group | ||
109 | and the limit should be increased. | ||
110 | |||
111 | b. The max_usage value can be used to quickly tune the group. One may | ||
112 | set the limits to maximal values and either load the container with | ||
113 | a common pattern or leave one for a while. After this the max_usage | ||
114 | value shows the amount of memory the container would require during | ||
115 | its common activity. | ||
116 | |||
117 | Setting the limit a bit above this value gives a pretty good | ||
118 | configuration that works in most of the cases. | ||
119 | |||
120 | c. If the max_usage is much less than the limit, but the failcnt value | ||
121 | is growing, then the group tries to allocate a big chunk of resource | ||
122 | at once. | ||
123 | |||
124 | d. If the max_usage is much less than the limit, but the failcnt value | ||
125 | is 0, then this group is given too high limit, that it does not | ||
126 | require. It is better to lower the limit a bit leaving more resource | ||
127 | for other groups. | ||
128 | |||
129 | |||
130 | |||
131 | 4. Communication with the control groups subsystem (cgroups) | ||
132 | |||
133 | All the resource controllers that are using cgroups and resource counters | ||
134 | should provide files (in the cgroup filesystem) to work with the resource | ||
135 | counter fields. They are recommended to adhere to the following rules: | ||
136 | |||
137 | a. File names | ||
138 | |||
139 | Field name File name | ||
140 | --------------------------------------------------- | ||
141 | usage usage_in_<unit_of_measurement> | ||
142 | max_usage max_usage_in_<unit_of_measurement> | ||
143 | limit limit_in_<unit_of_measurement> | ||
144 | failcnt failcnt | ||
145 | lock no file :) | ||
146 | |||
147 | b. Reading from file should show the corresponding field value in the | ||
148 | appropriate format. | ||
149 | |||
150 | c. Writing to file | ||
151 | |||
152 | Field Expected behavior | ||
153 | ---------------------------------- | ||
154 | usage prohibited | ||
155 | max_usage reset to usage | ||
156 | limit set the limit | ||
157 | failcnt reset to zero | ||
158 | |||
159 | |||
160 | |||
161 | 5. Usage example | ||
162 | |||
163 | a. Declare a task group (take a look at cgroups subsystem for this) and | ||
164 | fold a res_counter into it | ||
165 | |||
166 | struct my_group { | ||
167 | struct res_counter res; | ||
168 | |||
169 | <other fields> | ||
170 | } | ||
171 | |||
172 | b. Put hooks in resource allocation/release paths | ||
173 | |||
174 | int alloc_something(...) | ||
175 | { | ||
176 | if (res_counter_charge(res_counter_ptr, amount) < 0) | ||
177 | return -ENOMEM; | ||
178 | |||
179 | <allocate the resource and return to the caller> | ||
180 | } | ||
181 | |||
182 | void release_something(...) | ||
183 | { | ||
184 | res_counter_uncharge(res_counter_ptr, amount); | ||
185 | |||
186 | <release the resource> | ||
187 | } | ||
188 | |||
189 | In order to keep the usage value self-consistent, both the | ||
190 | "res_counter_ptr" and the "amount" in release_something() should be | ||
191 | the same as they were in the alloc_something() when the releasing | ||
192 | resource was allocated. | ||
193 | |||
194 | c. Provide the way to read res_counter values and set them (the cgroups | ||
195 | still can help with it). | ||
196 | |||
197 | c. Compile and run :) | ||
diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt index a69ffe1d54d5..765d7fc0e692 100644 --- a/Documentation/cpu-freq/intel-pstate.txt +++ b/Documentation/cpu-freq/intel-pstate.txt | |||
@@ -1,17 +1,28 @@ | |||
1 | Intel P-state driver | 1 | Intel P-state driver |
2 | -------------------- | 2 | -------------------- |
3 | 3 | ||
4 | This driver implements a scaling driver with an internal governor for | 4 | This driver provides an interface to control the P state selection for |
5 | Intel Core processors. The driver follows the same model as the | 5 | SandyBridge+ Intel processors. The driver can operate two different |
6 | Transmeta scaling driver (longrun.c) and implements the setpolicy() | 6 | modes based on the processor model legacy and Hardware P state (HWP) |
7 | instead of target(). Scaling drivers that implement setpolicy() are | 7 | mode. |
8 | assumed to implement internal governors by the cpufreq core. All the | 8 | |
9 | logic for selecting the current P state is contained within the | 9 | In legacy mode the driver implements a scaling driver with an internal |
10 | driver; no external governor is used by the cpufreq core. | 10 | governor for Intel Core processors. The driver follows the same model |
11 | 11 | as the Transmeta scaling driver (longrun.c) and implements the | |
12 | Intel SandyBridge+ processors are supported. | 12 | setpolicy() instead of target(). Scaling drivers that implement |
13 | 13 | setpolicy() are assumed to implement internal governors by the cpufreq | |
14 | New sysfs files for controlling P state selection have been added to | 14 | core. All the logic for selecting the current P state is contained |
15 | within the driver; no external governor is used by the cpufreq core. | ||
16 | |||
17 | In HWP mode P state selection is implemented in the processor | ||
18 | itself. The driver provides the interfaces between the cpufreq core and | ||
19 | the processor to control P state selection based on user preferences | ||
20 | and reporting frequency to the cpufreq core. In this mode the | ||
21 | internal governor code is disabled. | ||
22 | |||
23 | In addtion to the interfaces provided by the cpufreq core for | ||
24 | controlling frequency the driver provides sysfs files for | ||
25 | controlling P state selection. These files have been added to | ||
15 | /sys/devices/system/cpu/intel_pstate/ | 26 | /sys/devices/system/cpu/intel_pstate/ |
16 | 27 | ||
17 | max_perf_pct: limits the maximum P state that will be requested by | 28 | max_perf_pct: limits the maximum P state that will be requested by |
@@ -33,7 +44,9 @@ frequency is fiction for Intel Core processors. Even if the scaling | |||
33 | driver selects a single P state the actual frequency the processor | 44 | driver selects a single P state the actual frequency the processor |
34 | will run at is selected by the processor itself. | 45 | will run at is selected by the processor itself. |
35 | 46 | ||
36 | New debugfs files have also been added to /sys/kernel/debug/pstate_snb/ | 47 | For legacy mode debugfs files have also been added to allow tuning of |
48 | the internal governor algorythm. These files are located at | ||
49 | /sys/kernel/debug/pstate_snb/ These files are NOT present in HWP mode. | ||
37 | 50 | ||
38 | deadband | 51 | deadband |
39 | d_gain_pct | 52 | d_gain_pct |
diff --git a/Documentation/crypto/crypto-API-userspace.txt b/Documentation/crypto/crypto-API-userspace.txt new file mode 100644 index 000000000000..ac619cd90300 --- /dev/null +++ b/Documentation/crypto/crypto-API-userspace.txt | |||
@@ -0,0 +1,205 @@ | |||
1 | Introduction | ||
2 | ============ | ||
3 | |||
4 | The concepts of the kernel crypto API visible to kernel space is fully | ||
5 | applicable to the user space interface as well. Therefore, the kernel crypto API | ||
6 | high level discussion for the in-kernel use cases applies here as well. | ||
7 | |||
8 | The major difference, however, is that user space can only act as a consumer | ||
9 | and never as a provider of a transformation or cipher algorithm. | ||
10 | |||
11 | The following covers the user space interface exported by the kernel crypto | ||
12 | API. A working example of this description is libkcapi that can be obtained from | ||
13 | [1]. That library can be used by user space applications that require | ||
14 | cryptographic services from the kernel. | ||
15 | |||
16 | Some details of the in-kernel kernel crypto API aspects do not | ||
17 | apply to user space, however. This includes the difference between synchronous | ||
18 | and asynchronous invocations. The user space API call is fully synchronous. | ||
19 | In addition, only a subset of all cipher types are available as documented | ||
20 | below. | ||
21 | |||
22 | |||
23 | User space API general remarks | ||
24 | ============================== | ||
25 | |||
26 | The kernel crypto API is accessible from user space. Currently, the following | ||
27 | ciphers are accessible: | ||
28 | |||
29 | * Message digest including keyed message digest (HMAC, CMAC) | ||
30 | |||
31 | * Symmetric ciphers | ||
32 | |||
33 | Note, AEAD ciphers are currently not supported via the symmetric cipher | ||
34 | interface. | ||
35 | |||
36 | The interface is provided via Netlink using the type AF_ALG. In addition, the | ||
37 | setsockopt option type is SOL_ALG. In case the user space header files do not | ||
38 | export these flags yet, use the following macros: | ||
39 | |||
40 | #ifndef AF_ALG | ||
41 | #define AF_ALG 38 | ||
42 | #endif | ||
43 | #ifndef SOL_ALG | ||
44 | #define SOL_ALG 279 | ||
45 | #endif | ||
46 | |||
47 | A cipher is accessed with the same name as done for the in-kernel API calls. | ||
48 | This includes the generic vs. unique naming schema for ciphers as well as the | ||
49 | enforcement of priorities for generic names. | ||
50 | |||
51 | To interact with the kernel crypto API, a Netlink socket must be created by | ||
52 | the user space application. User space invokes the cipher operation with the | ||
53 | send/write system call family. The result of the cipher operation is obtained | ||
54 | with the read/recv system call family. | ||
55 | |||
56 | The following API calls assume that the Netlink socket descriptor is already | ||
57 | opened by the user space application and discusses only the kernel crypto API | ||
58 | specific invocations. | ||
59 | |||
60 | To initialize a Netlink interface, the following sequence has to be performed | ||
61 | by the consumer: | ||
62 | |||
63 | 1. Create a socket of type AF_ALG with the struct sockaddr_alg parameter | ||
64 | specified below for the different cipher types. | ||
65 | |||
66 | 2. Invoke bind with the socket descriptor | ||
67 | |||
68 | 3. Invoke accept with the socket descriptor. The accept system call | ||
69 | returns a new file descriptor that is to be used to interact with | ||
70 | the particular cipher instance. When invoking send/write or recv/read | ||
71 | system calls to send data to the kernel or obtain data from the | ||
72 | kernel, the file descriptor returned by accept must be used. | ||
73 | |||
74 | In-place cipher operation | ||
75 | ========================= | ||
76 | |||
77 | Just like the in-kernel operation of the kernel crypto API, the user space | ||
78 | interface allows the cipher operation in-place. That means that the input buffer | ||
79 | used for the send/write system call and the output buffer used by the read/recv | ||
80 | system call may be one and the same. This is of particular interest for | ||
81 | symmetric cipher operations where a copying of the output data to its final | ||
82 | destination can be avoided. | ||
83 | |||
84 | If a consumer on the other hand wants to maintain the plaintext and the | ||
85 | ciphertext in different memory locations, all a consumer needs to do is to | ||
86 | provide different memory pointers for the encryption and decryption operation. | ||
87 | |||
88 | Message digest API | ||
89 | ================== | ||
90 | |||
91 | The message digest type to be used for the cipher operation is selected when | ||
92 | invoking the bind syscall. bind requires the caller to provide a filled | ||
93 | struct sockaddr data structure. This data structure must be filled as follows: | ||
94 | |||
95 | struct sockaddr_alg sa = { | ||
96 | .salg_family = AF_ALG, | ||
97 | .salg_type = "hash", /* this selects the hash logic in the kernel */ | ||
98 | .salg_name = "sha1" /* this is the cipher name */ | ||
99 | }; | ||
100 | |||
101 | The salg_type value "hash" applies to message digests and keyed message digests. | ||
102 | Though, a keyed message digest is referenced by the appropriate salg_name. | ||
103 | Please see below for the setsockopt interface that explains how the key can be | ||
104 | set for a keyed message digest. | ||
105 | |||
106 | Using the send() system call, the application provides the data that should be | ||
107 | processed with the message digest. The send system call allows the following | ||
108 | flags to be specified: | ||
109 | |||
110 | * MSG_MORE: If this flag is set, the send system call acts like a | ||
111 | message digest update function where the final hash is not | ||
112 | yet calculated. If the flag is not set, the send system call | ||
113 | calculates the final message digest immediately. | ||
114 | |||
115 | With the recv() system call, the application can read the message digest from | ||
116 | the kernel crypto API. If the buffer is too small for the message digest, the | ||
117 | flag MSG_TRUNC is set by the kernel. | ||
118 | |||
119 | In order to set a message digest key, the calling application must use the | ||
120 | setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC operation is | ||
121 | performed without the initial HMAC state change caused by the key. | ||
122 | |||
123 | |||
124 | Symmetric cipher API | ||
125 | ==================== | ||
126 | |||
127 | The operation is very similar to the message digest discussion. During | ||
128 | initialization, the struct sockaddr data structure must be filled as follows: | ||
129 | |||
130 | struct sockaddr_alg sa = { | ||
131 | .salg_family = AF_ALG, | ||
132 | .salg_type = "skcipher", /* this selects the symmetric cipher */ | ||
133 | .salg_name = "cbc(aes)" /* this is the cipher name */ | ||
134 | }; | ||
135 | |||
136 | Before data can be sent to the kernel using the write/send system call family, | ||
137 | the consumer must set the key. The key setting is described with the setsockopt | ||
138 | invocation below. | ||
139 | |||
140 | Using the sendmsg() system call, the application provides the data that should | ||
141 | be processed for encryption or decryption. In addition, the IV is specified | ||
142 | with the data structure provided by the sendmsg() system call. | ||
143 | |||
144 | The sendmsg system call parameter of struct msghdr is embedded into the | ||
145 | struct cmsghdr data structure. See recv(2) and cmsg(3) for more information | ||
146 | on how the cmsghdr data structure is used together with the send/recv system | ||
147 | call family. That cmsghdr data structure holds the following information | ||
148 | specified with a separate header instances: | ||
149 | |||
150 | * specification of the cipher operation type with one of these flags: | ||
151 | ALG_OP_ENCRYPT - encryption of data | ||
152 | ALG_OP_DECRYPT - decryption of data | ||
153 | |||
154 | * specification of the IV information marked with the flag ALG_SET_IV | ||
155 | |||
156 | The send system call family allows the following flag to be specified: | ||
157 | |||
158 | * MSG_MORE: If this flag is set, the send system call acts like a | ||
159 | cipher update function where more input data is expected | ||
160 | with a subsequent invocation of the send system call. | ||
161 | |||
162 | Note: The kernel reports -EINVAL for any unexpected data. The caller must | ||
163 | make sure that all data matches the constraints given in /proc/crypto for the | ||
164 | selected cipher. | ||
165 | |||
166 | With the recv() system call, the application can read the result of the | ||
167 | cipher operation from the kernel crypto API. The output buffer must be at least | ||
168 | as large as to hold all blocks of the encrypted or decrypted data. If the output | ||
169 | data size is smaller, only as many blocks are returned that fit into that | ||
170 | output buffer size. | ||
171 | |||
172 | Setsockopt interface | ||
173 | ==================== | ||
174 | |||
175 | In addition to the read/recv and send/write system call handling to send and | ||
176 | retrieve data subject to the cipher operation, a consumer also needs to set | ||
177 | the additional information for the cipher operation. This additional information | ||
178 | is set using the setsockopt system call that must be invoked with the file | ||
179 | descriptor of the open cipher (i.e. the file descriptor returned by the | ||
180 | accept system call). | ||
181 | |||
182 | Each setsockopt invocation must use the level SOL_ALG. | ||
183 | |||
184 | The setsockopt interface allows setting the following data using the mentioned | ||
185 | optname: | ||
186 | |||
187 | * ALG_SET_KEY -- Setting the key. Key setting is applicable to: | ||
188 | |||
189 | - the skcipher cipher type (symmetric ciphers) | ||
190 | |||
191 | - the hash cipher type (keyed message digests) | ||
192 | |||
193 | User space API example | ||
194 | ====================== | ||
195 | |||
196 | Please see [1] for libkcapi which provides an easy-to-use wrapper around the | ||
197 | aforementioned Netlink kernel interface. [1] also contains a test application | ||
198 | that invokes all libkcapi API calls. | ||
199 | |||
200 | [1] http://www.chronox.de/libkcapi.html | ||
201 | |||
202 | Author | ||
203 | ====== | ||
204 | |||
205 | Stephan Mueller <smueller@chronox.de> | ||
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt index 66c2774c0c64..0d124a971801 100644 --- a/Documentation/device-mapper/cache-policies.txt +++ b/Documentation/device-mapper/cache-policies.txt | |||
@@ -47,20 +47,26 @@ Message and constructor argument pairs are: | |||
47 | 'discard_promote_adjustment <value>' | 47 | 'discard_promote_adjustment <value>' |
48 | 48 | ||
49 | The sequential threshold indicates the number of contiguous I/Os | 49 | The sequential threshold indicates the number of contiguous I/Os |
50 | required before a stream is treated as sequential. The random threshold | 50 | required before a stream is treated as sequential. Once a stream is |
51 | considered sequential it will bypass the cache. The random threshold | ||
51 | is the number of intervening non-contiguous I/Os that must be seen | 52 | is the number of intervening non-contiguous I/Os that must be seen |
52 | before the stream is treated as random again. | 53 | before the stream is treated as random again. |
53 | 54 | ||
54 | The sequential and random thresholds default to 512 and 4 respectively. | 55 | The sequential and random thresholds default to 512 and 4 respectively. |
55 | 56 | ||
56 | Large, sequential ios are probably better left on the origin device | 57 | Large, sequential I/Os are probably better left on the origin device |
57 | since spindles tend to have good bandwidth. The io_tracker counts | 58 | since spindles tend to have good sequential I/O bandwidth. The |
58 | contiguous I/Os to try to spot when the io is in one of these sequential | 59 | io_tracker counts contiguous I/Os to try to spot when the I/O is in one |
59 | modes. | 60 | of these sequential modes. But there are use-cases for wanting to |
60 | 61 | promote sequential blocks to the cache (e.g. fast application startup). | |
61 | Internally the mq policy maintains a promotion threshold variable. If | 62 | If sequential threshold is set to 0 the sequential I/O detection is |
62 | the hit count of a block not in the cache goes above this threshold it | 63 | disabled and sequential I/O will no longer implicitly bypass the cache. |
63 | gets promoted to the cache. The read, write and discard promote adjustment | 64 | Setting the random threshold to 0 does _not_ disable the random I/O |
65 | stream detection. | ||
66 | |||
67 | Internally the mq policy determines a promotion threshold. If the hit | ||
68 | count of a block not in the cache goes above this threshold it gets | ||
69 | promoted to the cache. The read, write and discard promote adjustment | ||
64 | tunables allow you to tweak the promotion threshold by adding a small | 70 | tunables allow you to tweak the promotion threshold by adding a small |
65 | value based on the io type. They default to 4, 8 and 1 respectively. | 71 | value based on the io type. They default to 4, 8 and 1 respectively. |
66 | If you're trying to quickly warm a new cache device you may wish to | 72 | If you're trying to quickly warm a new cache device you may wish to |
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt index 7eece72b1a35..8fe815046140 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.txt +++ b/Documentation/devicetree/bindings/arm/amlogic.txt | |||
@@ -2,7 +2,9 @@ Amlogic MesonX device tree bindings | |||
2 | ------------------------------------------- | 2 | ------------------------------------------- |
3 | 3 | ||
4 | Boards with the Amlogic Meson6 SoC shall have the following properties: | 4 | Boards with the Amlogic Meson6 SoC shall have the following properties: |
5 | Required root node property: | ||
6 | compatible: "amlogic,meson6" | ||
5 | 7 | ||
6 | Required root node property: | 8 | Boards with the Amlogic Meson8 SoC shall have the following properties: |
7 | 9 | Required root node property: | |
8 | compatible = "amlogic,meson6"; | 10 | compatible: "amlogic,meson8"; |
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt index 37b2cafa4e52..256b4d8bab7b 100644 --- a/Documentation/devicetree/bindings/arm/arch_timer.txt +++ b/Documentation/devicetree/bindings/arm/arch_timer.txt | |||
@@ -22,6 +22,14 @@ to deliver its interrupts via SPIs. | |||
22 | - always-on : a boolean property. If present, the timer is powered through an | 22 | - always-on : a boolean property. If present, the timer is powered through an |
23 | always-on power domain, therefore it never loses context. | 23 | always-on power domain, therefore it never loses context. |
24 | 24 | ||
25 | ** Optional properties: | ||
26 | |||
27 | - arm,cpu-registers-not-fw-configured : Firmware does not initialize | ||
28 | any of the generic timer CPU registers, which contain their | ||
29 | architecturally-defined reset values. Only supported for 32-bit | ||
30 | systems which follow the ARMv7 architected reset values. | ||
31 | |||
32 | |||
25 | Example: | 33 | Example: |
26 | 34 | ||
27 | timer { | 35 | timer { |
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index c554ed3d44fb..556c8665fdbf 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards | |||
@@ -92,3 +92,68 @@ Required nodes: | |||
92 | - core-module: the root node to the Versatile platforms must have | 92 | - core-module: the root node to the Versatile platforms must have |
93 | a core-module with regs and the compatible strings | 93 | a core-module with regs and the compatible strings |
94 | "arm,core-module-versatile", "syscon" | 94 | "arm,core-module-versatile", "syscon" |
95 | |||
96 | ARM RealView Boards | ||
97 | ------------------- | ||
98 | The RealView boards cover tailored evaluation boards that are used to explore | ||
99 | the ARM11 and Cortex A-8 and Cortex A-9 processors. | ||
100 | |||
101 | Required properties (in root node): | ||
102 | /* RealView Emulation Baseboard */ | ||
103 | compatible = "arm,realview-eb"; | ||
104 | /* RealView Platform Baseboard for ARM1176JZF-S */ | ||
105 | compatible = "arm,realview-pb1176"; | ||
106 | /* RealView Platform Baseboard for ARM11 MPCore */ | ||
107 | compatible = "arm,realview-pb11mp"; | ||
108 | /* RealView Platform Baseboard for Cortex A-8 */ | ||
109 | compatible = "arm,realview-pba8"; | ||
110 | /* RealView Platform Baseboard Explore for Cortex A-9 */ | ||
111 | compatible = "arm,realview-pbx"; | ||
112 | |||
113 | Required nodes: | ||
114 | |||
115 | - soc: some node of the RealView platforms must be the SoC | ||
116 | node that contain the SoC-specific devices, withe the compatible | ||
117 | string set to one of these tuples: | ||
118 | "arm,realview-eb-soc", "simple-bus" | ||
119 | "arm,realview-pb1176-soc", "simple-bus" | ||
120 | "arm,realview-pb11mp-soc", "simple-bus" | ||
121 | "arm,realview-pba8-soc", "simple-bus" | ||
122 | "arm,realview-pbx-soc", "simple-bus" | ||
123 | |||
124 | - syscon: some subnode of the RealView SoC node must be a | ||
125 | system controller node pointing to the control registers, | ||
126 | with the compatible string set to one of these tuples: | ||
127 | "arm,realview-eb-syscon", "syscon" | ||
128 | "arm,realview-pb1176-syscon", "syscon" | ||
129 | "arm,realview-pb11mp-syscon", "syscon" | ||
130 | "arm,realview-pba8-syscon", "syscon" | ||
131 | "arm,realview-pbx-syscon", "syscon" | ||
132 | |||
133 | Required properties for the system controller: | ||
134 | - regs: the location and size of the system controller registers, | ||
135 | one range of 0x1000 bytes. | ||
136 | |||
137 | Example: | ||
138 | |||
139 | /dts-v1/; | ||
140 | #include <dt-bindings/interrupt-controller/irq.h> | ||
141 | #include "skeleton.dtsi" | ||
142 | |||
143 | / { | ||
144 | model = "ARM RealView PB1176 with device tree"; | ||
145 | compatible = "arm,realview-pb1176"; | ||
146 | |||
147 | soc { | ||
148 | #address-cells = <1>; | ||
149 | #size-cells = <1>; | ||
150 | compatible = "arm,realview-pb1176-soc", "simple-bus"; | ||
151 | ranges; | ||
152 | |||
153 | syscon: syscon@10000000 { | ||
154 | compatible = "arm,realview-syscon", "syscon"; | ||
155 | reg = <0x10000000 0x1000>; | ||
156 | }; | ||
157 | |||
158 | }; | ||
159 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/cygnus.txt b/Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file mode 100644 index 000000000000..4c77169bb534 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/cygnus.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | Broadcom Cygnus device tree bindings | ||
2 | ------------------------------------ | ||
3 | |||
4 | |||
5 | Boards with Cygnus SoCs shall have the following properties: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | BCM11300 | ||
10 | compatible = "brcm,bcm11300", "brcm,cygnus"; | ||
11 | |||
12 | BCM11320 | ||
13 | compatible = "brcm,bcm11320", "brcm,cygnus"; | ||
14 | |||
15 | BCM11350 | ||
16 | compatible = "brcm,bcm11350", "brcm,cygnus"; | ||
17 | |||
18 | BCM11360 | ||
19 | compatible = "brcm,bcm11360", "brcm,cygnus"; | ||
20 | |||
21 | BCM58300 | ||
22 | compatible = "brcm,bcm58300", "brcm,cygnus"; | ||
23 | |||
24 | BCM58302 | ||
25 | compatible = "brcm,bcm58302", "brcm,cygnus"; | ||
26 | |||
27 | BCM58303 | ||
28 | compatible = "brcm,bcm58303", "brcm,cygnus"; | ||
29 | |||
30 | BCM58305 | ||
31 | compatible = "brcm,bcm58305", "brcm,cygnus"; | ||
diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt new file mode 100644 index 000000000000..d790f49066f3 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coresight.txt | |||
@@ -0,0 +1,204 @@ | |||
1 | * CoreSight Components: | ||
2 | |||
3 | CoreSight components are compliant with the ARM CoreSight architecture | ||
4 | specification and can be connected in various topologies to suit a particular | ||
5 | SoCs tracing needs. These trace components can generally be classified as | ||
6 | sinks, links and sources. Trace data produced by one or more sources flows | ||
7 | through the intermediate links connecting the source to the currently selected | ||
8 | sink. Each CoreSight component device should use these properties to describe | ||
9 | its hardware characteristcs. | ||
10 | |||
11 | * Required properties for all components *except* non-configurable replicators: | ||
12 | |||
13 | * compatible: These have to be supplemented with "arm,primecell" as | ||
14 | drivers are using the AMBA bus interface. Possible values include: | ||
15 | - "arm,coresight-etb10", "arm,primecell"; | ||
16 | - "arm,coresight-tpiu", "arm,primecell"; | ||
17 | - "arm,coresight-tmc", "arm,primecell"; | ||
18 | - "arm,coresight-funnel", "arm,primecell"; | ||
19 | - "arm,coresight-etm3x", "arm,primecell"; | ||
20 | |||
21 | * reg: physical base address and length of the register | ||
22 | set(s) of the component. | ||
23 | |||
24 | * clocks: the clock associated to this component. | ||
25 | |||
26 | * clock-names: the name of the clock as referenced by the code. | ||
27 | Since we are using the AMBA framework, the name should be | ||
28 | "apb_pclk". | ||
29 | |||
30 | * port or ports: The representation of the component's port | ||
31 | layout using the generic DT graph presentation found in | ||
32 | "bindings/graph.txt". | ||
33 | |||
34 | * Required properties for devices that don't show up on the AMBA bus, such as | ||
35 | non-configurable replicators: | ||
36 | |||
37 | * compatible: Currently supported value is (note the absence of the | ||
38 | AMBA markee): | ||
39 | - "arm,coresight-replicator" | ||
40 | |||
41 | * id: a unique number that will identify this replicator. | ||
42 | |||
43 | * port or ports: same as above. | ||
44 | |||
45 | * Optional properties for ETM/PTMs: | ||
46 | |||
47 | * arm,cp14: must be present if the system accesses ETM/PTM management | ||
48 | registers via co-processor 14. | ||
49 | |||
50 | * cpu: the cpu phandle this ETM/PTM is affined to. When omitted the | ||
51 | source is considered to belong to CPU0. | ||
52 | |||
53 | * Optional property for TMC: | ||
54 | |||
55 | * arm,buffer-size: size of contiguous buffer space for TMC ETR | ||
56 | (embedded trace router) | ||
57 | |||
58 | |||
59 | Example: | ||
60 | |||
61 | 1. Sinks | ||
62 | etb@20010000 { | ||
63 | compatible = "arm,coresight-etb10", "arm,primecell"; | ||
64 | reg = <0 0x20010000 0 0x1000>; | ||
65 | |||
66 | coresight-default-sink; | ||
67 | clocks = <&oscclk6a>; | ||
68 | clock-names = "apb_pclk"; | ||
69 | port { | ||
70 | etb_in_port: endpoint@0 { | ||
71 | slave-mode; | ||
72 | remote-endpoint = <&replicator_out_port0>; | ||
73 | }; | ||
74 | }; | ||
75 | }; | ||
76 | |||
77 | tpiu@20030000 { | ||
78 | compatible = "arm,coresight-tpiu", "arm,primecell"; | ||
79 | reg = <0 0x20030000 0 0x1000>; | ||
80 | |||
81 | clocks = <&oscclk6a>; | ||
82 | clock-names = "apb_pclk"; | ||
83 | port { | ||
84 | tpiu_in_port: endpoint@0 { | ||
85 | slave-mode; | ||
86 | remote-endpoint = <&replicator_out_port1>; | ||
87 | }; | ||
88 | }; | ||
89 | }; | ||
90 | |||
91 | 2. Links | ||
92 | replicator { | ||
93 | /* non-configurable replicators don't show up on the | ||
94 | * AMBA bus. As such no need to add "arm,primecell". | ||
95 | */ | ||
96 | compatible = "arm,coresight-replicator"; | ||
97 | /* this will show up in debugfs as "0.replicator" */ | ||
98 | id = <0>; | ||
99 | |||
100 | ports { | ||
101 | #address-cells = <1>; | ||
102 | #size-cells = <0>; | ||
103 | |||
104 | /* replicator output ports */ | ||
105 | port@0 { | ||
106 | reg = <0>; | ||
107 | replicator_out_port0: endpoint { | ||
108 | remote-endpoint = <&etb_in_port>; | ||
109 | }; | ||
110 | }; | ||
111 | |||
112 | port@1 { | ||
113 | reg = <1>; | ||
114 | replicator_out_port1: endpoint { | ||
115 | remote-endpoint = <&tpiu_in_port>; | ||
116 | }; | ||
117 | }; | ||
118 | |||
119 | /* replicator input port */ | ||
120 | port@2 { | ||
121 | reg = <0>; | ||
122 | replicator_in_port0: endpoint { | ||
123 | slave-mode; | ||
124 | remote-endpoint = <&funnel_out_port0>; | ||
125 | }; | ||
126 | }; | ||
127 | }; | ||
128 | }; | ||
129 | |||
130 | funnel@20040000 { | ||
131 | compatible = "arm,coresight-funnel", "arm,primecell"; | ||
132 | reg = <0 0x20040000 0 0x1000>; | ||
133 | |||
134 | clocks = <&oscclk6a>; | ||
135 | clock-names = "apb_pclk"; | ||
136 | ports { | ||
137 | #address-cells = <1>; | ||
138 | #size-cells = <0>; | ||
139 | |||
140 | /* funnel output port */ | ||
141 | port@0 { | ||
142 | reg = <0>; | ||
143 | funnel_out_port0: endpoint { | ||
144 | remote-endpoint = | ||
145 | <&replicator_in_port0>; | ||
146 | }; | ||
147 | }; | ||
148 | |||
149 | /* funnel input ports */ | ||
150 | port@1 { | ||
151 | reg = <0>; | ||
152 | funnel_in_port0: endpoint { | ||
153 | slave-mode; | ||
154 | remote-endpoint = <&ptm0_out_port>; | ||
155 | }; | ||
156 | }; | ||
157 | |||
158 | port@2 { | ||
159 | reg = <1>; | ||
160 | funnel_in_port1: endpoint { | ||
161 | slave-mode; | ||
162 | remote-endpoint = <&ptm1_out_port>; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | port@3 { | ||
167 | reg = <2>; | ||
168 | funnel_in_port2: endpoint { | ||
169 | slave-mode; | ||
170 | remote-endpoint = <&etm0_out_port>; | ||
171 | }; | ||
172 | }; | ||
173 | |||
174 | }; | ||
175 | }; | ||
176 | |||
177 | 3. Sources | ||
178 | ptm@2201c000 { | ||
179 | compatible = "arm,coresight-etm3x", "arm,primecell"; | ||
180 | reg = <0 0x2201c000 0 0x1000>; | ||
181 | |||
182 | cpu = <&cpu0>; | ||
183 | clocks = <&oscclk6a>; | ||
184 | clock-names = "apb_pclk"; | ||
185 | port { | ||
186 | ptm0_out_port: endpoint { | ||
187 | remote-endpoint = <&funnel_in_port0>; | ||
188 | }; | ||
189 | }; | ||
190 | }; | ||
191 | |||
192 | ptm@2201d000 { | ||
193 | compatible = "arm,coresight-etm3x", "arm,primecell"; | ||
194 | reg = <0 0x2201d000 0 0x1000>; | ||
195 | |||
196 | cpu = <&cpu1>; | ||
197 | clocks = <&oscclk6a>; | ||
198 | clock-names = "apb_pclk"; | ||
199 | port { | ||
200 | ptm1_out_port: endpoint { | ||
201 | remote-endpoint = <&funnel_in_port1>; | ||
202 | }; | ||
203 | }; | ||
204 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index fc446347ab6d..b2aacbe16ed9 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
@@ -227,6 +227,15 @@ nodes to be present and contain the properties described below. | |||
227 | # List of phandles to idle state nodes supported | 227 | # List of phandles to idle state nodes supported |
228 | by this cpu [3]. | 228 | by this cpu [3]. |
229 | 229 | ||
230 | - rockchip,pmu | ||
231 | Usage: optional for systems that have an "enable-method" | ||
232 | property value of "rockchip,rk3066-smp" | ||
233 | While optional, it is the preferred way to get access to | ||
234 | the cpu-core power-domains. | ||
235 | Value type: <phandle> | ||
236 | Definition: Specifies the syscon node controlling the cpu core | ||
237 | power domains. | ||
238 | |||
230 | Example 1 (dual-cluster big.LITTLE system 32-bit): | 239 | Example 1 (dual-cluster big.LITTLE system 32-bit): |
231 | 240 | ||
232 | cpus { | 241 | cpus { |
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index e935d7d4ac43..4e8b7df7fc62 100644 --- a/Documentation/devicetree/bindings/arm/fsl.txt +++ b/Documentation/devicetree/bindings/arm/fsl.txt | |||
@@ -74,3 +74,41 @@ Required root node properties: | |||
74 | i.MX6q generic board | 74 | i.MX6q generic board |
75 | Required root node properties: | 75 | Required root node properties: |
76 | - compatible = "fsl,imx6q"; | 76 | - compatible = "fsl,imx6q"; |
77 | |||
78 | |||
79 | Freescale LS1021A Platform Device Tree Bindings | ||
80 | ------------------------------------------------ | ||
81 | |||
82 | Required root node compatible properties: | ||
83 | - compatible = "fsl,ls1021a"; | ||
84 | |||
85 | Freescale LS1021A SoC-specific Device Tree Bindings | ||
86 | ------------------------------------------- | ||
87 | |||
88 | Freescale SCFG | ||
89 | SCFG is the supplemental configuration unit, that provides SoC specific | ||
90 | configuration and status registers for the chip. Such as getting PEX port | ||
91 | status. | ||
92 | Required properties: | ||
93 | - compatible: should be "fsl,ls1021a-scfg" | ||
94 | - reg: should contain base address and length of SCFG memory-mapped registers | ||
95 | |||
96 | Example: | ||
97 | scfg: scfg@1570000 { | ||
98 | compatible = "fsl,ls1021a-scfg"; | ||
99 | reg = <0x0 0x1570000 0x0 0x10000>; | ||
100 | }; | ||
101 | |||
102 | Freescale DCFG | ||
103 | DCFG is the device configuration unit, that provides general purpose | ||
104 | configuration and status for the device. Such as setting the secondary | ||
105 | core start address and release the secondary core from holdoff and startup. | ||
106 | Required properties: | ||
107 | - compatible: should be "fsl,ls1021a-dcfg" | ||
108 | - reg : should contain base address and length of DCFG memory-mapped registers | ||
109 | |||
110 | Example: | ||
111 | dcfg: dcfg@1ee0000 { | ||
112 | compatible = "fsl,ls1021a-dcfg"; | ||
113 | reg = <0x0 0x1ee0000 0x0 0x10000>; | ||
114 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/gic-v3.txt b/Documentation/devicetree/bindings/arm/gic-v3.txt index 33cd05e6c125..ddfade40ac59 100644 --- a/Documentation/devicetree/bindings/arm/gic-v3.txt +++ b/Documentation/devicetree/bindings/arm/gic-v3.txt | |||
@@ -49,11 +49,29 @@ Optional | |||
49 | occupied by the redistributors. Required if more than one such | 49 | occupied by the redistributors. Required if more than one such |
50 | region is present. | 50 | region is present. |
51 | 51 | ||
52 | Sub-nodes: | ||
53 | |||
54 | GICv3 has one or more Interrupt Translation Services (ITS) that are | ||
55 | used to route Message Signalled Interrupts (MSI) to the CPUs. | ||
56 | |||
57 | These nodes must have the following properties: | ||
58 | - compatible : Should at least contain "arm,gic-v3-its". | ||
59 | - msi-controller : Boolean property. Identifies the node as an MSI controller | ||
60 | - reg: Specifies the base physical address and size of the ITS | ||
61 | registers. | ||
62 | |||
63 | The main GIC node must contain the appropriate #address-cells, | ||
64 | #size-cells and ranges properties for the reg property of all ITS | ||
65 | nodes. | ||
66 | |||
52 | Examples: | 67 | Examples: |
53 | 68 | ||
54 | gic: interrupt-controller@2cf00000 { | 69 | gic: interrupt-controller@2cf00000 { |
55 | compatible = "arm,gic-v3"; | 70 | compatible = "arm,gic-v3"; |
56 | #interrupt-cells = <3>; | 71 | #interrupt-cells = <3>; |
72 | #address-cells = <2>; | ||
73 | #size-cells = <2>; | ||
74 | ranges; | ||
57 | interrupt-controller; | 75 | interrupt-controller; |
58 | reg = <0x0 0x2f000000 0 0x10000>, // GICD | 76 | reg = <0x0 0x2f000000 0 0x10000>, // GICD |
59 | <0x0 0x2f100000 0 0x200000>, // GICR | 77 | <0x0 0x2f100000 0 0x200000>, // GICR |
@@ -61,11 +79,20 @@ Examples: | |||
61 | <0x0 0x2c010000 0 0x2000>, // GICH | 79 | <0x0 0x2c010000 0 0x2000>, // GICH |
62 | <0x0 0x2c020000 0 0x2000>; // GICV | 80 | <0x0 0x2c020000 0 0x2000>; // GICV |
63 | interrupts = <1 9 4>; | 81 | interrupts = <1 9 4>; |
82 | |||
83 | gic-its@2c200000 { | ||
84 | compatible = "arm,gic-v3-its"; | ||
85 | msi-controller; | ||
86 | reg = <0x0 0x2c200000 0 0x200000>; | ||
87 | }; | ||
64 | }; | 88 | }; |
65 | 89 | ||
66 | gic: interrupt-controller@2c010000 { | 90 | gic: interrupt-controller@2c010000 { |
67 | compatible = "arm,gic-v3"; | 91 | compatible = "arm,gic-v3"; |
68 | #interrupt-cells = <3>; | 92 | #interrupt-cells = <3>; |
93 | #address-cells = <2>; | ||
94 | #size-cells = <2>; | ||
95 | ranges; | ||
69 | interrupt-controller; | 96 | interrupt-controller; |
70 | redistributor-stride = <0x0 0x40000>; // 256kB stride | 97 | redistributor-stride = <0x0 0x40000>; // 256kB stride |
71 | #redistributor-regions = <2>; | 98 | #redistributor-regions = <2>; |
@@ -76,4 +103,16 @@ Examples: | |||
76 | <0x0 0x2c060000 0 0x2000>, // GICH | 103 | <0x0 0x2c060000 0 0x2000>, // GICH |
77 | <0x0 0x2c080000 0 0x2000>; // GICV | 104 | <0x0 0x2c080000 0 0x2000>; // GICV |
78 | interrupts = <1 9 4>; | 105 | interrupts = <1 9 4>; |
106 | |||
107 | gic-its@2c200000 { | ||
108 | compatible = "arm,gic-v3-its"; | ||
109 | msi-controller; | ||
110 | reg = <0x0 0x2c200000 0 0x200000>; | ||
111 | }; | ||
112 | |||
113 | gic-its@2c400000 { | ||
114 | compatible = "arm,gic-v3-its"; | ||
115 | msi-controller; | ||
116 | reg = <0x0 0x2c400000 0 0x200000>; | ||
117 | }; | ||
79 | }; | 118 | }; |
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt index c7d2fa156678..8112d0c3675a 100644 --- a/Documentation/devicetree/bindings/arm/gic.txt +++ b/Documentation/devicetree/bindings/arm/gic.txt | |||
@@ -17,6 +17,7 @@ Main node required properties: | |||
17 | "arm,cortex-a7-gic" | 17 | "arm,cortex-a7-gic" |
18 | "arm,arm11mp-gic" | 18 | "arm,arm11mp-gic" |
19 | "brcm,brahma-b15-gic" | 19 | "brcm,brahma-b15-gic" |
20 | "arm,arm1176jzf-devchip-gic" | ||
20 | - interrupt-controller : Identifies the node as an interrupt controller | 21 | - interrupt-controller : Identifies the node as an interrupt controller |
21 | - #interrupt-cells : Specifies the number of cells needed to encode an | 22 | - #interrupt-cells : Specifies the number of cells needed to encode an |
22 | interrupt source. The type shall be a <u32> and the value shall be 3. | 23 | interrupt source. The type shall be a <u32> and the value shall be 3. |
@@ -96,3 +97,56 @@ Example: | |||
96 | <0x2c006000 0x2000>; | 97 | <0x2c006000 0x2000>; |
97 | interrupts = <1 9 0xf04>; | 98 | interrupts = <1 9 0xf04>; |
98 | }; | 99 | }; |
100 | |||
101 | |||
102 | * GICv2m extension for MSI/MSI-x support (Optional) | ||
103 | |||
104 | Certain revisions of GIC-400 supports MSI/MSI-x via V2M register frame(s). | ||
105 | This is enabled by specifying v2m sub-node(s). | ||
106 | |||
107 | Required properties: | ||
108 | |||
109 | - compatible : The value here should contain "arm,gic-v2m-frame". | ||
110 | |||
111 | - msi-controller : Identifies the node as an MSI controller. | ||
112 | |||
113 | - reg : GICv2m MSI interface register base and size | ||
114 | |||
115 | Optional properties: | ||
116 | |||
117 | - arm,msi-base-spi : When the MSI_TYPER register contains an incorrect | ||
118 | value, this property should contain the SPI base of | ||
119 | the MSI frame, overriding the HW value. | ||
120 | |||
121 | - arm,msi-num-spis : When the MSI_TYPER register contains an incorrect | ||
122 | value, this property should contain the number of | ||
123 | SPIs assigned to the frame, overriding the HW value. | ||
124 | |||
125 | Example: | ||
126 | |||
127 | interrupt-controller@e1101000 { | ||
128 | compatible = "arm,gic-400"; | ||
129 | #interrupt-cells = <3>; | ||
130 | #address-cells = <2>; | ||
131 | #size-cells = <2>; | ||
132 | interrupt-controller; | ||
133 | interrupts = <1 8 0xf04>; | ||
134 | ranges = <0 0 0 0xe1100000 0 0x100000>; | ||
135 | reg = <0x0 0xe1110000 0 0x01000>, | ||
136 | <0x0 0xe112f000 0 0x02000>, | ||
137 | <0x0 0xe1140000 0 0x10000>, | ||
138 | <0x0 0xe1160000 0 0x10000>; | ||
139 | v2m0: v2m@0x8000 { | ||
140 | compatible = "arm,gic-v2m-frame"; | ||
141 | msi-controller; | ||
142 | reg = <0x0 0x80000 0 0x1000>; | ||
143 | }; | ||
144 | |||
145 | .... | ||
146 | |||
147 | v2mN: v2m@0x9000 { | ||
148 | compatible = "arm,gic-v2m-frame"; | ||
149 | msi-controller; | ||
150 | reg = <0x0 0x90000 0 0x1000>; | ||
151 | }; | ||
152 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt index 37375c7f3ccc..a8274eabae2e 100644 --- a/Documentation/devicetree/bindings/arm/idle-states.txt +++ b/Documentation/devicetree/bindings/arm/idle-states.txt | |||
@@ -317,6 +317,26 @@ follows: | |||
317 | In such systems entry-latency-us + exit-latency-us | 317 | In such systems entry-latency-us + exit-latency-us |
318 | will exceed wakeup-latency-us by this duration. | 318 | will exceed wakeup-latency-us by this duration. |
319 | 319 | ||
320 | - status: | ||
321 | Usage: Optional | ||
322 | Value type: <string> | ||
323 | Definition: A standard device tree property [5] that indicates | ||
324 | the operational status of an idle-state. | ||
325 | If present, it shall be: | ||
326 | "okay": to indicate that the idle state is | ||
327 | operational. | ||
328 | "disabled": to indicate that the idle state has | ||
329 | been disabled in firmware so it is not | ||
330 | operational. | ||
331 | If the property is not present the idle-state must | ||
332 | be considered operational. | ||
333 | |||
334 | - idle-state-name: | ||
335 | Usage: Optional | ||
336 | Value type: <string> | ||
337 | Definition: A string used as a descriptive name for the idle | ||
338 | state. | ||
339 | |||
320 | In addition to the properties listed above, a state node may require | 340 | In addition to the properties listed above, a state node may require |
321 | additional properties specifics to the entry-method defined in the | 341 | additional properties specifics to the entry-method defined in the |
322 | idle-states node, please refer to the entry-method bindings | 342 | idle-states node, please refer to the entry-method bindings |
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt index 904de5781f44..a99eb9eb14c0 100644 --- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt +++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt | |||
@@ -106,11 +106,21 @@ Required subnode-properties: | |||
106 | - groups: a list of strings describing the group names. | 106 | - groups: a list of strings describing the group names. |
107 | - function: a string describing the function used to mux the groups. | 107 | - function: a string describing the function used to mux the groups. |
108 | 108 | ||
109 | * Reset controller binding | ||
110 | |||
111 | A reset controller is part of the chip control registers set. The chip control | ||
112 | node also provides the reset. The register set is not at the same offset between | ||
113 | Berlin SoCs. | ||
114 | |||
115 | Required property: | ||
116 | - #reset-cells: must be set to 2 | ||
117 | |||
109 | Example: | 118 | Example: |
110 | 119 | ||
111 | chip: chip-control@ea0000 { | 120 | chip: chip-control@ea0000 { |
112 | compatible = "marvell,berlin2-chip-ctrl"; | 121 | compatible = "marvell,berlin2-chip-ctrl"; |
113 | #clock-cells = <1>; | 122 | #clock-cells = <1>; |
123 | #reset-cells = <2>; | ||
114 | reg = <0xea0000 0x400>; | 124 | reg = <0xea0000 0x400>; |
115 | clocks = <&refclk>, <&externaldev 0>; | 125 | clocks = <&refclk>, <&externaldev 0>; |
116 | clock-names = "refclk", "video_ext0"; | 126 | clock-names = "refclk", "video_ext0"; |
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt index fa252261dfaf..3be40139cfbb 100644 --- a/Documentation/devicetree/bindings/arm/mediatek.txt +++ b/Documentation/devicetree/bindings/arm/mediatek.txt | |||
@@ -1,10 +1,14 @@ | |||
1 | Mediatek MT6589 Platforms Device Tree Bindings | 1 | MediaTek mt65xx & mt81xx Platforms Device Tree Bindings |
2 | 2 | ||
3 | Boards with a SoC of the Mediatek MT6589 shall have the following property: | 3 | Boards with a MediaTek mt65xx/mt81xx SoC shall have the following property: |
4 | 4 | ||
5 | Required root node property: | 5 | Required root node property: |
6 | 6 | ||
7 | compatible: must contain "mediatek,mt6589" | 7 | compatible: Must contain one of |
8 | "mediatek,mt6589" | ||
9 | "mediatek,mt6592" | ||
10 | "mediatek,mt8127" | ||
11 | "mediatek,mt8135" | ||
8 | 12 | ||
9 | 13 | ||
10 | Supported boards: | 14 | Supported boards: |
@@ -12,3 +16,12 @@ Supported boards: | |||
12 | - bq Aquaris5 smart phone: | 16 | - bq Aquaris5 smart phone: |
13 | Required root node properties: | 17 | Required root node properties: |
14 | - compatible = "mundoreader,bq-aquaris5", "mediatek,mt6589"; | 18 | - compatible = "mundoreader,bq-aquaris5", "mediatek,mt6589"; |
19 | - Evaluation board for MT6592: | ||
20 | Required root node properties: | ||
21 | - compatible = "mediatek,mt6592-evb", "mediatek,mt6592"; | ||
22 | - MTK mt8127 tablet moose EVB: | ||
23 | Required root node properties: | ||
24 | - compatible = "mediatek,mt8127-moose", "mediatek,mt8127"; | ||
25 | - MTK mt8135 tablet EVB: | ||
26 | Required root node properties: | ||
27 | - compatible = "mediatek,mt8135-evbp1", "mediatek,mt8135"; | ||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt new file mode 100644 index 000000000000..d680b07ec6e8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | Mediatek 65xx/81xx sysirq | ||
2 | |||
3 | Mediatek SOCs sysirq support controllable irq inverter for each GIC SPI | ||
4 | interrupt. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be one of: | ||
8 | "mediatek,mt8135-sysirq" | ||
9 | "mediatek,mt8127-sysirq" | ||
10 | "mediatek,mt6589-sysirq" | ||
11 | "mediatek,mt6582-sysirq" | ||
12 | "mediatek,mt6577-sysirq" | ||
13 | - interrupt-controller : Identifies the node as an interrupt controller | ||
14 | - #interrupt-cells : Use the same format as specified by GIC in | ||
15 | Documentation/devicetree/bindings/arm/gic.txt | ||
16 | - interrupt-parent: phandle of irq parent for sysirq. The parent must | ||
17 | use the same interrupt-cells format as GIC. | ||
18 | - reg: Physical base address of the intpol registers and length of memory | ||
19 | mapped region. | ||
20 | |||
21 | Example: | ||
22 | sysirq: interrupt-controller@10200100 { | ||
23 | compatible = "mediatek,mt6589-sysirq", "mediatek,mt6577-sysirq"; | ||
24 | interrupt-controller; | ||
25 | #interrupt-cells = <3>; | ||
26 | interrupt-parent = <&gic>; | ||
27 | reg = <0 0x10200100 0 0x1c>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index ddd9bcdf889c..4f6a82cef1d1 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -132,6 +132,9 @@ Boards: | |||
132 | - AM335X Bone : Low cost community board | 132 | - AM335X Bone : Low cost community board |
133 | compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3" | 133 | compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3" |
134 | 134 | ||
135 | - AM335X OrionLXm : Substation Automation Platform | ||
136 | compatible = "novatech,am335x-lxm", "ti,am33xx" | ||
137 | |||
135 | - OMAP5 EVM : Evaluation Module | 138 | - OMAP5 EVM : Evaluation Module |
136 | compatible = "ti,omap5-evm", "ti,omap5" | 139 | compatible = "ti,omap5-evm", "ti,omap5" |
137 | 140 | ||
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt index 857f12636eb2..eaa3d1a0eb05 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.txt +++ b/Documentation/devicetree/bindings/arm/rockchip.txt | |||
@@ -1,6 +1,10 @@ | |||
1 | Rockchip platforms device tree bindings | 1 | Rockchip platforms device tree bindings |
2 | --------------------------------------- | 2 | --------------------------------------- |
3 | 3 | ||
4 | - MarsBoard RK3066 board: | ||
5 | Required root node properties: | ||
6 | - compatible = "haoyu,marsboard-rk3066", "rockchip,rk3066a"; | ||
7 | |||
4 | - bq Curie 2 tablet: | 8 | - bq Curie 2 tablet: |
5 | Required root node properties: | 9 | Required root node properties: |
6 | - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a"; | 10 | - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a"; |
diff --git a/Documentation/devicetree/bindings/arm/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung-boards.txt index 2168ed31e1b0..43589d2466a7 100644 --- a/Documentation/devicetree/bindings/arm/samsung-boards.txt +++ b/Documentation/devicetree/bindings/arm/samsung-boards.txt | |||
@@ -1,11 +1,20 @@ | |||
1 | * Samsung's Exynos4210 based SMDKV310 evaluation board | 1 | * Samsung's Exynos SoC based boards |
2 | |||
3 | SMDKV310 evaluation board is based on Samsung's Exynos4210 SoC. | ||
4 | 2 | ||
5 | Required root node properties: | 3 | Required root node properties: |
6 | - compatible = should be one or more of the following. | 4 | - compatible = should be one or more of the following. |
7 | (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board. | 5 | - "samsung,monk" - for Exynos3250-based Samsung Simband board. |
8 | (b) "samsung,exynos4210" - for boards based on Exynos4210 SoC. | 6 | - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board. |
7 | - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board. | ||
8 | - "samsung,trats" - for Exynos4210-based Tizen Reference board. | ||
9 | - "samsung,universal_c210" - for Exynos4210-based Samsung board. | ||
10 | - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board. | ||
11 | - "samsung,trats2" - for Exynos4412-based Tizen Reference board. | ||
12 | - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board. | ||
13 | - "samsung,xyref5260" - for Exynos5260-based Samsung board. | ||
14 | - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board. | ||
15 | - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board. | ||
16 | - "samsung,sd5v1" - for Exynos5440-based Samsung board. | ||
17 | - "samsung,ssdk5440" - for Exynos5440-based Samsung board. | ||
9 | 18 | ||
10 | Optional: | 19 | Optional: |
11 | - firmware node, specifying presence and type of secure firmware: | 20 | - firmware node, specifying presence and type of secure firmware: |
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt index 709efaa30841..f46ca9a316a2 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | |||
@@ -16,6 +16,8 @@ Required properties: | |||
16 | future controllers. | 16 | future controllers. |
17 | Must be "samsung,exynos3250-adc" for | 17 | Must be "samsung,exynos3250-adc" for |
18 | controllers compatible with ADC of Exynos3250. | 18 | controllers compatible with ADC of Exynos3250. |
19 | Must be "samsung,exynos7-adc" for | ||
20 | the ADC in Exynos7 and compatibles | ||
19 | Must be "samsung,s3c2410-adc" for | 21 | Must be "samsung,s3c2410-adc" for |
20 | the ADC in s3c2410 and compatibles | 22 | the ADC in s3c2410 and compatibles |
21 | Must be "samsung,s3c2416-adc" for | 23 | Must be "samsung,s3c2416-adc" for |
@@ -43,13 +45,16 @@ Required properties: | |||
43 | compatible ADC block) | 45 | compatible ADC block) |
44 | - vdd-supply VDD input supply. | 46 | - vdd-supply VDD input supply. |
45 | 47 | ||
48 | - samsung,syscon-phandle Contains the PMU system controller node | ||
49 | (To access the ADC_PHY register on Exynos5250/5420/5800/3250) | ||
50 | |||
46 | Note: child nodes can be added for auto probing from device tree. | 51 | Note: child nodes can be added for auto probing from device tree. |
47 | 52 | ||
48 | Example: adding device info in dtsi file | 53 | Example: adding device info in dtsi file |
49 | 54 | ||
50 | adc: adc@12D10000 { | 55 | adc: adc@12D10000 { |
51 | compatible = "samsung,exynos-adc-v1"; | 56 | compatible = "samsung,exynos-adc-v1"; |
52 | reg = <0x12D10000 0x100>, <0x10040718 0x4>; | 57 | reg = <0x12D10000 0x100>; |
53 | interrupts = <0 106 0>; | 58 | interrupts = <0 106 0>; |
54 | #io-channel-cells = <1>; | 59 | #io-channel-cells = <1>; |
55 | io-channel-ranges; | 60 | io-channel-ranges; |
@@ -58,13 +63,14 @@ adc: adc@12D10000 { | |||
58 | clock-names = "adc"; | 63 | clock-names = "adc"; |
59 | 64 | ||
60 | vdd-supply = <&buck5_reg>; | 65 | vdd-supply = <&buck5_reg>; |
66 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
61 | }; | 67 | }; |
62 | 68 | ||
63 | Example: adding device info in dtsi file for Exynos3250 with additional sclk | 69 | Example: adding device info in dtsi file for Exynos3250 with additional sclk |
64 | 70 | ||
65 | adc: adc@126C0000 { | 71 | adc: adc@126C0000 { |
66 | compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2; | 72 | compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2; |
67 | reg = <0x126C0000 0x100>, <0x10020718 0x4>; | 73 | reg = <0x126C0000 0x100>; |
68 | interrupts = <0 137 0>; | 74 | interrupts = <0 137 0>; |
69 | #io-channel-cells = <1>; | 75 | #io-channel-cells = <1>; |
70 | io-channel-ranges; | 76 | io-channel-ranges; |
@@ -73,6 +79,7 @@ adc: adc@126C0000 { | |||
73 | clock-names = "adc", "sclk"; | 79 | clock-names = "adc", "sclk"; |
74 | 80 | ||
75 | vdd-supply = <&buck5_reg>; | 81 | vdd-supply = <&buck5_reg>; |
82 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
76 | }; | 83 | }; |
77 | 84 | ||
78 | Example: Adding child nodes in dts file | 85 | Example: Adding child nodes in dts file |
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt index 6256ec31666d..2fdff5a806cf 100644 --- a/Documentation/devicetree/bindings/arm/ste-nomadik.txt +++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt | |||
@@ -10,6 +10,12 @@ Required root node property: src | |||
10 | 10 | ||
11 | Boards with the Nomadik SoC include: | 11 | Boards with the Nomadik SoC include: |
12 | 12 | ||
13 | Nomadik NHK-15 board manufactured by ST Microelectronics: | ||
14 | |||
15 | Required root node property: | ||
16 | |||
17 | compatible="st,nomadik-nhk-15"; | ||
18 | |||
13 | S8815 "MiniKit" manufactured by Calao Systems: | 19 | S8815 "MiniKit" manufactured by Calao Systems: |
14 | 20 | ||
15 | Required root node property: | 21 | Required root node property: |
diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt new file mode 100644 index 000000000000..42941fdefb11 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/sunxi.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | Allwinner sunXi Platforms Device Tree Bindings | ||
2 | |||
3 | Each device tree must specify which Allwinner SoC it uses, | ||
4 | using one of the following compatible strings: | ||
5 | |||
6 | allwinner,sun4i-a10 | ||
7 | allwinner,sun5i-a10s | ||
8 | allwinner,sun5i-a13 | ||
9 | allwinner,sun6i-a31 | ||
10 | allwinner,sun7i-a20 | ||
11 | allwinner,sun8i-a23 | ||
12 | allwinner,sun9i-a80 | ||
diff --git a/Documentation/devicetree/bindings/arm/ux500/power_domain.txt b/Documentation/devicetree/bindings/arm/ux500/power_domain.txt new file mode 100644 index 000000000000..5679d1742d3e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/ux500/power_domain.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * ST-Ericsson UX500 PM Domains | ||
2 | |||
3 | UX500 supports multiple PM domains which are used to gate power to one or | ||
4 | more peripherals on the SOC. | ||
5 | |||
6 | The implementation of PM domains for UX500 are based upon the generic PM domain | ||
7 | and use the corresponding DT bindings. | ||
8 | |||
9 | ==PM domain providers== | ||
10 | |||
11 | Required properties: | ||
12 | - compatible: Must be "stericsson,ux500-pm-domains". | ||
13 | - #power-domain-cells : Number of cells in a power domain specifier, must be 1. | ||
14 | |||
15 | Example: | ||
16 | pm_domains: pm_domains0 { | ||
17 | compatible = "stericsson,ux500-pm-domains"; | ||
18 | #power-domain-cells = <1>; | ||
19 | }; | ||
20 | |||
21 | ==PM domain consumers== | ||
22 | |||
23 | Required properties: | ||
24 | - power-domains: A phandle and PM domain specifier. Below are the list of | ||
25 | valid specifiers: | ||
26 | |||
27 | Index Specifier | ||
28 | ----- --------- | ||
29 | 0 DOMAIN_VAPE | ||
30 | |||
31 | Example: | ||
32 | sdi0_per1@80126000 { | ||
33 | compatible = "arm,pl18x", "arm,primecell"; | ||
34 | power-domains = <&pm_domains DOMAIN_VAPE> | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt index 1c8351604d38..b460edd12766 100644 --- a/Documentation/devicetree/bindings/ata/marvell.txt +++ b/Documentation/devicetree/bindings/ata/marvell.txt | |||
@@ -6,11 +6,17 @@ Required Properties: | |||
6 | - interrupts : Interrupt controller is using | 6 | - interrupts : Interrupt controller is using |
7 | - nr-ports : Number of SATA ports in use. | 7 | - nr-ports : Number of SATA ports in use. |
8 | 8 | ||
9 | Optional Properties: | ||
10 | - phys : List of phandles to sata phys | ||
11 | - phy-names : Should be "0", "1", etc, one number per phandle | ||
12 | |||
9 | Example: | 13 | Example: |
10 | 14 | ||
11 | sata@80000 { | 15 | sata@80000 { |
12 | compatible = "marvell,orion-sata"; | 16 | compatible = "marvell,orion-sata"; |
13 | reg = <0x80000 0x5000>; | 17 | reg = <0x80000 0x5000>; |
14 | interrupts = <21>; | 18 | interrupts = <21>; |
19 | phys = <&sata_phy0>, <&sata_phy1>; | ||
20 | phy-names = "0", "1"; | ||
15 | nr-ports = <2>; | 21 | nr-ports = <2>; |
16 | } | 22 | } |
diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt index 1e6111333fa8..2493a5a31655 100644 --- a/Documentation/devicetree/bindings/ata/sata_rcar.txt +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt | |||
@@ -3,16 +3,21 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : should contain one of the following: | 4 | - compatible : should contain one of the following: |
5 | - "renesas,sata-r8a7779" for R-Car H1 | 5 | - "renesas,sata-r8a7779" for R-Car H1 |
6 | - "renesas,sata-r8a7790" for R-Car H2 | 6 | ("renesas,rcar-sata" is deprecated) |
7 | - "renesas,sata-r8a7791" for R-Car M2 | 7 | - "renesas,sata-r8a7790-es1" for R-Car H2 ES1 |
8 | - "renesas,sata-r8a7790" for R-Car H2 other than ES1 | ||
9 | - "renesas,sata-r8a7791" for R-Car M2-W | ||
10 | - "renesas,sata-r8a7793" for R-Car M2-N | ||
8 | - reg : address and length of the SATA registers; | 11 | - reg : address and length of the SATA registers; |
9 | - interrupts : must consist of one interrupt specifier. | 12 | - interrupts : must consist of one interrupt specifier. |
13 | - clocks : must contain a reference to the functional clock. | ||
10 | 14 | ||
11 | Example: | 15 | Example: |
12 | 16 | ||
13 | sata: sata@fc600000 { | 17 | sata0: sata@ee300000 { |
14 | compatible = "renesas,sata-r8a7779"; | 18 | compatible = "renesas,sata-r8a7791"; |
15 | reg = <0xfc600000 0x2000>; | 19 | reg = <0 0xee300000 0 0x2000>; |
16 | interrupt-parent = <&gic>; | 20 | interrupt-parent = <&gic>; |
17 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; | 21 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; |
22 | clocks = <&mstp8_clks R8A7791_CLK_SATA0>; | ||
18 | }; | 23 | }; |
diff --git a/Documentation/devicetree/bindings/btmrvl.txt b/Documentation/devicetree/bindings/btmrvl.txt new file mode 100644 index 000000000000..58f964bb0a52 --- /dev/null +++ b/Documentation/devicetree/bindings/btmrvl.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | btmrvl | ||
2 | ------ | ||
3 | |||
4 | Required properties: | ||
5 | |||
6 | - compatible : must be "btmrvl,cfgdata" | ||
7 | |||
8 | Optional properties: | ||
9 | |||
10 | - btmrvl,cal-data : Calibration data downloaded to the device during | ||
11 | initialization. This is an array of 28 values(u8). | ||
12 | |||
13 | - btmrvl,gpio-gap : gpio and gap (in msecs) combination to be | ||
14 | configured. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | GPIO pin 13 is configured as a wakeup source and GAP is set to 100 msecs | ||
19 | in below example. | ||
20 | |||
21 | btmrvl { | ||
22 | compatible = "btmrvl,cfgdata"; | ||
23 | |||
24 | btmrvl,cal-data = /bits/ 8 < | ||
25 | 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 | ||
26 | 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 | ||
27 | 0x00 0x00 0xf0 0x00>; | ||
28 | btmrvl,gpio-gap = <0x0d64>; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/bcma.txt b/Documentation/devicetree/bindings/bus/bcma.txt index 62a48348ac15..edd44d802139 100644 --- a/Documentation/devicetree/bindings/bus/bcma.txt +++ b/Documentation/devicetree/bindings/bus/bcma.txt | |||
@@ -8,6 +8,11 @@ Required properties: | |||
8 | 8 | ||
9 | The cores on the AXI bus are automatically detected by bcma with the | 9 | The cores on the AXI bus are automatically detected by bcma with the |
10 | memory ranges they are using and they get registered afterwards. | 10 | memory ranges they are using and they get registered afterwards. |
11 | Automatic detection of the IRQ number is not working on | ||
12 | BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide | ||
13 | them manually through device tree. Use an interrupt-map to specify the | ||
14 | IRQ used by the devices on the bus. The first address is just an index, | ||
15 | because we do not have any special register. | ||
11 | 16 | ||
12 | The top-level axi bus may contain children representing attached cores | 17 | The top-level axi bus may contain children representing attached cores |
13 | (devices). This is needed since some hardware details can't be auto | 18 | (devices). This is needed since some hardware details can't be auto |
@@ -22,6 +27,22 @@ Example: | |||
22 | ranges = <0x00000000 0x18000000 0x00100000>; | 27 | ranges = <0x00000000 0x18000000 0x00100000>; |
23 | #address-cells = <1>; | 28 | #address-cells = <1>; |
24 | #size-cells = <1>; | 29 | #size-cells = <1>; |
30 | #interrupt-cells = <1>; | ||
31 | interrupt-map-mask = <0x000fffff 0xffff>; | ||
32 | interrupt-map = | ||
33 | /* Ethernet Controller 0 */ | ||
34 | <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, | ||
35 | |||
36 | /* Ethernet Controller 1 */ | ||
37 | <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; | ||
38 | |||
39 | /* PCIe Controller 0 */ | ||
40 | <0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, | ||
41 | <0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, | ||
42 | <0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, | ||
43 | <0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, | ||
44 | <0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, | ||
45 | <0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>; | ||
25 | 46 | ||
26 | chipcommon { | 47 | chipcommon { |
27 | reg = <0x00000000 0x1000>; | 48 | reg = <0x00000000 0x1000>; |
diff --git a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt index e2d501d20c9a..1eceefb20f01 100644 --- a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt +++ b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt | |||
@@ -2,7 +2,11 @@ Broadcom GISB bus Arbiter controller | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible: should be "brcm,gisb-arb" | 5 | - compatible: |
6 | "brcm,gisb-arb" or "brcm,bcm7445-gisb-arb" for 28nm chips | ||
7 | "brcm,bcm7435-gisb-arb" for newer 40nm chips | ||
8 | "brcm,bcm7400-gisb-arb" for older 40nm chips and all 65nm chips | ||
9 | "brcm,bcm7038-gisb-arb" for 130nm chips | ||
6 | - reg: specifies the base physical address and size of the registers | 10 | - reg: specifies the base physical address and size of the registers |
7 | - interrupt-parent: specifies the phandle to the parent interrupt controller | 11 | - interrupt-parent: specifies the phandle to the parent interrupt controller |
8 | this arbiter gets interrupt line from | 12 | this arbiter gets interrupt line from |
diff --git a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt index 5fa44f52a0b8..5e16c3ccb061 100644 --- a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt +++ b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt | |||
@@ -48,9 +48,12 @@ Required properties: | |||
48 | - compatible: Should be set to "marvell,mbus-controller". | 48 | - compatible: Should be set to "marvell,mbus-controller". |
49 | 49 | ||
50 | - reg: Device's register space. | 50 | - reg: Device's register space. |
51 | Two entries are expected (see the examples below): | 51 | Two or three entries are expected (see the examples below): |
52 | the first one controls the devices decoding window and | 52 | the first one controls the devices decoding window, |
53 | the second one controls the SDRAM decoding window. | 53 | the second one controls the SDRAM decoding window and |
54 | the third controls the MBus bridge (only with the | ||
55 | marvell,armada370-mbus and marvell,armadaxp-mbus | ||
56 | compatible strings) | ||
54 | 57 | ||
55 | Example: | 58 | Example: |
56 | 59 | ||
@@ -67,7 +70,7 @@ Example: | |||
67 | 70 | ||
68 | mbusc: mbus-controller@20000 { | 71 | mbusc: mbus-controller@20000 { |
69 | compatible = "marvell,mbus-controller"; | 72 | compatible = "marvell,mbus-controller"; |
70 | reg = <0x20000 0x100>, <0x20180 0x20>; | 73 | reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>; |
71 | }; | 74 | }; |
72 | 75 | ||
73 | /* more children ...*/ | 76 | /* more children ...*/ |
@@ -126,7 +129,7 @@ are skipped. | |||
126 | 129 | ||
127 | mbusc: mbus-controller@20000 { | 130 | mbusc: mbus-controller@20000 { |
128 | compatible = "marvell,mbus-controller"; | 131 | compatible = "marvell,mbus-controller"; |
129 | reg = <0x20000 0x100>, <0x20180 0x20>; | 132 | reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>; |
130 | }; | 133 | }; |
131 | 134 | ||
132 | /* more children ...*/ | 135 | /* more children ...*/ |
@@ -170,7 +173,7 @@ Using this macro, the above example would be: | |||
170 | 173 | ||
171 | mbusc: mbus-controller@20000 { | 174 | mbusc: mbus-controller@20000 { |
172 | compatible = "marvell,mbus-controller"; | 175 | compatible = "marvell,mbus-controller"; |
173 | reg = <0x20000 0x100>, <0x20180 0x20>; | 176 | reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>; |
174 | }; | 177 | }; |
175 | 178 | ||
176 | /* other children */ | 179 | /* other children */ |
@@ -266,7 +269,7 @@ See the example below, where a more complete device tree is shown: | |||
266 | ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; | 269 | ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; |
267 | 270 | ||
268 | mbusc: mbus-controller@20000 { | 271 | mbusc: mbus-controller@20000 { |
269 | reg = <0x20000 0x100>, <0x20180 0x20>; | 272 | reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>; |
270 | }; | 273 | }; |
271 | 274 | ||
272 | interrupt-controller@20000 { | 275 | interrupt-controller@20000 { |
diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt new file mode 100644 index 000000000000..ed838f453f7a --- /dev/null +++ b/Documentation/devicetree/bindings/chosen.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | The chosen node | ||
2 | --------------- | ||
3 | |||
4 | The chosen node does not represent a real device, but serves as a place | ||
5 | for passing data between firmware and the operating system, like boot | ||
6 | arguments. Data in the chosen node does not represent the hardware. | ||
7 | |||
8 | |||
9 | stdout-path property | ||
10 | -------------------- | ||
11 | |||
12 | Device trees may specify the device to be used for boot console output | ||
13 | with a stdout-path property under /chosen, as described in ePAPR, e.g. | ||
14 | |||
15 | / { | ||
16 | chosen { | ||
17 | stdout-path = "/serial@f00:115200"; | ||
18 | }; | ||
19 | |||
20 | serial@f00 { | ||
21 | compatible = "vendor,some-uart"; | ||
22 | reg = <0xf00 0x10>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | If the character ":" is present in the value, this terminates the path. | ||
27 | The meaning of any characters following the ":" is device-specific, and | ||
28 | must be specified in the relevant binding documentation. | ||
29 | |||
30 | For UART devices, the preferred binding is a string in the form: | ||
31 | |||
32 | <baud>{<parity>{<bits>{<flow>}}} | ||
33 | |||
34 | where | ||
35 | |||
36 | baud - baud rate in decimal | ||
37 | parity - 'n' (none), 'o', (odd) or 'e' (even) | ||
38 | bits - number of data bits | ||
39 | flow - 'r' (rts) | ||
40 | |||
41 | For example: 115200n8r | ||
42 | |||
43 | Implementation note: Linux will look for the property "linux,stdout-path" or | ||
44 | on PowerPC "stdout" if "stdout-path" is not found. However, the | ||
45 | "linux,stdout-path" and "stdout" properties are deprecated. New platforms | ||
46 | should only use the "stdout-path" property. | ||
diff --git a/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt b/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file mode 100644 index 000000000000..00d26edec8bc --- /dev/null +++ b/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Broadcom Cygnus Clocks | ||
2 | |||
3 | This binding uses the common clock binding: | ||
4 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
5 | |||
6 | Currently various "fixed" clocks are declared for peripheral drivers that use | ||
7 | the common clock framework to reference their core clocks. Proper support of | ||
8 | these clocks will be added later | ||
9 | |||
10 | Device tree example: | ||
11 | |||
12 | clocks { | ||
13 | #address-cells = <1>; | ||
14 | #size-cells = <1>; | ||
15 | ranges; | ||
16 | |||
17 | osc: oscillator { | ||
18 | compatible = "fixed-clock"; | ||
19 | #clock-cells = <1>; | ||
20 | clock-frequency = <25000000>; | ||
21 | }; | ||
22 | |||
23 | apb_clk: apb_clk { | ||
24 | compatible = "fixed-clock"; | ||
25 | #clock-cells = <0>; | ||
26 | clock-frequency = <1000000000>; | ||
27 | }; | ||
28 | |||
29 | periph_clk: periph_clk { | ||
30 | compatible = "fixed-clock"; | ||
31 | #clock-cells = <0>; | ||
32 | clock-frequency = <500000000>; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/qoriq-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt index 5666812fc42b..266ff9d23229 100644 --- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt +++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt | |||
@@ -62,6 +62,8 @@ Required properties: | |||
62 | It takes parent's clock-frequency as its clock. | 62 | It takes parent's clock-frequency as its clock. |
63 | * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0). | 63 | * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0). |
64 | It takes parent's clock-frequency as its clock. | 64 | It takes parent's clock-frequency as its clock. |
65 | * "fsl,qoriq-platform-pll-1.0" for the platform PLL clock (v1.0) | ||
66 | * "fsl,qoriq-platform-pll-2.0" for the platform PLL clock (v2.0) | ||
65 | - #clock-cells: From common clock binding. The number of cells in a | 67 | - #clock-cells: From common clock binding. The number of cells in a |
66 | clock-specifier. Should be <0> for "fsl,qoriq-sysclk-[1,2].0" | 68 | clock-specifier. Should be <0> for "fsl,qoriq-sysclk-[1,2].0" |
67 | clocks, or <1> for "fsl,qoriq-core-pll-[1,2].0" clocks. | 69 | clocks, or <1> for "fsl,qoriq-core-pll-[1,2].0" clocks. |
@@ -128,8 +130,16 @@ Example for clock block and clock provider: | |||
128 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | 130 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; |
129 | clock-output-names = "cmux1"; | 131 | clock-output-names = "cmux1"; |
130 | }; | 132 | }; |
133 | |||
134 | platform-pll: platform-pll@c00 { | ||
135 | #clock-cells = <1>; | ||
136 | reg = <0xc00 0x4>; | ||
137 | compatible = "fsl,qoriq-platform-pll-1.0"; | ||
138 | clocks = <&sysclk>; | ||
139 | clock-output-names = "platform-pll", "platform-pll-div2"; | ||
140 | }; | ||
131 | }; | 141 | }; |
132 | } | 142 | }; |
133 | 143 | ||
134 | Example for clock consumer: | 144 | Example for clock consumer: |
135 | 145 | ||
@@ -139,4 +149,4 @@ Example for clock consumer: | |||
139 | clocks = <&mux0>; | 149 | clocks = <&mux0>; |
140 | ... | 150 | ... |
141 | }; | 151 | }; |
142 | } | 152 | }; |
diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt index 1d3ace088172..b7ee5c7e0f75 100644 --- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt +++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt | |||
@@ -11,7 +11,7 @@ Please find an example below: | |||
11 | 11 | ||
12 | Clockgen block diagram | 12 | Clockgen block diagram |
13 | ------------------------------------------------------------------- | 13 | ------------------------------------------------------------------- |
14 | | Flexgen stucture | | 14 | | Flexgen structure | |
15 | | --------------------------------------------- | | 15 | | --------------------------------------------- | |
16 | | | ------- -------- -------- | | | 16 | | | ------- -------- -------- | | |
17 | clk_sysin | | | | | | | | | | 17 | clk_sysin | | | | | | | | | |
diff --git a/Documentation/devicetree/bindings/clock/vf610-clock.txt b/Documentation/devicetree/bindings/clock/vf610-clock.txt index c80863d344ac..63f9f1ac3439 100644 --- a/Documentation/devicetree/bindings/clock/vf610-clock.txt +++ b/Documentation/devicetree/bindings/clock/vf610-clock.txt | |||
@@ -5,6 +5,19 @@ Required properties: | |||
5 | - reg: Address and length of the register set | 5 | - reg: Address and length of the register set |
6 | - #clock-cells: Should be <1> | 6 | - #clock-cells: Should be <1> |
7 | 7 | ||
8 | Optional properties: | ||
9 | - clocks: list of clock identifiers which are external input clocks to the | ||
10 | given clock controller. Please refer the next section to find | ||
11 | the input clocks for a given controller. | ||
12 | - clock-names: list of names of clocks which are exteral input clocks to the | ||
13 | given clock controller. | ||
14 | |||
15 | Input clocks for top clock controller: | ||
16 | - sxosc (external crystal oscillator 32KHz, recommended) | ||
17 | - fxosc (external crystal oscillator 24MHz, recommended) | ||
18 | - audio_ext | ||
19 | - enet_ext | ||
20 | |||
8 | The clock consumer should specify the desired clock by having the clock | 21 | The clock consumer should specify the desired clock by having the clock |
9 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h | 22 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h |
10 | for the full list of VF610 clock IDs. | 23 | for the full list of VF610 clock IDs. |
@@ -15,6 +28,8 @@ clks: ccm@4006b000 { | |||
15 | compatible = "fsl,vf610-ccm"; | 28 | compatible = "fsl,vf610-ccm"; |
16 | reg = <0x4006b000 0x1000>; | 29 | reg = <0x4006b000 0x1000>; |
17 | #clock-cells = <1>; | 30 | #clock-cells = <1>; |
31 | clocks = <&sxosc>, <&fxosc>; | ||
32 | clock-names = "sxosc", "fxosc"; | ||
18 | }; | 33 | }; |
19 | 34 | ||
20 | uart1: serial@40028000 { | 35 | uart1: serial@40028000 { |
diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt index 5c65eccd0e56..e8a35c71e947 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Freescale SAHARA Cryptographic Accelerator included in some i.MX chips. | 1 | Freescale SAHARA Cryptographic Accelerator included in some i.MX chips. |
2 | Currently only i.MX27 is supported. | 2 | Currently only i.MX27 and i.MX53 are supported. |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible : Should be "fsl,<soc>-sahara" | 5 | - compatible : Should be "fsl,<soc>-sahara" |
diff --git a/Documentation/devicetree/bindings/dma/atmel-xdma.txt b/Documentation/devicetree/bindings/dma/atmel-xdma.txt new file mode 100644 index 000000000000..0eb2b3207e08 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/atmel-xdma.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | * Atmel Extensible Direct Memory Access Controller (XDMAC) | ||
2 | |||
3 | * XDMA Controller | ||
4 | Required properties: | ||
5 | - compatible: Should be "atmel,<chip>-dma". | ||
6 | <chip> compatible description: | ||
7 | - sama5d4: first SoC adding the XDMAC | ||
8 | - reg: Should contain DMA registers location and length. | ||
9 | - interrupts: Should contain DMA interrupt. | ||
10 | - #dma-cells: Must be <1>, used to represent the number of integer cells in | ||
11 | the dmas property of client devices. | ||
12 | - The 1st cell specifies the channel configuration register: | ||
13 | - bit 13: SIF, source interface identifier, used to get the memory | ||
14 | interface identifier, | ||
15 | - bit 14: DIF, destination interface identifier, used to get the peripheral | ||
16 | interface identifier, | ||
17 | - bit 30-24: PERID, peripheral identifier. | ||
18 | |||
19 | Example: | ||
20 | |||
21 | dma1: dma-controller@f0004000 { | ||
22 | compatible = "atmel,sama5d4-dma"; | ||
23 | reg = <0xf0004000 0x200>; | ||
24 | interrupts = <50 4 0>; | ||
25 | #dma-cells = <1>; | ||
26 | }; | ||
27 | |||
28 | |||
29 | * DMA clients | ||
30 | DMA clients connected to the Atmel XDMA controller must use the format | ||
31 | described in the dma.txt file, using a one-cell specifier for each channel. | ||
32 | The two cells in order are: | ||
33 | 1. A phandle pointing to the DMA controller. | ||
34 | 2. Channel configuration register. Configurable fields are: | ||
35 | - bit 13: SIF, source interface identifier, used to get the memory | ||
36 | interface identifier, | ||
37 | - bit 14: DIF, destination interface identifier, used to get the peripheral | ||
38 | interface identifier, | ||
39 | - bit 30-24: PERID, peripheral identifier. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | i2c2: i2c@f8024000 { | ||
44 | compatible = "atmel,at91sam9x5-i2c"; | ||
45 | reg = <0xf8024000 0x4000>; | ||
46 | interrupts = <34 4 6>; | ||
47 | dmas = <&dma1 | ||
48 | (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | ||
49 | | AT91_XDMAC_DT_PERID(6))>, | ||
50 | <&dma1 | ||
51 | (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | ||
52 | | AT91_XDMAC_DT_PERID(7))>; | ||
53 | dma-names = "tx", "rx"; | ||
54 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index 4659fd952301..dc8d3aac1aa9 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | |||
@@ -48,6 +48,7 @@ The full ID of peripheral types can be found below. | |||
48 | 21 ESAI | 48 | 21 ESAI |
49 | 22 SSI Dual FIFO (needs firmware ver >= 2) | 49 | 22 SSI Dual FIFO (needs firmware ver >= 2) |
50 | 23 Shared ASRC | 50 | 23 Shared ASRC |
51 | 24 SAI | ||
51 | 52 | ||
52 | The third cell specifies the transfer priority as below. | 53 | The third cell specifies the transfer priority as below. |
53 | 54 | ||
diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt index d75a9d767022..f8c3311b7153 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt | |||
@@ -1,7 +1,9 @@ | |||
1 | QCOM BAM DMA controller | 1 | QCOM BAM DMA controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: must contain "qcom,bam-v1.4.0" for MSM8974 | 4 | - compatible: must be one of the following: |
5 | * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 | ||
6 | * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 | ||
5 | - reg: Address range for DMA registers | 7 | - reg: Address range for DMA registers |
6 | - interrupts: Should contain the one interrupt shared by all channels | 8 | - interrupts: Should contain the one interrupt shared by all channels |
7 | - #dma-cells: must be <1>, the cell in the dmas property of the client device | 9 | - #dma-cells: must be <1>, the cell in the dmas property of the client device |
diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt index 3e145c1675b1..9cdcba24d7c3 100644 --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt | |||
@@ -4,7 +4,7 @@ This driver follows the generic DMA bindings defined in dma.txt. | |||
4 | 4 | ||
5 | Required properties: | 5 | Required properties: |
6 | 6 | ||
7 | - compatible: Must be "allwinner,sun6i-a31-dma" | 7 | - compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma" |
8 | - reg: Should contain the registers base address and length | 8 | - reg: Should contain the registers base address and length |
9 | - interrupts: Should contain a reference to the interrupt used by this device | 9 | - interrupts: Should contain a reference to the interrupt used by this device |
10 | - clocks: Should contain a reference to the parent AHB clock | 10 | - clocks: Should contain a reference to the parent AHB clock |
diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt index 1405ed071bb4..e4c4d47f8137 100644 --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt | |||
@@ -25,7 +25,7 @@ Required child node properties: | |||
25 | - compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or | 25 | - compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or |
26 | "xlnx,axi-vdma-s2mm-channel". | 26 | "xlnx,axi-vdma-s2mm-channel". |
27 | - interrupts: Should contain per channel VDMA interrupts. | 27 | - interrupts: Should contain per channel VDMA interrupts. |
28 | - xlnx,data-width: Should contain the stream data width, take values | 28 | - xlnx,datawidth: Should contain the stream data width, take values |
29 | {32,64...1024}. | 29 | {32,64...1024}. |
30 | 30 | ||
31 | Optional child node properties: | 31 | Optional child node properties: |
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt index e75f0e549fff..e75f0e549fff 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt | |||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt b/Documentation/devicetree/bindings/drm/imx/hdmi.txt index 1b756cf9afb0..1b756cf9afb0 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt +++ b/Documentation/devicetree/bindings/drm/imx/hdmi.txt | |||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/drm/imx/ldb.txt index 443bcb6134d5..443bcb6134d5 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt +++ b/Documentation/devicetree/bindings/drm/imx/ldb.txt | |||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt new file mode 100644 index 000000000000..7bb1a9d60133 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * 74XX MMIO GPIO driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should contain one of the following: | ||
5 | "ti,741g125": for 741G125 (1-bit Input), | ||
6 | "ti,741g174": for 741G74 (1-bit Output), | ||
7 | "ti,742g125": for 742G125 (2-bit Input), | ||
8 | "ti,7474" : for 7474 (2-bit Output), | ||
9 | "ti,74125" : for 74125 (4-bit Input), | ||
10 | "ti,74175" : for 74175 (4-bit Output), | ||
11 | "ti,74365" : for 74365 (6-bit Input), | ||
12 | "ti,74174" : for 74174 (6-bit Output), | ||
13 | "ti,74244" : for 74244 (8-bit Input), | ||
14 | "ti,74273" : for 74273 (8-bit Output), | ||
15 | "ti,741624" : for 741624 (16-bit Input), | ||
16 | "ti,7416374": for 7416374 (16-bit Output). | ||
17 | - reg: Physical base address and length where IC resides. | ||
18 | - gpio-controller: Marks the device node as a gpio controller. | ||
19 | - #gpio-cells: Should be two. The first cell is the pin number and | ||
20 | the second cell is used to specify the GPIO polarity: | ||
21 | 0 = Active High, | ||
22 | 1 = Active Low. | ||
23 | |||
24 | Example: | ||
25 | ctrl: gpio@30008004 { | ||
26 | compatible = "ti,74174"; | ||
27 | reg = <0x30008004 0x1>; | ||
28 | gpio-controller; | ||
29 | #gpio-cells = <2>; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt index c306a2d0f2b1..f3332b9a8ed4 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt | |||
@@ -57,6 +57,8 @@ Optional device specific properties: | |||
57 | occurred on. If it is not set, the interrupt are only generated for the | 57 | occurred on. If it is not set, the interrupt are only generated for the |
58 | bank they belong to. | 58 | bank they belong to. |
59 | On devices with only one interrupt output this property is useless. | 59 | On devices with only one interrupt output this property is useless. |
60 | - microchip,irq-active-high: Sets the INTPOL flag in the IOCON register. This | ||
61 | configures the IRQ output polarity as active high. | ||
60 | 62 | ||
61 | Example I2C (with interrupt): | 63 | Example I2C (with interrupt): |
62 | gpiom1: gpio@20 { | 64 | gpiom1: gpio@20 { |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt new file mode 100644 index 000000000000..436cc99c6598 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | * Freescale VF610 PORT/GPIO module | ||
2 | |||
3 | The Freescale PORT/GPIO modules are two adjacent modules providing GPIO | ||
4 | functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of | ||
5 | each, and each PORT module has its own interrupt. | ||
6 | |||
7 | Required properties for GPIO node: | ||
8 | - compatible : Should be "fsl,<soc>-gpio", currently "fsl,vf610-gpio" | ||
9 | - reg : The first reg tuple represents the PORT module, the second tuple | ||
10 | the GPIO module. | ||
11 | - interrupts : Should be the port interrupt shared by all 32 pins. | ||
12 | - gpio-controller : Marks the device node as a gpio controller. | ||
13 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
14 | the second cell is used to specify the gpio polarity: | ||
15 | 0 = active high | ||
16 | 1 = active low | ||
17 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
18 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
19 | The second cell bits[3:0] is used to specify trigger type and level flags: | ||
20 | 1 = low-to-high edge triggered. | ||
21 | 2 = high-to-low edge triggered. | ||
22 | 4 = active high level-sensitive. | ||
23 | 8 = active low level-sensitive. | ||
24 | |||
25 | Note: Each GPIO port should have an alias correctly numbered in "aliases" | ||
26 | node. | ||
27 | |||
28 | Examples: | ||
29 | |||
30 | aliases { | ||
31 | gpio0 = &gpio1; | ||
32 | gpio1 = &gpio2; | ||
33 | }; | ||
34 | |||
35 | gpio1: gpio@40049000 { | ||
36 | compatible = "fsl,vf610-gpio"; | ||
37 | reg = <0x40049000 0x1000 0x400ff000 0x40>; | ||
38 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | ||
39 | gpio-controller; | ||
40 | #gpio-cells = <2>; | ||
41 | interrupt-controller; | ||
42 | #interrupt-cells = <2>; | ||
43 | gpio-ranges = <&iomuxc 0 0 32>; | ||
44 | }; | ||
45 | |||
46 | gpio2: gpio@4004a000 { | ||
47 | compatible = "fsl,vf610-gpio"; | ||
48 | reg = <0x4004a000 0x1000 0x400ff040 0x40>; | ||
49 | interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; | ||
50 | gpio-controller; | ||
51 | #gpio-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | #interrupt-cells = <2>; | ||
54 | gpio-ranges = <&iomuxc 0 32 32>; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index 3fb8f53071b8..b9bd1d64cfa6 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt | |||
@@ -13,13 +13,22 @@ 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". The exact | 16 | GPIO properties should be named "[<name>-]gpios", with <name> being the purpose |
17 | meaning of each gpios property must be documented in the device tree | 17 | of this GPIO for the device. While a non-existent <name> is considered valid |
18 | binding for each device. | 18 | for compatibility reasons (resolving to the "gpios" property), it is not allowed |
19 | for new bindings. | ||
19 | 20 | ||
20 | For example, the following could be used to describe GPIO pins used | 21 | GPIO properties can contain one or more GPIO phandles, but only in exceptional |
21 | as chip select lines; with chip selects 0, 1 and 3 populated, and chip | 22 | cases should they contain more than one. If your device uses several GPIOs with |
22 | select 2 left empty: | 23 | distinct functions, reference each of them under its own property, giving it a |
24 | meaningful name. The only case where an array of GPIOs is accepted is when | ||
25 | several GPIOs serve the same function (e.g. a parallel data line). | ||
26 | |||
27 | The exact purpose of each gpios property must be documented in the device tree | ||
28 | binding of the device. | ||
29 | |||
30 | The following example could be used to describe GPIO pins used as device enable | ||
31 | and bit-banged data signals: | ||
23 | 32 | ||
24 | gpio1: gpio1 { | 33 | gpio1: gpio1 { |
25 | gpio-controller | 34 | gpio-controller |
@@ -30,10 +39,12 @@ select 2 left empty: | |||
30 | #gpio-cells = <1>; | 39 | #gpio-cells = <1>; |
31 | }; | 40 | }; |
32 | [...] | 41 | [...] |
33 | chipsel-gpios = <&gpio1 12 0>, | 42 | |
34 | <&gpio1 13 0>, | 43 | enable-gpios = <&gpio2 2>; |
35 | <0>, /* holes are permitted, means no GPIO 2 */ | 44 | data-gpios = <&gpio1 12 0>, |
36 | <&gpio2 2>; | 45 | <&gpio1 13 0>, |
46 | <&gpio1 14 0>, | ||
47 | <&gpio1 15 0>; | ||
37 | 48 | ||
38 | Note that gpio-specifier length is controller dependent. In the | 49 | Note that gpio-specifier length is controller dependent. In the |
39 | above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2 | 50 | above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2 |
@@ -42,16 +53,17 @@ only uses one. | |||
42 | gpio-specifier may encode: bank, pin position inside the bank, | 53 | gpio-specifier may encode: bank, pin position inside the bank, |
43 | whether pin is open-drain and whether pin is logically inverted. | 54 | whether pin is open-drain and whether pin is logically inverted. |
44 | Exact meaning of each specifier cell is controller specific, and must | 55 | Exact meaning of each specifier cell is controller specific, and must |
45 | be documented in the device tree binding for the device. | 56 | be documented in the device tree binding for the device. Use the macros |
57 | defined in include/dt-bindings/gpio/gpio.h whenever possible: | ||
46 | 58 | ||
47 | Example of a node using GPIOs: | 59 | Example of a node using GPIOs: |
48 | 60 | ||
49 | node { | 61 | node { |
50 | gpios = <&qe_pio_e 18 0>; | 62 | enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>; |
51 | }; | 63 | }; |
52 | 64 | ||
53 | In this example gpio-specifier is "18 0" and encodes GPIO pin number, | 65 | GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes |
54 | and GPIO flags as accepted by the "qe_pio_e" gpio-controller. | 66 | GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller. |
55 | 67 | ||
56 | 1.1) GPIO specifier best practices | 68 | 1.1) GPIO specifier best practices |
57 | ---------------------------------- | 69 | ---------------------------------- |
diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt index a2c416bcbccc..89058d375b7c 100644 --- a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt | |||
@@ -7,4 +7,4 @@ Required properties: | |||
7 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | 7 | - bit 0 specifies polarity (0 for normal, 1 for inverted) |
8 | - gpio-controller : Marks the device node as a GPIO controller. | 8 | - gpio-controller : Marks the device node as a GPIO controller. |
9 | - interrupts : Interrupt mapping for GPIO IRQ. | 9 | - interrupts : Interrupt mapping for GPIO IRQ. |
10 | 10 | - gpio-ranges : Interaction with the PINCTRL subsystem. | |
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index 941a26aa4322..38fb86f28ba2 100644 --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | |||
@@ -6,7 +6,9 @@ Required Properties: | |||
6 | - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. | 6 | - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. |
7 | - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. | 7 | - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. |
8 | - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. | 8 | - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. |
9 | - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller. | 9 | - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller. |
10 | - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller. | ||
11 | - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller. | ||
10 | - "renesas,gpio-rcar": for generic R-Car GPIO controller. | 12 | - "renesas,gpio-rcar": for generic R-Car GPIO controller. |
11 | 13 | ||
12 | - reg: Base address and length of each memory resource used by the GPIO | 14 | - reg: Base address and length of each memory resource used by the GPIO |
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt index b48f4ef31d93..4c32ef0b7db8 100644 --- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
@@ -191,6 +191,8 @@ of the following host1x client modules: | |||
191 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection | 191 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection |
192 | - nvidia,edid: supplies a binary EDID blob | 192 | - nvidia,edid: supplies a binary EDID blob |
193 | - nvidia,panel: phandle of a display panel | 193 | - nvidia,panel: phandle of a display panel |
194 | - nvidia,ganged-mode: contains a phandle to a second DSI controller to gang | ||
195 | up with in order to support up to 8 data lanes | ||
194 | 196 | ||
195 | - sor: serial output resource | 197 | - sor: serial output resource |
196 | 198 | ||
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt index 2d150c311a05..c99eb34e640b 100644 --- a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt +++ b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt | |||
@@ -68,7 +68,7 @@ STMicroelectronics stih4xx platforms | |||
68 | number of clocks may depend of the SoC type. | 68 | number of clocks may depend of the SoC type. |
69 | - clock-names: names of the clocks listed in clocks property in the same | 69 | - clock-names: names of the clocks listed in clocks property in the same |
70 | order. | 70 | order. |
71 | - hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not. | 71 | - ddc: phandle of an I2C controller used for DDC EDID probing |
72 | 72 | ||
73 | sti-hda: | 73 | sti-hda: |
74 | Required properties: | 74 | Required properties: |
@@ -83,6 +83,22 @@ sti-hda: | |||
83 | - clock-names: names of the clocks listed in clocks property in the same | 83 | - clock-names: names of the clocks listed in clocks property in the same |
84 | order. | 84 | order. |
85 | 85 | ||
86 | sti-hqvdp: | ||
87 | must be a child of sti-display-subsystem | ||
88 | Required properties: | ||
89 | - compatible: "st,stih<chip>-hqvdp" | ||
90 | - reg: Physical base address of the IP registers and length of memory mapped region. | ||
91 | - clocks: from common clock binding: handle hardware IP needed clocks, the | ||
92 | number of clocks may depend of the SoC type. | ||
93 | See ../clocks/clock-bindings.txt for details. | ||
94 | - clock-names: names of the clocks listed in clocks property in the same | ||
95 | order. | ||
96 | - resets: resets to be used by the device | ||
97 | See ../reset/reset.txt for details. | ||
98 | - reset-names: names of the resets listed in resets property in the same | ||
99 | order. | ||
100 | - st,vtg: phandle on vtg main device node. | ||
101 | |||
86 | Example: | 102 | Example: |
87 | 103 | ||
88 | / { | 104 | / { |
@@ -173,7 +189,6 @@ Example: | |||
173 | interrupt-names = "irq"; | 189 | interrupt-names = "irq"; |
174 | clock-names = "pix", "tmds", "phy", "audio"; | 190 | clock-names = "pix", "tmds", "phy", "audio"; |
175 | clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>; | 191 | clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>; |
176 | hdmi,hpd-gpio = <&PIO2 5>; | ||
177 | }; | 192 | }; |
178 | 193 | ||
179 | sti-hda@fe85a000 { | 194 | sti-hda@fe85a000 { |
@@ -184,6 +199,16 @@ Example: | |||
184 | clocks = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>; | 199 | clocks = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>; |
185 | }; | 200 | }; |
186 | }; | 201 | }; |
202 | |||
203 | sti-hqvdp@9c000000 { | ||
204 | compatible = "st,stih407-hqvdp"; | ||
205 | reg = <0x9C00000 0x100000>; | ||
206 | clock-names = "hqvdp", "pix_main"; | ||
207 | clocks = <&clk_s_c0_flexgen CLK_MAIN_DISP>, <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>; | ||
208 | reset-names = "hqvdp"; | ||
209 | resets = <&softreset STIH407_HDQVDP_SOFTRESET>; | ||
210 | st,vtg = <&vtg_main>; | ||
211 | }; | ||
187 | }; | 212 | }; |
188 | ... | 213 | ... |
189 | }; | 214 | }; |
diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt new file mode 100644 index 000000000000..ed2f09dc2483 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | ltc2978 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should contain one of: | ||
5 | * "lltc,ltc2974" | ||
6 | * "lltc,ltc2977" | ||
7 | * "lltc,ltc2978" | ||
8 | * "lltc,ltc3880" | ||
9 | * "lltc,ltc3883" | ||
10 | * "lltc,ltm4676" | ||
11 | - reg: I2C slave address | ||
12 | |||
13 | Optional properties: | ||
14 | - regulators: A node that houses a sub-node for each regulator controlled by | ||
15 | the device. Each sub-node is identified using the node's name, with valid | ||
16 | values listed below. The content of each sub-node is defined by the | ||
17 | standard binding for regulators; see regulator.txt. | ||
18 | |||
19 | Valid names of regulators depend on number of supplies supported per device: | ||
20 | * ltc2974 : vout0 - vout3 | ||
21 | * ltc2977 : vout0 - vout7 | ||
22 | * ltc2978 : vout0 - vout7 | ||
23 | * ltc3880 : vout0 - vout1 | ||
24 | * ltc3883 : vout0 | ||
25 | * ltm4676 : vout0 - vout1 | ||
26 | |||
27 | Example: | ||
28 | ltc2978@5e { | ||
29 | compatible = "lltc,ltc2978"; | ||
30 | reg = <0x5e>; | ||
31 | regulators { | ||
32 | vout0 { | ||
33 | regulator-name = "FPGA-2.5V"; | ||
34 | }; | ||
35 | vout2 { | ||
36 | regulator-name = "FPGA-1.5V"; | ||
37 | }; | ||
38 | }; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt new file mode 100644 index 000000000000..4ac5aaa2d024 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Atmel TRNG (True Random Number Generator) block | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "atmel,at91sam9g45-trng" | ||
5 | - reg : Offset and length of the register set of this block | ||
6 | - interrupts : the interrupt number for the TRNG block | ||
7 | - clocks: should contain the TRNG clk source | ||
8 | |||
9 | Example: | ||
10 | |||
11 | trng@fffcc000 { | ||
12 | compatible = "atmel,at91sam9g45-trng"; | ||
13 | reg = <0xfffcc000 0x4000>; | ||
14 | interrupts = <6 IRQ_TYPE_LEVEL_HIGH 0>; | ||
15 | clocks = <&trng_clk>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt index 5199b0c8cf7a..fee26dc3e858 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt | |||
@@ -14,10 +14,10 @@ Optional properties : | |||
14 | - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds. | 14 | - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds. |
15 | This option is only supported in hardware blocks version 1.11a or newer. | 15 | This option is only supported in hardware blocks version 1.11a or newer. |
16 | 16 | ||
17 | - i2c-scl-falling-time : should contain the SCL falling time in nanoseconds. | 17 | - i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds. |
18 | This value which is by default 300ns is used to compute the tLOW period. | 18 | This value which is by default 300ns is used to compute the tLOW period. |
19 | 19 | ||
20 | - i2c-sda-falling-time : should contain the SDA falling time in nanoseconds. | 20 | - i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds. |
21 | This value which is by default 300ns is used to compute the tHIGH period. | 21 | This value which is by default 300ns is used to compute the tHIGH period. |
22 | 22 | ||
23 | Example : | 23 | Example : |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt b/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt new file mode 100644 index 000000000000..b6461602dca5 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | IMG Serial Control Bus (SCB) I2C Controller | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible: "img,scb-i2c" | ||
5 | - reg: Physical base address and length of controller registers | ||
6 | - interrupts: Interrupt number used by the controller | ||
7 | - clocks : Should contain a clock specifier for each entry in clock-names | ||
8 | - clock-names : Should contain the following entries: | ||
9 | "scb", for the SCB core clock. | ||
10 | "sys", for the system clock. | ||
11 | - clock-frequency: The I2C bus frequency in Hz | ||
12 | - #address-cells: Should be <1> | ||
13 | - #size-cells: Should be <0> | ||
14 | |||
15 | Example: | ||
16 | |||
17 | i2c@18100000 { | ||
18 | compatible = "img,scb-i2c"; | ||
19 | reg = <0x18100000 0x200>; | ||
20 | interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>; | ||
21 | clocks = <&i2c0_clk>, <&system_clk>; | ||
22 | clock-names = "scb", "sys"; | ||
23 | clock-frequency = <400000>; | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <0>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt index 4a8513e44740..52d37fd8d3e5 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt | |||
@@ -11,6 +11,8 @@ Required properties: | |||
11 | Optional properties: | 11 | Optional properties: |
12 | - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. | 12 | - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. |
13 | The absence of the propoerty indicates the default frequency 100 kHz. | 13 | The absence of the propoerty indicates the default frequency 100 kHz. |
14 | - dmas: A list of two dma specifiers, one for each entry in dma-names. | ||
15 | - dma-names: should contain "tx" and "rx". | ||
14 | 16 | ||
15 | Examples: | 17 | Examples: |
16 | 18 | ||
@@ -26,3 +28,12 @@ i2c@70038000 { /* HS-I2C on i.MX51 */ | |||
26 | interrupts = <64>; | 28 | interrupts = <64>; |
27 | clock-frequency = <400000>; | 29 | clock-frequency = <400000>; |
28 | }; | 30 | }; |
31 | |||
32 | i2c0: i2c@40066000 { /* i2c0 on vf610 */ | ||
33 | compatible = "fsl,vf610-i2c"; | ||
34 | reg = <0x40066000 0x1000>; | ||
35 | interrupts =<0 71 0x04>; | ||
36 | dmas = <&edma0 0 50>, | ||
37 | <&edma0 0 51>; | ||
38 | dma-names = "rx","tx"; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-meson.txt b/Documentation/devicetree/bindings/i2c/i2c-meson.txt new file mode 100644 index 000000000000..682f9a6f766e --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-meson.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Amlogic Meson I2C controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "amlogic,meson6-i2c" | ||
5 | - reg: physical address and length of the device registers | ||
6 | - interrupts: a single interrupt specifier | ||
7 | - clocks: clock for the device | ||
8 | - #address-cells: should be <1> | ||
9 | - #size-cells: should be <0> | ||
10 | |||
11 | Optional properties: | ||
12 | - clock-frequency: the desired I2C bus clock frequency in Hz; in | ||
13 | absence of this property the default value is used (100 kHz). | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | i2c@c8100500 { | ||
18 | compatible = "amlogic,meson6-i2c"; | ||
19 | reg = <0xc8100500 0x20>; | ||
20 | interrupts = <0 92 1>; | ||
21 | clocks = <&clk81>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-opal.txt b/Documentation/devicetree/bindings/i2c/i2c-opal.txt new file mode 100644 index 000000000000..12bc61465ee5 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-opal.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | Device-tree bindings for I2C OPAL driver | ||
2 | ---------------------------------------- | ||
3 | |||
4 | Most of the device node and properties layout is specific to the firmware and | ||
5 | used by the firmware itself for configuring the port. From the linux | ||
6 | perspective, the properties of use are "ibm,port-name" and "ibm,opal-id". | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - reg: Port-id within a given master | ||
11 | - compatible: must be "ibm,opal-i2c" | ||
12 | - ibm,opal-id: Refers to a specific bus and used to identify it when calling | ||
13 | the relevant OPAL functions. | ||
14 | - bus-frequency: Operating frequency of the i2c bus (in HZ). Informational for | ||
15 | linux, used by the FW though. | ||
16 | |||
17 | Optional properties: | ||
18 | - ibm,port-name: Firmware provides this name that uniquely identifies the i2c | ||
19 | port. | ||
20 | |||
21 | The node contains a number of other properties that are used by the FW itself | ||
22 | and depend on the specific hardware implementation. The example below depicts | ||
23 | a P8 on-chip bus. | ||
24 | |||
25 | Example: | ||
26 | |||
27 | i2c-bus@0 { | ||
28 | reg = <0x0>; | ||
29 | bus-frequency = <0x61a80>; | ||
30 | compatible = "ibm,power8-i2c-port", "ibm,opal-i2c"; | ||
31 | ibm,opal-id = <0x1>; | ||
32 | ibm,port-name = "p8_00000000_e1p0"; | ||
33 | #address-cells = <0x1>; | ||
34 | phandle = <0x10000006>; | ||
35 | #size-cells = <0x0>; | ||
36 | linux,phandle = <0x10000006>; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt index 278de8e64bbf..89b3250f049b 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt | |||
@@ -32,6 +32,7 @@ Optional properties: | |||
32 | specified, default value is 0. | 32 | specified, default value is 0. |
33 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not | 33 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not |
34 | specified, the default value in Hz is 100000. | 34 | specified, the default value in Hz is 100000. |
35 | - samsung,sysreg-phandle - handle to syscon used to control the system registers | ||
35 | 36 | ||
36 | Example: | 37 | Example: |
37 | 38 | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt index d2153ce36fa8..2bfc6e7ed094 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | |||
@@ -2,6 +2,15 @@ Device tree configuration for Renesas IIC (sh_mobile) driver | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback | 4 | - compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback |
5 | Examples with soctypes are: | ||
6 | - "renesas,iic-r8a73a4" (R-Mobile APE6) | ||
7 | - "renesas,iic-r8a7740" (R-Mobile A1) | ||
8 | - "renesas,iic-r8a7790" (R-Car H2) | ||
9 | - "renesas,iic-r8a7791" (R-Car M2-W) | ||
10 | - "renesas,iic-r8a7792" (R-Car V2H) | ||
11 | - "renesas,iic-r8a7793" (R-Car M2-N) | ||
12 | - "renesas,iic-r8a7794" (R-Car E2) | ||
13 | - "renesas,iic-sh73a0" (SH-Mobile AG5) | ||
5 | - reg : address start and address range size of device | 14 | - reg : address start and address range size of device |
6 | - interrupts : interrupt of device | 15 | - interrupts : interrupt of device |
7 | - clocks : clock for device | 16 | - clocks : clock for device |
@@ -10,6 +19,11 @@ Required properties: | |||
10 | 19 | ||
11 | Optional properties: | 20 | Optional properties: |
12 | - clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset. | 21 | - clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset. |
22 | - dmas : Must contain a list of two references to DMA | ||
23 | specifiers, one for transmission, and one for | ||
24 | reception. | ||
25 | - dma-names : Must contain a list of two DMA names, "tx" and "rx". | ||
26 | |||
13 | 27 | ||
14 | Pinctrl properties might be needed, too. See there. | 28 | Pinctrl properties might be needed, too. See there. |
15 | 29 | ||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index fbde415078e6..9f4e3824e71e 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -17,6 +17,9 @@ adi,adt7473 +/-1C TDM Extended Temp Range I.C | |||
17 | adi,adt7475 +/-1C TDM Extended Temp Range I.C | 17 | adi,adt7475 +/-1C TDM Extended Temp Range I.C |
18 | adi,adt7476 +/-1C TDM Extended Temp Range I.C | 18 | adi,adt7476 +/-1C TDM Extended Temp Range I.C |
19 | adi,adt7490 +/-1C TDM Extended Temp Range I.C | 19 | adi,adt7490 +/-1C TDM Extended Temp Range I.C |
20 | adi,adxl345 Three-Axis Digital Accelerometer | ||
21 | adi,adxl346 Three-Axis Digital Accelerometer | ||
22 | adi,adxl34x Three-Axis Digital Accelerometer | ||
20 | at,24c08 i2c serial eeprom (24cxx) | 23 | at,24c08 i2c serial eeprom (24cxx) |
21 | atmel,24c00 i2c serial eeprom (24cxx) | 24 | atmel,24c00 i2c serial eeprom (24cxx) |
22 | atmel,24c01 i2c serial eeprom (24cxx) | 25 | atmel,24c01 i2c serial eeprom (24cxx) |
@@ -56,6 +59,8 @@ gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire In | |||
56 | infineon,slb9635tt Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz) | 59 | infineon,slb9635tt Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz) |
57 | infineon,slb9645tt Infineon SLB9645 I2C TPM (new protocol, max 400khz) | 60 | infineon,slb9645tt Infineon SLB9645 I2C TPM (new protocol, max 400khz) |
58 | isl,isl12057 Intersil ISL12057 I2C RTC Chip | 61 | isl,isl12057 Intersil ISL12057 I2C RTC Chip |
62 | isil,isl29028 (deprecated, use isl) | ||
63 | isl,isl29028 Intersil ISL29028 Ambient Light and Proximity Sensor | ||
59 | maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator | 64 | maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator |
60 | maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs | 65 | maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs |
61 | maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface | 66 | maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface |
@@ -74,7 +79,12 @@ ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI an | |||
74 | pericom,pt7c4338 Real-time Clock Module | 79 | pericom,pt7c4338 Real-time Clock Module |
75 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch | 80 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch |
76 | ramtron,24c64 i2c serial eeprom (24cxx) | 81 | ramtron,24c64 i2c serial eeprom (24cxx) |
82 | ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | ||
83 | ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | ||
77 | ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 84 | ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
85 | ricoh,rs5c372b I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | ||
86 | ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | ||
87 | ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | ||
78 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) | 88 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) |
79 | sii,s35390a 2-wire CMOS real-time clock | 89 | sii,s35390a 2-wire CMOS real-time clock |
80 | st-micro,24c256 i2c serial eeprom (24cxx) | 90 | st-micro,24c256 i2c serial eeprom (24cxx) |
diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt new file mode 100644 index 000000000000..4e36d6e2f7b6 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | Qualcomm's SPMI PMIC current ADC | ||
2 | |||
3 | QPNP PMIC current ADC (IADC) provides interface to clients to read current. | ||
4 | A 16 bit ADC is used for current measurements. IADC can measure the current | ||
5 | through an external resistor (channel 1) or internal (built-in) resistor | ||
6 | (channel 0). When using an external resistor it is to be described by | ||
7 | qcom,external-resistor-micro-ohms property. | ||
8 | |||
9 | IADC node: | ||
10 | |||
11 | - compatible: | ||
12 | Usage: required | ||
13 | Value type: <string> | ||
14 | Definition: Should contain "qcom,spmi-iadc". | ||
15 | |||
16 | - reg: | ||
17 | Usage: required | ||
18 | Value type: <prop-encoded-array> | ||
19 | Definition: IADC base address and length in the SPMI PMIC register map | ||
20 | |||
21 | - interrupts: | ||
22 | Usage: optional | ||
23 | Value type: <prop-encoded-array> | ||
24 | Definition: End of ADC conversion. | ||
25 | |||
26 | - qcom,external-resistor-micro-ohms: | ||
27 | Usage: optional | ||
28 | Value type: <u32> | ||
29 | Definition: Sense resister value in micro Ohm. | ||
30 | If not defined value of 10000 micro Ohms will be used. | ||
31 | |||
32 | Example: | ||
33 | /* IADC node */ | ||
34 | pmic_iadc: iadc@3600 { | ||
35 | compatible = "qcom,spmi-iadc"; | ||
36 | reg = <0x3600 0x100>; | ||
37 | interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; | ||
38 | qcom,external-resistor-micro-ohms = <10000>; | ||
39 | #io-channel-cells = <1>; | ||
40 | }; | ||
41 | |||
42 | /* IIO client node */ | ||
43 | bat { | ||
44 | io-channels = <&pmic_iadc 0>; | ||
45 | io-channel-names = "iadc"; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt index 5d3ec1df226d..a9a5fe19ff2a 100644 --- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt +++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Rockchip Successive Approximation Register (SAR) A/D Converter bindings | 1 | Rockchip Successive Approximation Register (SAR) A/D Converter bindings |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "rockchip,saradc" | 4 | - compatible: Should be "rockchip,saradc" or "rockchip,rk3066-tsadc" |
5 | - reg: physical base address of the controller and length of memory mapped | 5 | - reg: physical base address of the controller and length of memory mapped |
6 | region. | 6 | region. |
7 | - interrupts: The interrupt number to the cpu. The interrupt specifier format | 7 | - interrupts: The interrupt number to the cpu. The interrupt specifier format |
diff --git a/Documentation/devicetree/bindings/input/cap1106.txt b/Documentation/devicetree/bindings/input/cap11xx.txt index 4b463904cba0..7d0a3009771b 100644 --- a/Documentation/devicetree/bindings/input/cap1106.txt +++ b/Documentation/devicetree/bindings/input/cap11xx.txt | |||
@@ -1,14 +1,16 @@ | |||
1 | Device tree bindings for Microchip CAP1106, 6 channel capacitive touch sensor | 1 | Device tree bindings for Microchip CAP11xx based capacitive touch sensors |
2 | 2 | ||
3 | The node for this driver must be a child of a I2C controller node, as the | 3 | The node for this device must be a child of a I2C controller node, as the |
4 | device communication via I2C only. | 4 | device communication via I2C only. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | 7 | ||
8 | compatible: Must be "microchip,cap1106" | 8 | compatible: Must contain one of: |
9 | "microchip,cap1106" | ||
10 | "microchip,cap1126" | ||
11 | "microchip,cap1188" | ||
9 | 12 | ||
10 | reg: The I2C slave address of the device. | 13 | reg: The I2C slave address of the device. |
11 | Only 0x28 is valid. | ||
12 | 14 | ||
13 | interrupts: Property describing the interrupt line the | 15 | interrupts: Property describing the interrupt line the |
14 | device's ALERT#/CM_IRQ# pin is connected to. | 16 | device's ALERT#/CM_IRQ# pin is connected to. |
@@ -26,6 +28,10 @@ Optional properties: | |||
26 | Valid values are 1, 2, 4, and 8. | 28 | Valid values are 1, 2, 4, and 8. |
27 | By default, a gain of 1 is set. | 29 | By default, a gain of 1 is set. |
28 | 30 | ||
31 | microchip,irq-active-high: By default the interrupt pin is active low | ||
32 | open drain. This property allows using the active | ||
33 | high push-pull output. | ||
34 | |||
29 | linux,keycodes: Specifies an array of numeric keycode values to | 35 | linux,keycodes: Specifies an array of numeric keycode values to |
30 | be used for the channels. If this property is | 36 | be used for the channels. If this property is |
31 | omitted, KEY_A, KEY_B, etc are used as | 37 | omitted, KEY_A, KEY_B, etc are used as |
@@ -43,11 +49,11 @@ i2c_controller { | |||
43 | autorepeat; | 49 | autorepeat; |
44 | microchip,sensor-gain = <2>; | 50 | microchip,sensor-gain = <2>; |
45 | 51 | ||
46 | linux,keycodes = <103 /* KEY_UP */ | 52 | linux,keycodes = <103>, /* KEY_UP */ |
47 | 106 /* KEY_RIGHT */ | 53 | <106>, /* KEY_RIGHT */ |
48 | 108 /* KEY_DOWN */ | 54 | <108>, /* KEY_DOWN */ |
49 | 105 /* KEY_LEFT */ | 55 | <105>, /* KEY_LEFT */ |
50 | 109 /* KEY_PAGEDOWN */ | 56 | <109>, /* KEY_PAGEDOWN */ |
51 | 104>; /* KEY_PAGEUP */ | 57 | <104>; /* KEY_PAGEUP */ |
52 | }; | 58 | }; |
53 | } | 59 | } |
diff --git a/Documentation/devicetree/bindings/input/elan_i2c.txt b/Documentation/devicetree/bindings/input/elan_i2c.txt new file mode 100644 index 000000000000..ee3242c4ba67 --- /dev/null +++ b/Documentation/devicetree/bindings/input/elan_i2c.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Elantech I2C Touchpad | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "elan,ekth3000". | ||
5 | - reg: I2C address of the chip. | ||
6 | - interrupt-parent: a phandle for the interrupt controller (see interrupt | ||
7 | binding[0]). | ||
8 | - interrupts: interrupt to which the chip is connected (see interrupt | ||
9 | binding[0]). | ||
10 | |||
11 | Optional properties: | ||
12 | - wakeup-source: touchpad can be used as a wakeup source. | ||
13 | - pinctrl-names: should be "default" (see pinctrl binding [1]). | ||
14 | - pinctrl-0: a phandle pointing to the pin settings for the device (see | ||
15 | pinctrl binding [1]). | ||
16 | - vcc-supply: a phandle for the regulator supplying 3.3V power. | ||
17 | |||
18 | [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
19 | [1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | ||
20 | |||
21 | Example: | ||
22 | &i2c1 { | ||
23 | /* ... */ | ||
24 | |||
25 | touchpad@15 { | ||
26 | compatible = "elan,ekth3000"; | ||
27 | reg = <0x15>; | ||
28 | interrupt-parent = <&gpio4>; | ||
29 | interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>; | ||
30 | wakeup-source; | ||
31 | }; | ||
32 | |||
33 | /* ... */ | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/elants_i2c.txt b/Documentation/devicetree/bindings/input/elants_i2c.txt new file mode 100644 index 000000000000..a765232e6446 --- /dev/null +++ b/Documentation/devicetree/bindings/input/elants_i2c.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Elantech I2C Touchscreen | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "elan,ekth3500". | ||
5 | - reg: I2C address of the chip. | ||
6 | - interrupt-parent: a phandle for the interrupt controller (see interrupt | ||
7 | binding[0]). | ||
8 | - interrupts: interrupt to which the chip is connected (see interrupt | ||
9 | binding[0]). | ||
10 | |||
11 | Optional properties: | ||
12 | - wakeup-source: touchscreen can be used as a wakeup source. | ||
13 | - pinctrl-names: should be "default" (see pinctrl binding [1]). | ||
14 | - pinctrl-0: a phandle pointing to the pin settings for the device (see | ||
15 | pinctrl binding [1]). | ||
16 | |||
17 | [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
18 | [1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | ||
19 | |||
20 | Example: | ||
21 | &i2c1 { | ||
22 | /* ... */ | ||
23 | |||
24 | touchscreen@10 { | ||
25 | compatible = "elan,ekth3500"; | ||
26 | reg = <0x10>; | ||
27 | interrupt-parent = <&gpio4>; | ||
28 | interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>; | ||
29 | wakeup-source; | ||
30 | }; | ||
31 | |||
32 | /* ... */ | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt index 5c2c02140a62..a4a38fcf2ed6 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.txt +++ b/Documentation/devicetree/bindings/input/gpio-keys.txt | |||
@@ -10,10 +10,13 @@ Optional properties: | |||
10 | Each button (key) is represented as a sub-node of "gpio-keys": | 10 | Each button (key) is represented as a sub-node of "gpio-keys": |
11 | Subnode properties: | 11 | Subnode properties: |
12 | 12 | ||
13 | - gpios: OF device-tree gpio specification. | ||
14 | - label: Descriptive name of the key. | 13 | - label: Descriptive name of the key. |
15 | - linux,code: Keycode to emit. | 14 | - linux,code: Keycode to emit. |
16 | 15 | ||
16 | Required mutual exclusive subnode-properties: | ||
17 | - gpios: OF device-tree gpio specification. | ||
18 | - interrupts: the interrupt line for that input | ||
19 | |||
17 | Optional subnode-properties: | 20 | Optional subnode-properties: |
18 | - linux,input-type: Specify event type this button/key generates. | 21 | - linux,input-type: Specify event type this button/key generates. |
19 | If not specified defaults to <1> == EV_KEY. | 22 | If not specified defaults to <1> == EV_KEY. |
@@ -33,4 +36,9 @@ Example nodes: | |||
33 | linux,code = <103>; | 36 | linux,code = <103>; |
34 | gpios = <&gpio1 0 1>; | 37 | gpios = <&gpio1 0 1>; |
35 | }; | 38 | }; |
39 | button@22 { | ||
40 | label = "GPIO Key DOWN"; | ||
41 | linux,code = <108>; | ||
42 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; | ||
43 | }; | ||
36 | ... | 44 | ... |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt index ff812a8a82bc..bae1f2187226 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt | |||
@@ -13,7 +13,12 @@ Such an interrupt controller has the following hardware design: | |||
13 | or if they will output an interrupt signal at this 2nd level interrupt | 13 | or if they will output an interrupt signal at this 2nd level interrupt |
14 | controller, in particular for UARTs | 14 | controller, in particular for UARTs |
15 | 15 | ||
16 | - not all 32-bits within the interrupt controller actually map to an interrupt | 16 | - typically has one 32-bit enable word and one 32-bit status word, but on |
17 | some hardware may have more than one enable/status pair | ||
18 | |||
19 | - no atomic set/clear operations | ||
20 | |||
21 | - not all bits within the interrupt controller actually map to an interrupt | ||
17 | 22 | ||
18 | The typical hardware layout for this controller is represented below: | 23 | The typical hardware layout for this controller is represented below: |
19 | 24 | ||
@@ -48,7 +53,9 @@ The typical hardware layout for this controller is represented below: | |||
48 | Required properties: | 53 | Required properties: |
49 | 54 | ||
50 | - compatible: should be "brcm,bcm7120-l2-intc" | 55 | - compatible: should be "brcm,bcm7120-l2-intc" |
51 | - reg: specifies the base physical address and size of the registers | 56 | - reg: specifies the base physical address and size of the registers; |
57 | multiple pairs may be specified, with the first pair handling IRQ offsets | ||
58 | 0..31 and the second pair handling 32..63 | ||
52 | - interrupt-controller: identifies the node as an interrupt controller | 59 | - interrupt-controller: identifies the node as an interrupt controller |
53 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt | 60 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt |
54 | source, should be 1. | 61 | source, should be 1. |
@@ -59,18 +66,21 @@ Required properties: | |||
59 | - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts | 66 | - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts |
60 | are wired to this 2nd level interrupt controller, and how they match their | 67 | are wired to this 2nd level interrupt controller, and how they match their |
61 | respective interrupt parents. Should match exactly the number of interrupts | 68 | respective interrupt parents. Should match exactly the number of interrupts |
62 | specified in the 'interrupts' property. | 69 | specified in the 'interrupts' property, multiplied by the number of |
70 | enable/status register pairs implemented by this controller. For | ||
71 | multiple parent IRQs with multiple enable/status words, this looks like: | ||
72 | <irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...> | ||
63 | 73 | ||
64 | Optional properties: | 74 | Optional properties: |
65 | 75 | ||
66 | - brcm,irq-can-wake: if present, this means the L2 controller can be used as a | 76 | - brcm,irq-can-wake: if present, this means the L2 controller can be used as a |
67 | wakeup source for system suspend/resume. | 77 | wakeup source for system suspend/resume. |
68 | 78 | ||
69 | - brcm,int-fwd-mask: if present, a 32-bits bit mask to configure for the | 79 | - brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which |
70 | interrupts which have a mux gate, typically UARTs. Setting these bits will | 80 | have a mux gate, typically UARTs. Setting these bits will make their |
71 | make their respective interrupts outputs bypass this 2nd level interrupt | 81 | respective interrupt outputs bypass this 2nd level interrupt controller |
72 | controller completely, it completely transparent for the interrupt controller | 82 | completely; it is completely transparent for the interrupt controller |
73 | parent | 83 | parent. This should have one 32-bit word per enable/status pair. |
74 | 84 | ||
75 | Example: | 85 | Example: |
76 | 86 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt index ce6a1a072028..8a3c40829899 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | |||
@@ -30,10 +30,6 @@ should only be used when a device has multiple interrupt parents. | |||
30 | Example: | 30 | Example: |
31 | interrupts-extended = <&intc1 5 1>, <&intc2 1 0>; | 31 | interrupts-extended = <&intc1 5 1>, <&intc2 1 0>; |
32 | 32 | ||
33 | A device node may contain either "interrupts" or "interrupts-extended", but not | ||
34 | both. If both properties are present, then the operating system should log an | ||
35 | error and use only the data in "interrupts". | ||
36 | |||
37 | 2) Interrupt controller nodes | 33 | 2) Interrupt controller nodes |
38 | ----------------------------- | 34 | ----------------------------- |
39 | 35 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt new file mode 100644 index 000000000000..5a65478e5d40 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | MIPS Global Interrupt Controller (GIC) | ||
2 | |||
3 | The MIPS GIC routes external interrupts to individual VPEs and IRQ pins. | ||
4 | It also supports local (per-processor) interrupts and software-generated | ||
5 | interrupts which can be used as IPIs. The GIC also includes a free-running | ||
6 | global timer, per-CPU count/compare timers, and a watchdog. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be "mti,gic". | ||
10 | - interrupt-controller : Identifies the node as an interrupt controller | ||
11 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
12 | interrupt specifier. Should be 3. | ||
13 | - The first cell is the type of interrupt, local or shared. | ||
14 | See <include/dt-bindings/interrupt-controller/mips-gic.h>. | ||
15 | - The second cell is the GIC interrupt number. | ||
16 | - The third cell encodes the interrupt flags. | ||
17 | See <include/dt-bindings/interrupt-controller/irq.h> for a list of valid | ||
18 | flags. | ||
19 | |||
20 | Optional properties: | ||
21 | - reg : Base address and length of the GIC registers. If not present, | ||
22 | the base address reported by the hardware GCR_GIC_BASE will be used. | ||
23 | - mti,reserved-cpu-vectors : Specifies the list of CPU interrupt vectors | ||
24 | to which the GIC may not route interrupts. Valid values are 2 - 7. | ||
25 | This property is ignored if the CPU is started in EIC mode. | ||
26 | |||
27 | Required properties for timer sub-node: | ||
28 | - compatible : Should be "mti,gic-timer". | ||
29 | - interrupts : Interrupt for the GIC local timer. | ||
30 | - clock-frequency : Clock frequency at which the GIC timers operate. | ||
31 | |||
32 | Example: | ||
33 | |||
34 | gic: interrupt-controller@1bdc0000 { | ||
35 | compatible = "mti,gic"; | ||
36 | reg = <0x1bdc0000 0x20000>; | ||
37 | |||
38 | interrupt-controller; | ||
39 | #interrupt-cells = <3>; | ||
40 | |||
41 | mti,reserved-cpu-vectors = <7>; | ||
42 | |||
43 | timer { | ||
44 | compatible = "mti,gic-timer"; | ||
45 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; | ||
46 | clock-frequency = <50000000>; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | uart@18101400 { | ||
51 | ... | ||
52 | interrupt-parent = <&gic>; | ||
53 | interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>; | ||
54 | ... | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt b/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt new file mode 100644 index 000000000000..9a55ac3735e5 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Rockchip IOMMU | ||
2 | ============== | ||
3 | |||
4 | A Rockchip DRM iommu translates io virtual addresses to physical addresses for | ||
5 | its master device. Each slave device is bound to a single master device, and | ||
6 | shares its clocks, power domain and irq. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be "rockchip,iommu" | ||
10 | - reg : Address space for the configuration registers | ||
11 | - interrupts : Interrupt specifier for the IOMMU instance | ||
12 | - interrupt-names : Interrupt name for the IOMMU instance | ||
13 | - #iommu-cells : Should be <0>. This indicates the iommu is a | ||
14 | "single-master" device, and needs no additional information | ||
15 | to associate with its master device. See: | ||
16 | Documentation/devicetree/bindings/iommu/iommu.txt | ||
17 | |||
18 | Example: | ||
19 | |||
20 | vopl_mmu: iommu@ff940300 { | ||
21 | compatible = "rockchip,iommu"; | ||
22 | reg = <0xff940300 0x100>; | ||
23 | interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; | ||
24 | interrupt-names = "vopl_mmu"; | ||
25 | #iommu-cells = <0>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-lp8860.txt b/Documentation/devicetree/bindings/leds/leds-lp8860.txt new file mode 100644 index 000000000000..aad38dd94d4b --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-lp8860.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Texas Instruments - lp8860 4-Channel LED Driver | ||
2 | |||
3 | The LP8860-Q1 is an high-efficiency LED | ||
4 | driver with boost controller. It has 4 high-precision | ||
5 | current sinks that can be controlled by a PWM input | ||
6 | signal, a SPI/I2C master, or both. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: | ||
10 | "ti,lp8860" | ||
11 | - reg - I2C slave address | ||
12 | - label - Used for naming LEDs | ||
13 | |||
14 | Optional properties: | ||
15 | - enable-gpio - gpio pin to enable/disable the device. | ||
16 | - supply - "vled" - LED supply | ||
17 | |||
18 | Example: | ||
19 | |||
20 | leds: leds@6 { | ||
21 | compatible = "ti,lp8860"; | ||
22 | reg = <0x2d>; | ||
23 | label = "display_cluster"; | ||
24 | enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; | ||
25 | vled-supply = <&vbatt>; | ||
26 | } | ||
27 | |||
28 | For more product information please see the link below: | ||
29 | http://www.ti.com/product/lp8860-q1 | ||
diff --git a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt index 48edc4b92afb..d1a043339c11 100644 --- a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt +++ b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt | |||
@@ -43,6 +43,9 @@ Required properties: | |||
43 | device. The format is dependent on which interrupt | 43 | device. The format is dependent on which interrupt |
44 | controller the OMAP device uses | 44 | controller the OMAP device uses |
45 | - ti,hwmods: Name of the hwmod associated with the mailbox | 45 | - ti,hwmods: Name of the hwmod associated with the mailbox |
46 | - #mbox-cells: Common mailbox binding property to identify the number | ||
47 | of cells required for the mailbox specifier. Should be | ||
48 | 1 | ||
46 | - ti,mbox-num-users: Number of targets (processor devices) that the mailbox | 49 | - ti,mbox-num-users: Number of targets (processor devices) that the mailbox |
47 | device can interrupt | 50 | device can interrupt |
48 | - ti,mbox-num-fifos: Number of h/w fifo queues within the mailbox IP block | 51 | - ti,mbox-num-fifos: Number of h/w fifo queues within the mailbox IP block |
@@ -72,6 +75,18 @@ data that represent the following: | |||
72 | Cell #3 (usr_id) - mailbox user id for identifying the interrupt line | 75 | Cell #3 (usr_id) - mailbox user id for identifying the interrupt line |
73 | associated with generating a tx/rx fifo interrupt. | 76 | associated with generating a tx/rx fifo interrupt. |
74 | 77 | ||
78 | Mailbox Users: | ||
79 | ============== | ||
80 | A device needing to communicate with a target processor device should specify | ||
81 | them using the common mailbox binding properties, "mboxes" and the optional | ||
82 | "mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt | ||
83 | for details). Each value of the mboxes property should contain a phandle to the | ||
84 | mailbox controller device node and an args specifier that will be the phandle to | ||
85 | the intended sub-mailbox child node to be used for communication. The equivalent | ||
86 | "mbox-names" property value can be used to give a name to the communication channel | ||
87 | to be used by the client user. | ||
88 | |||
89 | |||
75 | Example: | 90 | Example: |
76 | -------- | 91 | -------- |
77 | 92 | ||
@@ -81,6 +96,7 @@ mailbox: mailbox@4a0f4000 { | |||
81 | reg = <0x4a0f4000 0x200>; | 96 | reg = <0x4a0f4000 0x200>; |
82 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; | 97 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; |
83 | ti,hwmods = "mailbox"; | 98 | ti,hwmods = "mailbox"; |
99 | #mbox-cells = <1>; | ||
84 | ti,mbox-num-users = <3>; | 100 | ti,mbox-num-users = <3>; |
85 | ti,mbox-num-fifos = <8>; | 101 | ti,mbox-num-fifos = <8>; |
86 | mbox_ipu: mbox_ipu { | 102 | mbox_ipu: mbox_ipu { |
@@ -93,12 +109,19 @@ mailbox: mailbox@4a0f4000 { | |||
93 | }; | 109 | }; |
94 | }; | 110 | }; |
95 | 111 | ||
112 | dsp { | ||
113 | ... | ||
114 | mboxes = <&mailbox &mbox_dsp>; | ||
115 | ... | ||
116 | }; | ||
117 | |||
96 | /* AM33xx */ | 118 | /* AM33xx */ |
97 | mailbox: mailbox@480C8000 { | 119 | mailbox: mailbox@480C8000 { |
98 | compatible = "ti,omap4-mailbox"; | 120 | compatible = "ti,omap4-mailbox"; |
99 | reg = <0x480C8000 0x200>; | 121 | reg = <0x480C8000 0x200>; |
100 | interrupts = <77>; | 122 | interrupts = <77>; |
101 | ti,hwmods = "mailbox"; | 123 | ti,hwmods = "mailbox"; |
124 | #mbox-cells = <1>; | ||
102 | ti,mbox-num-users = <4>; | 125 | ti,mbox-num-users = <4>; |
103 | ti,mbox-num-fifos = <8>; | 126 | ti,mbox-num-fifos = <8>; |
104 | mbox_wkupm3: wkup_m3 { | 127 | mbox_wkupm3: wkup_m3 { |
diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt new file mode 100644 index 000000000000..407848e85f31 --- /dev/null +++ b/Documentation/devicetree/bindings/media/meson-ir.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Amlogic Meson IR remote control receiver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "amlogic,meson6-ir" | ||
5 | - reg : physical base address and length of the device registers | ||
6 | - interrupts : a single specifier for the interrupt from the device | ||
7 | |||
8 | Example: | ||
9 | |||
10 | ir-receiver@c8100480 { | ||
11 | compatible= "amlogic,meson6-ir"; | ||
12 | reg = <0xc8100480 0x20>; | ||
13 | interrupts = <0 15 1>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt index ba61782c2af9..9dafe6b06cd2 100644 --- a/Documentation/devicetree/bindings/media/rcar_vin.txt +++ b/Documentation/devicetree/bindings/media/rcar_vin.txt | |||
@@ -6,6 +6,8 @@ family of devices. The current blocks are always slaves and suppot one input | |||
6 | channel which can be either RGB, YUYV or BT656. | 6 | channel which can be either RGB, YUYV or BT656. |
7 | 7 | ||
8 | - compatible: Must be one of the following | 8 | - compatible: Must be one of the following |
9 | - "renesas,vin-r8a7794" for the R8A7794 device | ||
10 | - "renesas,vin-r8a7793" for the R8A7793 device | ||
9 | - "renesas,vin-r8a7791" for the R8A7791 device | 11 | - "renesas,vin-r8a7791" for the R8A7791 device |
10 | - "renesas,vin-r8a7790" for the R8A7790 device | 12 | - "renesas,vin-r8a7790" for the R8A7790 device |
11 | - "renesas,vin-r8a7779" for the R8A7779 device | 13 | - "renesas,vin-r8a7779" for the R8A7779 device |
diff --git a/Documentation/devicetree/bindings/media/si4713.txt b/Documentation/devicetree/bindings/media/si4713.txt new file mode 100644 index 000000000000..5ee5552d3465 --- /dev/null +++ b/Documentation/devicetree/bindings/media/si4713.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Silicon Labs FM Radio transmitter | ||
2 | |||
3 | The Silicon Labs Si4713 is an FM radio transmitter with receive power scan | ||
4 | supporting 76-108 MHz. It includes an RDS encoder and has both, a stereo-analog | ||
5 | and a digital interface, which supports I2S, left-justified and a custom | ||
6 | DSP-mode format. It is programmable through an I2C interface. | ||
7 | |||
8 | Required Properties: | ||
9 | - compatible: Should contain "silabs,si4713" | ||
10 | - reg: the I2C address of the device | ||
11 | |||
12 | Optional Properties: | ||
13 | - interrupts-extended: Interrupt specifier for the chips interrupt | ||
14 | - reset-gpios: GPIO specifier for the chips reset line | ||
15 | - vdd-supply: phandle for Vdd regulator | ||
16 | - vio-supply: phandle for Vio regulator | ||
17 | |||
18 | Example: | ||
19 | |||
20 | &i2c2 { | ||
21 | fmtx: si4713@63 { | ||
22 | compatible = "silabs,si4713"; | ||
23 | reg = <0x63>; | ||
24 | |||
25 | interrupts-extended = <&gpio2 21 IRQ_TYPE_EDGE_FALLING>; /* 53 */ | ||
26 | reset-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; /* 163 */ | ||
27 | vio-supply = <&vio>; | ||
28 | vdd-supply = <&vaux1>; | ||
29 | }; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt new file mode 100644 index 000000000000..89657d1d4cd4 --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Device Tree bindings for MVEBU SDRAM controllers | ||
2 | |||
3 | The Marvell EBU SoCs all have a SDRAM controller. The SDRAM controller | ||
4 | differs from one SoC variant to another, but they also share a number | ||
5 | of commonalities. | ||
6 | |||
7 | For now, this Device Tree binding documentation only documents the | ||
8 | Armada XP SDRAM controller. | ||
9 | |||
10 | Required properties: | ||
11 | |||
12 | - compatible: for Armada XP, "marvell,armada-xp-sdram-controller" | ||
13 | - reg: a resource specifier for the register space, which should | ||
14 | include all SDRAM controller registers as per the datasheet. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | sdramc@1400 { | ||
19 | compatible = "marvell,armada-xp-sdram-controller"; | ||
20 | reg = <0x1400 0x500>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt new file mode 100644 index 000000000000..f3db93c85eea --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | NVIDIA Tegra Memory Controller device tree bindings | ||
2 | =================================================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "nvidia,tegra<chip>-mc" | ||
6 | - reg: Physical base address and length of the controller's registers. | ||
7 | - clocks: Must contain an entry for each entry in clock-names. | ||
8 | See ../clocks/clock-bindings.txt for details. | ||
9 | - clock-names: Must include the following entries: | ||
10 | - mc: the module's clock input | ||
11 | - interrupts: The interrupt outputs from the controller. | ||
12 | - #iommu-cells: Should be 1. The single cell of the IOMMU specifier defines | ||
13 | the SWGROUP of the master. | ||
14 | |||
15 | This device implements an IOMMU that complies with the generic IOMMU binding. | ||
16 | See ../iommu/iommu.txt for details. | ||
17 | |||
18 | Example: | ||
19 | -------- | ||
20 | |||
21 | mc: memory-controller@0,70019000 { | ||
22 | compatible = "nvidia,tegra124-mc"; | ||
23 | reg = <0x0 0x70019000 0x0 0x1000>; | ||
24 | clocks = <&tegra_car TEGRA124_CLK_MC>; | ||
25 | clock-names = "mc"; | ||
26 | |||
27 | interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; | ||
28 | |||
29 | #iommu-cells = <1>; | ||
30 | }; | ||
31 | |||
32 | sdhci@0,700b0000 { | ||
33 | compatible = "nvidia,tegra124-sdhci"; | ||
34 | ... | ||
35 | iommus = <&mc TEGRA_SWGROUP_SDMMC1A>; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt new file mode 100644 index 000000000000..f64de95a8e8b --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt | |||
@@ -0,0 +1,51 @@ | |||
1 | Device-Tree bindings for Atmel's HLCDC (High LCD Controller) MFD driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be one of the following: | ||
5 | "atmel,sama5d3-hlcdc" | ||
6 | - reg: base address and size of the HLCDC device registers. | ||
7 | - clock-names: the name of the 3 clocks requested by the HLCDC device. | ||
8 | Should contain "periph_clk", "sys_clk" and "slow_clk". | ||
9 | - clocks: should contain the 3 clocks requested by the HLCDC device. | ||
10 | - interrupts: should contain the description of the HLCDC interrupt line | ||
11 | |||
12 | The HLCDC IP exposes two subdevices: | ||
13 | - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt | ||
14 | - a Display Controller: see ../drm/atmel-hlcdc-dc.txt | ||
15 | |||
16 | Example: | ||
17 | |||
18 | hlcdc: hlcdc@f0030000 { | ||
19 | compatible = "atmel,sama5d3-hlcdc"; | ||
20 | reg = <0xf0030000 0x2000>; | ||
21 | clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; | ||
22 | clock-names = "periph_clk","sys_clk", "slow_clk"; | ||
23 | interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; | ||
24 | status = "disabled"; | ||
25 | |||
26 | hlcdc-display-controller { | ||
27 | compatible = "atmel,hlcdc-display-controller"; | ||
28 | pinctrl-names = "default"; | ||
29 | pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>; | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | port@0 { | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <0>; | ||
36 | reg = <0>; | ||
37 | |||
38 | hlcdc_panel_output: endpoint@0 { | ||
39 | reg = <0>; | ||
40 | remote-endpoint = <&panel_input>; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | hlcdc_pwm: hlcdc-pwm { | ||
46 | compatible = "atmel,hlcdc-pwm"; | ||
47 | pinctrl-names = "default"; | ||
48 | pinctrl-0 = <&pinctrl_lcd_pwm>; | ||
49 | #pwm-cells = <3>; | ||
50 | }; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt b/Documentation/devicetree/bindings/mfd/max77686.txt index 678f3cf0b8f0..75fdfaf41831 100644 --- a/Documentation/devicetree/bindings/mfd/max77686.txt +++ b/Documentation/devicetree/bindings/mfd/max77686.txt | |||
@@ -34,6 +34,12 @@ to get matched with their hardware counterparts as follow: | |||
34 | -BUCKn : for BUCKs, where n can lie in range 1 to 9. | 34 | -BUCKn : for BUCKs, where n can lie in range 1 to 9. |
35 | example: BUCK1, BUCK5, BUCK9. | 35 | example: BUCK1, BUCK5, BUCK9. |
36 | 36 | ||
37 | Regulators which can be turned off during system suspend: | ||
38 | -LDOn : 2, 6-8, 10-12, 14-16, | ||
39 | -BUCKn : 1-4. | ||
40 | Use standard regulator bindings for it ('regulator-off-in-suspend'). | ||
41 | |||
42 | |||
37 | Example: | 43 | Example: |
38 | 44 | ||
39 | max77686@09 { | 45 | max77686@09 { |
diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt index 11921cc417bf..01e9f30fe678 100644 --- a/Documentation/devicetree/bindings/mfd/max77693.txt +++ b/Documentation/devicetree/bindings/mfd/max77693.txt | |||
@@ -27,6 +27,20 @@ Optional properties: | |||
27 | 27 | ||
28 | [*] refer Documentation/devicetree/bindings/regulator/regulator.txt | 28 | [*] refer Documentation/devicetree/bindings/regulator/regulator.txt |
29 | 29 | ||
30 | - haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide | ||
31 | users with tactile feedback. PWM period and duty-cycle are varied in | ||
32 | order to provide the approprite level of feedback. | ||
33 | |||
34 | Required properties: | ||
35 | - compatible : Must be "maxim,max77693-hpatic" | ||
36 | - haptic-supply : power supply for the haptic motor | ||
37 | [*] refer Documentation/devicetree/bindings/regulator/regulator.txt | ||
38 | - pwms : phandle to the physical PWM(Pulse Width Modulation) device. | ||
39 | PWM properties should be named "pwms". And number of cell is different | ||
40 | for each pwm device. | ||
41 | To get more informations, please refer to documentaion. | ||
42 | [*] refer Documentation/devicetree/bindings/pwm/pwm.txt | ||
43 | |||
30 | Example: | 44 | Example: |
31 | max77693@66 { | 45 | max77693@66 { |
32 | compatible = "maxim,max77693"; | 46 | compatible = "maxim,max77693"; |
@@ -52,4 +66,11 @@ Example: | |||
52 | regulator-boot-on; | 66 | regulator-boot-on; |
53 | }; | 67 | }; |
54 | }; | 68 | }; |
69 | |||
70 | haptic { | ||
71 | compatible = "maxim,max77693-haptic"; | ||
72 | haptic-supply = <&haptic_supply>; | ||
73 | pwms = <&pwm 0 40000 0>; | ||
74 | pwm-names = "haptic"; | ||
75 | }; | ||
55 | }; | 76 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt index 0e4026a6cbbf..57a045016fca 100644 --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt +++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | * Samsung S2MPS11, S2MPS14 and S2MPU02 Voltage and Current Regulator | 2 | * Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 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,8 +7,8 @@ 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" or "samsung,s2mps14-pmic" | 10 | - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic" |
11 | or "samsung,s2mpu02-pmic". | 11 | or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". |
12 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. | 12 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. |
13 | 13 | ||
14 | Optional properties: | 14 | Optional properties: |
@@ -17,8 +17,8 @@ Optional properties: | |||
17 | - interrupts: Interrupt specifiers for interrupt sources. | 17 | - interrupts: Interrupt specifiers for interrupt sources. |
18 | 18 | ||
19 | Optional nodes: | 19 | Optional nodes: |
20 | - clocks: s2mps11 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz | 20 | - clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 |
21 | outputs, so to register these as clocks with common clock framework | 21 | KHz outputs, so to register these as clocks with common clock framework |
22 | instantiate a sub-node named "clocks". It uses the common clock binding | 22 | instantiate a sub-node named "clocks". It uses the common clock binding |
23 | documented in : | 23 | documented in : |
24 | [Documentation/devicetree/bindings/clock/clock-bindings.txt] | 24 | [Documentation/devicetree/bindings/clock/clock-bindings.txt] |
@@ -30,12 +30,12 @@ Optional nodes: | |||
30 | the clock which they consume. | 30 | the clock which they consume. |
31 | Clock ID Devices | 31 | Clock ID Devices |
32 | ---------------------------------------------------------- | 32 | ---------------------------------------------------------- |
33 | 32KhzAP 0 S2MPS11, S2MPS14, S5M8767 | 33 | 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 |
34 | 32KhzCP 1 S2MPS11, S5M8767 | 34 | 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 |
35 | 32KhzBT 2 S2MPS11, S2MPS14, S5M8767 | 35 | 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 |
36 | 36 | ||
37 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps14-clk", | 37 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", |
38 | "samsung,s5m8767-clk" | 38 | "samsung,s2mps14-clk", "samsung,s5m8767-clk" |
39 | 39 | ||
40 | - regulators: The regulators of s2mps11 that have to be instantiated should be | 40 | - regulators: The regulators of s2mps11 that have to be instantiated should be |
41 | included in a sub-node named 'regulators'. Regulator nodes included in this | 41 | included in a sub-node named 'regulators'. Regulator nodes included in this |
@@ -81,12 +81,14 @@ as per the datasheet of s2mps11. | |||
81 | - LDOn | 81 | - LDOn |
82 | - valid values for n are: | 82 | - valid values for n are: |
83 | - S2MPS11: 1 to 38 | 83 | - S2MPS11: 1 to 38 |
84 | - S2MPS13: 1 to 40 | ||
84 | - S2MPS14: 1 to 25 | 85 | - S2MPS14: 1 to 25 |
85 | - S2MPU02: 1 to 28 | 86 | - S2MPU02: 1 to 28 |
86 | - Example: LDO1, LDO2, LDO28 | 87 | - Example: LDO1, LDO2, LDO28 |
87 | - BUCKn | 88 | - BUCKn |
88 | - valid values for n are: | 89 | - valid values for n are: |
89 | - S2MPS11: 1 to 10 | 90 | - S2MPS11: 1 to 10 |
91 | - S2MPS13: 1 to 10 | ||
90 | - S2MPS14: 1 to 5 | 92 | - S2MPS14: 1 to 5 |
91 | - S2MPU02: 1 to 7 | 93 | - S2MPU02: 1 to 7 |
92 | - Example: BUCK1, BUCK2, BUCK9 | 94 | - Example: BUCK1, BUCK2, BUCK9 |
diff --git a/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt b/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt new file mode 100644 index 000000000000..d4e0141d3620 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | * Interrupt Controller | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "brcm,bcm3384-intc" | ||
5 | |||
6 | Compatibility with BCM3384 and possibly other BCM33xx/BCM63xx SoCs. | ||
7 | |||
8 | - reg: Address/length pairs for each mask/status register set. Length must | ||
9 | be 8. If multiple register sets are specified, the first set will | ||
10 | handle IRQ offsets 0..31, the second set 32..63, and so on. | ||
11 | |||
12 | - interrupt-controller: This is an interrupt controller. | ||
13 | |||
14 | - #interrupt-cells: Must be <1>. Just a simple IRQ offset; no level/edge | ||
15 | or polarity configuration is possible with this controller. | ||
16 | |||
17 | - interrupt-parent: This controller is cascaded from a MIPS CPU HW IRQ, or | ||
18 | from another INTC. | ||
19 | |||
20 | - interrupts: The IRQ on the parent controller. | ||
21 | |||
22 | Example: | ||
23 | periph_intc: periph_intc@14e00038 { | ||
24 | compatible = "brcm,bcm3384-intc"; | ||
25 | |||
26 | /* | ||
27 | * IRQs 0..31: mask reg 0x14e00038, status reg 0x14e0003c | ||
28 | * IRQs 32..63: mask reg 0x14e00340, status reg 0x14e00344 | ||
29 | */ | ||
30 | reg = <0x14e00038 0x8 0x14e00340 0x8>; | ||
31 | |||
32 | interrupt-controller; | ||
33 | #interrupt-cells = <1>; | ||
34 | |||
35 | interrupt-parent = <&cpu_intc>; | ||
36 | interrupts = <4>; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/bmips.txt b/Documentation/devicetree/bindings/mips/brcm/bmips.txt new file mode 100644 index 000000000000..8ef71b4085ca --- /dev/null +++ b/Documentation/devicetree/bindings/mips/brcm/bmips.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | * Broadcom MIPS (BMIPS) CPUs | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380", | ||
5 | "brcm,bmips5000" | ||
6 | |||
7 | - mips-hpt-frequency: This is common to all CPUs in the system so it lives | ||
8 | under the "cpus" node. | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt b/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt new file mode 100644 index 000000000000..8a139cb3c0b5 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | * Broadcom cable/DSL platforms | ||
2 | |||
3 | SoCs: | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: "brcm,bcm3384", "brcm,bcm33843" | ||
7 | |||
8 | Boards: | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "brcm,bcm93384wvg" | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/usb.txt b/Documentation/devicetree/bindings/mips/brcm/usb.txt new file mode 100644 index 000000000000..452c45c7bf29 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/brcm/usb.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | * Broadcom USB controllers | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "brcm,bcm3384-ohci", "brcm,bcm3384-ehci" | ||
5 | |||
6 | These currently use the generic-ohci and generic-ehci drivers. On some | ||
7 | systems, special handling may be needed in the following cases: | ||
8 | |||
9 | - Restoring state after systemwide power save modes | ||
10 | - Sharing PHYs with the USBD (UDC) hardware | ||
11 | - Figuring out which controllers are disabled on ASIC bondout variants | ||
diff --git a/Documentation/devicetree/bindings/mips/cpu_irq.txt b/Documentation/devicetree/bindings/mips/cpu_irq.txt index 13aa4b62c62a..fc149f326dae 100644 --- a/Documentation/devicetree/bindings/mips/cpu_irq.txt +++ b/Documentation/devicetree/bindings/mips/cpu_irq.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | MIPS CPU interrupt controller | 1 | MIPS CPU interrupt controller |
2 | 2 | ||
3 | On MIPS the mips_cpu_intc_init() helper can be used to initialize the 8 CPU | 3 | On MIPS the mips_cpu_irq_of_init() helper can be used to initialize the 8 CPU |
4 | IRQs from a devicetree file and create a irq_domain for IRQ controller. | 4 | IRQs from a devicetree file and create a irq_domain for IRQ controller. |
5 | 5 | ||
6 | With the irq_domain in place we can describe how the 8 IRQs are wired to the | 6 | With the irq_domain in place we can describe how the 8 IRQs are wired to the |
@@ -36,7 +36,7 @@ Example devicetree: | |||
36 | 36 | ||
37 | Example platform irq.c: | 37 | Example platform irq.c: |
38 | static struct of_device_id __initdata of_irq_ids[] = { | 38 | static struct of_device_id __initdata of_irq_ids[] = { |
39 | { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_intc_init }, | 39 | { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_irq_of_init }, |
40 | { .compatible = "ralink,rt2880-intc", .data = intc_of_init }, | 40 | { .compatible = "ralink,rt2880-intc", .data = intc_of_init }, |
41 | {}, | 41 | {}, |
42 | }; | 42 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index 6cd3525d0e09..ee4fc0576c7d 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | |||
@@ -18,6 +18,10 @@ Required Properties: | |||
18 | specific extensions. | 18 | specific extensions. |
19 | - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420 | 19 | - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420 |
20 | specific extensions. | 20 | specific extensions. |
21 | - "samsung,exynos7-dw-mshc": for controllers with Samsung Exynos7 | ||
22 | specific extensions. | ||
23 | - "samsung,exynos7-dw-mshc-smu": for controllers with Samsung Exynos7 | ||
24 | specific extensions having an SMU. | ||
21 | 25 | ||
22 | * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface | 26 | * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface |
23 | unit (ciu) clock. This property is applicable only for Exynos5 SoC's and | 27 | unit (ciu) clock. This property is applicable only for Exynos5 SoC's and |
diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt new file mode 100644 index 000000000000..85de99fcaa2f --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Imagination specific extensions to the Synopsys Designware Mobile Storage | ||
2 | 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 Imagination specific | ||
8 | extensions to the Synopsys Designware Mobile Storage Host Controller. | ||
9 | |||
10 | Required Properties: | ||
11 | |||
12 | * compatible: should be | ||
13 | - "img,pistachio-dw-mshc": for Pistachio SoCs | ||
14 | |||
15 | Example: | ||
16 | |||
17 | mmc@18142000 { | ||
18 | compatible = "img,pistachio-dw-mshc"; | ||
19 | reg = <0x18142000 0x400>; | ||
20 | interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>; | ||
21 | |||
22 | clocks = <&system_clk>, <&sdhost_clk>; | ||
23 | clock-names = "biu", "ciu"; | ||
24 | |||
25 | fifo-depth = <0x20>; | ||
26 | bus-width = <4>; | ||
27 | num-slots = <1>; | ||
28 | disable-wp; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt index 86223c3eda90..4dd6deb90719 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt | |||
@@ -12,6 +12,10 @@ Required properties: | |||
12 | * for "marvell,armada-380-sdhci", two register areas. The first one | 12 | * for "marvell,armada-380-sdhci", two register areas. The first one |
13 | for the SDHCI registers themselves, and the second one for the | 13 | for the SDHCI registers themselves, and the second one for the |
14 | AXI/Mbus bridge registers of the SDHCI unit. | 14 | AXI/Mbus bridge registers of the SDHCI unit. |
15 | - clocks: Array of clocks required for SDHCI; requires at least one for | ||
16 | I/O clock. | ||
17 | - clock-names: Array of names corresponding to clocks property; shall be | ||
18 | "io" for I/O clock and "core" for optional core clock. | ||
15 | 19 | ||
16 | Optional properties: | 20 | Optional properties: |
17 | - mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning. | 21 | - mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning. |
@@ -23,6 +27,8 @@ sdhci@d4280800 { | |||
23 | reg = <0xd4280800 0x800>; | 27 | reg = <0xd4280800 0x800>; |
24 | bus-width = <8>; | 28 | bus-width = <8>; |
25 | interrupts = <27>; | 29 | interrupts = <27>; |
30 | clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>; | ||
31 | clock-names = "io", "core"; | ||
26 | non-removable; | 32 | non-removable; |
27 | mrvl,clk-delay-cycles = <31>; | 33 | mrvl,clk-delay-cycles = <31>; |
28 | }; | 34 | }; |
@@ -32,5 +38,6 @@ sdhci@d8000 { | |||
32 | reg = <0xd8000 0x1000>, <0xdc000 0x100>; | 38 | reg = <0xd8000 0x1000>, <0xdc000 0x100>; |
33 | interrupts = <0 25 0x4>; | 39 | interrupts = <0 25 0x4>; |
34 | clocks = <&gateclk 17>; | 40 | clocks = <&gateclk 17>; |
41 | clock-names = "io"; | ||
35 | mrvl,clk-delay-cycles = <0x1F>; | 42 | mrvl,clk-delay-cycles = <0x1F>; |
36 | }; | 43 | }; |
diff --git a/Documentation/devicetree/bindings/mtd/atmel-nand.txt b/Documentation/devicetree/bindings/mtd/atmel-nand.txt index 6edc3b616e98..1fe6dde98499 100644 --- a/Documentation/devicetree/bindings/mtd/atmel-nand.txt +++ b/Documentation/devicetree/bindings/mtd/atmel-nand.txt | |||
@@ -5,7 +5,9 @@ Required properties: | |||
5 | - reg : should specify localbus address and size used for the chip, | 5 | - reg : should specify localbus address and size used for the chip, |
6 | and hardware ECC controller if available. | 6 | and hardware ECC controller if available. |
7 | If the hardware ECC is PMECC, it should contain address and size for | 7 | If the hardware ECC is PMECC, it should contain address and size for |
8 | PMECC, PMECC Error Location controller and ROM which has lookup tables. | 8 | PMECC and PMECC Error Location controller. |
9 | The PMECC lookup table address and size in ROM is optional. If not | ||
10 | specified, driver will build it in runtime. | ||
9 | - atmel,nand-addr-offset : offset for the address latch. | 11 | - atmel,nand-addr-offset : offset for the address latch. |
10 | - atmel,nand-cmd-offset : offset for the command latch. | 12 | - atmel,nand-cmd-offset : offset for the command latch. |
11 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | 13 | - #address-cells, #size-cells : Must be present if the device has sub-nodes |
@@ -27,7 +29,7 @@ Optional properties: | |||
27 | are: 512, 1024. | 29 | are: 512, 1024. |
28 | - atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM | 30 | - atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM |
29 | for different sector size. First one is for sector size 512, the next is for | 31 | for different sector size. First one is for sector size 512, the next is for |
30 | sector size 1024. | 32 | sector size 1024. If not specified, driver will build the table in runtime. |
31 | - nand-bus-width : 8 or 16 bus width if not present 8 | 33 | - nand-bus-width : 8 or 16 bus width if not present 8 |
32 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false | 34 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false |
33 | - Nand Flash Controller(NFC) is a slave driver under Atmel nand flash | 35 | - Nand Flash Controller(NFC) is a slave driver under Atmel nand flash |
diff --git a/Documentation/devicetree/bindings/mtd/diskonchip.txt b/Documentation/devicetree/bindings/mtd/diskonchip.txt new file mode 100644 index 000000000000..3e13bfdbea5b --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/diskonchip.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | M-Systems and Sandisk DiskOnChip devices | ||
2 | |||
3 | M-System DiskOnChip G3 | ||
4 | ====================== | ||
5 | The Sandisk (formerly M-Systems) docg3 is a nand device of 64M to 256MB. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: should be "m-systems,diskonchip-g3" | ||
9 | - reg: register base and size | ||
10 | |||
11 | Example: | ||
12 | docg3: flash@0 { | ||
13 | compatible = "m-systems,diskonchip-g3"; | ||
14 | reg = <0x0 0x2000>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt index 36ef07d3c90f..af8915b41ccf 100644 --- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt | |||
@@ -11,8 +11,8 @@ Required properties: | |||
11 | are made in native endianness. | 11 | are made in native endianness. |
12 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | 12 | - #address-cells, #size-cells : Must be present if the device has sub-nodes |
13 | representing partitions. | 13 | representing partitions. |
14 | - gpios : specifies the gpio pins to control the NAND device. nwp is an | 14 | - gpios : Specifies the GPIO pins to control the NAND device. The order of |
15 | optional gpio and may be set to 0 if not present. | 15 | GPIO references is: RDY, nCE, ALE, CLE, and an optional nWP. |
16 | 16 | ||
17 | Optional properties: | 17 | Optional properties: |
18 | - bank-width : Width (in bytes) of the device. If not present, the width | 18 | - bank-width : Width (in bytes) of the device. If not present, the width |
@@ -35,11 +35,11 @@ gpio-nand@1,0 { | |||
35 | reg = <1 0x0000 0x2>; | 35 | reg = <1 0x0000 0x2>; |
36 | #address-cells = <1>; | 36 | #address-cells = <1>; |
37 | #size-cells = <1>; | 37 | #size-cells = <1>; |
38 | gpios = <&banka 1 0 /* rdy */ | 38 | gpios = <&banka 1 0>, /* RDY */ |
39 | &banka 2 0 /* nce */ | 39 | <&banka 2 0>, /* nCE */ |
40 | &banka 3 0 /* ale */ | 40 | <&banka 3 0>, /* ALE */ |
41 | &banka 4 0 /* cle */ | 41 | <&banka 4 0>, /* CLE */ |
42 | 0 /* nwp */>; | 42 | <0>; /* nWP */ |
43 | 43 | ||
44 | partition@0 { | 44 | partition@0 { |
45 | ... | 45 | ... |
diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt new file mode 100644 index 000000000000..0273adb8638c --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | Allwinner NAND Flash Controller (NFC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "allwinner,sun4i-a10-nand". | ||
5 | - reg : shall contain registers location and length for data and reg. | ||
6 | - interrupts : shall define the nand controller interrupt. | ||
7 | - #address-cells: shall be set to 1. Encode the nand CS. | ||
8 | - #size-cells : shall be set to 0. | ||
9 | - clocks : shall reference nand controller clocks. | ||
10 | - clock-names : nand controller internal clock names. Shall contain : | ||
11 | * "ahb" : AHB gating clock | ||
12 | * "mod" : nand controller clock | ||
13 | |||
14 | Optional children nodes: | ||
15 | Children nodes represent the available nand chips. | ||
16 | |||
17 | Optional properties: | ||
18 | - allwinner,rb : shall contain the native Ready/Busy ids. | ||
19 | or | ||
20 | - rb-gpios : shall contain the gpios used as R/B pins. | ||
21 | - nand-ecc-mode : one of the supported ECC modes ("hw", "hw_syndrome", "soft", | ||
22 | "soft_bch" or "none") | ||
23 | |||
24 | see Documentation/devicetree/mtd/nand.txt for generic bindings. | ||
25 | |||
26 | |||
27 | Examples: | ||
28 | nfc: nand@01c03000 { | ||
29 | compatible = "allwinner,sun4i-a10-nand"; | ||
30 | reg = <0x01c03000 0x1000>; | ||
31 | interrupts = <0 37 1>; | ||
32 | clocks = <&ahb_gates 13>, <&nand_clk>; | ||
33 | clock-names = "ahb", "mod"; | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <0>; | ||
36 | pinctrl-names = "default"; | ||
37 | pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>; | ||
38 | status = "okay"; | ||
39 | |||
40 | nand@0 { | ||
41 | reg = <0>; | ||
42 | allwinner,rb = <0>; | ||
43 | nand-ecc-mode = "soft_bch"; | ||
44 | }; | ||
45 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt index 41354f730beb..26efd526d16c 100644 --- a/Documentation/devicetree/bindings/net/amd-xgbe.txt +++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt | |||
@@ -7,7 +7,10 @@ Required properties: | |||
7 | - PCS registers | 7 | - PCS registers |
8 | - interrupt-parent: Should be the phandle for the interrupt controller | 8 | - interrupt-parent: Should be the phandle for the interrupt controller |
9 | that services interrupts for this device | 9 | that services interrupts for this device |
10 | - interrupts: Should contain the amd-xgbe interrupt | 10 | - interrupts: Should contain the amd-xgbe interrupt(s). The first interrupt |
11 | listed is required and is the general device interrupt. If the optional | ||
12 | amd,per-channel-interrupt property is specified, then one additional | ||
13 | interrupt for each DMA channel supported by the device should be specified | ||
11 | - clocks: | 14 | - clocks: |
12 | - DMA clock for the amd-xgbe device (used for calculating the | 15 | - DMA clock for the amd-xgbe device (used for calculating the |
13 | correct Rx interrupt watchdog timer value on a DMA channel | 16 | correct Rx interrupt watchdog timer value on a DMA channel |
@@ -23,6 +26,9 @@ Optional properties: | |||
23 | - mac-address: mac address to be assigned to the device. Can be overridden | 26 | - mac-address: mac address to be assigned to the device. Can be overridden |
24 | by UEFI. | 27 | by UEFI. |
25 | - dma-coherent: Present if dma operations are coherent | 28 | - dma-coherent: Present if dma operations are coherent |
29 | - amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate | ||
30 | a unique interrupt for each DMA channel - this requires an additional | ||
31 | interrupt be configured for each DMA channel | ||
26 | 32 | ||
27 | Example: | 33 | Example: |
28 | xgbe@e0700000 { | 34 | xgbe@e0700000 { |
@@ -30,7 +36,9 @@ Example: | |||
30 | reg = <0 0xe0700000 0 0x80000>, | 36 | reg = <0 0xe0700000 0 0x80000>, |
31 | <0 0xe0780000 0 0x80000>; | 37 | <0 0xe0780000 0 0x80000>; |
32 | interrupt-parent = <&gic>; | 38 | interrupt-parent = <&gic>; |
33 | interrupts = <0 325 4>; | 39 | interrupts = <0 325 4>, |
40 | <0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>; | ||
41 | amd,per-channel-interrupt; | ||
34 | clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>; | 42 | clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>; |
35 | clock-names = "dma_clk", "ptp_clk"; | 43 | clock-names = "dma_clk", "ptp_clk"; |
36 | phy-handle = <&phy>; | 44 | phy-handle = <&phy>; |
diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index 8f1ae81228e3..5a1d8b0c39e9 100644 --- a/Documentation/devicetree/bindings/net/can/c_can.txt +++ b/Documentation/devicetree/bindings/net/can/c_can.txt | |||
@@ -4,6 +4,8 @@ Bosch C_CAN/D_CAN controller Device Tree Bindings | |||
4 | Required properties: | 4 | Required properties: |
5 | - compatible : Should be "bosch,c_can" for C_CAN controllers and | 5 | - compatible : Should be "bosch,c_can" for C_CAN controllers and |
6 | "bosch,d_can" for D_CAN controllers. | 6 | "bosch,d_can" for D_CAN controllers. |
7 | Can be "ti,dra7-d_can", "ti,am3352-d_can" or | ||
8 | "ti,am4372-d_can". | ||
7 | - reg : physical base address and size of the C_CAN/D_CAN | 9 | - reg : physical base address and size of the C_CAN/D_CAN |
8 | registers map | 10 | registers map |
9 | - interrupts : property with a value describing the interrupt | 11 | - interrupts : property with a value describing the interrupt |
@@ -12,6 +14,9 @@ Required properties: | |||
12 | Optional properties: | 14 | Optional properties: |
13 | - ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the | 15 | - ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the |
14 | instance number | 16 | instance number |
17 | - syscon-raminit : Handle to system control region that contains the | ||
18 | RAMINIT register, register offset to the RAMINIT | ||
19 | register and the CAN instance number (0 offset). | ||
15 | 20 | ||
16 | Note: "ti,hwmods" field is used to fetch the base address and irq | 21 | Note: "ti,hwmods" field is used to fetch the base address and irq |
17 | resources from TI, omap hwmod data base during device registration. | 22 | resources from TI, omap hwmod data base during device registration. |
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt index a62c889aafca..e124847443f8 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.txt +++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt | |||
@@ -10,7 +10,7 @@ Required properties: | |||
10 | - dsa,ethernet : Should be a phandle to a valid Ethernet device node | 10 | - dsa,ethernet : Should be a phandle to a valid Ethernet device node |
11 | - dsa,mii-bus : Should be a phandle to a valid MDIO bus device node | 11 | - dsa,mii-bus : Should be a phandle to a valid MDIO bus device node |
12 | 12 | ||
13 | Optionnal properties: | 13 | Optional properties: |
14 | - interrupts : property with a value describing the switch | 14 | - interrupts : property with a value describing the switch |
15 | interrupt number (not supported by the driver) | 15 | interrupt number (not supported by the driver) |
16 | 16 | ||
@@ -23,6 +23,13 @@ Each of these switch child nodes should have the following required properties: | |||
23 | - #address-cells : Must be 1 | 23 | - #address-cells : Must be 1 |
24 | - #size-cells : Must be 0 | 24 | - #size-cells : Must be 0 |
25 | 25 | ||
26 | A switch child node has the following optional property: | ||
27 | |||
28 | - eeprom-length : Set to the length of an EEPROM connected to the | ||
29 | switch. Must be set if the switch can not detect | ||
30 | the presence and/or size of a connected EEPROM, | ||
31 | otherwise optional. | ||
32 | |||
26 | A switch may have multiple "port" children nodes | 33 | A switch may have multiple "port" children nodes |
27 | 34 | ||
28 | Each port children node must have the following mandatory properties: | 35 | Each port children node must have the following mandatory properties: |
diff --git a/Documentation/devicetree/bindings/net/micrel.txt b/Documentation/devicetree/bindings/net/micrel.txt index e1d99b95c4ec..87496a8c64ab 100644 --- a/Documentation/devicetree/bindings/net/micrel.txt +++ b/Documentation/devicetree/bindings/net/micrel.txt | |||
@@ -6,19 +6,32 @@ Optional properties: | |||
6 | 6 | ||
7 | - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs. | 7 | - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs. |
8 | 8 | ||
9 | Configure the LED mode with single value. The list of PHYs and | 9 | Configure the LED mode with single value. The list of PHYs and the |
10 | the bits that are currently supported: | 10 | bits that are currently supported: |
11 | 11 | ||
12 | KSZ8001: register 0x1e, bits 15..14 | 12 | KSZ8001: register 0x1e, bits 15..14 |
13 | KSZ8041: register 0x1e, bits 15..14 | 13 | KSZ8041: register 0x1e, bits 15..14 |
14 | KSZ8021: register 0x1f, bits 5..4 | 14 | KSZ8021: register 0x1f, bits 5..4 |
15 | KSZ8031: register 0x1f, bits 5..4 | 15 | KSZ8031: register 0x1f, bits 5..4 |
16 | KSZ8051: register 0x1f, bits 5..4 | 16 | KSZ8051: register 0x1f, bits 5..4 |
17 | KSZ8081: register 0x1f, bits 5..4 | ||
18 | KSZ8091: register 0x1f, bits 5..4 | ||
17 | 19 | ||
18 | See the respective PHY datasheet for the mode values. | 20 | See the respective PHY datasheet for the mode values. |
21 | |||
22 | - micrel,rmii-reference-clock-select-25-mhz: RMII Reference Clock Select | ||
23 | bit selects 25 MHz mode | ||
24 | |||
25 | Setting the RMII Reference Clock Select bit enables 25 MHz rather | ||
26 | than 50 MHz clock mode. | ||
27 | |||
28 | Note that this option in only needed for certain PHY revisions with a | ||
29 | non-standard, inverted function of this configuration bit. | ||
30 | Specifically, a clock reference ("rmii-ref" below) is always needed to | ||
31 | actually select a mode. | ||
19 | 32 | ||
20 | - clocks, clock-names: contains clocks according to the common clock bindings. | 33 | - clocks, clock-names: contains clocks according to the common clock bindings. |
21 | 34 | ||
22 | supported clocks: | 35 | supported clocks: |
23 | - KSZ8021, KSZ8031: "rmii-ref": The RMII refence input clock. Used | 36 | - KSZ8021, KSZ8031, KSZ8081, KSZ8091: "rmii-ref": The RMII reference |
24 | to determine the XI input clock. | 37 | input clock. Used to determine the XI input clock. |
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt index 5b8c58903077..40831fbaff72 100644 --- a/Documentation/devicetree/bindings/net/phy.txt +++ b/Documentation/devicetree/bindings/net/phy.txt | |||
@@ -19,7 +19,6 @@ Optional Properties: | |||
19 | specifications. If neither of these are specified, the default is to | 19 | specifications. If neither of these are specified, the default is to |
20 | assume clause 22. The compatible list may also contain other | 20 | assume clause 22. The compatible list may also contain other |
21 | elements. | 21 | elements. |
22 | - max-speed: Maximum PHY supported speed (10, 100, 1000...) | ||
23 | 22 | ||
24 | If the phy's identifier is known then the list may contain an entry | 23 | If the phy's identifier is known then the list may contain an entry |
25 | of the form: "ethernet-phy-idAAAA.BBBB" where | 24 | of the form: "ethernet-phy-idAAAA.BBBB" where |
@@ -29,6 +28,8 @@ Optional Properties: | |||
29 | 4 hex digits. This is the chip vendor OUI bits 19:24, | 28 | 4 hex digits. This is the chip vendor OUI bits 19:24, |
30 | followed by 10 bits of a vendor specific ID. | 29 | followed by 10 bits of a vendor specific ID. |
31 | 30 | ||
31 | - max-speed: Maximum PHY supported speed (10, 100, 1000...) | ||
32 | |||
32 | Example: | 33 | Example: |
33 | 34 | ||
34 | ethernet-phy@0 { | 35 | ethernet-phy@0 { |
diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt index 34d4db1a4e25..2f6ec85fda8e 100644 --- a/Documentation/devicetree/bindings/net/sh_eth.txt +++ b/Documentation/devicetree/bindings/net/sh_eth.txt | |||
@@ -9,6 +9,7 @@ Required properties: | |||
9 | "renesas,ether-r8a7779" if the device is a part of R8A7779 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. | 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. | 11 | "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC. |
12 | "renesas,ether-r8a7793" if the device is a part of R8A7793 SoC. | ||
12 | "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC. | 13 | "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC. |
13 | "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. | 14 | "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. |
14 | - reg: offset and length of (1) the E-DMAC/feLic register block (required), | 15 | - reg: offset and length of (1) the E-DMAC/feLic register block (required), |
diff --git a/Documentation/devicetree/bindings/nios2/nios2.txt b/Documentation/devicetree/bindings/nios2/nios2.txt new file mode 100644 index 000000000000..d6d0a94cb3bb --- /dev/null +++ b/Documentation/devicetree/bindings/nios2/nios2.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | * Nios II Processor Binding | ||
2 | |||
3 | This binding specifies what properties available in the device tree | ||
4 | representation of a Nios II Processor Core. | ||
5 | |||
6 | Users can use sopc2dts tool for generating device tree sources (dts) from a | ||
7 | Qsys system. See more detail in: http://www.alterawiki.com/wiki/Sopc2dts | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: Compatible property value should be "altr,nios2-1.0". | ||
12 | - reg: Contains CPU index. | ||
13 | - interrupt-controller: Specifies that the node is an interrupt controller | ||
14 | - #interrupt-cells: Specifies the number of cells needed to encode an | ||
15 | interrupt source, should be 1. | ||
16 | - clock-frequency: Contains the clock frequency for CPU, in Hz. | ||
17 | - dcache-line-size: Contains data cache line size. | ||
18 | - icache-line-size: Contains instruction line size. | ||
19 | - dcache-size: Contains data cache size. | ||
20 | - icache-size: Contains instruction cache size. | ||
21 | - altr,pid-num-bits: Specifies the number of bits to use to represent the process | ||
22 | identifier (PID). | ||
23 | - altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB. | ||
24 | - altr,tlb-num-entries: Specifies the number of entries in the TLB. | ||
25 | - altr,tlb-ptr-sz: Specifies size of TLB pointer. | ||
26 | - altr,has-mul: Specifies CPU hardware multipy support, should be 1. | ||
27 | - altr,has-mmu: Specifies CPU support MMU support, should be 1. | ||
28 | - altr,has-initda: Specifies CPU support initda instruction, should be 1. | ||
29 | - altr,reset-addr: Specifies CPU reset address | ||
30 | - altr,fast-tlb-miss-addr: Specifies CPU fast TLB miss exception address | ||
31 | - altr,exception-addr: Specifies CPU exception address | ||
32 | |||
33 | Optional properties: | ||
34 | - altr,has-div: Specifies CPU hardware divide support | ||
35 | - altr,implementation: Nios II core implementation, this should be "fast"; | ||
36 | |||
37 | Example: | ||
38 | |||
39 | cpu@0x0 { | ||
40 | device_type = "cpu"; | ||
41 | compatible = "altr,nios2-1.0"; | ||
42 | reg = <0>; | ||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | clock-frequency = <125000000>; | ||
46 | dcache-line-size = <32>; | ||
47 | icache-line-size = <32>; | ||
48 | dcache-size = <32768>; | ||
49 | icache-size = <32768>; | ||
50 | altr,implementation = "fast"; | ||
51 | altr,pid-num-bits = <8>; | ||
52 | altr,tlb-num-ways = <16>; | ||
53 | altr,tlb-num-entries = <128>; | ||
54 | altr,tlb-ptr-sz = <7>; | ||
55 | altr,has-div = <1>; | ||
56 | altr,has-mul = <1>; | ||
57 | altr,reset-addr = <0xc2800000>; | ||
58 | altr,fast-tlb-miss-addr = <0xc7fff400>; | ||
59 | altr,exception-addr = <0xd0000020>; | ||
60 | altr,has-initda = <1>; | ||
61 | altr,has-mmu = <1>; | ||
62 | }; | ||
diff --git a/Documentation/devicetree/bindings/nios2/timer.txt b/Documentation/devicetree/bindings/nios2/timer.txt new file mode 100644 index 000000000000..904a5846d7ac --- /dev/null +++ b/Documentation/devicetree/bindings/nios2/timer.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Altera Timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "altr,timer-1.0" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupt-parent: phandle of the interrupt controller | ||
8 | - interrupts : Should contain the timer interrupt number | ||
9 | - clock-frequency : The frequency of the clock that drives the counter, in Hz. | ||
10 | |||
11 | Example: | ||
12 | |||
13 | timer { | ||
14 | compatible = "altr,timer-1.0"; | ||
15 | reg = <0x00400000 0x00000020>; | ||
16 | interrupt-parent = <&cpu>; | ||
17 | interrupts = <11>; | ||
18 | clock-frequency = <125000000>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt b/Documentation/devicetree/bindings/panel/auo,b116xw03.txt new file mode 100644 index 000000000000..690d0a568ef3 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/auo,b116xw03.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | AU Optronics Corporation 11.6" HD (1366x768) color TFT-LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "auo,b116xw03" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt b/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt new file mode 100644 index 000000000000..7da1d5c038ff --- /dev/null +++ b/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | HannStar Display Corp. HSD070PWW1 7.0" WXGA TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "hannstar,hsd070pww1" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt b/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt new file mode 100644 index 000000000000..04caaae19af6 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Hitachi Ltd. Corporation 9" WVGA (800x480) TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "hit,tx23d38vm0caa" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt b/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt new file mode 100644 index 000000000000..2743b07cd2f2 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Innolux Corporation 12.1" WXGA (1280x800) TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "innolux,g121i1-l01" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt b/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt new file mode 100644 index 000000000000..f522bb8e47e1 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Sharp Microelectronics 10.1" WQXGA TFT LCD panel | ||
2 | |||
3 | This panel requires a dual-channel DSI host to operate. It supports two modes: | ||
4 | - left-right: each channel drives the left or right half of the screen | ||
5 | - even-odd: each channel drives the even or odd lines of the screen | ||
6 | |||
7 | Each of the DSI channels controls a separate DSI peripheral. The peripheral | ||
8 | driven by the first link (DSI-LINK1), left or even, is considered the primary | ||
9 | peripheral and controls the device. The 'link2' property contains a phandle | ||
10 | to the peripheral driven by the second link (DSI-LINK2, right or odd). | ||
11 | |||
12 | Note that in video mode the DSI-LINK1 interface always provides the left/even | ||
13 | pixels and DSI-LINK2 always provides the right/odd pixels. In command mode it | ||
14 | is possible to program either link to drive the left/even or right/odd pixels | ||
15 | but for the sake of consistency this binding assumes that the same assignment | ||
16 | is chosen as for video mode. | ||
17 | |||
18 | Required properties: | ||
19 | - compatible: should be "sharp,lq101r1sx01" | ||
20 | - reg: DSI virtual channel of the peripheral | ||
21 | |||
22 | Required properties (for DSI-LINK1 only): | ||
23 | - link2: phandle to the DSI peripheral on the secondary link. Note that the | ||
24 | presence of this property marks the containing node as DSI-LINK1. | ||
25 | - power-supply: phandle of the regulator that provides the supply voltage | ||
26 | |||
27 | Optional properties (for DSI-LINK1 only): | ||
28 | - backlight: phandle of the backlight device attached to the panel | ||
29 | |||
30 | Example: | ||
31 | |||
32 | dsi@54300000 { | ||
33 | panel: panel@0 { | ||
34 | compatible = "sharp,lq101r1sx01"; | ||
35 | reg = <0>; | ||
36 | |||
37 | link2 = <&secondary>; | ||
38 | |||
39 | power-supply = <...>; | ||
40 | backlight = <...>; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | dsi@54400000 { | ||
45 | secondary: panel@0 { | ||
46 | compatible = "sharp,lq101r1sx01"; | ||
47 | reg = <0>; | ||
48 | }; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/pci/layerscape-pci.txt new file mode 100644 index 000000000000..6286f049bf18 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | Freescale Layerscape PCIe controller | ||
2 | |||
3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | ||
4 | and thus inherits all the common properties defined in designware-pcie.txt. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should contain the platform identifier such as "fsl,ls1021a-pcie" | ||
8 | - reg: base addresses and lengths of the PCIe controller | ||
9 | - interrupts: A list of interrupt outputs of the controller. Must contain an | ||
10 | entry for each entry in the interrupt-names property. | ||
11 | - interrupt-names: Must include the following entries: | ||
12 | "intr": The interrupt that is asserted for controller interrupts | ||
13 | - fsl,pcie-scfg: Must include two entries. | ||
14 | The first entry must be a link to the SCFG device node | ||
15 | The second entry must be '0' or '1' based on physical PCIe controller index. | ||
16 | This is used to get SCFG PEXN registers | ||
17 | |||
18 | Example: | ||
19 | |||
20 | pcie@3400000 { | ||
21 | compatible = "fsl,ls1021a-pcie", "snps,dw-pcie"; | ||
22 | reg = <0x00 0x03400000 0x0 0x00010000 /* controller registers */ | ||
23 | 0x40 0x00000000 0x0 0x00002000>; /* configuration space */ | ||
24 | reg-names = "regs", "config"; | ||
25 | interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */ | ||
26 | interrupt-names = "intr"; | ||
27 | fsl,pcie-scfg = <&scfg 0>; | ||
28 | #address-cells = <3>; | ||
29 | #size-cells = <2>; | ||
30 | device_type = "pci"; | ||
31 | num-lanes = <4>; | ||
32 | bus-range = <0x0 0xff>; | ||
33 | ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */ | ||
34 | 0xc2000000 0x0 0x20000000 0x40 0x20000000 0x0 0x20000000 /* prefetchable memory */ | ||
35 | 0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ | ||
36 | #interrupt-cells = <1>; | ||
37 | interrupt-map-mask = <0 0 0 7>; | ||
38 | interrupt-map = <0000 0 0 1 &gic GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>, | ||
39 | <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, | ||
40 | <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, | ||
41 | <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; | ||
42 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt index 41aeed38926d..f8fbe9af7b2f 100644 --- a/Documentation/devicetree/bindings/pci/pci.txt +++ b/Documentation/devicetree/bindings/pci/pci.txt | |||
@@ -7,3 +7,14 @@ And for the interrupt mapping part: | |||
7 | 7 | ||
8 | Open Firmware Recommended Practice: Interrupt Mapping | 8 | Open Firmware Recommended Practice: Interrupt Mapping |
9 | http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf | 9 | http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf |
10 | |||
11 | Additionally to the properties specified in the above standards a host bridge | ||
12 | driver implementation may support the following properties: | ||
13 | |||
14 | - linux,pci-domain: | ||
15 | If present this property assigns a fixed PCI domain number to a host bridge, | ||
16 | otherwise an unstable (across boots) unique number will be assigned. | ||
17 | It is required to either not set this property at all or set it for all | ||
18 | host bridges in the system, otherwise potentially conflicting domain numbers | ||
19 | may be assigned to root buses behind different host bridges. The domain | ||
20 | number for each host bridge in the system must be unique. | ||
diff --git a/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt index 88f8c23384c0..c0155f842f62 100644 --- a/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt +++ b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt | |||
@@ -2,7 +2,9 @@ Berlin SATA PHY | |||
2 | --------------- | 2 | --------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible: should be "marvell,berlin2q-sata-phy" | 5 | - compatible: should be one of |
6 | "marvell,berlin2-sata-phy" | ||
7 | "marvell,berlin2q-sata-phy" | ||
6 | - address-cells: should be 1 | 8 | - address-cells: should be 1 |
7 | - size-cells: should be 0 | 9 | - size-cells: should be 0 |
8 | - phy-cells: from the generic PHY bindings, must be 1 | 10 | - phy-cells: from the generic PHY bindings, must be 1 |
diff --git a/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt b/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt new file mode 100644 index 000000000000..be33780f668e --- /dev/null +++ b/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Marvell Berlin USB PHY | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "marvell,berlin2-usb-phy" or "marvell,berlin2cd-usb-phy" | ||
5 | - reg: base address and length of the registers | ||
6 | - #phys-cells: should be 0 | ||
7 | - resets: reference to the reset controller | ||
8 | |||
9 | Example: | ||
10 | |||
11 | usb-phy@f774000 { | ||
12 | compatible = "marvell,berlin2-usb-phy"; | ||
13 | reg = <0xf774000 0x128>; | ||
14 | #phy-cells = <0>; | ||
15 | resets = <&chip 0x104 14>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt b/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt new file mode 100644 index 000000000000..46a135dae6b3 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt | |||
@@ -0,0 +1,128 @@ | |||
1 | STMicroelectronics STi MIPHY28LP PHY binding | ||
2 | ============================================ | ||
3 | |||
4 | This binding describes a miphy device that is used to control PHY hardware | ||
5 | for SATA, PCIe or USB3. | ||
6 | |||
7 | Required properties (controller (parent) node): | ||
8 | - compatible : Should be "st,miphy28lp-phy". | ||
9 | - st,syscfg : Should be a phandle of the system configuration register group | ||
10 | which contain the SATA, PCIe or USB3 mode setting bits. | ||
11 | |||
12 | Required nodes : A sub-node is required for each channel the controller | ||
13 | provides. Address range information including the usual | ||
14 | 'reg' and 'reg-names' properties are used inside these | ||
15 | nodes to describe the controller's topology. These nodes | ||
16 | are translated by the driver's .xlate() function. | ||
17 | |||
18 | Required properties (port (child) node): | ||
19 | - #phy-cells : Should be 1 (See second example) | ||
20 | Cell after port phandle is device type from: | ||
21 | - PHY_TYPE_SATA | ||
22 | - PHY_TYPE_PCI | ||
23 | - PHY_TYPE_USB3 | ||
24 | - reg : Address and length of the register set for the device. | ||
25 | - reg-names : The names of the register addresses corresponding to the registers | ||
26 | filled in "reg". It can also contain the offset of the system configuration | ||
27 | registers used as glue-logic to setup the device for SATA/PCIe or USB3 | ||
28 | devices. | ||
29 | - resets : phandle to the parent reset controller. | ||
30 | - reset-names : Associated name must be "miphy-sw-rst". | ||
31 | |||
32 | Optional properties (port (child) node): | ||
33 | - st,osc-rdy : to check the MIPHY0_OSC_RDY status in the glue-logic. This | ||
34 | is not available in all the MiPHY. For example, for STiH407, only the | ||
35 | MiPHY0 has this bit. | ||
36 | - st,osc-force-ext : to select the external oscillator. This can change from | ||
37 | different MiPHY inside the same SoC. | ||
38 | - st,sata_gen : to select which SATA_SPDMODE has to be set in the SATA system config | ||
39 | register. | ||
40 | - st,px_rx_pol_inv : to invert polarity of RXn/RXp (respectively negative line and positive | ||
41 | line). | ||
42 | - st,scc-on : enable ssc to reduce effects of EMI (only for sata or PCIe). | ||
43 | - st,tx-impedance-comp : to compensate tx impedance avoiding out of range values. | ||
44 | |||
45 | example: | ||
46 | |||
47 | miphy28lp_phy: miphy28lp@9b22000 { | ||
48 | compatible = "st,miphy28lp-phy"; | ||
49 | st,syscfg = <&syscfg_core>; | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | ranges; | ||
53 | |||
54 | phy_port0: port@9b22000 { | ||
55 | reg = <0x9b22000 0xff>, | ||
56 | <0x9b09000 0xff>, | ||
57 | <0x9b04000 0xff>, | ||
58 | <0x114 0x4>, /* sysctrl MiPHY cntrl */ | ||
59 | <0x818 0x4>, /* sysctrl MiPHY status*/ | ||
60 | <0xe0 0x4>, /* sysctrl PCIe */ | ||
61 | <0xec 0x4>; /* sysctrl SATA */ | ||
62 | reg-names = "sata-up", | ||
63 | "pcie-up", | ||
64 | "pipew", | ||
65 | "miphy-ctrl-glue", | ||
66 | "miphy-status-glue", | ||
67 | "pcie-glue", | ||
68 | "sata-glue"; | ||
69 | #phy-cells = <1>; | ||
70 | st,osc-rdy; | ||
71 | reset-names = "miphy-sw-rst"; | ||
72 | resets = <&softreset STIH407_MIPHY0_SOFTRESET>; | ||
73 | }; | ||
74 | |||
75 | phy_port1: port@9b2a000 { | ||
76 | reg = <0x9b2a000 0xff>, | ||
77 | <0x9b19000 0xff>, | ||
78 | <0x9b14000 0xff>, | ||
79 | <0x118 0x4>, | ||
80 | <0x81c 0x4>, | ||
81 | <0xe4 0x4>, | ||
82 | <0xf0 0x4>; | ||
83 | reg-names = "sata-up", | ||
84 | "pcie-up", | ||
85 | "pipew", | ||
86 | "miphy-ctrl-glue", | ||
87 | "miphy-status-glue", | ||
88 | "pcie-glue", | ||
89 | "sata-glue"; | ||
90 | #phy-cells = <1>; | ||
91 | st,osc-force-ext; | ||
92 | reset-names = "miphy-sw-rst"; | ||
93 | resets = <&softreset STIH407_MIPHY1_SOFTRESET>; | ||
94 | }; | ||
95 | |||
96 | phy_port2: port@8f95000 { | ||
97 | reg = <0x8f95000 0xff>, | ||
98 | <0x8f90000 0xff>, | ||
99 | <0x11c 0x4>, | ||
100 | <0x820 0x4>; | ||
101 | reg-names = "pipew", | ||
102 | "usb3-up", | ||
103 | "miphy-ctrl-glue", | ||
104 | "miphy-status-glue"; | ||
105 | #phy-cells = <1>; | ||
106 | reset-names = "miphy-sw-rst"; | ||
107 | resets = <&softreset STIH407_MIPHY2_SOFTRESET>; | ||
108 | }; | ||
109 | }; | ||
110 | |||
111 | |||
112 | Specifying phy control of devices | ||
113 | ================================= | ||
114 | |||
115 | Device nodes should specify the configuration required in their "phys" | ||
116 | property, containing a phandle to the miphy device node and an index | ||
117 | specifying which configuration to use, as described in phy-bindings.txt. | ||
118 | |||
119 | example: | ||
120 | sata0: sata@9b20000 { | ||
121 | ... | ||
122 | phys = <&phy_port0 PHY_TYPE_SATA>; | ||
123 | ... | ||
124 | }; | ||
125 | |||
126 | Macro definitions for the supported miphy configuration can be found in: | ||
127 | |||
128 | include/dt-bindings/phy/phy-miphy28lp.h | ||
diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu.txt b/Documentation/devicetree/bindings/phy/phy-mvebu.txt new file mode 100644 index 000000000000..f95b6260a3b3 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-mvebu.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | * Marvell MVEBU SATA PHY | ||
2 | |||
3 | Power control for the SATA phy found on Marvell MVEBU SoCs. | ||
4 | |||
5 | This document extends the binding described in phy-bindings.txt | ||
6 | |||
7 | Required properties : | ||
8 | |||
9 | - reg : Offset and length of the register set for the SATA device | ||
10 | - compatible : Should be "marvell,mvebu-sata-phy" | ||
11 | - clocks : phandle of clock and specifier that supplies the device | ||
12 | - clock-names : Should be "sata" | ||
13 | |||
14 | Example: | ||
15 | sata-phy@84000 { | ||
16 | compatible = "marvell,mvebu-sata-phy"; | ||
17 | reg = <0x84000 0x0334>; | ||
18 | clocks = <&gate_clk 15>; | ||
19 | clock-names = "sata"; | ||
20 | #phy-cells = <0>; | ||
21 | status = "ok"; | ||
22 | }; | ||
23 | |||
24 | Armada 375 USB cluster | ||
25 | ---------------------- | ||
26 | |||
27 | Armada 375 comes with an USB2 host and device controller and an USB3 | ||
28 | controller. The USB cluster control register allows to manage common | ||
29 | features of both USB controllers. | ||
30 | |||
31 | Required properties: | ||
32 | |||
33 | - compatible: "marvell,armada-375-usb-cluster" | ||
34 | - reg: Should contain usb cluster register location and length. | ||
35 | - #phy-cells : from the generic phy bindings, must be 1. Possible | ||
36 | values are 1 (USB2), 2 (USB3). | ||
37 | |||
38 | Example: | ||
39 | usbcluster: usb-cluster@18400 { | ||
40 | compatible = "marvell,armada-375-usb-cluster"; | ||
41 | reg = <0x18400 0x4>; | ||
42 | #phy-cells = <1> | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index 15e0f2c7130f..d5bad920827f 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
@@ -128,6 +128,7 @@ Required properties: | |||
128 | - compatible : Should be set to one of the following supported values: | 128 | - compatible : Should be set to one of the following supported values: |
129 | - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, | 129 | - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, |
130 | - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. | 130 | - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. |
131 | - "samsung,exynos7-usbdrd-phy" - for exynos7 SoC. | ||
131 | - reg : Register offset and length of USB DRD PHY register set; | 132 | - reg : Register offset and length of USB DRD PHY register set; |
132 | - clocks: Clock IDs array as required by the controller | 133 | - clocks: Clock IDs array as required by the controller |
133 | - clock-names: names of clocks correseponding to IDs in the clock property; | 134 | - clock-names: names of clocks correseponding to IDs in the clock property; |
@@ -138,6 +139,11 @@ Required properties: | |||
138 | PHY operations, associated by phy name. It is used to | 139 | PHY operations, associated by phy name. It is used to |
139 | determine bit values for clock settings register. | 140 | determine bit values for clock settings register. |
140 | For Exynos5420 this is given as 'sclk_usbphy30' in CMU. | 141 | For Exynos5420 this is given as 'sclk_usbphy30' in CMU. |
142 | - optional clocks: Exynos7 SoC has now following additional | ||
143 | gate clocks available: | ||
144 | - phy_pipe: for PIPE3 phy | ||
145 | - phy_utmi: for UTMI+ phy | ||
146 | - itp: for ITP generation | ||
141 | - samsung,pmu-syscon: phandle for PMU system controller interface, used to | 147 | - samsung,pmu-syscon: phandle for PMU system controller interface, used to |
142 | control pmu registers for power isolation. | 148 | control pmu registers for power isolation. |
143 | - #phy-cells : from the generic PHY bindings, must be 1; | 149 | - #phy-cells : from the generic PHY bindings, must be 1; |
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt index a186181c402b..51b943cc9770 100644 --- a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt | |||
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
9 | common pinctrl bindings used by client devices, including the meaning of the | 9 | common pinctrl bindings used by client devices, including the meaning of the |
10 | phrase "pin configuration node". | 10 | phrase "pin configuration node". |
11 | 11 | ||
12 | TZ1090-PDC's pin configuration nodes act as a container for an abitrary number | 12 | TZ1090-PDC's pin configuration nodes act as a container for an arbitrary number |
13 | of subnodes. Each of these subnodes represents some desired configuration for a | 13 | of subnodes. Each of these subnodes represents some desired configuration for a |
14 | pin, a group, or a list of pins or groups. This configuration can include the | 14 | pin, a group, or a list of pins or groups. This configuration can include the |
15 | mux function to select on those pin(s)/group(s), and various pin configuration | 15 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt index 4b27c99f7f9d..509faa87ad0e 100644 --- a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt | |||
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
9 | common pinctrl bindings used by client devices, including the meaning of the | 9 | common pinctrl bindings used by client devices, including the meaning of the |
10 | phrase "pin configuration node". | 10 | phrase "pin configuration node". |
11 | 11 | ||
12 | TZ1090's pin configuration nodes act as a container for an abitrary number of | 12 | TZ1090's pin configuration nodes act as a container for an arbitrary number of |
13 | subnodes. Each of these subnodes represents some desired configuration for a | 13 | subnodes. Each of these subnodes represents some desired configuration for a |
14 | pin, a group, or a list of pins or groups. This configuration can include the | 14 | pin, a group, or a list of pins or groups. This configuration can include the |
15 | mux function to select on those pin(s)/group(s), and various pin configuration | 15 | mux function to select on those pin(s)/group(s), and various pin configuration |
@@ -67,7 +67,7 @@ Valid values for pin and group names are: | |||
67 | They also all support the some form of muxing. Any pins which are contained | 67 | They also all support the some form of muxing. Any pins which are contained |
68 | in one of the mux groups (see below) can be muxed only to the functions | 68 | in one of the mux groups (see below) can be muxed only to the functions |
69 | supported by the mux group. All other pins can be muxed to the "perip" | 69 | supported by the mux group. All other pins can be muxed to the "perip" |
70 | function which which enables them with their intended peripheral. | 70 | function which enables them with their intended peripheral. |
71 | 71 | ||
72 | Different pins in the same mux group cannot be muxed to different functions, | 72 | Different pins in the same mux group cannot be muxed to different functions, |
73 | however it is possible to mux only a subset of the pins in a mux group to a | 73 | however it is possible to mux only a subset of the pins in a mux group to a |
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt index daa768956069..ac4da9fe07bd 100644 --- a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt +++ b/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt | |||
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
9 | common pinctrl bindings used by client devices, including the meaning of the | 9 | common pinctrl bindings used by client devices, including the meaning of the |
10 | phrase "pin configuration node". | 10 | phrase "pin configuration node". |
11 | 11 | ||
12 | Lantiq's pin configuration nodes act as a container for an abitrary number of | 12 | Lantiq's pin configuration nodes act as a container for an arbitrary number of |
13 | subnodes. Each of these subnodes represents some desired configuration for a | 13 | subnodes. Each of these subnodes represents some desired configuration for a |
14 | pin, a group, or a list of pins or groups. This configuration can include the | 14 | pin, a group, or a list of pins or groups. This configuration can include the |
15 | mux function to select on those group(s), and two pin configuration parameters: | 15 | mux function to select on those group(s), and two pin configuration parameters: |
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt index b5469db1d7ad..e89b4677567d 100644 --- a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt +++ b/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt | |||
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
9 | common pinctrl bindings used by client devices, including the meaning of the | 9 | common pinctrl bindings used by client devices, including the meaning of the |
10 | phrase "pin configuration node". | 10 | phrase "pin configuration node". |
11 | 11 | ||
12 | Lantiq's pin configuration nodes act as a container for an abitrary number of | 12 | Lantiq's pin configuration nodes act as a container for an arbitrary number of |
13 | subnodes. Each of these subnodes represents some desired configuration for a | 13 | subnodes. Each of these subnodes represents some desired configuration for a |
14 | pin, a group, or a list of pins or groups. This configuration can include the | 14 | pin, a group, or a list of pins or groups. This configuration can include the |
15 | mux function to select on those group(s), and two pin configuration parameters: | 15 | mux function to select on those group(s), and two pin configuration parameters: |
diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt new file mode 100644 index 000000000000..17e7240c6998 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt | |||
@@ -0,0 +1,96 @@ | |||
1 | == Amlogic Meson pinmux controller == | ||
2 | |||
3 | Required properties for the root node: | ||
4 | - compatible: "amlogic,meson8-pinctrl" | ||
5 | - reg: address and size of registers controlling irq functionality | ||
6 | |||
7 | === GPIO sub-nodes === | ||
8 | |||
9 | The 2 power domains of the controller (regular and always-on) are | ||
10 | represented as sub-nodes and each of them acts as a GPIO controller. | ||
11 | |||
12 | Required properties for sub-nodes are: | ||
13 | - reg: should contain address and size for mux, pull-enable, pull and | ||
14 | gpio register sets | ||
15 | - reg-names: an array of strings describing the "reg" entries. Must | ||
16 | contain "mux", "pull" and "gpio". "pull-enable" is optional and | ||
17 | when it is missing the "pull" registers are used instead | ||
18 | - gpio-controller: identifies the node as a gpio controller | ||
19 | - #gpio-cells: must be 2 | ||
20 | |||
21 | Valid sub-node names are: | ||
22 | - "banks" for the regular domain | ||
23 | - "ao-bank" for the always-on domain | ||
24 | |||
25 | === Other sub-nodes === | ||
26 | |||
27 | Child nodes without the "gpio-controller" represent some desired | ||
28 | configuration for a pin or a group. Those nodes can be pinmux nodes or | ||
29 | configuration nodes. | ||
30 | |||
31 | Required properties for pinmux nodes are: | ||
32 | - groups: a list of pinmux groups. The list of all available groups | ||
33 | depends on the SoC and can be found in driver sources. | ||
34 | - function: the name of a function to activate for the specified set | ||
35 | of groups. The list of all available functions depends on the SoC | ||
36 | and can be found in driver sources. | ||
37 | |||
38 | Required properties for configuration nodes: | ||
39 | - pins: a list of pin names | ||
40 | |||
41 | Configuration nodes support the generic properties "bias-disable", | ||
42 | "bias-pull-up" and "bias-pull-down", described in file | ||
43 | pinctrl-bindings.txt | ||
44 | |||
45 | === Example === | ||
46 | |||
47 | pinctrl: pinctrl@c1109880 { | ||
48 | compatible = "amlogic,meson8-pinctrl"; | ||
49 | reg = <0xc1109880 0x10>; | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | ranges; | ||
53 | |||
54 | gpio: banks@c11080b0 { | ||
55 | reg = <0xc11080b0 0x28>, | ||
56 | <0xc11080e8 0x18>, | ||
57 | <0xc1108120 0x18>, | ||
58 | <0xc1108030 0x30>; | ||
59 | reg-names = "mux", "pull", "pull-enable", "gpio"; | ||
60 | gpio-controller; | ||
61 | #gpio-cells = <2>; | ||
62 | }; | ||
63 | |||
64 | gpio_ao: ao-bank@c1108030 { | ||
65 | reg = <0xc8100014 0x4>, | ||
66 | <0xc810002c 0x4>, | ||
67 | <0xc8100024 0x8>; | ||
68 | reg-names = "mux", "pull", "gpio"; | ||
69 | gpio-controller; | ||
70 | #gpio-cells = <2>; | ||
71 | }; | ||
72 | |||
73 | nand { | ||
74 | mux { | ||
75 | groups = "nand_io", "nand_io_ce0", "nand_io_ce1", | ||
76 | "nand_io_rb0", "nand_ale", "nand_cle", | ||
77 | "nand_wen_clk", "nand_ren_clk", "nand_dqs", | ||
78 | "nand_ce2", "nand_ce3"; | ||
79 | function = "nand"; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | uart_ao_a { | ||
84 | mux { | ||
85 | groups = "uart_tx_ao_a", "uart_rx_ao_a", | ||
86 | "uart_cts_ao_a", "uart_rts_ao_a"; | ||
87 | function = "uart_ao"; | ||
88 | }; | ||
89 | |||
90 | conf { | ||
91 | pins = "GPIOAO_0", "GPIOAO_1", | ||
92 | "GPIOAO_2", "GPIOAO_3"; | ||
93 | bias-disable; | ||
94 | }; | ||
95 | }; | ||
96 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt index 61e73cde9ae9..3c8ce28baad6 100644 --- a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt | |||
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
9 | common pinctrl bindings used by client devices, including the meaning of the | 9 | common pinctrl bindings used by client devices, including the meaning of the |
10 | phrase "pin configuration node". | 10 | phrase "pin configuration node". |
11 | 11 | ||
12 | Tegra's pin configuration nodes act as a container for an abitrary number of | 12 | Tegra's pin configuration nodes act as a container for an arbitrary number of |
13 | subnodes. Each of these subnodes represents some desired configuration for a | 13 | subnodes. Each of these subnodes represents some desired configuration for a |
14 | pin, a group, or a list of pins or groups. This configuration can include the | 14 | pin, a group, or a list of pins or groups. This configuration can include the |
15 | mux function to select on those pin(s)/group(s), and various pin configuration | 15 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index 98eb94d91a1c..47d84b6ee91b 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | |||
@@ -216,4 +216,4 @@ arguments are described below. | |||
216 | or 0 to disable debouncing | 216 | or 0 to disable debouncing |
217 | 217 | ||
218 | More in-depth documentation on these parameters can be found in | 218 | More in-depth documentation on these parameters can be found in |
219 | <include/linux/pinctrl/pinconfig-generic.h> | 219 | <include/linux/pinctrl/pinconf-generic.h> |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt index c596a6ad3285..5f55be59d914 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt | |||
@@ -13,7 +13,7 @@ Optional properties: | |||
13 | Please refer to pinctrl-bindings.txt in this directory for details of the common | 13 | Please refer to pinctrl-bindings.txt in this directory for details of the common |
14 | pinctrl bindings used by client devices. | 14 | pinctrl bindings used by client devices. |
15 | 15 | ||
16 | SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes. | 16 | SiRFprimaII's pinmux nodes act as a container for an arbitrary number of subnodes. |
17 | Each of these subnodes represents some desired configuration for a group of pins. | 17 | Each of these subnodes represents some desired configuration for a group of pins. |
18 | 18 | ||
19 | Required subnode-properties: | 19 | Required subnode-properties: |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt index b4480d5c3aca..458615596946 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt | |||
@@ -32,7 +32,7 @@ Required properties: | |||
32 | Please refer to pinctrl-bindings.txt in this directory for details of the common | 32 | Please refer to pinctrl-bindings.txt in this directory for details of the common |
33 | pinctrl bindings used by client devices. | 33 | pinctrl bindings used by client devices. |
34 | 34 | ||
35 | SPEAr's pinmux nodes act as a container for an abitrary number of subnodes. Each | 35 | SPEAr's pinmux nodes act as a container for an arbitrary number of subnodes. Each |
36 | of these subnodes represents muxing for a pin, a group, or a list of pins or | 36 | of these subnodes represents muxing for a pin, a group, or a list of pins or |
37 | groups. | 37 | groups. |
38 | 38 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt index 2fb90b37aa09..a7bde64798c7 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt | |||
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
18 | common pinctrl bindings used by client devices, including the meaning of the | 18 | common pinctrl bindings used by client devices, including the meaning of the |
19 | phrase "pin configuration node". | 19 | phrase "pin configuration node". |
20 | 20 | ||
21 | Qualcomm's pin configuration nodes act as a container for an abitrary number of | 21 | Qualcomm's pin configuration nodes act as a container for an arbitrary number of |
22 | subnodes. Each of these subnodes represents some desired configuration for a | 22 | subnodes. Each of these subnodes represents some desired configuration for a |
23 | pin, a group, or a list of pins or groups. This configuration can include the | 23 | pin, a group, or a list of pins or groups. This configuration can include the |
24 | mux function to select on those pin(s)/group(s), and various pin configuration | 24 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt index ffafa1990a30..c4ea61ac56f2 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt | |||
@@ -47,7 +47,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
47 | common pinctrl bindings used by client devices, including the meaning of the | 47 | common pinctrl bindings used by client devices, including the meaning of the |
48 | phrase "pin configuration node". | 48 | phrase "pin configuration node". |
49 | 49 | ||
50 | The pin configuration nodes act as a container for an abitrary number of | 50 | The pin configuration nodes act as a container for an arbitrary number of |
51 | subnodes. Each of these subnodes represents some desired configuration for a | 51 | subnodes. Each of these subnodes represents some desired configuration for a |
52 | pin, a group, or a list of pins or groups. This configuration can include the | 52 | pin, a group, or a list of pins or groups. This configuration can include the |
53 | mux function to select on those pin(s)/group(s), and various pin configuration | 53 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt index e33e4dcdce79..6e88e91feb11 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt | |||
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
18 | common pinctrl bindings used by client devices, including the meaning of the | 18 | common pinctrl bindings used by client devices, including the meaning of the |
19 | phrase "pin configuration node". | 19 | phrase "pin configuration node". |
20 | 20 | ||
21 | Qualcomm's pin configuration nodes act as a container for an abitrary number of | 21 | Qualcomm's pin configuration nodes act as a container for an arbitrary number of |
22 | subnodes. Each of these subnodes represents some desired configuration for a | 22 | subnodes. Each of these subnodes represents some desired configuration for a |
23 | pin, a group, or a list of pins or groups. This configuration can include the | 23 | pin, a group, or a list of pins or groups. This configuration can include the |
24 | mux function to select on those pin(s)/group(s), and various pin configuration | 24 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt index 93b7de91b9f6..eb8d8aa41f20 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt | |||
@@ -47,7 +47,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
47 | common pinctrl bindings used by client devices, including the meaning of the | 47 | common pinctrl bindings used by client devices, including the meaning of the |
48 | phrase "pin configuration node". | 48 | phrase "pin configuration node". |
49 | 49 | ||
50 | The pin configuration nodes act as a container for an abitrary number of | 50 | The pin configuration nodes act as a container for an arbitrary number of |
51 | subnodes. Each of these subnodes represents some desired configuration for a | 51 | subnodes. Each of these subnodes represents some desired configuration for a |
52 | pin, a group, or a list of pins or groups. This configuration can include the | 52 | pin, a group, or a list of pins or groups. This configuration can include the |
53 | mux function to select on those pin(s)/group(s), and various pin configuration | 53 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt index d2ea80dc43eb..e4d6a9d20f7d 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt | |||
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
18 | common pinctrl bindings used by client devices, including the meaning of the | 18 | common pinctrl bindings used by client devices, including the meaning of the |
19 | phrase "pin configuration node". | 19 | phrase "pin configuration node". |
20 | 20 | ||
21 | Qualcomm's pin configuration nodes act as a container for an abitrary number of | 21 | Qualcomm's pin configuration nodes act as a container for an arbitrary number of |
22 | subnodes. Each of these subnodes represents some desired configuration for a | 22 | subnodes. Each of these subnodes represents some desired configuration for a |
23 | pin, a group, or a list of pins or groups. This configuration can include the | 23 | pin, a group, or a list of pins or groups. This configuration can include the |
24 | mux function to select on those pin(s)/group(s), and various pin configuration | 24 | mux function to select on those pin(s)/group(s), and various pin configuration |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt new file mode 100644 index 000000000000..7ed08048516a --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | |||
@@ -0,0 +1,215 @@ | |||
1 | Qualcomm PMIC GPIO block | ||
2 | |||
3 | This binding describes the GPIO block(s) found in the 8xxx series of | ||
4 | PMIC's from Qualcomm. | ||
5 | |||
6 | - compatible: | ||
7 | Usage: required | ||
8 | Value type: <string> | ||
9 | Definition: must be one of: | ||
10 | "qcom,pm8018-gpio" | ||
11 | "qcom,pm8038-gpio" | ||
12 | "qcom,pm8058-gpio" | ||
13 | "qcom,pm8917-gpio" | ||
14 | "qcom,pm8921-gpio" | ||
15 | "qcom,pm8941-gpio" | ||
16 | "qcom,pma8084-gpio" | ||
17 | |||
18 | - reg: | ||
19 | Usage: required | ||
20 | Value type: <prop-encoded-array> | ||
21 | Definition: Register base of the GPIO block and length. | ||
22 | |||
23 | - interrupts: | ||
24 | Usage: required | ||
25 | Value type: <prop-encoded-array> | ||
26 | Definition: Must contain an array of encoded interrupt specifiers for | ||
27 | each available GPIO | ||
28 | |||
29 | - gpio-controller: | ||
30 | Usage: required | ||
31 | Value type: <none> | ||
32 | Definition: Mark the device node as a GPIO controller | ||
33 | |||
34 | - #gpio-cells: | ||
35 | Usage: required | ||
36 | Value type: <u32> | ||
37 | Definition: Must be 2; | ||
38 | the first cell will be used to define gpio number and the | ||
39 | second denotes the flags for this gpio | ||
40 | |||
41 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for | ||
42 | a general description of GPIO and interrupt bindings. | ||
43 | |||
44 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
45 | common pinctrl bindings used by client devices, including the meaning of the | ||
46 | phrase "pin configuration node". | ||
47 | |||
48 | The pin configuration nodes act as a container for an arbitrary number of | ||
49 | subnodes. Each of these subnodes represents some desired configuration for a | ||
50 | pin or a list of pins. This configuration can include the | ||
51 | mux function to select on those pin(s), and various pin configuration | ||
52 | parameters, as listed below. | ||
53 | |||
54 | |||
55 | SUBNODES: | ||
56 | |||
57 | The name of each subnode is not important; all subnodes should be enumerated | ||
58 | and processed purely based on their content. | ||
59 | |||
60 | Each subnode only affects those parameters that are explicitly listed. In | ||
61 | other words, a subnode that lists a mux function but no pin configuration | ||
62 | parameters implies no information about any pin configuration parameters. | ||
63 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
64 | information about e.g. the mux function. | ||
65 | |||
66 | The following generic properties as defined in pinctrl-bindings.txt are valid | ||
67 | to specify in a pin configuration subnode: | ||
68 | |||
69 | - pins: | ||
70 | Usage: required | ||
71 | Value type: <string-array> | ||
72 | Definition: List of gpio pins affected by the properties specified in | ||
73 | this subnode. Valid pins are: | ||
74 | gpio1-gpio6 for pm8018 | ||
75 | gpio1-gpio12 for pm8038 | ||
76 | gpio1-gpio40 for pm8058 | ||
77 | gpio1-gpio38 for pm8917 | ||
78 | gpio1-gpio44 for pm8921 | ||
79 | gpio1-gpio36 for pm8941 | ||
80 | gpio1-gpio22 for pma8084 | ||
81 | |||
82 | - function: | ||
83 | Usage: required | ||
84 | Value type: <string> | ||
85 | Definition: Specify the alternative function to be configured for the | ||
86 | specified pins. Valid values are: | ||
87 | "normal", | ||
88 | "paired", | ||
89 | "func1", | ||
90 | "func2", | ||
91 | "dtest1", | ||
92 | "dtest2", | ||
93 | "dtest3", | ||
94 | "dtest4" | ||
95 | |||
96 | - bias-disable: | ||
97 | Usage: optional | ||
98 | Value type: <none> | ||
99 | Definition: The specified pins should be configured as no pull. | ||
100 | |||
101 | - bias-pull-down: | ||
102 | Usage: optional | ||
103 | Value type: <none> | ||
104 | Definition: The specified pins should be configured as pull down. | ||
105 | |||
106 | - bias-pull-up: | ||
107 | Usage: optional | ||
108 | Value type: <empty> | ||
109 | Definition: The specified pins should be configured as pull up. | ||
110 | |||
111 | - qcom,pull-up-strength: | ||
112 | Usage: optional | ||
113 | Value type: <u32> | ||
114 | Definition: Specifies the strength to use for pull up, if selected. | ||
115 | Valid values are; as defined in | ||
116 | <dt-bindings/pinctrl/qcom,pmic-gpio.h>: | ||
117 | 1: 30uA (PMIC_GPIO_PULL_UP_30) | ||
118 | 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5) | ||
119 | 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5) | ||
120 | 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30) | ||
121 | If this property is ommited 30uA strength will be used if | ||
122 | pull up is selected | ||
123 | |||
124 | - bias-high-impedance: | ||
125 | Usage: optional | ||
126 | Value type: <none> | ||
127 | Definition: The specified pins will put in high-Z mode and disabled. | ||
128 | |||
129 | - input-enable: | ||
130 | Usage: optional | ||
131 | Value type: <none> | ||
132 | Definition: The specified pins are put in input mode. | ||
133 | |||
134 | - output-high: | ||
135 | Usage: optional | ||
136 | Value type: <none> | ||
137 | Definition: The specified pins are configured in output mode, driven | ||
138 | high. | ||
139 | |||
140 | - output-low: | ||
141 | Usage: optional | ||
142 | Value type: <none> | ||
143 | Definition: The specified pins are configured in output mode, driven | ||
144 | low. | ||
145 | |||
146 | - power-source: | ||
147 | Usage: optional | ||
148 | Value type: <u32> | ||
149 | Definition: Selects the power source for the specified pins. Valid | ||
150 | power sources are defined per chip in | ||
151 | <dt-bindings/pinctrl/qcom,pmic-gpio.h> | ||
152 | |||
153 | - qcom,drive-strength: | ||
154 | Usage: optional | ||
155 | Value type: <u32> | ||
156 | Definition: Selects the drive strength for the specified pins. Value | ||
157 | drive strengths are: | ||
158 | 0: no (PMIC_GPIO_STRENGTH_NO) | ||
159 | 1: high (PMIC_GPIO_STRENGTH_HIGH) 0.9mA @ 1.8V - 1.9mA @ 2.6V | ||
160 | 2: medium (PMIC_GPIO_STRENGTH_MED) 0.6mA @ 1.8V - 1.25mA @ 2.6V | ||
161 | 3: low (PMIC_GPIO_STRENGTH_LOW) 0.15mA @ 1.8V - 0.3mA @ 2.6V | ||
162 | as defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h> | ||
163 | |||
164 | - drive-push-pull: | ||
165 | Usage: optional | ||
166 | Value type: <none> | ||
167 | Definition: The specified pins are configured in push-pull mode. | ||
168 | |||
169 | - drive-open-drain: | ||
170 | Usage: optional | ||
171 | Value type: <none> | ||
172 | Definition: The specified pins are configured in open-drain mode. | ||
173 | |||
174 | - drive-open-source: | ||
175 | Usage: optional | ||
176 | Value type: <none> | ||
177 | Definition: The specified pins are configured in open-source mode. | ||
178 | |||
179 | Example: | ||
180 | |||
181 | pm8921_gpio: gpio@150 { | ||
182 | compatible = "qcom,pm8921-gpio"; | ||
183 | reg = <0x150 0x160>; | ||
184 | interrupts = <192 1>, <193 1>, <194 1>, | ||
185 | <195 1>, <196 1>, <197 1>, | ||
186 | <198 1>, <199 1>, <200 1>, | ||
187 | <201 1>, <202 1>, <203 1>, | ||
188 | <204 1>, <205 1>, <206 1>, | ||
189 | <207 1>, <208 1>, <209 1>, | ||
190 | <210 1>, <211 1>, <212 1>, | ||
191 | <213 1>, <214 1>, <215 1>, | ||
192 | <216 1>, <217 1>, <218 1>, | ||
193 | <219 1>, <220 1>, <221 1>, | ||
194 | <222 1>, <223 1>, <224 1>, | ||
195 | <225 1>, <226 1>, <227 1>, | ||
196 | <228 1>, <229 1>, <230 1>, | ||
197 | <231 1>, <232 1>, <233 1>, | ||
198 | <234 1>, <235 1>; | ||
199 | |||
200 | gpio-controller; | ||
201 | #gpio-cells = <2>; | ||
202 | |||
203 | pm8921_gpio_keys: gpio-keys { | ||
204 | volume-keys { | ||
205 | pins = "gpio20", "gpio21"; | ||
206 | function = "normal"; | ||
207 | |||
208 | input-enable; | ||
209 | bias-pull-up; | ||
210 | drive-push-pull; | ||
211 | qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; | ||
212 | power-source = <PM8921_GPIO_S4>; | ||
213 | }; | ||
214 | }; | ||
215 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt new file mode 100644 index 000000000000..854774b194ed --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | |||
@@ -0,0 +1,162 @@ | |||
1 | Qualcomm PMIC Multi-Purpose Pin (MPP) block | ||
2 | |||
3 | This binding describes the MPP block(s) found in the 8xxx series | ||
4 | of PMIC's from Qualcomm. | ||
5 | |||
6 | - compatible: | ||
7 | Usage: required | ||
8 | Value type: <string> | ||
9 | Definition: Should contain one of: | ||
10 | "qcom,pm8841-mpp", | ||
11 | "qcom,pm8941-mpp", | ||
12 | "qcom,pma8084-mpp", | ||
13 | |||
14 | - reg: | ||
15 | Usage: required | ||
16 | Value type: <prop-encoded-array> | ||
17 | Definition: Register base of the MPP block and length. | ||
18 | |||
19 | - interrupts: | ||
20 | Usage: required | ||
21 | Value type: <prop-encoded-array> | ||
22 | Definition: Must contain an array of encoded interrupt specifiers for | ||
23 | each available MPP | ||
24 | |||
25 | - gpio-controller: | ||
26 | Usage: required | ||
27 | Value type: <none> | ||
28 | Definition: Mark the device node as a GPIO controller | ||
29 | |||
30 | - #gpio-cells: | ||
31 | Usage: required | ||
32 | Value type: <u32> | ||
33 | Definition: Must be 2; | ||
34 | the first cell will be used to define MPP number and the | ||
35 | second denotes the flags for this MPP | ||
36 | |||
37 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for | ||
38 | a general description of GPIO and interrupt bindings. | ||
39 | |||
40 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
41 | common pinctrl bindings used by client devices, including the meaning of the | ||
42 | phrase "pin configuration node". | ||
43 | |||
44 | The pin configuration nodes act as a container for an arbitrary number of | ||
45 | subnodes. Each of these subnodes represents some desired configuration for a | ||
46 | pin or a list of pins. This configuration can include the | ||
47 | mux function to select on those pin(s), and various pin configuration | ||
48 | parameters, as listed below. | ||
49 | |||
50 | SUBNODES: | ||
51 | |||
52 | The name of each subnode is not important; all subnodes should be enumerated | ||
53 | and processed purely based on their content. | ||
54 | |||
55 | Each subnode only affects those parameters that are explicitly listed. In | ||
56 | other words, a subnode that lists a mux function but no pin configuration | ||
57 | parameters implies no information about any pin configuration parameters. | ||
58 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
59 | information about e.g. the mux function. | ||
60 | |||
61 | The following generic properties as defined in pinctrl-bindings.txt are valid | ||
62 | to specify in a pin configuration subnode: | ||
63 | |||
64 | - pins: | ||
65 | Usage: required | ||
66 | Value type: <string-array> | ||
67 | Definition: List of MPP pins affected by the properties specified in | ||
68 | this subnode. Valid pins are: | ||
69 | mpp1-mpp4 for pm8841 | ||
70 | mpp1-mpp8 for pm8941 | ||
71 | mpp1-mpp4 for pma8084 | ||
72 | |||
73 | - function: | ||
74 | Usage: required | ||
75 | Value type: <string> | ||
76 | Definition: Specify the alternative function to be configured for the | ||
77 | specified pins. Valid values are: | ||
78 | "normal", | ||
79 | "paired", | ||
80 | "dtest1", | ||
81 | "dtest2", | ||
82 | "dtest3", | ||
83 | "dtest4" | ||
84 | |||
85 | - bias-disable: | ||
86 | Usage: optional | ||
87 | Value type: <none> | ||
88 | Definition: The specified pins should be configured as no pull. | ||
89 | |||
90 | - bias-pull-up: | ||
91 | Usage: optional | ||
92 | Value type: <u32> | ||
93 | Definition: The specified pins should be configured as pull up. | ||
94 | Valid values are 600, 10000 and 30000 in bidirectional mode | ||
95 | only, i.e. when operating in qcom,analog-mode and input and | ||
96 | outputs are enabled. The hardware ignores the configuration | ||
97 | when operating in other modes. | ||
98 | |||
99 | - bias-high-impedance: | ||
100 | Usage: optional | ||
101 | Value type: <none> | ||
102 | Definition: The specified pins will put in high-Z mode and disabled. | ||
103 | |||
104 | - input-enable: | ||
105 | Usage: optional | ||
106 | Value type: <none> | ||
107 | Definition: The specified pins are put in input mode, i.e. their input | ||
108 | buffer is enabled | ||
109 | |||
110 | - output-high: | ||
111 | Usage: optional | ||
112 | Value type: <none> | ||
113 | Definition: The specified pins are configured in output mode, driven | ||
114 | high. | ||
115 | |||
116 | - output-low: | ||
117 | Usage: optional | ||
118 | Value type: <none> | ||
119 | Definition: The specified pins are configured in output mode, driven | ||
120 | low. | ||
121 | |||
122 | - power-source: | ||
123 | Usage: optional | ||
124 | Value type: <u32> | ||
125 | Definition: Selects the power source for the specified pins. Valid power | ||
126 | sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> | ||
127 | |||
128 | - qcom,analog-mode: | ||
129 | Usage: optional | ||
130 | Value type: <none> | ||
131 | Definition: Selects Analog mode of operation: combined with input-enable | ||
132 | and/or output-high, output-low MPP could operate as | ||
133 | Bidirectional Logic, Analog Input, Analog Output. | ||
134 | |||
135 | - qcom,amux-route: | ||
136 | Usage: optional | ||
137 | Value type: <u32> | ||
138 | Definition: Selects the source for analog input. Valid values are | ||
139 | defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> | ||
140 | PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6... | ||
141 | |||
142 | Example: | ||
143 | |||
144 | mpps@a000 { | ||
145 | compatible = "qcom,pm8841-mpp"; | ||
146 | reg = <0xa000>; | ||
147 | gpio-controller; | ||
148 | #gpio-cells = <2>; | ||
149 | interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>; | ||
150 | |||
151 | pinctrl-names = "default"; | ||
152 | pinctrl-0 = <&pm8841_default>; | ||
153 | |||
154 | pm8841_default: default { | ||
155 | gpio { | ||
156 | pins = "mpp1", "mpp2", "mpp3", "mpp4"; | ||
157 | function = "normal"; | ||
158 | input-enable; | ||
159 | power-source = <PM8841_MPP_S3>; | ||
160 | }; | ||
161 | }; | ||
162 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index e82aaf492517..8425838a6dff 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -18,6 +18,7 @@ Required Properties: | |||
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,exynos5260-pinctrl": for Exynos5260 compatible pin-controller. |
20 | - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. | 20 | - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. |
21 | - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller. | ||
21 | 22 | ||
22 | - reg: Base address of the pin controller hardware module and length of | 23 | - reg: Base address of the pin controller hardware module and length of |
23 | the address space it occupies. | 24 | the address space it occupies. |
@@ -136,6 +137,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
136 | found on Samsung S3C64xx SoCs, | 137 | found on Samsung S3C64xx SoCs, |
137 | - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller | 138 | - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller |
138 | found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs. | 139 | found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs. |
140 | - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller | ||
141 | found on Samsung Exynos7 SoC. | ||
139 | - interrupt-parent: phandle of the interrupt parent to which the external | 142 | - interrupt-parent: phandle of the interrupt parent to which the external |
140 | wakeup interrupts are forwarded to. | 143 | wakeup interrupts are forwarded to. |
141 | - interrupts: interrupt used by multiplexed wakeup interrupts. | 144 | - interrupts: interrupt used by multiplexed wakeup interrupts. |
diff --git a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt index e3865e136067..87697420439e 100644 --- a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt +++ b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt | |||
@@ -8,42 +8,8 @@ Please refer to pinctrl-bindings.txt in this directory for details of the | |||
8 | common pinctrl bindings used by client devices, including the meaning of the | 8 | common pinctrl bindings used by client devices, including the meaning of the |
9 | phrase "pin configuration node". | 9 | phrase "pin configuration node". |
10 | 10 | ||
11 | ST Ericsson's pin configuration nodes act as a container for an arbitrary number of | 11 | ST Ericsson's pin configuration nodes use the generic pin multiplexing |
12 | subnodes. Each of these subnodes represents some desired configuration for a | 12 | and pin configuration bindings, see pinctrl-bindings.txt |
13 | pin, a group, or a list of pins or groups. This configuration can include the | ||
14 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
15 | parameters, such as input, output, pull up, pull down... | ||
16 | |||
17 | The name of each subnode is not important; all subnodes should be enumerated | ||
18 | and processed purely based on their content. | ||
19 | |||
20 | Required subnode-properties: | ||
21 | - ste,pins : An array of strings. Each string contains the name of a pin or | ||
22 | group. | ||
23 | |||
24 | Optional subnode-properties: | ||
25 | - ste,function: A string containing the name of the function to mux to the | ||
26 | pin or group. | ||
27 | |||
28 | - generic pin configuration option to use. Example : | ||
29 | |||
30 | default_cfg { | ||
31 | ste,pins = "GPIO1"; | ||
32 | bias-disable; | ||
33 | }; | ||
34 | |||
35 | - ste,config: Handle of pin configuration node containing the generic | ||
36 | pinconfig options to use, as described in pinctrl-bindings.txt in | ||
37 | this directory. Example : | ||
38 | |||
39 | pcfg_bias_disable: pcfg_bias_disable { | ||
40 | bias-disable; | ||
41 | }; | ||
42 | |||
43 | default_cfg { | ||
44 | ste,pins = "GPIO1"; | ||
45 | ste.config = <&pcfg_bias_disable>; | ||
46 | }; | ||
47 | 13 | ||
48 | Example board file extract: | 14 | Example board file extract: |
49 | 15 | ||
@@ -54,11 +20,11 @@ Example board file extract: | |||
54 | sysclkreq2 { | 20 | sysclkreq2 { |
55 | sysclkreq2_default_mode: sysclkreq2_default { | 21 | sysclkreq2_default_mode: sysclkreq2_default { |
56 | default_mux { | 22 | default_mux { |
57 | ste,function = "sysclkreq"; | 23 | function = "sysclkreq"; |
58 | ste,pins = "sysclkreq2_d_1"; | 24 | groups = "sysclkreq2_d_1"; |
59 | }; | 25 | }; |
60 | default_cfg { | 26 | default_cfg { |
61 | ste,pins = "GPIO1"; | 27 | pins = "GPIO1"; |
62 | bias-disable; | 28 | bias-disable; |
63 | }; | 29 | }; |
64 | }; | 30 | }; |
@@ -66,11 +32,11 @@ Example board file extract: | |||
66 | sysclkreq3 { | 32 | sysclkreq3 { |
67 | sysclkreq3_default_mode: sysclkreq3_default { | 33 | sysclkreq3_default_mode: sysclkreq3_default { |
68 | default_mux { | 34 | default_mux { |
69 | ste,function = "sysclkreq"; | 35 | function = "sysclkreq"; |
70 | ste,pins = "sysclkreq3_d_1"; | 36 | groups = "sysclkreq3_d_1"; |
71 | }; | 37 | }; |
72 | default_cfg { | 38 | default_cfg { |
73 | ste,pins = "GPIO2"; | 39 | pins = "GPIO2"; |
74 | output-low; | 40 | output-low; |
75 | }; | 41 | }; |
76 | }; | 42 | }; |
@@ -78,11 +44,11 @@ Example board file extract: | |||
78 | gpio3 { | 44 | gpio3 { |
79 | gpio3_default_mode: gpio3_default { | 45 | gpio3_default_mode: gpio3_default { |
80 | default_mux { | 46 | default_mux { |
81 | ste,function = "gpio"; | 47 | function = "gpio"; |
82 | ste,pins = "gpio3_a_1"; | 48 | groups = "gpio3_a_1"; |
83 | }; | 49 | }; |
84 | default_cfg { | 50 | default_cfg { |
85 | ste,pins = "GPIO3"; | 51 | pins = "GPIO3"; |
86 | output-low; | 52 | output-low; |
87 | }; | 53 | }; |
88 | }; | 54 | }; |
@@ -90,11 +56,11 @@ Example board file extract: | |||
90 | sysclkreq6 { | 56 | sysclkreq6 { |
91 | sysclkreq6_default_mode: sysclkreq6_default { | 57 | sysclkreq6_default_mode: sysclkreq6_default { |
92 | default_mux { | 58 | default_mux { |
93 | ste,function = "sysclkreq"; | 59 | function = "sysclkreq"; |
94 | ste,pins = "sysclkreq6_d_1"; | 60 | groups = "sysclkreq6_d_1"; |
95 | }; | 61 | }; |
96 | default_cfg { | 62 | default_cfg { |
97 | ste,pins = "GPIO4"; | 63 | pins = "GPIO4"; |
98 | bias-disable; | 64 | bias-disable; |
99 | }; | 65 | }; |
100 | }; | 66 | }; |
@@ -102,11 +68,11 @@ Example board file extract: | |||
102 | pwmout1 { | 68 | pwmout1 { |
103 | pwmout1_default_mode: pwmout1_default { | 69 | pwmout1_default_mode: pwmout1_default { |
104 | default_mux { | 70 | default_mux { |
105 | ste,function = "pwmout"; | 71 | function = "pwmout"; |
106 | ste,pins = "pwmout1_d_1"; | 72 | groups = "pwmout1_d_1"; |
107 | }; | 73 | }; |
108 | default_cfg { | 74 | default_cfg { |
109 | ste,pins = "GPIO14"; | 75 | pins = "GPIO14"; |
110 | output-low; | 76 | output-low; |
111 | }; | 77 | }; |
112 | }; | 78 | }; |
@@ -114,11 +80,11 @@ Example board file extract: | |||
114 | pwmout2 { | 80 | pwmout2 { |
115 | pwmout2_default_mode: pwmout2_default { | 81 | pwmout2_default_mode: pwmout2_default { |
116 | pwmout2_default_mux { | 82 | pwmout2_default_mux { |
117 | ste,function = "pwmout"; | 83 | function = "pwmout"; |
118 | ste,pins = "pwmout2_d_1"; | 84 | groups = "pwmout2_d_1"; |
119 | }; | 85 | }; |
120 | pwmout2_default_cfg { | 86 | pwmout2_default_cfg { |
121 | ste,pins = "GPIO15"; | 87 | pins = "GPIO15"; |
122 | output-low; | 88 | output-low; |
123 | }; | 89 | }; |
124 | }; | 90 | }; |
@@ -126,11 +92,11 @@ Example board file extract: | |||
126 | pwmout3 { | 92 | pwmout3 { |
127 | pwmout3_default_mode: pwmout3_default { | 93 | pwmout3_default_mode: pwmout3_default { |
128 | pwmout3_default_mux { | 94 | pwmout3_default_mux { |
129 | ste,function = "pwmout"; | 95 | function = "pwmout"; |
130 | ste,pins = "pwmout3_d_1"; | 96 | groups = "pwmout3_d_1"; |
131 | }; | 97 | }; |
132 | pwmout3_default_cfg { | 98 | pwmout3_default_cfg { |
133 | ste,pins = "GPIO16"; | 99 | pins = "GPIO16"; |
134 | output-low; | 100 | output-low; |
135 | }; | 101 | }; |
136 | }; | 102 | }; |
@@ -139,15 +105,15 @@ Example board file extract: | |||
139 | 105 | ||
140 | adi1_default_mode: adi1_default { | 106 | adi1_default_mode: adi1_default { |
141 | adi1_default_mux { | 107 | adi1_default_mux { |
142 | ste,function = "adi1"; | 108 | function = "adi1"; |
143 | ste,pins = "adi1_d_1"; | 109 | groups = "adi1_d_1"; |
144 | }; | 110 | }; |
145 | adi1_default_cfg1 { | 111 | adi1_default_cfg1 { |
146 | ste,pins = "GPIO17","GPIO19","GPIO20"; | 112 | pins = "GPIO17","GPIO19","GPIO20"; |
147 | bias-disable; | 113 | bias-disable; |
148 | }; | 114 | }; |
149 | adi1_default_cfg2 { | 115 | adi1_default_cfg2 { |
150 | ste,pins = "GPIO18"; | 116 | pins = "GPIO18"; |
151 | output-low; | 117 | output-low; |
152 | }; | 118 | }; |
153 | }; | 119 | }; |
@@ -155,15 +121,15 @@ Example board file extract: | |||
155 | dmic12 { | 121 | dmic12 { |
156 | dmic12_default_mode: dmic12_default { | 122 | dmic12_default_mode: dmic12_default { |
157 | dmic12_default_mux { | 123 | dmic12_default_mux { |
158 | ste,function = "dmic"; | 124 | function = "dmic"; |
159 | ste,pins = "dmic12_d_1"; | 125 | groups = "dmic12_d_1"; |
160 | }; | 126 | }; |
161 | dmic12_default_cfg1 { | 127 | dmic12_default_cfg1 { |
162 | ste,pins = "GPIO27"; | 128 | pins = "GPIO27"; |
163 | output-low; | 129 | output-low; |
164 | }; | 130 | }; |
165 | dmic12_default_cfg2 { | 131 | dmic12_default_cfg2 { |
166 | ste,pins = "GPIO28"; | 132 | pins = "GPIO28"; |
167 | bias-disable; | 133 | bias-disable; |
168 | }; | 134 | }; |
169 | }; | 135 | }; |
@@ -171,15 +137,15 @@ Example board file extract: | |||
171 | dmic34 { | 137 | dmic34 { |
172 | dmic34_default_mode: dmic34_default { | 138 | dmic34_default_mode: dmic34_default { |
173 | dmic34_default_mux { | 139 | dmic34_default_mux { |
174 | ste,function = "dmic"; | 140 | function = "dmic"; |
175 | ste,pins = "dmic34_d_1"; | 141 | groups = "dmic34_d_1"; |
176 | }; | 142 | }; |
177 | dmic34_default_cfg1 { | 143 | dmic34_default_cfg1 { |
178 | ste,pins = "GPIO29"; | 144 | pins = "GPIO29"; |
179 | output-low; | 145 | output-low; |
180 | }; | 146 | }; |
181 | dmic34_default_cfg2 { | 147 | dmic34_default_cfg2 { |
182 | ste,pins = "GPIO30"; | 148 | pins = "GPIO30"; |
183 | bias-disable;{ | 149 | bias-disable;{ |
184 | 150 | ||
185 | }; | 151 | }; |
@@ -188,15 +154,15 @@ Example board file extract: | |||
188 | dmic56 { | 154 | dmic56 { |
189 | dmic56_default_mode: dmic56_default { | 155 | dmic56_default_mode: dmic56_default { |
190 | dmic56_default_mux { | 156 | dmic56_default_mux { |
191 | ste,function = "dmic"; | 157 | function = "dmic"; |
192 | ste,pins = "dmic56_d_1"; | 158 | groups = "dmic56_d_1"; |
193 | }; | 159 | }; |
194 | dmic56_default_cfg1 { | 160 | dmic56_default_cfg1 { |
195 | ste,pins = "GPIO31"; | 161 | pins = "GPIO31"; |
196 | output-low; | 162 | output-low; |
197 | }; | 163 | }; |
198 | dmic56_default_cfg2 { | 164 | dmic56_default_cfg2 { |
199 | ste,pins = "GPIO32"; | 165 | pins = "GPIO32"; |
200 | bias-disable; | 166 | bias-disable; |
201 | }; | 167 | }; |
202 | }; | 168 | }; |
@@ -204,11 +170,11 @@ Example board file extract: | |||
204 | sysclkreq5 { | 170 | sysclkreq5 { |
205 | sysclkreq5_default_mode: sysclkreq5_default { | 171 | sysclkreq5_default_mode: sysclkreq5_default { |
206 | sysclkreq5_default_mux { | 172 | sysclkreq5_default_mux { |
207 | ste,function = "sysclkreq"; | 173 | function = "sysclkreq"; |
208 | ste,pins = "sysclkreq5_d_1"; | 174 | groups = "sysclkreq5_d_1"; |
209 | }; | 175 | }; |
210 | sysclkreq5_default_cfg { | 176 | sysclkreq5_default_cfg { |
211 | ste,pins = "GPIO42"; | 177 | pins = "GPIO42"; |
212 | output-low; | 178 | output-low; |
213 | }; | 179 | }; |
214 | }; | 180 | }; |
@@ -216,11 +182,11 @@ Example board file extract: | |||
216 | batremn { | 182 | batremn { |
217 | batremn_default_mode: batremn_default { | 183 | batremn_default_mode: batremn_default { |
218 | batremn_default_mux { | 184 | batremn_default_mux { |
219 | ste,function = "batremn"; | 185 | function = "batremn"; |
220 | ste,pins = "batremn_d_1"; | 186 | groups = "batremn_d_1"; |
221 | }; | 187 | }; |
222 | batremn_default_cfg { | 188 | batremn_default_cfg { |
223 | ste,pins = "GPIO43"; | 189 | pins = "GPIO43"; |
224 | bias-disable; | 190 | bias-disable; |
225 | }; | 191 | }; |
226 | }; | 192 | }; |
@@ -228,11 +194,11 @@ Example board file extract: | |||
228 | service { | 194 | service { |
229 | service_default_mode: service_default { | 195 | service_default_mode: service_default { |
230 | service_default_mux { | 196 | service_default_mux { |
231 | ste,function = "service"; | 197 | function = "service"; |
232 | ste,pins = "service_d_1"; | 198 | groups = "service_d_1"; |
233 | }; | 199 | }; |
234 | service_default_cfg { | 200 | service_default_cfg { |
235 | ste,pins = "GPIO44"; | 201 | pins = "GPIO44"; |
236 | bias-disable; | 202 | bias-disable; |
237 | }; | 203 | }; |
238 | }; | 204 | }; |
@@ -240,13 +206,13 @@ Example board file extract: | |||
240 | pwrctrl0 { | 206 | pwrctrl0 { |
241 | pwrctrl0_default_mux: pwrctrl0_mux { | 207 | pwrctrl0_default_mux: pwrctrl0_mux { |
242 | pwrctrl0_default_mux { | 208 | pwrctrl0_default_mux { |
243 | ste,function = "pwrctrl"; | 209 | function = "pwrctrl"; |
244 | ste,pins = "pwrctrl0_d_1"; | 210 | groups = "pwrctrl0_d_1"; |
245 | }; | 211 | }; |
246 | }; | 212 | }; |
247 | pwrctrl0_default_mode: pwrctrl0_default { | 213 | pwrctrl0_default_mode: pwrctrl0_default { |
248 | pwrctrl0_default_cfg { | 214 | pwrctrl0_default_cfg { |
249 | ste,pins = "GPIO45"; | 215 | pins = "GPIO45"; |
250 | bias-disable; | 216 | bias-disable; |
251 | }; | 217 | }; |
252 | }; | 218 | }; |
@@ -254,13 +220,13 @@ Example board file extract: | |||
254 | pwrctrl1 { | 220 | pwrctrl1 { |
255 | pwrctrl1_default_mux: pwrctrl1_mux { | 221 | pwrctrl1_default_mux: pwrctrl1_mux { |
256 | pwrctrl1_default_mux { | 222 | pwrctrl1_default_mux { |
257 | ste,function = "pwrctrl"; | 223 | function = "pwrctrl"; |
258 | ste,pins = "pwrctrl1_d_1"; | 224 | groups = "pwrctrl1_d_1"; |
259 | }; | 225 | }; |
260 | }; | 226 | }; |
261 | pwrctrl1_default_mode: pwrctrl1_default { | 227 | pwrctrl1_default_mode: pwrctrl1_default { |
262 | pwrctrl1_default_cfg { | 228 | pwrctrl1_default_cfg { |
263 | ste,pins = "GPIO46"; | 229 | pins = "GPIO46"; |
264 | bias-disable; | 230 | bias-disable; |
265 | }; | 231 | }; |
266 | }; | 232 | }; |
@@ -268,11 +234,11 @@ Example board file extract: | |||
268 | pwmextvibra1 { | 234 | pwmextvibra1 { |
269 | pwmextvibra1_default_mode: pwmextvibra1_default { | 235 | pwmextvibra1_default_mode: pwmextvibra1_default { |
270 | pwmextvibra1_default_mux { | 236 | pwmextvibra1_default_mux { |
271 | ste,function = "pwmextvibra"; | 237 | function = "pwmextvibra"; |
272 | ste,pins = "pwmextvibra1_d_1"; | 238 | groups = "pwmextvibra1_d_1"; |
273 | }; | 239 | }; |
274 | pwmextvibra1_default_cfg { | 240 | pwmextvibra1_default_cfg { |
275 | ste,pins = "GPIO47"; | 241 | pins = "GPIO47"; |
276 | bias-disable; | 242 | bias-disable; |
277 | }; | 243 | }; |
278 | }; | 244 | }; |
@@ -280,11 +246,11 @@ Example board file extract: | |||
280 | pwmextvibra2 { | 246 | pwmextvibra2 { |
281 | pwmextvibra2_default_mode: pwmextvibra2_default { | 247 | pwmextvibra2_default_mode: pwmextvibra2_default { |
282 | pwmextvibra2_default_mux { | 248 | pwmextvibra2_default_mux { |
283 | ste,function = "pwmextvibra"; | 249 | function = "pwmextvibra"; |
284 | ste,pins = "pwmextvibra2_d_1"; | 250 | groups = "pwmextvibra2_d_1"; |
285 | }; | 251 | }; |
286 | pwmextvibra1_default_cfg { | 252 | pwmextvibra1_default_cfg { |
287 | ste,pins = "GPIO48"; | 253 | pins = "GPIO48"; |
288 | bias-disable; | 254 | bias-disable; |
289 | }; | 255 | }; |
290 | }; | 256 | }; |
@@ -292,11 +258,11 @@ Example board file extract: | |||
292 | gpio51 { | 258 | gpio51 { |
293 | gpio51_default_mode: gpio51_default { | 259 | gpio51_default_mode: gpio51_default { |
294 | gpio51_default_mux { | 260 | gpio51_default_mux { |
295 | ste,function = "gpio"; | 261 | function = "gpio"; |
296 | ste,pins = "gpio51_a_1"; | 262 | groups = "gpio51_a_1"; |
297 | }; | 263 | }; |
298 | gpio51_default_cfg { | 264 | gpio51_default_cfg { |
299 | ste,pins = "GPIO51"; | 265 | pins = "GPIO51"; |
300 | output-low; | 266 | output-low; |
301 | }; | 267 | }; |
302 | }; | 268 | }; |
@@ -304,11 +270,11 @@ Example board file extract: | |||
304 | gpio52 { | 270 | gpio52 { |
305 | gpio52_default_mode: gpio52_default { | 271 | gpio52_default_mode: gpio52_default { |
306 | gpio52_default_mux { | 272 | gpio52_default_mux { |
307 | ste,function = "gpio"; | 273 | function = "gpio"; |
308 | ste,pins = "gpio52_a_1"; | 274 | groups = "gpio52_a_1"; |
309 | }; | 275 | }; |
310 | gpio52_default_cfg { | 276 | gpio52_default_cfg { |
311 | ste,pins = "GPIO52"; | 277 | pins = "GPIO52"; |
312 | bias-pull-down; | 278 | bias-pull-down; |
313 | }; | 279 | }; |
314 | }; | 280 | }; |
@@ -316,11 +282,11 @@ Example board file extract: | |||
316 | gpio53 { | 282 | gpio53 { |
317 | gpio53_default_mode: gpio53_default { | 283 | gpio53_default_mode: gpio53_default { |
318 | gpio53_default_mux { | 284 | gpio53_default_mux { |
319 | ste,function = "gpio"; | 285 | function = "gpio"; |
320 | ste,pins = "gpio53_a_1"; | 286 | groups = "gpio53_a_1"; |
321 | }; | 287 | }; |
322 | gpio53_default_cfg { | 288 | gpio53_default_cfg { |
323 | ste,pins = "GPIO53"; | 289 | pins = "GPIO53"; |
324 | bias-pull-down; | 290 | bias-pull-down; |
325 | }; | 291 | }; |
326 | }; | 292 | }; |
@@ -328,11 +294,11 @@ Example board file extract: | |||
328 | gpio54 { | 294 | gpio54 { |
329 | gpio54_default_mode: gpio54_default { | 295 | gpio54_default_mode: gpio54_default { |
330 | gpio54_default_mux { | 296 | gpio54_default_mux { |
331 | ste,function = "gpio"; | 297 | function = "gpio"; |
332 | ste,pins = "gpio54_a_1"; | 298 | groups = "gpio54_a_1"; |
333 | }; | 299 | }; |
334 | gpio54_default_cfg { | 300 | gpio54_default_cfg { |
335 | ste,pins = "GPIO54"; | 301 | pins = "GPIO54"; |
336 | output-low; | 302 | output-low; |
337 | }; | 303 | }; |
338 | }; | 304 | }; |
@@ -340,11 +306,11 @@ Example board file extract: | |||
340 | pdmclkdat { | 306 | pdmclkdat { |
341 | pdmclkdat_default_mode: pdmclkdat_default { | 307 | pdmclkdat_default_mode: pdmclkdat_default { |
342 | pdmclkdat_default_mux { | 308 | pdmclkdat_default_mux { |
343 | ste,function = "pdm"; | 309 | function = "pdm"; |
344 | ste,pins = "pdmclkdat_d_1"; | 310 | groups = "pdmclkdat_d_1"; |
345 | }; | 311 | }; |
346 | pdmclkdat_default_cfg { | 312 | pdmclkdat_default_cfg { |
347 | ste,pins = "GPIO55", "GPIO56"; | 313 | pins = "GPIO55", "GPIO56"; |
348 | bias-disable; | 314 | bias-disable; |
349 | }; | 315 | }; |
350 | }; | 316 | }; |
diff --git a/Documentation/devicetree/bindings/power/power-controller.txt b/Documentation/devicetree/bindings/power/power-controller.txt new file mode 100644 index 000000000000..4f7a3bc9c407 --- /dev/null +++ b/Documentation/devicetree/bindings/power/power-controller.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Generic system power control capability | ||
2 | |||
3 | Power-management integrated circuits or miscellaneous hardware components are | ||
4 | sometimes able to control the system power. The device driver associated with these | ||
5 | components might need to define this capability, which tells the kernel that | ||
6 | it can be used to switch off the system. The corresponding device must have the | ||
7 | standard property "system-power-controller" in its device node. This property | ||
8 | marks the device as able to control the system power. In order to test if this | ||
9 | property is found programmatically, use the helper function | ||
10 | "of_device_is_system_power_controller" from of.h . | ||
11 | |||
12 | Example: | ||
13 | |||
14 | act8846: act8846@5 { | ||
15 | compatible = "active-semi,act8846"; | ||
16 | status = "okay"; | ||
17 | system-power-controller; | ||
18 | } | ||
diff --git a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt new file mode 100644 index 000000000000..adbb5dc5b6e9 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | gpio-charger | ||
2 | |||
3 | Required properties : | ||
4 | - compatible : "gpio-charger" | ||
5 | - gpios : GPIO indicating the charger presence. | ||
6 | See GPIO binding in bindings/gpio/gpio.txt . | ||
7 | - charger-type : power supply type, one of | ||
8 | unknown | ||
9 | battery | ||
10 | ups | ||
11 | mains | ||
12 | usb-sdp (USB standard downstream port) | ||
13 | usb-dcp (USB dedicated charging port) | ||
14 | usb-cdp (USB charging downstream port) | ||
15 | usb-aca (USB accessory charger adapter) | ||
16 | |||
17 | Example: | ||
18 | |||
19 | usb_charger: charger { | ||
20 | compatible = "gpio-charger"; | ||
21 | charger-type = "usb-sdp"; | ||
22 | gpios = <&gpf0 2 0 0 0>; | ||
23 | } | ||
24 | |||
25 | battery { | ||
26 | power-supplies = <&usb_charger>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt new file mode 100644 index 000000000000..dc7c9bad63ea --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | i.mx6 Poweroff Driver | ||
2 | |||
3 | SNVS_LPCR in SNVS module can power off the whole system by pull | ||
4 | PMIC_ON_REQ low if PMIC_ON_REQ is connected with external PMIC. | ||
5 | If you don't want to use PMIC_ON_REQ as power on/off control, | ||
6 | please set status='disabled' to disable this driver. | ||
7 | |||
8 | Required Properties: | ||
9 | -compatible: "fsl,sec-v4.0-poweroff" | ||
10 | -reg: Specifies the physical address of the SNVS_LPCR register | ||
11 | |||
12 | Example: | ||
13 | snvs@020cc000 { | ||
14 | compatible = "fsl,sec-v4.0-mon", "simple-bus"; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | ranges = <0 0x020cc000 0x4000>; | ||
18 | ..... | ||
19 | snvs_poweroff: snvs-poweroff@38 { | ||
20 | compatible = "fsl,sec-v4.0-poweroff"; | ||
21 | reg = <0x38 0x4>; | ||
22 | }; | ||
23 | } | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt new file mode 100644 index 000000000000..edeea160ca39 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt | |||
@@ -0,0 +1,534 @@ | |||
1 | ============================================================================= | ||
2 | Freescale Frame Manager Device Bindings | ||
3 | |||
4 | CONTENTS | ||
5 | - FMan Node | ||
6 | - FMan Port Node | ||
7 | - FMan MURAM Node | ||
8 | - FMan dTSEC/XGEC/mEMAC Node | ||
9 | - FMan IEEE 1588 Node | ||
10 | - Example | ||
11 | |||
12 | ============================================================================= | ||
13 | FMan Node | ||
14 | |||
15 | DESCRIPTION | ||
16 | |||
17 | Due to the fact that the FMan is an aggregation of sub-engines (ports, MACs, | ||
18 | etc.) the FMan node will have child nodes for each of them. | ||
19 | |||
20 | PROPERTIES | ||
21 | |||
22 | - compatible | ||
23 | Usage: required | ||
24 | Value type: <stringlist> | ||
25 | Definition: Must include "fsl,fman" | ||
26 | FMan version can be determined via FM_IP_REV_1 register in the | ||
27 | FMan block. The offset is 0xc4 from the beginning of the | ||
28 | Frame Processing Manager memory map (0xc3000 from the | ||
29 | beginning of the FMan node). | ||
30 | |||
31 | - cell-index | ||
32 | Usage: required | ||
33 | Value type: <u32> | ||
34 | Definition: Specifies the index of the FMan unit. | ||
35 | |||
36 | The cell-index value may be used by the SoC, to identify the | ||
37 | FMan unit in the SoC memory map. In the table bellow, | ||
38 | there's a description of the cell-index use in each SoC: | ||
39 | |||
40 | - P1023: | ||
41 | register[bit] FMan unit cell-index | ||
42 | ============================================================ | ||
43 | DEVDISR[1] 1 0 | ||
44 | |||
45 | - P2041, P3041, P4080 P5020, P5040: | ||
46 | register[bit] FMan unit cell-index | ||
47 | ============================================================ | ||
48 | DCFG_DEVDISR2[6] 1 0 | ||
49 | DCFG_DEVDISR2[14] 2 1 | ||
50 | (Second FM available only in P4080 and P5040) | ||
51 | |||
52 | - B4860, T1040, T2080, T4240: | ||
53 | register[bit] FMan unit cell-index | ||
54 | ============================================================ | ||
55 | DCFG_CCSR_DEVDISR2[24] 1 0 | ||
56 | DCFG_CCSR_DEVDISR2[25] 2 1 | ||
57 | (Second FM available only in T4240) | ||
58 | |||
59 | DEVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in | ||
60 | the specific SoC "Device Configuration/Pin Control" Memory | ||
61 | Map. | ||
62 | |||
63 | - reg | ||
64 | Usage: required | ||
65 | Value type: <prop-encoded-array> | ||
66 | Definition: A standard property. Specifies the offset of the | ||
67 | following configuration registers: | ||
68 | - BMI configuration registers. | ||
69 | - QMI configuration registers. | ||
70 | - DMA configuration registers. | ||
71 | - FPM configuration registers. | ||
72 | - FMan controller configuration registers. | ||
73 | |||
74 | - ranges | ||
75 | Usage: required | ||
76 | Value type: <prop-encoded-array> | ||
77 | Definition: A standard property. | ||
78 | |||
79 | - clocks | ||
80 | Usage: required | ||
81 | Value type: <prop-encoded-array> | ||
82 | Definition: phandle for the fman input clock. | ||
83 | |||
84 | - clock-names | ||
85 | usage: required | ||
86 | Value type: <stringlist> | ||
87 | Definition: "fmanclk" for the fman input clock. | ||
88 | |||
89 | - interrupts | ||
90 | Usage: required | ||
91 | Value type: <prop-encoded-array> | ||
92 | Definition: A pair of IRQs are specified in this property. | ||
93 | The first element is associated with the event interrupts and | ||
94 | the second element is associated with the error interrupts. | ||
95 | |||
96 | - fsl,qman-channel-range | ||
97 | Usage: required | ||
98 | Value type: <prop-encoded-array> | ||
99 | Definition: Specifies the range of the available dedicated | ||
100 | channels in the FMan. The first cell specifies the beginning | ||
101 | of the range and the second cell specifies the number of | ||
102 | channels. | ||
103 | Further information available at: | ||
104 | "Work Queue (WQ) Channel Assignments in the QMan" section | ||
105 | in DPAA Reference Manual. | ||
106 | |||
107 | - fsl,qman | ||
108 | - fsl,bman | ||
109 | Usage: required | ||
110 | Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt | ||
111 | |||
112 | ============================================================================= | ||
113 | FMan MURAM Node | ||
114 | |||
115 | DESCRIPTION | ||
116 | |||
117 | FMan Internal memory - shared between all the FMan modules. | ||
118 | It contains data structures that are common and written to or read by | ||
119 | the modules. | ||
120 | FMan internal memory is split into the following parts: | ||
121 | Packet buffering (Tx/Rx FIFOs) | ||
122 | Frames internal context | ||
123 | |||
124 | PROPERTIES | ||
125 | |||
126 | - compatible | ||
127 | Usage: required | ||
128 | Value type: <stringlist> | ||
129 | Definition: Must include "fsl,fman-muram" | ||
130 | |||
131 | - ranges | ||
132 | Usage: required | ||
133 | Value type: <prop-encoded-array> | ||
134 | Definition: A standard property. | ||
135 | Specifies the multi-user memory offset and the size within | ||
136 | the FMan. | ||
137 | |||
138 | EXAMPLE | ||
139 | |||
140 | muram@0 { | ||
141 | compatible = "fsl,fman-muram"; | ||
142 | ranges = <0 0x000000 0x28000>; | ||
143 | }; | ||
144 | |||
145 | ============================================================================= | ||
146 | FMan Port Node | ||
147 | |||
148 | DESCRIPTION | ||
149 | |||
150 | The Frame Manager (FMan) supports several types of hardware ports: | ||
151 | Ethernet receiver (RX) | ||
152 | Ethernet transmitter (TX) | ||
153 | Offline/Host command (O/H) | ||
154 | |||
155 | PROPERTIES | ||
156 | |||
157 | - compatible | ||
158 | Usage: required | ||
159 | Value type: <stringlist> | ||
160 | Definition: A standard property. | ||
161 | Must include one of the following: | ||
162 | - "fsl,fman-v2-port-oh" for FManV2 OH ports | ||
163 | - "fsl,fman-v2-port-rx" for FManV2 RX ports | ||
164 | - "fsl,fman-v2-port-tx" for FManV2 TX ports | ||
165 | - "fsl,fman-v3-port-oh" for FManV3 OH ports | ||
166 | - "fsl,fman-v3-port-rx" for FManV3 RX ports | ||
167 | - "fsl,fman-v3-port-tx" for FManV3 TX ports | ||
168 | |||
169 | - cell-index | ||
170 | Usage: required | ||
171 | Value type: <u32> | ||
172 | Definition: Specifies the hardware port id. | ||
173 | Each hardware port on the FMan has its own hardware PortID. | ||
174 | Super set of all hardware Port IDs available at FMan Reference | ||
175 | Manual under "FMan Hardware Ports in Freescale Devices" table. | ||
176 | |||
177 | Each hardware port is assigned a 4KB, port-specific page in | ||
178 | the FMan hardware port memory region (which is part of the | ||
179 | FMan memory map). The first 4 KB in the FMan hardware ports | ||
180 | memory region is used for what are called common registers. | ||
181 | The subsequent 63 4KB pages are allocated to the hardware | ||
182 | ports. | ||
183 | The page of a specific port is determined by the cell-index. | ||
184 | |||
185 | - reg | ||
186 | Usage: required | ||
187 | Value type: <prop-encoded-array> | ||
188 | Definition: There is one reg region describing the port | ||
189 | configuration registers. | ||
190 | |||
191 | EXAMPLE | ||
192 | |||
193 | port@a8000 { | ||
194 | cell-index = <0x28>; | ||
195 | compatible = "fsl,fman-v2-port-tx"; | ||
196 | reg = <0xa8000 0x1000>; | ||
197 | }; | ||
198 | |||
199 | port@88000 { | ||
200 | cell-index = <0x8>; | ||
201 | compatible = "fsl,fman-v2-port-rx"; | ||
202 | reg = <0x88000 0x1000>; | ||
203 | }; | ||
204 | |||
205 | port@81000 { | ||
206 | cell-index = <0x1>; | ||
207 | compatible = "fsl,fman-v2-port-oh"; | ||
208 | reg = <0x81000 0x1000>; | ||
209 | }; | ||
210 | |||
211 | ============================================================================= | ||
212 | FMan dTSEC/XGEC/mEMAC Node | ||
213 | |||
214 | DESCRIPTION | ||
215 | |||
216 | mEMAC/dTSEC/XGEC are the Ethernet network interfaces | ||
217 | |||
218 | PROPERTIES | ||
219 | |||
220 | - compatible | ||
221 | Usage: required | ||
222 | Value type: <stringlist> | ||
223 | Definition: A standard property. | ||
224 | Must include one of the following: | ||
225 | - "fsl,fman-dtsec" for dTSEC MAC | ||
226 | - "fsl,fman-xgec" for XGEC MAC | ||
227 | - "fsl,fman-memac for mEMAC MAC | ||
228 | |||
229 | - cell-index | ||
230 | Usage: required | ||
231 | Value type: <u32> | ||
232 | Definition: Specifies the MAC id. | ||
233 | |||
234 | The cell-index value may be used by the FMan or the SoC, to | ||
235 | identify the MAC unit in the FMan (or SoC) memory map. | ||
236 | In the tables bellow there's a description of the cell-index | ||
237 | use, there are two tables, one describes the use of cell-index | ||
238 | by the FMan, the second describes the use by the SoC: | ||
239 | |||
240 | 1. FMan Registers | ||
241 | |||
242 | FManV2: | ||
243 | register[bit] MAC cell-index | ||
244 | ============================================================ | ||
245 | FM_EPI[16] XGEC 8 | ||
246 | FM_EPI[16+n] dTSECn n-1 | ||
247 | FM_NPI[11+n] dTSECn n-1 | ||
248 | n = 1,..,5 | ||
249 | |||
250 | FManV3: | ||
251 | register[bit] MAC cell-index | ||
252 | ============================================================ | ||
253 | FM_EPI[16+n] mEMACn n-1 | ||
254 | FM_EPI[25] mEMAC10 9 | ||
255 | |||
256 | FM_NPI[11+n] mEMACn n-1 | ||
257 | FM_NPI[10] mEMAC10 9 | ||
258 | FM_NPI[11] mEMAC9 8 | ||
259 | n = 1,..8 | ||
260 | |||
261 | FM_EPI and FM_NPI are located in the FMan memory map. | ||
262 | |||
263 | 2. SoC registers: | ||
264 | |||
265 | - P2041, P3041, P4080 P5020, P5040: | ||
266 | register[bit] FMan MAC cell | ||
267 | Unit index | ||
268 | ============================================================ | ||
269 | DCFG_DEVDISR2[7] 1 XGEC 8 | ||
270 | DCFG_DEVDISR2[7+n] 1 dTSECn n-1 | ||
271 | DCFG_DEVDISR2[15] 2 XGEC 8 | ||
272 | DCFG_DEVDISR2[15+n] 2 dTSECn n-1 | ||
273 | n = 1,..5 | ||
274 | |||
275 | - T1040, T2080, T4240, B4860: | ||
276 | register[bit] FMan MAC cell | ||
277 | Unit index | ||
278 | ============================================================ | ||
279 | DCFG_CCSR_DEVDISR2[n-1] 1 mEMACn n-1 | ||
280 | DCFG_CCSR_DEVDISR2[11+n] 2 mEMACn n-1 | ||
281 | n = 1,..6,9,10 | ||
282 | |||
283 | EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in | ||
284 | the specific SoC "Device Configuration/Pin Control" Memory | ||
285 | Map. | ||
286 | |||
287 | - reg | ||
288 | Usage: required | ||
289 | Value type: <prop-encoded-array> | ||
290 | Definition: A standard property. | ||
291 | |||
292 | - fsl,fman-ports | ||
293 | Usage: required | ||
294 | Value type: <prop-encoded-array> | ||
295 | Definition: An array of two phandles - the first references is | ||
296 | the FMan RX port and the second is the TX port used by this | ||
297 | MAC. | ||
298 | |||
299 | - ptp-timer | ||
300 | Usage required | ||
301 | Value type: <phandle> | ||
302 | Definition: A phandle for 1EEE1588 timer. | ||
303 | |||
304 | EXAMPLE | ||
305 | |||
306 | fman1_tx28: port@a8000 { | ||
307 | cell-index = <0x28>; | ||
308 | compatible = "fsl,fman-v2-port-tx"; | ||
309 | reg = <0xa8000 0x1000>; | ||
310 | }; | ||
311 | |||
312 | fman1_rx8: port@88000 { | ||
313 | cell-index = <0x8>; | ||
314 | compatible = "fsl,fman-v2-port-rx"; | ||
315 | reg = <0x88000 0x1000>; | ||
316 | }; | ||
317 | |||
318 | ptp-timer: ptp_timer@fe000 { | ||
319 | compatible = "fsl,fman-ptp-timer"; | ||
320 | reg = <0xfe000 0x1000>; | ||
321 | }; | ||
322 | |||
323 | ethernet@e0000 { | ||
324 | compatible = "fsl,fman-dtsec"; | ||
325 | cell-index = <0>; | ||
326 | reg = <0xe0000 0x1000>; | ||
327 | fsl,fman-ports = <&fman1_rx8 &fman1_tx28>; | ||
328 | ptp-timer = <&ptp-timer>; | ||
329 | }; | ||
330 | |||
331 | ============================================================================ | ||
332 | FMan IEEE 1588 Node | ||
333 | |||
334 | DESCRIPTION | ||
335 | |||
336 | The FMan interface to support IEEE 1588 | ||
337 | |||
338 | |||
339 | PROPERTIES | ||
340 | |||
341 | - compatible | ||
342 | Usage: required | ||
343 | Value type: <stringlist> | ||
344 | Definition: A standard property. | ||
345 | Must include "fsl,fman-ptp-timer". | ||
346 | |||
347 | - reg | ||
348 | Usage: required | ||
349 | Value type: <prop-encoded-array> | ||
350 | Definition: A standard property. | ||
351 | |||
352 | EXAMPLE | ||
353 | |||
354 | ptp-timer@fe000 { | ||
355 | compatible = "fsl,fman-ptp-timer"; | ||
356 | reg = <0xfe000 0x1000>; | ||
357 | }; | ||
358 | |||
359 | ============================================================================= | ||
360 | Example | ||
361 | |||
362 | fman@400000 { | ||
363 | #address-cells = <1>; | ||
364 | #size-cells = <1>; | ||
365 | cell-index = <1>; | ||
366 | compatible = "fsl,fman" | ||
367 | ranges = <0 0x400000 0x100000>; | ||
368 | reg = <0x400000 0x100000>; | ||
369 | clocks = <&fman_clk>; | ||
370 | clock-names = "fmanclk"; | ||
371 | interrupts = < | ||
372 | 96 2 0 0 | ||
373 | 16 2 1 1>; | ||
374 | fsl,qman-channel-range = <0x40 0xc>; | ||
375 | |||
376 | muram@0 { | ||
377 | compatible = "fsl,fman-muram"; | ||
378 | reg = <0x0 0x28000>; | ||
379 | }; | ||
380 | |||
381 | port@81000 { | ||
382 | cell-index = <1>; | ||
383 | compatible = "fsl,fman-v2-port-oh"; | ||
384 | reg = <0x81000 0x1000>; | ||
385 | }; | ||
386 | |||
387 | port@82000 { | ||
388 | cell-index = <2>; | ||
389 | compatible = "fsl,fman-v2-port-oh"; | ||
390 | reg = <0x82000 0x1000>; | ||
391 | }; | ||
392 | |||
393 | port@83000 { | ||
394 | cell-index = <3>; | ||
395 | compatible = "fsl,fman-v2-port-oh"; | ||
396 | reg = <0x83000 0x1000>; | ||
397 | }; | ||
398 | |||
399 | port@84000 { | ||
400 | cell-index = <4>; | ||
401 | compatible = "fsl,fman-v2-port-oh"; | ||
402 | reg = <0x84000 0x1000>; | ||
403 | }; | ||
404 | |||
405 | port@85000 { | ||
406 | cell-index = <5>; | ||
407 | compatible = "fsl,fman-v2-port-oh"; | ||
408 | reg = <0x85000 0x1000>; | ||
409 | }; | ||
410 | |||
411 | port@86000 { | ||
412 | cell-index = <6>; | ||
413 | compatible = "fsl,fman-v2-port-oh"; | ||
414 | reg = <0x86000 0x1000>; | ||
415 | }; | ||
416 | |||
417 | fman1_rx_0x8: port@88000 { | ||
418 | cell-index = <0x8>; | ||
419 | compatible = "fsl,fman-v2-port-rx"; | ||
420 | reg = <0x88000 0x1000>; | ||
421 | }; | ||
422 | |||
423 | fman1_rx_0x9: port@89000 { | ||
424 | cell-index = <0x9>; | ||
425 | compatible = "fsl,fman-v2-port-rx"; | ||
426 | reg = <0x89000 0x1000>; | ||
427 | }; | ||
428 | |||
429 | fman1_rx_0xa: port@8a000 { | ||
430 | cell-index = <0xa>; | ||
431 | compatible = "fsl,fman-v2-port-rx"; | ||
432 | reg = <0x8a000 0x1000>; | ||
433 | }; | ||
434 | |||
435 | fman1_rx_0xb: port@8b000 { | ||
436 | cell-index = <0xb>; | ||
437 | compatible = "fsl,fman-v2-port-rx"; | ||
438 | reg = <0x8b000 0x1000>; | ||
439 | }; | ||
440 | |||
441 | fman1_rx_0xc: port@8c000 { | ||
442 | cell-index = <0xc>; | ||
443 | compatible = "fsl,fman-v2-port-rx"; | ||
444 | reg = <0x8c000 0x1000>; | ||
445 | }; | ||
446 | |||
447 | fman1_rx_0x10: port@90000 { | ||
448 | cell-index = <0x10>; | ||
449 | compatible = "fsl,fman-v2-port-rx"; | ||
450 | reg = <0x90000 0x1000>; | ||
451 | }; | ||
452 | |||
453 | fman1_tx_0x28: port@a8000 { | ||
454 | cell-index = <0x28>; | ||
455 | compatible = "fsl,fman-v2-port-tx"; | ||
456 | reg = <0xa8000 0x1000>; | ||
457 | }; | ||
458 | |||
459 | fman1_tx_0x29: port@a9000 { | ||
460 | cell-index = <0x29>; | ||
461 | compatible = "fsl,fman-v2-port-tx"; | ||
462 | reg = <0xa9000 0x1000>; | ||
463 | }; | ||
464 | |||
465 | fman1_tx_0x2a: port@aa000 { | ||
466 | cell-index = <0x2a>; | ||
467 | compatible = "fsl,fman-v2-port-tx"; | ||
468 | reg = <0xaa000 0x1000>; | ||
469 | }; | ||
470 | |||
471 | fman1_tx_0x2b: port@ab000 { | ||
472 | cell-index = <0x2b>; | ||
473 | compatible = "fsl,fman-v2-port-tx"; | ||
474 | reg = <0xab000 0x1000>; | ||
475 | }; | ||
476 | |||
477 | fman1_tx_0x2c: port@ac0000 { | ||
478 | cell-index = <0x2c>; | ||
479 | compatible = "fsl,fman-v2-port-tx"; | ||
480 | reg = <0xac000 0x1000>; | ||
481 | }; | ||
482 | |||
483 | fman1_tx_0x30: port@b0000 { | ||
484 | cell-index = <0x30>; | ||
485 | compatible = "fsl,fman-v2-port-tx"; | ||
486 | reg = <0xb0000 0x1000>; | ||
487 | }; | ||
488 | |||
489 | ethernet@e0000 { | ||
490 | compatible = "fsl,fman-dtsec"; | ||
491 | cell-index = <0>; | ||
492 | reg = <0xe0000 0x1000>; | ||
493 | fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>; | ||
494 | }; | ||
495 | |||
496 | ethernet@e2000 { | ||
497 | compatible = "fsl,fman-dtsec"; | ||
498 | cell-index = <1>; | ||
499 | reg = <0xe2000 0x1000>; | ||
500 | fsl,fman-ports = <&fman1_rx_0x9 &fman1_tx_0x29>; | ||
501 | }; | ||
502 | |||
503 | ethernet@e4000 { | ||
504 | compatible = "fsl,fman-dtsec"; | ||
505 | cell-index = <2>; | ||
506 | reg = <0xe4000 0x1000>; | ||
507 | fsl,fman-ports = <&fman1_rx_0xa &fman1_tx_0x2a>; | ||
508 | }; | ||
509 | |||
510 | ethernet@e6000 { | ||
511 | compatible = "fsl,fman-dtsec"; | ||
512 | cell-index = <3>; | ||
513 | reg = <0xe6000 0x1000>; | ||
514 | fsl,fman-ports = <&fman1_rx_0xb &fman1_tx_0x2b>; | ||
515 | }; | ||
516 | |||
517 | ethernet@e8000 { | ||
518 | compatible = "fsl,fman-dtsec"; | ||
519 | cell-index = <4>; | ||
520 | reg = <0xf0000 0x1000>; | ||
521 | fsl,fman-ports = <&fman1_rx_0xc &fman1_tx_0x2c>; | ||
522 | |||
523 | ethernet@f0000 { | ||
524 | cell-index = <8>; | ||
525 | compatible = "fsl,fman-xgec"; | ||
526 | reg = <0xf0000 0x1000>; | ||
527 | fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>; | ||
528 | }; | ||
529 | |||
530 | ptp-timer@fe000 { | ||
531 | compatible = "fsl,fman-ptp-timer"; | ||
532 | reg = <0xfe000 0x1000>; | ||
533 | }; | ||
534 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt new file mode 100644 index 000000000000..cfda0d57d302 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM driver | ||
2 | |||
3 | The Atmel HLCDC PWM is subdevice of the HLCDC MFD device. | ||
4 | See ../mfd/atmel-hlcdc.txt for more details. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: value should be one of the following: | ||
8 | "atmel,hlcdc-pwm" | ||
9 | - pinctr-names: the pin control state names. Should contain "default". | ||
10 | - pinctrl-0: should contain the pinctrl states described by pinctrl | ||
11 | default. | ||
12 | - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells | ||
13 | bindings defined in pwm.txt in this directory. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | hlcdc: hlcdc@f0030000 { | ||
18 | compatible = "atmel,sama5d3-hlcdc"; | ||
19 | reg = <0xf0030000 0x2000>; | ||
20 | clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; | ||
21 | clock-names = "periph_clk","sys_clk", "slow_clk"; | ||
22 | |||
23 | hlcdc_pwm: hlcdc-pwm { | ||
24 | compatible = "atmel,hlcdc-pwm"; | ||
25 | pinctrl-names = "default"; | ||
26 | pinctrl-0 = <&pinctrl_lcd_pwm>; | ||
27 | #pwm-cells = <3>; | ||
28 | }; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt new file mode 100644 index 000000000000..fb6fb31bc4c4 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | BCM2835 PWM controller (Raspberry Pi controller) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "brcm,bcm2835-pwm" | ||
5 | - reg: physical base address and length of the controller's registers | ||
6 | - clock: This clock defines the base clock frequency of the PWM hardware | ||
7 | system, the period and the duty_cycle of the PWM signal is a multiple of | ||
8 | the base period. | ||
9 | - #pwm-cells: Should be 2. See pwm.txt in this directory for a description of | ||
10 | the cells format. | ||
11 | |||
12 | Examples: | ||
13 | |||
14 | pwm@2020c000 { | ||
15 | compatible = "brcm,bcm2835-pwm"; | ||
16 | reg = <0x2020c000 0x28>; | ||
17 | clocks = <&clk_pwm>; | ||
18 | #pwm-cells = <2>; | ||
19 | }; | ||
20 | |||
21 | clocks { | ||
22 | .... | ||
23 | clk_pwm: pwm { | ||
24 | compatible = "fixed-clock"; | ||
25 | reg = <3>; | ||
26 | #clock-cells = <0>; | ||
27 | clock-frequency = <9200000>; | ||
28 | }; | ||
29 | .... | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt index 865614b34d6f..dad6358074ac 100644 --- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt | |||
@@ -5,6 +5,10 @@ Required properties: | |||
5 | - compatible: "active-semi,act8846" or "active-semi,act8865" | 5 | - compatible: "active-semi,act8846" or "active-semi,act8865" |
6 | - reg: I2C slave address | 6 | - reg: I2C slave address |
7 | 7 | ||
8 | Optional properties: | ||
9 | - system-power-controller: Telling whether or not this pmic is controlling | ||
10 | the system power. See Documentation/devicetree/bindings/power/power-controller.txt . | ||
11 | |||
8 | Any standard regulator properties can be used to configure the single regulator. | 12 | Any standard regulator properties can be used to configure the single regulator. |
9 | 13 | ||
10 | The valid names for regulators are: | 14 | The valid names for regulators are: |
diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt index 5aeaffc0f1f0..79e5476444f7 100644 --- a/Documentation/devicetree/bindings/regulator/max77802.txt +++ b/Documentation/devicetree/bindings/regulator/max77802.txt | |||
@@ -25,6 +25,29 @@ with their hardware counterparts as follow. The valid names are: | |||
25 | example: LDO1, LDO2, LDO35. | 25 | example: LDO1, LDO2, LDO35. |
26 | -BUCKn : for BUCKs, where n can lie in range 1 to 10. | 26 | -BUCKn : for BUCKs, where n can lie in range 1 to 10. |
27 | example: BUCK1, BUCK5, BUCK10. | 27 | example: BUCK1, BUCK5, BUCK10. |
28 | |||
29 | The max77802 regulator supports two different operating modes: Normal and Low | ||
30 | Power Mode. Some regulators support the modes to be changed at startup or by | ||
31 | the consumers during normal operation while others only support to change the | ||
32 | mode during system suspend. The standard regulator suspend states binding can | ||
33 | be used to configure the regulator operating mode. | ||
34 | |||
35 | The regulators that support the standard "regulator-initial-mode" property, | ||
36 | changing their mode during normal operation are: LDOs 1, 3, 20 and 21. | ||
37 | |||
38 | The possible values for "regulator-initial-mode" and "regulator-mode" are: | ||
39 | 1: Normal regulator voltage output mode. | ||
40 | 3: Low Power which reduces the quiescent current down to only 1uA | ||
41 | |||
42 | The list of valid modes are defined in the dt-bindings/clock/maxim,max77802.h | ||
43 | header and can be included by device tree source files. | ||
44 | |||
45 | The standard "regulator-mode" property can only be used for regulators that | ||
46 | support changing their mode to Low Power Mode during suspend. These regulators | ||
47 | are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has | ||
48 | been enabled for the given suspend state using "regulator-on-in-suspend" and | ||
49 | has not been disabled for that state using "regulator-off-in-suspend". | ||
50 | |||
28 | Example: | 51 | Example: |
29 | 52 | ||
30 | max77802@09 { | 53 | max77802@09 { |
@@ -36,11 +59,23 @@ Example: | |||
36 | #size-cells = <0>; | 59 | #size-cells = <0>; |
37 | 60 | ||
38 | regulators { | 61 | regulators { |
62 | ldo1_reg: LDO1 { | ||
63 | regulator-name = "vdd_1v0"; | ||
64 | regulator-min-microvolt = <1000000>; | ||
65 | regulator-max-microvolt = <1000000>; | ||
66 | regulator-always-on; | ||
67 | regulator-initial-mode = <MAX77802_OPMODE_LP>; | ||
68 | }; | ||
69 | |||
39 | ldo11_reg: LDO11 { | 70 | ldo11_reg: LDO11 { |
40 | regulator-name = "vdd_ldo11"; | 71 | regulator-name = "vdd_ldo11"; |
41 | regulator-min-microvolt = <1900000>; | 72 | regulator-min-microvolt = <1900000>; |
42 | regulator-max-microvolt = <1900000>; | 73 | regulator-max-microvolt = <1900000>; |
43 | regulator-always-on; | 74 | regulator-always-on; |
75 | regulator-state-mem { | ||
76 | regulator-on-in-suspend; | ||
77 | regulator-mode = <MAX77802_OPMODE_LP>; | ||
78 | }; | ||
44 | }; | 79 | }; |
45 | 80 | ||
46 | buck1_reg: BUCK1 { | 81 | buck1_reg: BUCK1 { |
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 86074334e342..abb26b58c83e 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
@@ -19,6 +19,24 @@ Optional properties: | |||
19 | design requires. This property describes the total system ramp time | 19 | design requires. This property describes the total system ramp time |
20 | required due to the combination of internal ramping of the regulator itself, | 20 | required due to the combination of internal ramping of the regulator itself, |
21 | and board design issues such as trace capacitance and load on the supply. | 21 | and board design issues such as trace capacitance and load on the supply. |
22 | - regulator-state-mem sub-root node for Suspend-to-RAM mode | ||
23 | : suspend to memory, the device goes to sleep, but all data stored in memory, | ||
24 | only some external interrupt can wake the device. | ||
25 | - regulator-state-disk sub-root node for Suspend-to-DISK mode | ||
26 | : suspend to disk, this state operates similarly to Suspend-to-RAM, | ||
27 | but includes a final step of writing memory contents to disk. | ||
28 | - regulator-state-[mem/disk] node has following common properties: | ||
29 | - regulator-on-in-suspend: regulator should be on in suspend state. | ||
30 | - regulator-off-in-suspend: regulator should be off in suspend state. | ||
31 | - regulator-suspend-microvolt: regulator should be set to this voltage | ||
32 | in suspend. | ||
33 | - regulator-mode: operating mode in the given suspend state. | ||
34 | The set of possible operating modes depends on the capabilities of | ||
35 | every hardware so the valid modes are documented on each regulator | ||
36 | device tree binding document. | ||
37 | - regulator-initial-mode: initial operating mode. The set of possible operating | ||
38 | modes depends on the capabilities of every hardware so each device binding | ||
39 | documentation explains which values the regulator supports. | ||
22 | 40 | ||
23 | Deprecated properties: | 41 | Deprecated properties: |
24 | - regulator-compatible: If a regulator chip contains multiple | 42 | - regulator-compatible: If a regulator chip contains multiple |
@@ -34,6 +52,10 @@ Example: | |||
34 | regulator-max-microvolt = <2500000>; | 52 | regulator-max-microvolt = <2500000>; |
35 | regulator-always-on; | 53 | regulator-always-on; |
36 | vin-supply = <&vin>; | 54 | vin-supply = <&vin>; |
55 | |||
56 | regulator-state-mem { | ||
57 | regulator-on-in-suspend; | ||
58 | }; | ||
37 | }; | 59 | }; |
38 | 60 | ||
39 | Regulator Consumers: | 61 | Regulator Consumers: |
diff --git a/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt b/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt index 882455e9b36d..f9acbc1f3c6b 100644 --- a/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt | |||
@@ -1,6 +1,7 @@ | |||
1 | SKY81452 voltage regulator | 1 | SKY81452 voltage regulator |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - regulator node named lout. | ||
4 | - any required generic properties defined in regulator.txt | 5 | - any required generic properties defined in regulator.txt |
5 | 6 | ||
6 | Optional properties: | 7 | Optional properties: |
@@ -9,8 +10,9 @@ Optional properties: | |||
9 | Example: | 10 | Example: |
10 | 11 | ||
11 | regulator { | 12 | regulator { |
12 | /* generic regulator properties */ | 13 | lout { |
13 | regulator-name = "touch_en"; | 14 | regulator-name = "sky81452-lout"; |
14 | regulator-min-microvolt = <4500000>; | 15 | regulator-min-microvolt = <4500000>; |
15 | regulator-max-microvolt = <8000000>; | 16 | regulator-max-microvolt = <8000000>; |
17 | }; | ||
16 | }; | 18 | }; |
diff --git a/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt b/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt new file mode 100644 index 000000000000..54ae9f747e45 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | STMicroelectronics STi family Sysconfig Picophy SoftReset Controller | ||
2 | ============================================================================= | ||
3 | |||
4 | This binding describes a reset controller device that is used to enable and | ||
5 | disable on-chip PicoPHY USB2 phy(s) using "softreset" control bits found in | ||
6 | the STi family SoC system configuration registers. | ||
7 | |||
8 | The actual action taken when softreset is asserted is hardware dependent. | ||
9 | However, when asserted it may not be possible to access the hardware's | ||
10 | registers and after an assert/deassert sequence the hardware's previous state | ||
11 | may no longer be valid. | ||
12 | |||
13 | Please refer to Documentation/devicetree/bindings/reset/reset.txt | ||
14 | for common reset controller binding usage. | ||
15 | |||
16 | Required properties: | ||
17 | - compatible: Should be "st,stih407-picophyreset" | ||
18 | - #reset-cells: 1, see below | ||
19 | |||
20 | Example: | ||
21 | |||
22 | picophyreset: picophyreset-controller { | ||
23 | compatible = "st,stih407-picophyreset"; | ||
24 | #reset-cells = <1>; | ||
25 | }; | ||
26 | |||
27 | Specifying picophyreset control of devices | ||
28 | ======================================= | ||
29 | |||
30 | Device nodes should specify the reset channel required in their "resets" | ||
31 | property, containing a phandle to the picophyreset device node and an | ||
32 | index specifying which channel to use, as described in | ||
33 | Documentation/devicetree/bindings/reset/reset.txt. | ||
34 | |||
35 | Example: | ||
36 | |||
37 | usb2_picophy0: usbpicophy@0 { | ||
38 | resets = <&picophyreset STIH407_PICOPHY0_RESET>; | ||
39 | }; | ||
40 | |||
41 | Macro definitions for the supported reset channels can be found in: | ||
42 | include/dt-bindings/reset-controller/stih407-resets.h | ||
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt new file mode 100644 index 000000000000..6ae79d1843f3 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Atmel AT91SAM9260 Real Time Timer | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be: "atmel,at91sam9260-rtt" | ||
5 | - reg: should encode the memory region of the RTT controller | ||
6 | - interrupts: rtt alarm/event interrupt | ||
7 | - clocks: should contain the 32 KHz slow clk that will drive the RTT block. | ||
8 | - atmel,rtt-rtc-time-reg: should encode the GPBR register used to store | ||
9 | the time base when the RTT is used as an RTC. | ||
10 | The first cell should point to the GPBR node and the second one | ||
11 | encode the offset within the GPBR block (or in other words, the | ||
12 | GPBR register used to store the time base). | ||
13 | |||
14 | |||
15 | Example: | ||
16 | |||
17 | rtt@fffffd20 { | ||
18 | compatible = "atmel,at91sam9260-rtt"; | ||
19 | reg = <0xfffffd20 0x10>; | ||
20 | interrupts = <1 4 7>; | ||
21 | clocks = <&clk32k>; | ||
22 | atmel,rtt-rtc-time-reg = <&gpbr 0x0>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt index 5a0f02d34d95..4ba4dbd34289 100644 --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt | |||
@@ -5,11 +5,17 @@ Required properties: | |||
5 | - "ti,da830-rtc" - for RTC IP used similar to that on DA8xx SoC family. | 5 | - "ti,da830-rtc" - for RTC IP used similar to that on DA8xx SoC family. |
6 | - "ti,am3352-rtc" - for RTC IP used similar to that on AM335x SoC family. | 6 | - "ti,am3352-rtc" - for RTC IP used similar to that on AM335x SoC family. |
7 | This RTC IP has special WAKE-EN Register to enable | 7 | This RTC IP has special WAKE-EN Register to enable |
8 | Wakeup generation for event Alarm. | 8 | Wakeup generation for event Alarm. It can also be |
9 | used to control an external PMIC via the | ||
10 | pmic_power_en pin. | ||
9 | - reg: Address range of rtc register set | 11 | - reg: Address range of rtc register set |
10 | - interrupts: rtc timer, alarm interrupts in order | 12 | - interrupts: rtc timer, alarm interrupts in order |
11 | - interrupt-parent: phandle for the interrupt controller | 13 | - interrupt-parent: phandle for the interrupt controller |
12 | 14 | ||
15 | Optional properties: | ||
16 | - system-power-controller: whether the rtc is controlling the system power | ||
17 | through pmic_power_en | ||
18 | |||
13 | Example: | 19 | Example: |
14 | 20 | ||
15 | rtc@1c23000 { | 21 | rtc@1c23000 { |
@@ -18,4 +24,5 @@ rtc@1c23000 { | |||
18 | interrupts = <19 | 24 | interrupts = <19 |
19 | 19>; | 25 | 19>; |
20 | interrupt-parent = <&intc>; | 26 | interrupt-parent = <&intc>; |
27 | system-power-controller; | ||
21 | }; | 28 | }; |
diff --git a/Documentation/devicetree/bindings/rtc/rtc-opal.txt b/Documentation/devicetree/bindings/rtc/rtc-opal.txt new file mode 100644 index 000000000000..af87e5ecac54 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/rtc-opal.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | IBM OPAL real-time clock | ||
2 | ------------------------ | ||
3 | |||
4 | Required properties: | ||
5 | - comapatible: Should be "ibm,opal-rtc" | ||
6 | |||
7 | Optional properties: | ||
8 | - has-tpo: Decides if the wakeup is supported or not. | ||
9 | |||
10 | Example: | ||
11 | rtc { | ||
12 | compatible = "ibm,opal-rtc"; | ||
13 | has-tpo; | ||
14 | phandle = <0x10000029>; | ||
15 | linux,phandle = <0x10000029>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt b/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt new file mode 100644 index 000000000000..5c52e5eef16d --- /dev/null +++ b/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * BCM63xx UART | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: "brcm,bcm6345-uart" | ||
6 | |||
7 | - reg: The base address of the UART register bank. | ||
8 | |||
9 | - interrupts: A single interrupt specifier. | ||
10 | |||
11 | - clocks: Clock driving the hardware; used to figure out the baud rate | ||
12 | divisor. | ||
13 | |||
14 | Example: | ||
15 | |||
16 | uart0: serial@14e00520 { | ||
17 | compatible = "brcm,bcm6345-uart"; | ||
18 | reg = <0x14e00520 0x18>; | ||
19 | interrupt-parent = <&periph_intc>; | ||
20 | interrupts = <2>; | ||
21 | clocks = <&periph_clk>; | ||
22 | }; | ||
23 | |||
24 | clocks { | ||
25 | periph_clk: periph_clk@0 { | ||
26 | compatible = "fixed-clock"; | ||
27 | #clock-cells = <0>; | ||
28 | clock-frequency = <54000000>; | ||
29 | }; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt index 59a40f18d551..7c408c87e613 100644 --- a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt +++ b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt | |||
@@ -11,8 +11,13 @@ Required properties: | |||
11 | - dma-names: "rx" for RX channel, "tx" for TX channel. | 11 | - dma-names: "rx" for RX channel, "tx" for TX channel. |
12 | 12 | ||
13 | Optional properties: | 13 | Optional properties: |
14 | - fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines, | 14 | - fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines |
15 | for hardware flow control, | ||
15 | it also means you enable the DMA support for this UART. | 16 | it also means you enable the DMA support for this UART. |
17 | - {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD | ||
18 | line respectively. It will use specified PIO instead of the peripheral | ||
19 | function pin for the USART feature. | ||
20 | If unsure, don't specify this property. | ||
16 | 21 | ||
17 | Example: | 22 | Example: |
18 | auart0: serial@8006a000 { | 23 | auart0: serial@8006a000 { |
@@ -21,6 +26,9 @@ auart0: serial@8006a000 { | |||
21 | interrupts = <112>; | 26 | interrupts = <112>; |
22 | dmas = <&dma_apbx 8>, <&dma_apbx 9>; | 27 | dmas = <&dma_apbx 8>, <&dma_apbx 9>; |
23 | dma-names = "rx", "tx"; | 28 | dma-names = "rx", "tx"; |
29 | cts-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; | ||
30 | dsr-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; | ||
31 | dcd-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; | ||
24 | }; | 32 | }; |
25 | 33 | ||
26 | Note: Each auart port should have an alias correctly numbered in "aliases" | 34 | Note: Each auart port should have an alias correctly numbered in "aliases" |
diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt index 8c4fd0332028..b52b98234b9b 100644 --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | - "ns16850" | 10 | - "ns16850" |
11 | - "nvidia,tegra20-uart" | 11 | - "nvidia,tegra20-uart" |
12 | - "nxp,lpc3220-uart" | 12 | - "nxp,lpc3220-uart" |
13 | - "ralink,rt2880-uart" | ||
13 | - "ibm,qpace-nwp-serial" | 14 | - "ibm,qpace-nwp-serial" |
14 | - "altr,16550-FIFO32" | 15 | - "altr,16550-FIFO32" |
15 | - "altr,16550-FIFO64" | 16 | - "altr,16550-FIFO64" |
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt index 5d2e840ae65c..ba3ecb8cb5a1 100644 --- a/Documentation/devicetree/bindings/serial/pl011.txt +++ b/Documentation/devicetree/bindings/serial/pl011.txt | |||
@@ -6,12 +6,46 @@ Required properties: | |||
6 | - interrupts: exactly one interrupt specifier | 6 | - interrupts: exactly one interrupt specifier |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - pinctrl: When present, must have one state named "sleep" | 9 | - pinctrl: |
10 | and one state named "default" | 10 | When present, must have one state named "default", |
11 | - clocks: When present, must refer to exactly one clock named | 11 | and may contain a second name named "sleep". The former |
12 | state sets up pins for ordinary operation whereas | ||
13 | the latter state will put the associated pins to sleep | ||
14 | when the UART is unused | ||
15 | - clocks: | ||
16 | When present, the first clock listed must correspond to | ||
17 | the clock named UARTCLK on the IP block, i.e. the clock | ||
18 | to the external serial line, whereas the second clock | ||
19 | must correspond to the PCLK clocking the internal logic | ||
20 | of the block. Just listing one clock (the first one) is | ||
21 | deprecated. | ||
22 | - clocks-names: | ||
23 | When present, the first clock listed must be named | ||
24 | "uartclk" and the second clock listed must be named | ||
12 | "apb_pclk" | 25 | "apb_pclk" |
13 | - dmas: When present, may have one or two dma channels. | 26 | - dmas: |
27 | When present, may have one or two dma channels. | ||
14 | The first one must be named "rx", the second one | 28 | The first one must be named "rx", the second one |
15 | must be named "tx". | 29 | must be named "tx". |
30 | - auto-poll: | ||
31 | Enables polling when using RX DMA. | ||
32 | - poll-rate-ms: | ||
33 | Rate at which poll occurs when auto-poll is set, | ||
34 | default 100ms. | ||
35 | - poll-timeout-ms: | ||
36 | Poll timeout when auto-poll is set, default | ||
37 | 3000ms. | ||
16 | 38 | ||
17 | See also bindings/arm/primecell.txt | 39 | See also bindings/arm/primecell.txt |
40 | |||
41 | Example: | ||
42 | |||
43 | uart@80120000 { | ||
44 | compatible = "arm,pl011", "arm,primecell"; | ||
45 | reg = <0x80120000 0x1000>; | ||
46 | interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; | ||
47 | dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>; | ||
48 | dma-names = "rx", "tx"; | ||
49 | clocks = <&foo_clk>, <&bar_clk>; | ||
50 | clock-names = "uartclk", "apb_pclk"; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt index ffa5b784c66e..a2114c217376 100644 --- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt +++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt | |||
@@ -27,27 +27,52 @@ Optional properties: | |||
27 | - dmas: Should contain dma specifiers for transmit and receive channels | 27 | - dmas: Should contain dma specifiers for transmit and receive channels |
28 | - dma-names: Should contain "tx" for transmit and "rx" for receive channels | 28 | - dma-names: Should contain "tx" for transmit and "rx" for receive channels |
29 | 29 | ||
30 | Note: Aliases may be defined to ensure the correct ordering of the UARTs. | ||
31 | The alias serialN will result in the UART being assigned port N. If any | ||
32 | serialN alias exists, then an alias must exist for each enabled UART. The | ||
33 | serialN aliases should be in a .dts file instead of in a .dtsi file. | ||
34 | |||
30 | Examples: | 35 | Examples: |
31 | 36 | ||
32 | A uartdm v1.4 device with dma capabilities. | 37 | - A uartdm v1.4 device with dma capabilities. |
33 | 38 | ||
34 | serial@f991e000 { | 39 | serial@f991e000 { |
35 | compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; | 40 | compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; |
36 | reg = <0xf991e000 0x1000>; | 41 | reg = <0xf991e000 0x1000>; |
37 | interrupts = <0 108 0x0>; | 42 | interrupts = <0 108 0x0>; |
38 | clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>; | 43 | clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>; |
39 | clock-names = "core", "iface"; | 44 | clock-names = "core", "iface"; |
40 | dmas = <&dma0 0>, <&dma0 1>; | 45 | dmas = <&dma0 0>, <&dma0 1>; |
41 | dma-names = "tx", "rx"; | 46 | dma-names = "tx", "rx"; |
42 | }; | 47 | }; |
43 | 48 | ||
44 | A uartdm v1.3 device without dma capabilities and part of a GSBI complex. | 49 | - A uartdm v1.3 device without dma capabilities and part of a GSBI complex. |
45 | 50 | ||
46 | serial@19c40000 { | 51 | serial@19c40000 { |
47 | compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; | 52 | compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; |
48 | reg = <0x19c40000 0x1000>, | 53 | reg = <0x19c40000 0x1000>, |
49 | <0x19c00000 0x1000>; | 54 | <0x19c00000 0x1000>; |
50 | interrupts = <0 195 0x0>; | 55 | interrupts = <0 195 0x0>; |
51 | clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>; | 56 | clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>; |
52 | clock-names = "core", "iface"; | 57 | clock-names = "core", "iface"; |
53 | }; | 58 | }; |
59 | |||
60 | - serialN alias. | ||
61 | |||
62 | aliases { | ||
63 | serial0 = &uarta; | ||
64 | serial1 = &uartc; | ||
65 | serial2 = &uartb; | ||
66 | }; | ||
67 | |||
68 | uarta: serial@12490000 { | ||
69 | status = "ok"; | ||
70 | }; | ||
71 | |||
72 | uartb: serial@16340000 { | ||
73 | status = "ok"; | ||
74 | }; | ||
75 | |||
76 | uartc: serial@1a240000 { | ||
77 | status = "ok"; | ||
78 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index b3556609a06f..ae73bb0e9ad9 100644 --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | |||
@@ -4,8 +4,7 @@ Required properties: | |||
4 | 4 | ||
5 | - compatible: Must contain one of the following: | 5 | - compatible: Must contain one of the following: |
6 | 6 | ||
7 | - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. | 7 | - "renesas,scif-r7s72100" for R7S72100 (RZ/A1H) SCIF compatible UART. |
8 | - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART. | ||
9 | - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART. | 8 | - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART. |
10 | - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. | 9 | - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. |
11 | - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. | 10 | - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. |
@@ -20,6 +19,12 @@ Required properties: | |||
20 | - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. | 19 | - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. |
21 | - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. | 20 | - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. |
22 | - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. | 21 | - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. |
22 | - "renesas,scif-r8a7794" for R8A7794 (R-Car E2) SCIF compatible UART. | ||
23 | - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART. | ||
24 | - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART. | ||
25 | - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART. | ||
26 | - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. | ||
27 | - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART. | ||
23 | - "renesas,scif" for generic SCIF compatible UART. | 28 | - "renesas,scif" for generic SCIF compatible UART. |
24 | - "renesas,scifa" for generic SCIFA compatible UART. | 29 | - "renesas,scifa" for generic SCIFA compatible UART. |
25 | - "renesas,scifb" for generic SCIFB compatible UART. | 30 | - "renesas,scifb" for generic SCIFB compatible UART. |
diff --git a/Documentation/devicetree/bindings/serial/sirf-uart.txt b/Documentation/devicetree/bindings/serial/sirf-uart.txt index a2dfc6522a91..3acdd969edf1 100644 --- a/Documentation/devicetree/bindings/serial/sirf-uart.txt +++ b/Documentation/devicetree/bindings/serial/sirf-uart.txt | |||
@@ -1,7 +1,9 @@ | |||
1 | * CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter * | 1 | * CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter * |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : Should be "sirf,prima2-uart" or "sirf, prima2-usp-uart" | 4 | - compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart", |
5 | "sirf,marco-uart" or "sirf,marco-bt-uart" which means | ||
6 | uart located in BT module and used for BT. | ||
5 | - reg : Offset and length of the register set for the device | 7 | - reg : Offset and length of the register set for the device |
6 | - interrupts : Should contain uart interrupt | 8 | - interrupts : Should contain uart interrupt |
7 | - fifosize : Should define hardware rx/tx fifo size | 9 | - fifosize : Should define hardware rx/tx fifo size |
@@ -31,3 +33,15 @@ usp@b0090000 { | |||
31 | rts-gpios = <&gpio 15 0>; | 33 | rts-gpios = <&gpio 15 0>; |
32 | cts-gpios = <&gpio 46 0>; | 34 | cts-gpios = <&gpio 46 0>; |
33 | }; | 35 | }; |
36 | |||
37 | for uart use in BT module, | ||
38 | uart6: uart@11000000 { | ||
39 | cell-index = <6>; | ||
40 | compatible = "sirf,marco-bt-uart", "sirf,marco-uart"; | ||
41 | reg = <0x11000000 0x1000>; | ||
42 | interrupts = <0 100 0>; | ||
43 | clocks = <&clks 138>, <&clks 140>, <&clks 141>; | ||
44 | clock-names = "uart", "general", "noc"; | ||
45 | fifosize = <128>; | ||
46 | status = "disabled"; | ||
47 | } | ||
diff --git a/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt new file mode 100644 index 000000000000..2a00e14e11e0 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt | |||
@@ -0,0 +1,56 @@ | |||
1 | QorIQ DPAA Buffer Manager Portals Device Tree Binding | ||
2 | |||
3 | Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. | ||
4 | |||
5 | CONTENTS | ||
6 | |||
7 | - BMan Portal | ||
8 | - Example | ||
9 | |||
10 | BMan Portal Node | ||
11 | |||
12 | Portals are memory mapped interfaces to BMan that allow low-latency, lock-less | ||
13 | interaction by software running on processor cores, accelerators and network | ||
14 | interfaces with the BMan | ||
15 | |||
16 | PROPERTIES | ||
17 | |||
18 | - compatible | ||
19 | Usage: Required | ||
20 | Value type: <stringlist> | ||
21 | Definition: Must include "fsl,bman-portal-<hardware revision>" | ||
22 | May include "fsl,<SoC>-bman-portal" or "fsl,bman-portal" | ||
23 | |||
24 | - reg | ||
25 | Usage: Required | ||
26 | Value type: <prop-encoded-array> | ||
27 | Definition: Two regions. The first is the cache-enabled region of | ||
28 | the portal. The second is the cache-inhibited region of | ||
29 | the portal | ||
30 | |||
31 | - interrupts | ||
32 | Usage: Required | ||
33 | Value type: <prop-encoded-array> | ||
34 | Definition: Standard property | ||
35 | |||
36 | EXAMPLE | ||
37 | |||
38 | The example below shows a (P4080) BMan portals container/bus node with two portals | ||
39 | |||
40 | bman-portals@ff4000000 { | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <1>; | ||
43 | compatible = "simple-bus"; | ||
44 | ranges = <0 0xf 0xf4000000 0x200000>; | ||
45 | |||
46 | bman-portal@0 { | ||
47 | compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal"; | ||
48 | reg = <0x0 0x4000>, <0x100000 0x1000>; | ||
49 | interrupts = <105 2 0 0>; | ||
50 | }; | ||
51 | bman-portal@4000 { | ||
52 | compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal"; | ||
53 | reg = <0x4000 0x4000>, <0x101000 0x1000>; | ||
54 | interrupts = <107 2 0 0>; | ||
55 | }; | ||
56 | }; | ||
diff --git a/Documentation/devicetree/bindings/soc/fsl/bman.txt b/Documentation/devicetree/bindings/soc/fsl/bman.txt new file mode 100644 index 000000000000..9f80bf8709ac --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/bman.txt | |||
@@ -0,0 +1,125 @@ | |||
1 | QorIQ DPAA Buffer Manager Device Tree Bindings | ||
2 | |||
3 | Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. | ||
4 | |||
5 | CONTENTS | ||
6 | |||
7 | - BMan Node | ||
8 | - BMan Private Memory Node | ||
9 | - Example | ||
10 | |||
11 | BMan Node | ||
12 | |||
13 | The Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA). | ||
14 | BMan supports hardware allocation and deallocation of buffers belonging to pools | ||
15 | originally created by software with configurable depletion thresholds. This | ||
16 | binding covers the CCSR space programming model | ||
17 | |||
18 | PROPERTIES | ||
19 | |||
20 | - compatible | ||
21 | Usage: Required | ||
22 | Value type: <stringlist> | ||
23 | Definition: Must include "fsl,bman" | ||
24 | May include "fsl,<SoC>-bman" | ||
25 | |||
26 | - reg | ||
27 | Usage: Required | ||
28 | Value type: <prop-encoded-array> | ||
29 | Definition: Registers region within the CCSR address space | ||
30 | |||
31 | The BMan revision information is located in the BMAN_IP_REV_1/2 registers which | ||
32 | are located at offsets 0xbf8 and 0xbfc | ||
33 | |||
34 | - interrupts | ||
35 | Usage: Required | ||
36 | Value type: <prop-encoded-array> | ||
37 | Definition: Standard property. The error interrupt | ||
38 | |||
39 | - fsl,liodn | ||
40 | Usage: See pamu.txt | ||
41 | Value type: <prop-encoded-array> | ||
42 | Definition: PAMU property used for static LIODN assignment | ||
43 | |||
44 | - fsl,iommu-parent | ||
45 | Usage: See pamu.txt | ||
46 | Value type: <phandle> | ||
47 | Definition: PAMU property used for dynamic LIODN assignment | ||
48 | |||
49 | For additional details about the PAMU/LIODN binding(s) see pamu.txt | ||
50 | |||
51 | Devices connected to a BMan instance via Direct Connect Portals (DCP) must link | ||
52 | to the respective BMan instance | ||
53 | |||
54 | - fsl,bman | ||
55 | Usage: Required | ||
56 | Value type: <prop-encoded-array> | ||
57 | Description: List of phandle and DCP index pairs, to the BMan instance | ||
58 | to which this device is connected via the DCP | ||
59 | |||
60 | BMan Private Memory Node | ||
61 | |||
62 | BMan requires a contiguous range of physical memory used for the backing store | ||
63 | for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as a | ||
64 | node under the /reserved-memory node | ||
65 | |||
66 | The BMan FBPR memory node must be named "bman-fbpr" | ||
67 | |||
68 | PROPERTIES | ||
69 | |||
70 | - compatible | ||
71 | Usage: required | ||
72 | Value type: <stringlist> | ||
73 | Definition: Must inclide "fsl,bman-fbpr" | ||
74 | |||
75 | The following constraints are relevant to the FBPR private memory: | ||
76 | - The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to | ||
77 | 16 GiB | ||
78 | - The alignment must be a muliptle of the memory size | ||
79 | |||
80 | The size of the FBPR must be chosen by observing the hardware features configured | ||
81 | via the Reset Configuration Word (RCW) and that are relevant to a specific board | ||
82 | (e.g. number of MAC(s) pinned-out, number of offline/host command FMan ports, | ||
83 | etc.). The size configured in the DT must reflect the hardware capabilities and | ||
84 | not the specific needs of an application | ||
85 | |||
86 | For additional details about reserved memory regions see reserved-memory.txt | ||
87 | |||
88 | EXAMPLE | ||
89 | |||
90 | The example below shows a BMan FBPR dynamic allocation memory node | ||
91 | |||
92 | reserved-memory { | ||
93 | #address-cells = <2>; | ||
94 | #size-cells = <2>; | ||
95 | ranges; | ||
96 | |||
97 | bman_fbpr: bman-fbpr { | ||
98 | compatible = "fsl,bman-fbpr"; | ||
99 | alloc-ranges = <0 0 0xf 0xffffffff>; | ||
100 | size = <0 0x1000000>; | ||
101 | alignment = <0 0x1000000>; | ||
102 | }; | ||
103 | }; | ||
104 | |||
105 | The example below shows a (P4080) BMan CCSR-space node | ||
106 | |||
107 | crypto@300000 { | ||
108 | ... | ||
109 | fsl,bman = <&bman, 2>; | ||
110 | ... | ||
111 | }; | ||
112 | |||
113 | bman: bman@31a000 { | ||
114 | compatible = "fsl,bman"; | ||
115 | reg = <0x31a000 0x1000>; | ||
116 | interrupts = <16 2 1 2>; | ||
117 | fsl,liodn = <0x17>; | ||
118 | memory-region = <&bman_fbpr>; | ||
119 | }; | ||
120 | |||
121 | fman@400000 { | ||
122 | ... | ||
123 | fsl,bman = <&bman, 0>; | ||
124 | ... | ||
125 | }; | ||
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt new file mode 100644 index 000000000000..48c4dae5d6f9 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt | |||
@@ -0,0 +1,154 @@ | |||
1 | QorIQ DPAA Queue Manager Portals Device Tree Binding | ||
2 | |||
3 | Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. | ||
4 | |||
5 | CONTENTS | ||
6 | |||
7 | - QMan Portal | ||
8 | - QMan Pool Channel | ||
9 | - Example | ||
10 | |||
11 | QMan Portal Node | ||
12 | |||
13 | Portals are memory mapped interfaces to QMan that allow low-latency, lock-less | ||
14 | interaction by software running on processor cores, accelerators and network | ||
15 | interfaces with the QMan | ||
16 | |||
17 | PROPERTIES | ||
18 | |||
19 | - compatible | ||
20 | Usage: Required | ||
21 | Value type: <stringlist> | ||
22 | Definition: Must include "fsl,qman-portal-<hardware revision>" | ||
23 | May include "fsl,<SoC>-qman-portal" or "fsl,qman-portal" | ||
24 | |||
25 | - reg | ||
26 | Usage: Required | ||
27 | Value type: <prop-encoded-array> | ||
28 | Definition: Two regions. The first is the cache-enabled region of | ||
29 | the portal. The second is the cache-inhibited region of | ||
30 | the portal | ||
31 | |||
32 | - interrupts | ||
33 | Usage: Required | ||
34 | Value type: <prop-encoded-array> | ||
35 | Definition: Standard property | ||
36 | |||
37 | - fsl,liodn | ||
38 | Usage: See pamu.txt | ||
39 | Value type: <prop-encoded-array> | ||
40 | Definition: Two LIODN(s). DQRR LIODN (DLIODN) and Frame LIODN | ||
41 | (FLIODN) | ||
42 | |||
43 | - fsl,iommu-parent | ||
44 | Usage: See pamu.txt | ||
45 | Value type: <phandle> | ||
46 | Definition: PAMU property used for dynamic LIODN assignment | ||
47 | |||
48 | For additional details about the PAMU/LIODN binding(s) see pamu.txt | ||
49 | |||
50 | - fsl,qman-channel-id | ||
51 | Usage: Required | ||
52 | Value type: <u32> | ||
53 | Definition: The hardware index of the channel. This can also be | ||
54 | determined by dividing any of the channel's 8 work queue | ||
55 | IDs by 8 | ||
56 | |||
57 | In addition to these properties the qman-portals should have sub-nodes to | ||
58 | represent the HW devices/portals that are connected to the software portal | ||
59 | described here | ||
60 | |||
61 | The currently supported sub-nodes are: | ||
62 | * fman0 | ||
63 | * fman1 | ||
64 | * pme | ||
65 | * crypto | ||
66 | |||
67 | These subnodes should have the following properties: | ||
68 | |||
69 | - fsl,liodn | ||
70 | Usage: See pamu.txt | ||
71 | Value type: <prop-encoded-array> | ||
72 | Definition: PAMU property used for static LIODN assignment | ||
73 | |||
74 | - fsl,iommu-parent | ||
75 | Usage: See pamu.txt | ||
76 | Value type: <phandle> | ||
77 | Definition: PAMU property used for dynamic LIODN assignment | ||
78 | |||
79 | - dev-handle | ||
80 | Usage: Required | ||
81 | Value type: <phandle> | ||
82 | Definition: The phandle to the particular hardware device that this | ||
83 | portal is connected to. | ||
84 | |||
85 | DPAA QMan Pool Channel Nodes | ||
86 | |||
87 | Pool Channels are defined with the following properties. | ||
88 | |||
89 | PROPERTIES | ||
90 | |||
91 | - compatible | ||
92 | Usage: Required | ||
93 | Value type: <stringlist> | ||
94 | Definition: Must include "fsl,qman-pool-channel" | ||
95 | May include "fsl,<SoC>-qman-pool-channel" | ||
96 | |||
97 | - fsl,qman-channel-id | ||
98 | Usage: Required | ||
99 | Value type: <u32> | ||
100 | Definition: The hardware index of the channel. This can also be | ||
101 | determined by dividing any of the channel's 8 work queue | ||
102 | IDs by 8 | ||
103 | |||
104 | EXAMPLE | ||
105 | |||
106 | The example below shows a (P4080) QMan portals container/bus node with two portals | ||
107 | |||
108 | qman-portals@ff4200000 { | ||
109 | #address-cells = <1>; | ||
110 | #size-cells = <1>; | ||
111 | compatible = "simple-bus"; | ||
112 | ranges = <0 0xf 0xf4200000 0x200000>; | ||
113 | |||
114 | qman-portal@0 { | ||
115 | compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal"; | ||
116 | reg = <0 0x4000>, <0x100000 0x1000>; | ||
117 | interrupts = <104 2 0 0>; | ||
118 | fsl,liodn = <1 2>; | ||
119 | fsl,qman-channel-id = <0>; | ||
120 | |||
121 | fman0 { | ||
122 | fsl,liodn = <0x21>; | ||
123 | dev-handle = <&fman0>; | ||
124 | }; | ||
125 | fman1 { | ||
126 | fsl,liodn = <0xa1>; | ||
127 | dev-handle = <&fman1>; | ||
128 | }; | ||
129 | crypto { | ||
130 | fsl,liodn = <0x41 0x66>; | ||
131 | dev-handle = <&crypto>; | ||
132 | }; | ||
133 | }; | ||
134 | qman-portal@4000 { | ||
135 | compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal"; | ||
136 | reg = <0x4000 0x4000>, <0x101000 0x1000>; | ||
137 | interrupts = <106 2 0 0>; | ||
138 | fsl,liodn = <3 4>; | ||
139 | fsl,qman-channel-id = <1>; | ||
140 | |||
141 | fman0 { | ||
142 | fsl,liodn = <0x22>; | ||
143 | dev-handle = <&fman0>; | ||
144 | }; | ||
145 | fman1 { | ||
146 | fsl,liodn = <0xa2>; | ||
147 | dev-handle = <&fman1>; | ||
148 | }; | ||
149 | crypto { | ||
150 | fsl,liodn = <0x42 0x67>; | ||
151 | dev-handle = <&crypto>; | ||
152 | }; | ||
153 | }; | ||
154 | }; | ||
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman.txt b/Documentation/devicetree/bindings/soc/fsl/qman.txt new file mode 100644 index 000000000000..063e3a0b9d04 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/qman.txt | |||
@@ -0,0 +1,165 @@ | |||
1 | QorIQ DPAA Queue Manager Device Tree Binding | ||
2 | |||
3 | Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. | ||
4 | |||
5 | CONTENTS | ||
6 | |||
7 | - QMan Node | ||
8 | - QMan Private Memory Nodes | ||
9 | - Example | ||
10 | |||
11 | QMan Node | ||
12 | |||
13 | The Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan | ||
14 | supports queuing and QoS scheduling of frames to CPUs, network interfaces and | ||
15 | DPAA logic modules, maintains packet ordering within flows. Besides providing | ||
16 | flow-level queuing, is also responsible for congestion management functions such | ||
17 | as RED/WRED, congestion notifications and tail discards. This binding covers the | ||
18 | CCSR space programming model | ||
19 | |||
20 | PROPERTIES | ||
21 | |||
22 | - compatible | ||
23 | Usage: Required | ||
24 | Value type: <stringlist> | ||
25 | Definition: Must include "fsl,qman" | ||
26 | May include "fsl,<SoC>-qman" | ||
27 | |||
28 | - reg | ||
29 | Usage: Required | ||
30 | Value type: <prop-encoded-array> | ||
31 | Definition: Registers region within the CCSR address space | ||
32 | |||
33 | The QMan revision information is located in the QMAN_IP_REV_1/2 registers which | ||
34 | are located at offsets 0xbf8 and 0xbfc | ||
35 | |||
36 | - interrupts | ||
37 | Usage: Required | ||
38 | Value type: <prop-encoded-array> | ||
39 | Definition: Standard property. The error interrupt | ||
40 | |||
41 | - fsl,liodn | ||
42 | Usage: See pamu.txt | ||
43 | Value type: <prop-encoded-array> | ||
44 | Definition: PAMU property used for static LIODN assignment | ||
45 | |||
46 | - fsl,iommu-parent | ||
47 | Usage: See pamu.txt | ||
48 | Value type: <phandle> | ||
49 | Definition: PAMU property used for dynamic LIODN assignment | ||
50 | |||
51 | For additional details about the PAMU/LIODN binding(s) see pamu.txt | ||
52 | |||
53 | - clocks | ||
54 | Usage: See clock-bindings.txt and qoriq-clock.txt | ||
55 | Value type: <prop-encoded-array> | ||
56 | Definition: Reference input clock. Its frequency is half of the | ||
57 | platform clock | ||
58 | |||
59 | Devices connected to a QMan instance via Direct Connect Portals (DCP) must link | ||
60 | to the respective QMan instance | ||
61 | |||
62 | - fsl,qman | ||
63 | Usage: Required | ||
64 | Value type: <prop-encoded-array> | ||
65 | Description: List of phandle and DCP index pairs, to the QMan instance | ||
66 | to which this device is connected via the DCP | ||
67 | |||
68 | QMan Private Memory Nodes | ||
69 | |||
70 | QMan requires two contiguous range of physical memory used for the backing store | ||
71 | for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR). | ||
72 | This memory is reserved/allocated as a nodes under the /reserved-memory node | ||
73 | |||
74 | The QMan FQD memory node must be named "qman-fqd" | ||
75 | |||
76 | PROPERTIES | ||
77 | |||
78 | - compatible | ||
79 | Usage: required | ||
80 | Value type: <stringlist> | ||
81 | Definition: Must inclide "fsl,qman-fqd" | ||
82 | |||
83 | The QMan PFDR memory node must be named "qman-pfdr" | ||
84 | |||
85 | PROPERTIES | ||
86 | |||
87 | - compatible | ||
88 | Usage: required | ||
89 | Value type: <stringlist> | ||
90 | Definition: Must inclide "fsl,qman-pfdr" | ||
91 | |||
92 | The following constraints are relevant to the FQD and PFDR private memory: | ||
93 | - The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to | ||
94 | 1 GiB | ||
95 | - The alignment must be a muliptle of the memory size | ||
96 | |||
97 | The size of the FQD and PFDP must be chosen by observing the hardware features | ||
98 | configured via the Reset Configuration Word (RCW) and that are relevant to a | ||
99 | specific board (e.g. number of MAC(s) pinned-out, number of offline/host command | ||
100 | FMan ports, etc.). The size configured in the DT must reflect the hardware | ||
101 | capabilities and not the specific needs of an application | ||
102 | |||
103 | For additional details about reserved memory regions see reserved-memory.txt | ||
104 | |||
105 | EXAMPLE | ||
106 | |||
107 | The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes | ||
108 | |||
109 | reserved-memory { | ||
110 | #address-cells = <2>; | ||
111 | #size-cells = <2>; | ||
112 | ranges; | ||
113 | |||
114 | qman_fqd: qman-fqd { | ||
115 | compatible = "fsl,qman-fqd"; | ||
116 | alloc-ranges = <0 0 0xf 0xffffffff>; | ||
117 | size = <0 0x400000>; | ||
118 | alignment = <0 0x400000>; | ||
119 | }; | ||
120 | qman_pfdr: qman-pfdr { | ||
121 | compatible = "fsl,qman-pfdr"; | ||
122 | alloc-ranges = <0 0 0xf 0xffffffff>; | ||
123 | size = <0 0x2000000>; | ||
124 | alignment = <0 0x2000000>; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | The example below shows a (P4080) QMan CCSR-space node | ||
129 | |||
130 | clockgen: global-utilities@e1000 { | ||
131 | ... | ||
132 | sysclk: sysclk { | ||
133 | ... | ||
134 | }; | ||
135 | ... | ||
136 | platform_pll: platform-pll@c00 { | ||
137 | #clock-cells = <1>; | ||
138 | reg = <0xc00 0x4>; | ||
139 | compatible = "fsl,qoriq-platform-pll-1.0"; | ||
140 | clocks = <&sysclk>; | ||
141 | clock-output-names = "platform-pll", "platform-pll-div2"; | ||
142 | }; | ||
143 | ... | ||
144 | }; | ||
145 | |||
146 | crypto@300000 { | ||
147 | ... | ||
148 | fsl,qman = <&qman, 2>; | ||
149 | ... | ||
150 | }; | ||
151 | |||
152 | qman: qman@318000 { | ||
153 | compatible = "fsl,qman"; | ||
154 | reg = <0x318000 0x1000>; | ||
155 | interrupts = <16 2 1 3> | ||
156 | fsl,liodn = <0x16>; | ||
157 | memory-region = <&qman_fqd &qman_pfdr>; | ||
158 | clocks = <&platform_pll 1>; | ||
159 | }; | ||
160 | |||
161 | fman@400000 { | ||
162 | ... | ||
163 | fsl,qman = <&qman, 0>; | ||
164 | ... | ||
165 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/arndale.txt b/Documentation/devicetree/bindings/sound/arndale.txt new file mode 100644 index 000000000000..0e76946385ae --- /dev/null +++ b/Documentation/devicetree/bindings/sound/arndale.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Audio Binding for Arndale boards | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Can be the following, | ||
5 | "samsung,arndale-rt5631" | ||
6 | |||
7 | - samsung,audio-cpu: The phandle of the Samsung I2S controller | ||
8 | - samsung,audio-codec: The phandle of the audio codec | ||
9 | |||
10 | Optional: | ||
11 | - samsung,model: The name of the sound-card | ||
12 | |||
13 | Arndale Boards has many audio daughter cards, one of them is | ||
14 | rt5631/alc5631. Below example shows audio bindings for rt5631/ | ||
15 | alc5631 based codec. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | sound { | ||
20 | compatible = "samsung,arndale-rt5631"; | ||
21 | |||
22 | samsung,audio-cpu = <&i2s0> | ||
23 | samsung,audio-codec = <&rt5631>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt index 60ca07996458..46bc9829c71a 100644 --- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | |||
@@ -32,7 +32,7 @@ Optional properties: | |||
32 | - rx-num-evt : FIFO levels. | 32 | - rx-num-evt : FIFO levels. |
33 | - sram-size-playback : size of sram to be allocated during playback | 33 | - sram-size-playback : size of sram to be allocated during playback |
34 | - sram-size-capture : size of sram to be allocated during capture | 34 | - sram-size-capture : size of sram to be allocated during capture |
35 | - interrupts : Interrupt numbers for McASP, currently not used by the driver | 35 | - interrupts : Interrupt numbers for McASP |
36 | - interrupt-names : Known interrupt names are "tx" and "rx" | 36 | - interrupt-names : Known interrupt names are "tx" and "rx" |
37 | - pinctrl-0: Should specify pin control group used for this controller. | 37 | - pinctrl-0: Should specify pin control group used for this controller. |
38 | - pinctrl-names: Should contain only one value - "default", for more details | 38 | - pinctrl-names: Should contain only one value - "default", for more details |
diff --git a/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt index 0d7985c864af..6dfa88c4dc1e 100644 --- a/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt +++ b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt | |||
@@ -1,11 +1,16 @@ | |||
1 | Audio complex for Eukrea boards with tlv320aic23 codec. | 1 | Audio complex for Eukrea boards with tlv320aic23 codec. |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "eukrea,asoc-tlv320" | 4 | |
5 | - eukrea,model : The user-visible name of this sound complex. | 5 | - compatible : "eukrea,asoc-tlv320" |
6 | - ssi-controller : The phandle of the SSI controller. | 6 | |
7 | - fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX). | 7 | - eukrea,model : The user-visible name of this sound complex. |
8 | - fsl,mux-ext-port : The external port of the i.MX audio muxer. | 8 | |
9 | - ssi-controller : The phandle of the SSI controller. | ||
10 | |||
11 | - fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX). | ||
12 | |||
13 | - fsl,mux-ext-port : The external port of the i.MX audio muxer. | ||
9 | 14 | ||
10 | Note: The AUDMUX port numbering should start at 1, which is consistent with | 15 | Note: The AUDMUX port numbering should start at 1, which is consistent with |
11 | hardware manual. | 16 | hardware manual. |
diff --git a/Documentation/devicetree/bindings/sound/fsl,esai.txt b/Documentation/devicetree/bindings/sound/fsl,esai.txt index 52f5b6bf3e8e..d3b6b5f48010 100644 --- a/Documentation/devicetree/bindings/sound/fsl,esai.txt +++ b/Documentation/devicetree/bindings/sound/fsl,esai.txt | |||
@@ -7,37 +7,39 @@ other DSPs. It has up to six transmitters and four receivers. | |||
7 | 7 | ||
8 | Required properties: | 8 | Required properties: |
9 | 9 | ||
10 | - compatible : Compatible list, must contain "fsl,imx35-esai" or | 10 | - compatible : Compatible list, must contain "fsl,imx35-esai" or |
11 | "fsl,vf610-esai" | 11 | "fsl,vf610-esai" |
12 | 12 | ||
13 | - reg : Offset and length of the register set for the device. | 13 | - reg : Offset and length of the register set for the device. |
14 | 14 | ||
15 | - interrupts : Contains the spdif interrupt. | 15 | - interrupts : Contains the spdif interrupt. |
16 | 16 | ||
17 | - dmas : Generic dma devicetree binding as described in | 17 | - dmas : Generic dma devicetree binding as described in |
18 | Documentation/devicetree/bindings/dma/dma.txt. | 18 | Documentation/devicetree/bindings/dma/dma.txt. |
19 | 19 | ||
20 | - dma-names : Two dmas have to be defined, "tx" and "rx". | 20 | - dma-names : Two dmas have to be defined, "tx" and "rx". |
21 | 21 | ||
22 | - clocks: Contains an entry for each entry in clock-names. | 22 | - clocks : Contains an entry for each entry in clock-names. |
23 | 23 | ||
24 | - clock-names : Includes the following entries: | 24 | - clock-names : Includes the following entries: |
25 | "core" The core clock used to access registers | 25 | "core" The core clock used to access registers |
26 | "extal" The esai baud clock for esai controller used to derive | 26 | "extal" The esai baud clock for esai controller used to |
27 | HCK, SCK and FS. | 27 | derive HCK, SCK and FS. |
28 | "fsys" The system clock derived from ahb clock used to derive | 28 | "fsys" The system clock derived from ahb clock used to |
29 | HCK, SCK and FS. | 29 | derive HCK, SCK and FS. |
30 | 30 | ||
31 | - fsl,fifo-depth: The number of elements in the transmit and receive FIFOs. | 31 | - fsl,fifo-depth : The number of elements in the transmit and receive |
32 | This number is the maximum allowed value for TFCR[TFWM] or RFCR[RFWM]. | 32 | FIFOs. This number is the maximum allowed value for |
33 | TFCR[TFWM] or RFCR[RFWM]. | ||
33 | 34 | ||
34 | - fsl,esai-synchronous: This is a boolean property. If present, indicating | 35 | - fsl,esai-synchronous: This is a boolean property. If present, indicating |
35 | that ESAI would work in the synchronous mode, which means all the settings | 36 | that ESAI would work in the synchronous mode, which |
36 | for Receiving would be duplicated from Transmition related registers. | 37 | means all the settings for Receiving would be |
38 | duplicated from Transmition related registers. | ||
37 | 39 | ||
38 | - big-endian : If this property is absent, the native endian mode will | 40 | - big-endian : If this property is absent, the native endian mode |
39 | be in use as default, or the big endian mode will be in use for all the | 41 | will be in use as default, or the big endian mode |
40 | device registers. | 42 | will be in use for all the device registers. |
41 | 43 | ||
42 | Example: | 44 | Example: |
43 | 45 | ||
diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.txt b/Documentation/devicetree/bindings/sound/fsl,spdif.txt index 3e9e82c8eab3..b5ee32ee3706 100644 --- a/Documentation/devicetree/bindings/sound/fsl,spdif.txt +++ b/Documentation/devicetree/bindings/sound/fsl,spdif.txt | |||
@@ -6,32 +6,31 @@ a fibre cable. | |||
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | 8 | ||
9 | - compatible : Compatible list, must contain "fsl,imx35-spdif". | 9 | - compatible : Compatible list, must contain "fsl,imx35-spdif". |
10 | 10 | ||
11 | - reg : Offset and length of the register set for the device. | 11 | - reg : Offset and length of the register set for the device. |
12 | 12 | ||
13 | - interrupts : Contains the spdif interrupt. | 13 | - interrupts : Contains the spdif interrupt. |
14 | 14 | ||
15 | - dmas : Generic dma devicetree binding as described in | 15 | - dmas : Generic dma devicetree binding as described in |
16 | Documentation/devicetree/bindings/dma/dma.txt. | 16 | Documentation/devicetree/bindings/dma/dma.txt. |
17 | 17 | ||
18 | - dma-names : Two dmas have to be defined, "tx" and "rx". | 18 | - dma-names : Two dmas have to be defined, "tx" and "rx". |
19 | 19 | ||
20 | - clocks : Contains an entry for each entry in clock-names. | 20 | - clocks : Contains an entry for each entry in clock-names. |
21 | 21 | ||
22 | - clock-names : Includes the following entries: | 22 | - clock-names : Includes the following entries: |
23 | "core" The core clock of spdif controller | 23 | "core" The core clock of spdif controller. |
24 | "rxtx<0-7>" Clock source list for tx and rx clock. | 24 | "rxtx<0-7>" Clock source list for tx and rx clock. |
25 | This clock list should be identical to | 25 | This clock list should be identical to the source |
26 | the source list connecting to the spdif | 26 | list connecting to the spdif clock mux in "SPDIF |
27 | clock mux in "SPDIF Transceiver Clock | 27 | Transceiver Clock Diagram" of SoC reference manual. |
28 | Diagram" of SoC reference manual. It | 28 | It can also be referred to TxClk_Source bit of |
29 | can also be referred to TxClk_Source | 29 | register SPDIF_STC. |
30 | bit of register SPDIF_STC. | ||
31 | 30 | ||
32 | - big-endian : If this property is absent, the native endian mode will | 31 | - big-endian : If this property is absent, the native endian mode |
33 | be in use as default, or the big endian mode will be in use for all the | 32 | will be in use as default, or the big endian mode |
34 | device registers. | 33 | will be in use for all the device registers. |
35 | 34 | ||
36 | Example: | 35 | Example: |
37 | 36 | ||
diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index 4956b14d4b06..044e5d76e2dd 100644 --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt | |||
@@ -5,32 +5,48 @@ which provides a synchronous audio interface that supports fullduplex | |||
5 | serial interfaces with frame synchronization such as I2S, AC97, TDM, and | 5 | serial interfaces with frame synchronization such as I2S, AC97, TDM, and |
6 | codec/DSP interfaces. | 6 | codec/DSP interfaces. |
7 | 7 | ||
8 | |||
9 | Required properties: | 8 | Required properties: |
10 | - compatible: Compatible list, contains "fsl,vf610-sai" or "fsl,imx6sx-sai". | 9 | |
11 | - reg: Offset and length of the register set for the device. | 10 | - compatible : Compatible list, contains "fsl,vf610-sai" or |
12 | - clocks: Must contain an entry for each entry in clock-names. | 11 | "fsl,imx6sx-sai". |
13 | - clock-names : Must include the "bus" for register access and "mclk1" "mclk2" | 12 | |
14 | "mclk3" for bit clock and frame clock providing. | 13 | - reg : Offset and length of the register set for the device. |
15 | - dmas : Generic dma devicetree binding as described in | 14 | |
16 | Documentation/devicetree/bindings/dma/dma.txt. | 15 | - clocks : Must contain an entry for each entry in clock-names. |
17 | - dma-names : Two dmas have to be defined, "tx" and "rx". | 16 | |
18 | - pinctrl-names: Must contain a "default" entry. | 17 | - clock-names : Must include the "bus" for register access and |
19 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. | 18 | "mclk1", "mclk2", "mclk3" for bit clock and frame |
20 | See ../pinctrl/pinctrl-bindings.txt for details of the property values. | 19 | clock providing. |
21 | - big-endian: Boolean property, required if all the FTM_PWM registers | 20 | - dmas : Generic dma devicetree binding as described in |
22 | are big-endian rather than little-endian. | 21 | Documentation/devicetree/bindings/dma/dma.txt. |
23 | - lsb-first: Configures whether the LSB or the MSB is transmitted first for | 22 | |
24 | the fifo data. If this property is absent, the MSB is transmitted first as | 23 | - dma-names : Two dmas have to be defined, "tx" and "rx". |
25 | default, or the LSB is transmitted first. | 24 | |
26 | - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating | 25 | - pinctrl-names : Must contain a "default" entry. |
27 | that SAI will work in the synchronous mode (sync Tx with Rx) which means | 26 | |
28 | both the transimitter and receiver will send and receive data by following | 27 | - pinctrl-NNN : One property must exist for each entry in |
29 | receiver's bit clocks and frame sync clocks. | 28 | pinctrl-names. See ../pinctrl/pinctrl-bindings.txt |
30 | - fsl,sai-asynchronous: This is a boolean property. If present, indicating | 29 | for details of the property values. |
31 | that SAI will work in the asynchronous mode, which means both transimitter | 30 | |
32 | and receiver will send and receive data by following their own bit clocks | 31 | - big-endian : Boolean property, required if all the FTM_PWM |
33 | and frame sync clocks separately. | 32 | registers are big-endian rather than little-endian. |
33 | |||
34 | - lsb-first : Configures whether the LSB or the MSB is transmitted | ||
35 | first for the fifo data. If this property is absent, | ||
36 | the MSB is transmitted first as default, or the LSB | ||
37 | is transmitted first. | ||
38 | |||
39 | - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating | ||
40 | that SAI will work in the synchronous mode (sync Tx | ||
41 | with Rx) which means both the transimitter and the | ||
42 | receiver will send and receive data by following | ||
43 | receiver's bit clocks and frame sync clocks. | ||
44 | |||
45 | - fsl,sai-asynchronous: This is a boolean property. If present, indicating | ||
46 | that SAI will work in the asynchronous mode, which | ||
47 | means both transimitter and receiver will send and | ||
48 | receive data by following their own bit clocks and | ||
49 | frame sync clocks separately. | ||
34 | 50 | ||
35 | Note: | 51 | Note: |
36 | - If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the | 52 | - If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the |
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt index e4acdd891e49..2f89db88fd57 100644 --- a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt | |||
@@ -1,33 +1,40 @@ | |||
1 | Freescale i.MX audio complex with SGTL5000 codec | 1 | Freescale i.MX audio complex with SGTL5000 codec |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "fsl,imx-audio-sgtl5000" | 4 | |
5 | - model : The user-visible name of this sound complex | 5 | - compatible : "fsl,imx-audio-sgtl5000" |
6 | - ssi-controller : The phandle of the i.MX SSI controller | 6 | |
7 | - audio-codec : The phandle of the SGTL5000 audio codec | 7 | - model : The user-visible name of this sound complex |
8 | - audio-routing : A list of the connections between audio components. | 8 | |
9 | Each entry is a pair of strings, the first being the connection's sink, | 9 | - ssi-controller : The phandle of the i.MX SSI controller |
10 | the second being the connection's source. Valid names could be power | 10 | |
11 | supplies, SGTL5000 pins, and the jacks on the board: | 11 | - audio-codec : The phandle of the SGTL5000 audio codec |
12 | 12 | ||
13 | Power supplies: | 13 | - audio-routing : A list of the connections between audio components. |
14 | * Mic Bias | 14 | Each entry is a pair of strings, the first being the |
15 | 15 | connection's sink, the second being the connection's | |
16 | SGTL5000 pins: | 16 | source. Valid names could be power supplies, SGTL5000 |
17 | * MIC_IN | 17 | pins, and the jacks on the board: |
18 | * LINE_IN | 18 | |
19 | * HP_OUT | 19 | Power supplies: |
20 | * LINE_OUT | 20 | * Mic Bias |
21 | 21 | ||
22 | Board connectors: | 22 | SGTL5000 pins: |
23 | * Mic Jack | 23 | * MIC_IN |
24 | * Line In Jack | 24 | * LINE_IN |
25 | * Headphone Jack | 25 | * HP_OUT |
26 | * Line Out Jack | 26 | * LINE_OUT |
27 | * Ext Spk | 27 | |
28 | 28 | Board connectors: | |
29 | - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) | 29 | * Mic Jack |
30 | - mux-ext-port : The external port of the i.MX audio muxer | 30 | * Line In Jack |
31 | * Headphone Jack | ||
32 | * Line Out Jack | ||
33 | * Ext Spk | ||
34 | |||
35 | - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) | ||
36 | |||
37 | - mux-ext-port : The external port of the i.MX audio muxer | ||
31 | 38 | ||
32 | Note: The AUDMUX port numbering should start at 1, which is consistent with | 39 | Note: The AUDMUX port numbering should start at 1, which is consistent with |
33 | hardware manual. | 40 | hardware manual. |
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt index 7d13479f9c3c..da84a442ccea 100644 --- a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt +++ b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt | |||
@@ -2,23 +2,25 @@ Freescale i.MX audio complex with S/PDIF transceiver | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : "fsl,imx-audio-spdif" | 5 | - compatible : "fsl,imx-audio-spdif" |
6 | 6 | ||
7 | - model : The user-visible name of this sound complex | 7 | - model : The user-visible name of this sound complex |
8 | 8 | ||
9 | - spdif-controller : The phandle of the i.MX S/PDIF controller | 9 | - spdif-controller : The phandle of the i.MX S/PDIF controller |
10 | 10 | ||
11 | 11 | ||
12 | Optional properties: | 12 | Optional properties: |
13 | 13 | ||
14 | - spdif-out : This is a boolean property. If present, the transmitting | 14 | - spdif-out : This is a boolean property. If present, the |
15 | function of S/PDIF will be enabled, indicating there's a physical | 15 | transmitting function of S/PDIF will be enabled, |
16 | S/PDIF out connector/jack on the board or it's connecting to some | 16 | indicating there's a physical S/PDIF out connector |
17 | other IP block, such as an HDMI encoder/display-controller. | 17 | or jack on the board or it's connecting to some |
18 | other IP block, such as an HDMI encoder or | ||
19 | display-controller. | ||
18 | 20 | ||
19 | - spdif-in : This is a boolean property. If present, the receiving | 21 | - spdif-in : This is a boolean property. If present, the receiving |
20 | function of S/PDIF will be enabled, indicating there's a physical | 22 | function of S/PDIF will be enabled, indicating there |
21 | S/PDIF in connector/jack on the board. | 23 | is a physical S/PDIF in connector/jack on the board. |
22 | 24 | ||
23 | * Note: At least one of these two properties should be set in the DT binding. | 25 | * Note: At least one of these two properties should be set in the DT binding. |
24 | 26 | ||
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt index f49450a87890..acea71bee34f 100644 --- a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt +++ b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt | |||
@@ -1,25 +1,32 @@ | |||
1 | Freescale i.MX audio complex with WM8962 codec | 1 | Freescale i.MX audio complex with WM8962 codec |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "fsl,imx-audio-wm8962" | 4 | |
5 | - model : The user-visible name of this sound complex | 5 | - compatible : "fsl,imx-audio-wm8962" |
6 | - ssi-controller : The phandle of the i.MX SSI controller | 6 | |
7 | - audio-codec : The phandle of the WM8962 audio codec | 7 | - model : The user-visible name of this sound complex |
8 | - audio-routing : A list of the connections between audio components. | 8 | |
9 | Each entry is a pair of strings, the first being the connection's sink, | 9 | - ssi-controller : The phandle of the i.MX SSI controller |
10 | the second being the connection's source. Valid names could be power | 10 | |
11 | supplies, WM8962 pins, and the jacks on the board: | 11 | - audio-codec : The phandle of the WM8962 audio codec |
12 | 12 | ||
13 | Power supplies: | 13 | - audio-routing : A list of the connections between audio components. |
14 | * Mic Bias | 14 | Each entry is a pair of strings, the first being the |
15 | 15 | connection's sink, the second being the connection's | |
16 | Board connectors: | 16 | source. Valid names could be power supplies, WM8962 |
17 | * Mic Jack | 17 | pins, and the jacks on the board: |
18 | * Headphone Jack | 18 | |
19 | * Ext Spk | 19 | Power supplies: |
20 | 20 | * Mic Bias | |
21 | - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) | 21 | |
22 | - mux-ext-port : The external port of the i.MX audio muxer | 22 | Board connectors: |
23 | * Mic Jack | ||
24 | * Headphone Jack | ||
25 | * Ext Spk | ||
26 | |||
27 | - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) | ||
28 | |||
29 | - mux-ext-port : The external port of the i.MX audio muxer | ||
23 | 30 | ||
24 | Note: The AUDMUX port numbering should start at 1, which is consistent with | 31 | Note: The AUDMUX port numbering should start at 1, which is consistent with |
25 | hardware manual. | 32 | hardware manual. |
diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.txt b/Documentation/devicetree/bindings/sound/imx-audmux.txt index f88a00e54c63..b30a737e209e 100644 --- a/Documentation/devicetree/bindings/sound/imx-audmux.txt +++ b/Documentation/devicetree/bindings/sound/imx-audmux.txt | |||
@@ -1,18 +1,24 @@ | |||
1 | Freescale Digital Audio Mux (AUDMUX) device | 1 | Freescale Digital Audio Mux (AUDMUX) device |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used on i.MX21, | 4 | |
5 | or "fsl,imx31-audmux" for the version firstly used on i.MX31. | 5 | - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used |
6 | - reg : Should contain AUDMUX registers location and length | 6 | on i.MX21, or "fsl,imx31-audmux" for the version |
7 | firstly used on i.MX31. | ||
8 | |||
9 | - reg : Should contain AUDMUX registers location and length. | ||
7 | 10 | ||
8 | An initial configuration can be setup using child nodes. | 11 | An initial configuration can be setup using child nodes. |
9 | 12 | ||
10 | Required properties of optional child nodes: | 13 | Required properties of optional child nodes: |
11 | - fsl,audmux-port : Integer of the audmux port that is configured by this | 14 | |
12 | child node. | 15 | - fsl,audmux-port : Integer of the audmux port that is configured by this |
13 | - fsl,port-config : List of configuration options for the specific port. For | 16 | child node. |
14 | imx31-audmux and above, it is a list of tuples <ptcr pdcr>. For | 17 | |
15 | imx21-audmux it is a list of pcr values. | 18 | - fsl,port-config : List of configuration options for the specific port. |
19 | For imx31-audmux and above, it is a list of tuples | ||
20 | <ptcr pdcr>. For imx21-audmux it is a list of pcr | ||
21 | values. | ||
16 | 22 | ||
17 | Example: | 23 | Example: |
18 | 24 | ||
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt index c454e67f54bb..aa802a274520 100644 --- a/Documentation/devicetree/bindings/sound/max98090.txt +++ b/Documentation/devicetree/bindings/sound/max98090.txt | |||
@@ -16,6 +16,8 @@ Optional properties: | |||
16 | 16 | ||
17 | - clock-names: Should be "mclk" | 17 | - clock-names: Should be "mclk" |
18 | 18 | ||
19 | - maxim,dmic-freq: Frequency at which to clock DMIC | ||
20 | |||
19 | Pins on the device (for linking into audio routes): | 21 | Pins on the device (for linking into audio routes): |
20 | 22 | ||
21 | * MIC1 | 23 | * MIC1 |
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.txt b/Documentation/devicetree/bindings/sound/renesas,fsi.txt index c5be003f413e..0d0ab51105b0 100644 --- a/Documentation/devicetree/bindings/sound/renesas,fsi.txt +++ b/Documentation/devicetree/bindings/sound/renesas,fsi.txt | |||
@@ -1,11 +1,16 @@ | |||
1 | Renesas FSI | 1 | Renesas FSI |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "renesas,sh_fsi2" or "renesas,sh_fsi" | 4 | - compatible : "renesas,fsi2-<soctype>", |
5 | "renesas,sh_fsi2" or "renesas,sh_fsi" as | ||
6 | fallback. | ||
7 | Examples with soctypes are: | ||
8 | - "renesas,fsi2-r8a7740" (R-Mobile A1) | ||
9 | - "renesas,fsi2-sh73a0" (SH-Mobile AG5) | ||
5 | - reg : Should contain the register physical address and length | 10 | - reg : Should contain the register physical address and length |
6 | - interrupts : Should contain FSI interrupt | 11 | - interrupts : Should contain FSI interrupt |
7 | 12 | ||
8 | - fsia,spdif-connection : FSI is connected by S/PDFI | 13 | - fsia,spdif-connection : FSI is connected by S/PDIF |
9 | - fsia,stream-mode-support : FSI supports 16bit stream mode. | 14 | - fsia,stream-mode-support : FSI supports 16bit stream mode. |
10 | - fsia,use-internal-clock : FSI uses internal clock when master mode. | 15 | - fsia,use-internal-clock : FSI uses internal clock when master mode. |
11 | 16 | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index aa697abf337e..2dd690bc19cc 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt | |||
@@ -1,8 +1,12 @@ | |||
1 | Renesas R-Car sound | 1 | Renesas R-Car sound |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "renesas,rcar_sound-gen1" if generation1 | 4 | - compatible : "renesas,rcar_sound-<soctype>", fallbacks |
5 | "renesas,rcar_sound-gen1" if generation1, and | ||
5 | "renesas,rcar_sound-gen2" if generation2 | 6 | "renesas,rcar_sound-gen2" if generation2 |
7 | Examples with soctypes are: | ||
8 | - "renesas,rcar_sound-r8a7790" (R-Car H2) | ||
9 | - "renesas,rcar_sound-r8a7791" (R-Car M2-W) | ||
6 | - reg : Should contain the register physical address. | 10 | - reg : Should contain the register physical address. |
7 | required register is | 11 | required register is |
8 | SRU/ADG/SSI if generation1 | 12 | SRU/ADG/SSI if generation1 |
@@ -35,9 +39,9 @@ DAI subnode properties: | |||
35 | 39 | ||
36 | Example: | 40 | Example: |
37 | 41 | ||
38 | rcar_sound: rcar_sound@0xffd90000 { | 42 | rcar_sound: rcar_sound@ec500000 { |
39 | #sound-dai-cells = <1>; | 43 | #sound-dai-cells = <1>; |
40 | compatible = "renesas,rcar_sound-gen2"; | 44 | compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2"; |
41 | reg = <0 0xec500000 0 0x1000>, /* SCU */ | 45 | reg = <0 0xec500000 0 0x1000>, /* SCU */ |
42 | <0 0xec5a0000 0 0x100>, /* ADG */ | 46 | <0 0xec5a0000 0 0x100>, /* ADG */ |
43 | <0 0xec540000 0 0x1000>, /* SSIU */ | 47 | <0 0xec540000 0 0x1000>, /* SSIU */ |
diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt b/Documentation/devicetree/bindings/sound/rt5631.txt new file mode 100644 index 000000000000..92b986ca337b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rt5631.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | ALC5631/RT5631 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "realtek,alc5631" or "realtek,rt5631" | ||
8 | |||
9 | - reg : the I2C address of the device. | ||
10 | |||
11 | Pins on the device (for linking into audio routes): | ||
12 | |||
13 | * SPK_OUT_R_P | ||
14 | * SPK_OUT_R_N | ||
15 | * SPK_OUT_L_P | ||
16 | * SPK_OUT_L_N | ||
17 | * HP_OUT_L | ||
18 | * HP_OUT_R | ||
19 | * AUX_OUT2_LP | ||
20 | * AUX_OUT2_RN | ||
21 | * AUX_OUT1_LP | ||
22 | * AUX_OUT1_RN | ||
23 | * AUX_IN_L_JD | ||
24 | * AUX_IN_R_JD | ||
25 | * MONO_IN_P | ||
26 | * MONO_IN_N | ||
27 | * MIC1_P | ||
28 | * MIC1_N | ||
29 | * MIC2_P | ||
30 | * MIC2_N | ||
31 | * MONO_OUT_P | ||
32 | * MONO_OUT_N | ||
33 | * MICBIAS1 | ||
34 | * MICBIAS2 | ||
35 | |||
36 | Example: | ||
37 | |||
38 | alc5631: alc5631@1a { | ||
39 | compatible = "realtek,alc5631"; | ||
40 | reg = <0x1a>; | ||
41 | }; | ||
42 | |||
43 | or | ||
44 | |||
45 | rt5631: rt5631@1a { | ||
46 | compatible = "realtek,rt5631"; | ||
47 | reg = <0x1a>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/rt5677.txt b/Documentation/devicetree/bindings/sound/rt5677.txt index 0701b834fc73..740ff771aa8b 100644 --- a/Documentation/devicetree/bindings/sound/rt5677.txt +++ b/Documentation/devicetree/bindings/sound/rt5677.txt | |||
@@ -27,6 +27,21 @@ Optional properties: | |||
27 | Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, | 27 | Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, |
28 | rather than single-ended. | 28 | rather than single-ended. |
29 | 29 | ||
30 | - realtek,gpio-config | ||
31 | Array of six 8bit elements that configures GPIO. | ||
32 | 0 - floating (reset value) | ||
33 | 1 - pull down | ||
34 | 2 - pull up | ||
35 | |||
36 | - realtek,jd1-gpio | ||
37 | Configures GPIO Mic Jack detection 1. | ||
38 | Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively. | ||
39 | |||
40 | - realtek,jd2-gpio | ||
41 | - realtek,jd3-gpio | ||
42 | Configures GPIO Mic Jack detection 2 and 3. | ||
43 | Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively. | ||
44 | |||
30 | Pins on the device (for linking into audio routes): | 45 | Pins on the device (for linking into audio routes): |
31 | 46 | ||
32 | * IN1P | 47 | * IN1P |
@@ -56,4 +71,6 @@ rt5677 { | |||
56 | realtek,pow-ldo2-gpio = | 71 | realtek,pow-ldo2-gpio = |
57 | <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; | 72 | <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; |
58 | realtek,in1-differential = "true"; | 73 | realtek,in1-differential = "true"; |
74 | realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */ | ||
75 | realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */ | ||
59 | }; | 76 | }; |
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt index 7386d444ada1..d188296bb6ec 100644 --- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt +++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt | |||
@@ -6,10 +6,17 @@ Required SoC Specific Properties: | |||
6 | - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. | 6 | - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. |
7 | - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with | 7 | - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with |
8 | secondary fifo, s/w reset control and internal mux for root clk src. | 8 | secondary fifo, s/w reset control and internal mux for root clk src. |
9 | - samsung,exynos5420-i2s: for 8/16/24bit multichannel(7.1) I2S with | 9 | - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for |
10 | secondary fifo, s/w reset control, internal mux for root clk src and | 10 | playback, sterio channel capture, secondary fifo using internal |
11 | TDM support. TDM (Time division multiplexing) is to allow transfer of | 11 | or external dma, s/w reset control, internal mux for root clk src |
12 | multiple channel audio data on single data line. | 12 | and 7.1 channel TDM support for playback. TDM (Time division multiplexing) |
13 | is to allow transfer of multiple channel audio data on single data line. | ||
14 | - samsung,exynos7-i2s: with all the available features of exynos5 i2s, | ||
15 | exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo | ||
16 | with only external dma and more no.of root clk sampling frequencies. | ||
17 | - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports | ||
18 | stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with | ||
19 | slightly modified bit offsets. | ||
13 | 20 | ||
14 | - reg: physical base address of the controller and length of memory mapped | 21 | - reg: physical base address of the controller and length of memory mapped |
15 | region. | 22 | region. |
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index d556dcb8816b..0e5e4eb3ef1b 100644 --- a/Documentation/devicetree/bindings/sound/sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt | |||
@@ -7,6 +7,17 @@ Required properties: | |||
7 | 7 | ||
8 | - clocks : the clock provider of SYS_MCLK | 8 | - clocks : the clock provider of SYS_MCLK |
9 | 9 | ||
10 | - micbias-resistor-k-ohms : the bias resistor to be used in kOmhs | ||
11 | The resistor can take values of 2k, 4k or 8k. | ||
12 | If set to 0 it will be off. | ||
13 | If this node is not mentioned or if the value is unknown, then | ||
14 | micbias resistor is set to 4K. | ||
15 | |||
16 | - micbias-voltage-m-volts : the bias voltage to be used in mVolts | ||
17 | The voltage can take values from 1.25V to 3V by 250mV steps | ||
18 | If this node is not mentionned or the value is unknown, then | ||
19 | the value is set to 1.25V. | ||
20 | |||
10 | - VDDA-supply : the regulator provider of VDDA | 21 | - VDDA-supply : the regulator provider of VDDA |
11 | 22 | ||
12 | - VDDIO-supply: the regulator provider of VDDIO | 23 | - VDDIO-supply: the regulator provider of VDDIO |
@@ -21,6 +32,8 @@ codec: sgtl5000@0a { | |||
21 | compatible = "fsl,sgtl5000"; | 32 | compatible = "fsl,sgtl5000"; |
22 | reg = <0x0a>; | 33 | reg = <0x0a>; |
23 | clocks = <&clks 150>; | 34 | clocks = <&clks 150>; |
35 | micbias-resistor-k-ohms = <2>; | ||
36 | micbias-voltage-m-volts = <2250>; | ||
24 | VDDA-supply = <®_3p3v>; | 37 | VDDA-supply = <®_3p3v>; |
25 | VDDIO-supply = <®_3p3v>; | 38 | VDDIO-supply = <®_3p3v>; |
26 | }; | 39 | }; |
diff --git a/Documentation/devicetree/bindings/sound/ts3a227e.txt b/Documentation/devicetree/bindings/sound/ts3a227e.txt new file mode 100644 index 000000000000..e8bf23eb1803 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ts3a227e.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Texas Instruments TS3A227E | ||
2 | Autonomous Audio Accessory Detection and Configuration Switch | ||
3 | |||
4 | The TS3A227E detect headsets of 3-ring and 4-ring standards and | ||
5 | switches automatically to route the microphone correctly. It also | ||
6 | handles key press detection in accordance with the Android audio | ||
7 | headset specification v1.0. | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: Should contain "ti,ts3a227e". | ||
12 | - reg: The i2c address. Should contain <0x3b>. | ||
13 | - interrupt-parent: The parent interrupt controller | ||
14 | - interrupts: Interrupt number for /INT pin from the 227e | ||
15 | |||
16 | |||
17 | Examples: | ||
18 | |||
19 | i2c { | ||
20 | ts3a227e@3b { | ||
21 | compatible = "ti,ts3a227e"; | ||
22 | reg = <0x3b>; | ||
23 | interrupt-parent = <&gpio>; | ||
24 | interrupts = <3 IRQ_TYPE_LEVEL_LOW>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/wm8960.txt b/Documentation/devicetree/bindings/sound/wm8960.txt new file mode 100644 index 000000000000..2deb8a3da9c5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/wm8960.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | WM8960 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "wlf,wm8960" | ||
8 | |||
9 | - reg : the I2C address of the device. | ||
10 | |||
11 | Optional properties: | ||
12 | - wlf,shared-lrclk: This is a boolean property. If present, the LRCM bit of | ||
13 | R24 (Additional control 2) gets set, indicating that ADCLRC and DACLRC pins | ||
14 | will be disabled only when ADC (Left and Right) and DAC (Left and Right) | ||
15 | are disabled. | ||
16 | When wm8960 works on synchronize mode and DACLRC pin is used to supply | ||
17 | frame clock, it will no frame clock for captrue unless enable DAC to enable | ||
18 | DACLRC pin. If shared-lrclk is present, no need to enable DAC for captrue. | ||
19 | |||
20 | - wlf,capless: This is a boolean property. If present, OUT3 pin will be | ||
21 | enabled and disabled together with HP_L and HP_R pins in response to jack | ||
22 | detect events. | ||
23 | |||
24 | Example: | ||
25 | |||
26 | codec: wm8960@1a { | ||
27 | compatible = "wlf,wm8960"; | ||
28 | reg = <0x1a>; | ||
29 | |||
30 | wlf,shared-lrclk; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-gpio.txt b/Documentation/devicetree/bindings/spi/spi-gpio.txt index 8a824be15754..a95603bcf6ff 100644 --- a/Documentation/devicetree/bindings/spi/spi-gpio.txt +++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt | |||
@@ -8,8 +8,10 @@ Required properties: | |||
8 | - gpio-sck: GPIO spec for the SCK line to use | 8 | - gpio-sck: GPIO spec for the SCK line to use |
9 | - gpio-miso: GPIO spec for the MISO line to use | 9 | - gpio-miso: GPIO spec for the MISO line to use |
10 | - gpio-mosi: GPIO spec for the MOSI line to use | 10 | - gpio-mosi: GPIO spec for the MOSI line to use |
11 | - cs-gpios: GPIOs to use for chipselect lines | 11 | - cs-gpios: GPIOs to use for chipselect lines. |
12 | - num-chipselects: number of chipselect lines | 12 | Not needed if num-chipselects = <0>. |
13 | - num-chipselects: Number of chipselect lines. Should be <0> if a single device | ||
14 | with no chip select is connected. | ||
13 | 15 | ||
14 | Example: | 16 | Example: |
15 | 17 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-img-spfi.txt b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt new file mode 100644 index 000000000000..c7dd50fb8eb2 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | IMG Synchronous Peripheral Flash Interface (SPFI) controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "img,spfi". | ||
5 | - reg: Must contain the base address and length of the SPFI registers. | ||
6 | - interrupts: Must contain the SPFI interrupt. | ||
7 | - clocks: Must contain an entry for each entry in clock-names. | ||
8 | See ../clock/clock-bindings.txt for details. | ||
9 | - clock-names: Must include the following entries: | ||
10 | - spfi: SPI operating clock | ||
11 | - sys: SPI system interface clock | ||
12 | - dmas: Must contain an entry for each entry in dma-names. | ||
13 | See ../dma/dma.txt for details. | ||
14 | - dma-names: Must include the following entries: | ||
15 | - rx | ||
16 | - tx | ||
17 | - #address-cells: Must be 1. | ||
18 | - #size-cells: Must be 0. | ||
19 | |||
20 | Optional properties: | ||
21 | - img,supports-quad-mode: Should be set if the interface supports quad mode | ||
22 | SPI transfers. | ||
23 | |||
24 | Example: | ||
25 | |||
26 | spi@18100f00 { | ||
27 | compatible = "img,spfi"; | ||
28 | reg = <0x18100f00 0x100>; | ||
29 | interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>; | ||
30 | clocks = <&spi_clk>, <&system_clk>; | ||
31 | clock-names = "spfi", "sys"; | ||
32 | dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>; | ||
33 | dma-names = "rx", "tx"; | ||
34 | |||
35 | #address-cells = <1>; | ||
36 | #size-cells = <0>; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-meson.txt b/Documentation/devicetree/bindings/spi/spi-meson.txt new file mode 100644 index 000000000000..bb52a86f3365 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-meson.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Amlogic Meson SPI controllers | ||
2 | |||
3 | * SPIFC (SPI Flash Controller) | ||
4 | |||
5 | The Meson SPIFC is a controller optimized for communication with SPI | ||
6 | NOR memories, without DMA support and a 64-byte unified transmit / | ||
7 | receive buffer. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible: should be "amlogic,meson6-spifc" | ||
11 | - reg: physical base address and length of the controller registers | ||
12 | - clocks: phandle of the input clock for the baud rate generator | ||
13 | - #address-cells: should be 1 | ||
14 | - #size-cells: should be 0 | ||
15 | |||
16 | spi@c1108c80 { | ||
17 | compatible = "amlogic,meson6-spifc"; | ||
18 | reg = <0xc1108c80 0x80>; | ||
19 | clocks = <&clk81>; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt index 1e8a8578148f..6dbdeb3c361a 100644 --- a/Documentation/devicetree/bindings/spi/spi-samsung.txt +++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt | |||
@@ -9,7 +9,7 @@ Required SoC Specific Properties: | |||
9 | - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms | 9 | - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms |
10 | - samsung,s3c6410-spi: for s3c6410 platforms | 10 | - samsung,s3c6410-spi: for s3c6410 platforms |
11 | - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms | 11 | - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms |
12 | - samsung,exynos4210-spi: for exynos4 and exynos5 platforms | 12 | - samsung,exynos7-spi: for exynos7 platforms |
13 | 13 | ||
14 | - reg: physical base address of the controller and length of memory mapped | 14 | - reg: physical base address of the controller and length of memory mapped |
15 | region. | 15 | region. |
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt index 4cf024929a3f..4698e0edc205 100644 --- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt | |||
@@ -5,17 +5,9 @@ Required properties: | |||
5 | - compatible: Should be set to one of the following: | 5 | - compatible: Should be set to one of the following: |
6 | marvell,armada370-thermal | 6 | marvell,armada370-thermal |
7 | marvell,armada375-thermal | 7 | marvell,armada375-thermal |
8 | marvell,armada375-z1-thermal | ||
9 | marvell,armada380-thermal | 8 | marvell,armada380-thermal |
10 | marvell,armadaxp-thermal | 9 | marvell,armadaxp-thermal |
11 | 10 | ||
12 | Note: As the name suggests, "marvell,armada375-z1-thermal" | ||
13 | applies for the SoC Z1 stepping only. On such stepping | ||
14 | some quirks need to be done and the register offset differs | ||
15 | from the one in the A0 stepping. | ||
16 | The operating system may auto-detect the SoC stepping and | ||
17 | update the compatible and register offsets at runtime. | ||
18 | |||
19 | - reg: Device's register space. | 11 | - reg: Device's register space. |
20 | Two entries are expected, see the examples below. | 12 | Two entries are expected, see the examples below. |
21 | The first one is required for the sensor register; | 13 | The first one is required for the sensor register; |
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt new file mode 100644 index 000000000000..ef802de4957a --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | * Temperature Sensor ADC (TSADC) on rockchip SoCs | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "rockchip,rk3288-tsadc" | ||
5 | - reg : physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts : The interrupt number to the cpu. The interrupt specifier format | ||
8 | depends on the interrupt controller. | ||
9 | - clocks : Must contain an entry for each entry in clock-names. | ||
10 | - clock-names : Shall be "tsadc" for the converter-clock, and "apb_pclk" for | ||
11 | the peripheral clock. | ||
12 | - resets : Must contain an entry for each entry in reset-names. | ||
13 | See ../reset/reset.txt for details. | ||
14 | - reset-names : Must include the name "tsadc-apb". | ||
15 | - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. | ||
16 | - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value. | ||
17 | - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO. | ||
18 | - rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW | ||
19 | 1:HIGH. | ||
20 | |||
21 | Exiample: | ||
22 | tsadc: tsadc@ff280000 { | ||
23 | compatible = "rockchip,rk3288-tsadc"; | ||
24 | reg = <0xff280000 0x100>; | ||
25 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; | ||
26 | clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; | ||
27 | clock-names = "tsadc", "apb_pclk"; | ||
28 | resets = <&cru SRST_TSADC>; | ||
29 | reset-names = "tsadc-apb"; | ||
30 | pinctrl-names = "default"; | ||
31 | pinctrl-0 = <&otp_out>; | ||
32 | #thermal-sensor-cells = <1>; | ||
33 | rockchip,hw-tshut-temp = <95000>; | ||
34 | rockchip,hw-tshut-mode = <0>; | ||
35 | rockchip,hw-tshut-polarity = <0>; | ||
36 | }; | ||
37 | |||
38 | Example: referring to thermal sensors: | ||
39 | thermal-zones { | ||
40 | cpu_thermal: cpu_thermal { | ||
41 | polling-delay-passive = <1000>; /* milliseconds */ | ||
42 | polling-delay = <5000>; /* milliseconds */ | ||
43 | |||
44 | /* sensor ID */ | ||
45 | thermal-sensors = <&tsadc 1>; | ||
46 | |||
47 | trips { | ||
48 | cpu_alert0: cpu_alert { | ||
49 | temperature = <70000>; /* millicelsius */ | ||
50 | hysteresis = <2000>; /* millicelsius */ | ||
51 | type = "passive"; | ||
52 | }; | ||
53 | cpu_crit: cpu_crit { | ||
54 | temperature = <90000>; /* millicelsius */ | ||
55 | hysteresis = <2000>; /* millicelsius */ | ||
56 | type = "critical"; | ||
57 | }; | ||
58 | }; | ||
59 | |||
60 | cooling-maps { | ||
61 | map0 { | ||
62 | trip = <&cpu_alert0>; | ||
63 | cooling-device = | ||
64 | <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | ||
65 | }; | ||
66 | }; | ||
67 | }; | ||
68 | }; | ||
diff --git a/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt new file mode 100644 index 000000000000..ecf3ed76cd46 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | Tegra124 SOCTHERM thermal management system | ||
2 | |||
3 | The SOCTHERM IP block contains thermal sensors, support for polled | ||
4 | or interrupt-based thermal monitoring, CPU and GPU throttling based | ||
5 | on temperature trip points, and handling external overcurrent | ||
6 | notifications. It is also used to manage emergency shutdown in an | ||
7 | overheating situation. | ||
8 | |||
9 | Required properties : | ||
10 | - compatible : "nvidia,tegra124-soctherm". | ||
11 | - reg : Should contain 1 entry: | ||
12 | - SOCTHERM register set | ||
13 | - interrupts : Defines the interrupt used by SOCTHERM | ||
14 | - clocks : Must contain an entry for each entry in clock-names. | ||
15 | See ../clocks/clock-bindings.txt for details. | ||
16 | - clock-names : Must include the following entries: | ||
17 | - tsensor | ||
18 | - soctherm | ||
19 | - resets : Must contain an entry for each entry in reset-names. | ||
20 | See ../reset/reset.txt for details. | ||
21 | - reset-names : Must include the following entries: | ||
22 | - soctherm | ||
23 | - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description | ||
24 | of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a | ||
25 | list of valid values when referring to thermal sensors. | ||
26 | |||
27 | |||
28 | Example : | ||
29 | |||
30 | soctherm@0,700e2000 { | ||
31 | compatible = "nvidia,tegra124-soctherm"; | ||
32 | reg = <0x0 0x700e2000 0x0 0x1000>; | ||
33 | interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; | ||
34 | clocks = <&tegra_car TEGRA124_CLK_TSENSOR>, | ||
35 | <&tegra_car TEGRA124_CLK_SOC_THERM>; | ||
36 | clock-names = "tsensor", "soctherm"; | ||
37 | resets = <&tegra_car 78>; | ||
38 | reset-names = "soctherm"; | ||
39 | |||
40 | #thermal-sensor-cells = <1>; | ||
41 | }; | ||
42 | |||
43 | Example: referring to thermal sensors : | ||
44 | |||
45 | thermal-zones { | ||
46 | cpu { | ||
47 | polling-delay-passive = <1000>; | ||
48 | polling-delay = <1000>; | ||
49 | |||
50 | thermal-sensors = | ||
51 | <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>; | ||
52 | }; | ||
53 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt index f455182b1086..e9c78ce880e6 100644 --- a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt +++ b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt | |||
@@ -2,8 +2,10 @@ Marvell Armada 370 and Armada XP Timers | |||
2 | --------------------------------------- | 2 | --------------------------------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible: Should be either "marvell,armada-370-timer" or | 5 | - compatible: Should be one of the following |
6 | "marvell,armada-xp-timer" as appropriate. | 6 | "marvell,armada-370-timer", |
7 | "marvell,armada-375-timer", | ||
8 | "marvell,armada-xp-timer". | ||
7 | - interrupts: Should contain the list of Global Timer interrupts and | 9 | - interrupts: Should contain the list of Global Timer interrupts and |
8 | then local timer interrupts | 10 | then local timer interrupts |
9 | - reg: Should contain location and length for timers register. First | 11 | - reg: Should contain location and length for timers register. First |
@@ -13,7 +15,8 @@ Required properties: | |||
13 | Clocks required for compatible = "marvell,armada-370-timer": | 15 | Clocks required for compatible = "marvell,armada-370-timer": |
14 | - clocks : Must contain a single entry describing the clock input | 16 | - clocks : Must contain a single entry describing the clock input |
15 | 17 | ||
16 | Clocks required for compatible = "marvell,armada-xp-timer": | 18 | Clocks required for compatibles = "marvell,armada-xp-timer", |
19 | "marvell,armada-375-timer": | ||
17 | - clocks : Must contain an entry for each entry in clock-names. | 20 | - clocks : Must contain an entry for each entry in clock-names. |
18 | - clock-names : Must include the following entries: | 21 | - clock-names : Must include the following entries: |
19 | "nbclk" (L2/coherency fabric clock), | 22 | "nbclk" (L2/coherency fabric clock), |
diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt index d9a8d5af1a21..ba0a34d97eb8 100644 --- a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt +++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | * Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2) | 1 | * Renesas Multi-Function Timer Pulse Unit 2 (MTU2) |
2 | 2 | ||
3 | The MTU2 is a multi-purpose, multi-channel timer/counter with configurable | 3 | The MTU2 is a multi-purpose, multi-channel timer/counter with configurable |
4 | clock inputs and programmable compare match. | 4 | clock inputs and programmable compare match. |
diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt index 7db89fb25444..cd5f20bf2582 100644 --- a/Documentation/devicetree/bindings/timer/renesas,tmu.txt +++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | * Renesas R-Car Timer Unit (TMU) | 1 | * Renesas R-Mobile/R-Car Timer Unit (TMU) |
2 | 2 | ||
3 | The TMU is a 32-bit timer/counter with configurable clock inputs and | 3 | The TMU is a 32-bit timer/counter with configurable clock inputs and |
4 | programmable compare match. | 4 | programmable compare match. |
@@ -9,6 +9,8 @@ are independent. The TMU hardware supports up to three channels. | |||
9 | Required Properties: | 9 | Required Properties: |
10 | 10 | ||
11 | - compatible: must contain one or more of the following: | 11 | - compatible: must contain one or more of the following: |
12 | - "renesas,tmu-r8a7740" for the r8a7740 TMU | ||
13 | - "renesas,tmu-r8a7778" for the r8a7778 TMU | ||
12 | - "renesas,tmu-r8a7779" for the r8a7779 TMU | 14 | - "renesas,tmu-r8a7779" for the r8a7779 TMU |
13 | - "renesas,tmu" for any TMU. | 15 | - "renesas,tmu" for any TMU. |
14 | This is a fallback for the above renesas,tmu-* entries | 16 | This is a fallback for the above renesas,tmu-* entries |
diff --git a/Documentation/devicetree/bindings/unittest.txt b/Documentation/devicetree/bindings/unittest.txt new file mode 100644 index 000000000000..0f92a22fddfa --- /dev/null +++ b/Documentation/devicetree/bindings/unittest.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * OF selftest platform device | ||
2 | |||
3 | ** selftest | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: must be "selftest" | ||
7 | |||
8 | All other properties are optional. | ||
9 | |||
10 | Example: | ||
11 | selftest { | ||
12 | compatible = "selftest"; | ||
13 | status = "okay"; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt new file mode 100644 index 000000000000..27f8b1e5ee46 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * USB2 ChipIdea USB controller for ci13xxx | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "chipidea,usb2" | ||
5 | - reg: base address and length of the registers | ||
6 | - interrupts: interrupt for the USB controller | ||
7 | |||
8 | Optional properties: | ||
9 | - clocks: reference to the USB clock | ||
10 | - phys: reference to the USB PHY | ||
11 | - phy-names: should be "usb-phy" | ||
12 | - vbus-supply: reference to the VBUS regulator | ||
13 | |||
14 | Example: | ||
15 | |||
16 | usb@f7ed0000 { | ||
17 | compatible = "chipidea,usb2"; | ||
18 | reg = <0xf7ed0000 0x10000>; | ||
19 | interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; | ||
20 | clocks = <&chip CLKID_USB0>; | ||
21 | phys = <&usb_phy0>; | ||
22 | phy-names = "usb-phy"; | ||
23 | vbus-supply = <®_usb0_vbus>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 471366d6a129..cd7f0454e13a 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt | |||
@@ -14,6 +14,29 @@ Optional properties: | |||
14 | - phys: from the *Generic PHY* bindings | 14 | - phys: from the *Generic PHY* bindings |
15 | - phy-names: from the *Generic PHY* bindings | 15 | - phy-names: from the *Generic PHY* bindings |
16 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. | 16 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. |
17 | - snps,disable_scramble_quirk: true when SW should disable data scrambling. | ||
18 | Only really useful for FPGA builds. | ||
19 | - snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum enabled | ||
20 | - snps,lpm-nyet-threshold: LPM NYET threshold | ||
21 | - snps,u2exit_lfps_quirk: set if we want to enable u2exit lfps quirk | ||
22 | - snps,u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk | ||
23 | - snps,req_p1p2p3_quirk: when set, the core will always request for | ||
24 | P1/P2/P3 transition sequence. | ||
25 | - snps,del_p1p2p3_quirk: when set core will delay P1/P2/P3 until a certain | ||
26 | amount of 8B10B errors occur. | ||
27 | - snps,del_phy_power_chg_quirk: when set core will delay PHY power change | ||
28 | from P0 to P1/P2/P3. | ||
29 | - snps,lfps_filter_quirk: when set core will filter LFPS reception. | ||
30 | - snps,rx_detect_poll_quirk: when set core will disable a 400us delay to start | ||
31 | Polling LFPS after RX.Detect. | ||
32 | - snps,tx_de_emphasis_quirk: when set core will set Tx de-emphasis value. | ||
33 | - snps,tx_de_emphasis: the value driven to the PHY is controlled by the | ||
34 | LTSSM during USB3 Compliance mode. | ||
35 | - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy. | ||
36 | - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy. | ||
37 | - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal | ||
38 | utmi_l1_suspend_n, false when asserts utmi_sleep_n | ||
39 | - snps,hird-threshold: HIRD threshold | ||
17 | 40 | ||
18 | This is usually a subnode to DWC3 glue to which it is connected. | 41 | This is usually a subnode to DWC3 glue to which it is connected. |
19 | 42 | ||
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index a3b5990d0f2c..9b4dbe3b2acc 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt | |||
@@ -82,8 +82,10 @@ Example: | |||
82 | 82 | ||
83 | DWC3 | 83 | DWC3 |
84 | Required properties: | 84 | Required properties: |
85 | - compatible: should be "samsung,exynos5250-dwusb3" for USB 3.0 DWC3 | 85 | - compatible: should be one of the following - |
86 | controller. | 86 | "samsung,exynos5250-dwusb3": for USB 3.0 DWC3 controller on |
87 | Exynos5250/5420. | ||
88 | "samsung,exynos7-dwusb3": for USB 3.0 DWC3 controller on Exynos7. | ||
87 | - #address-cells, #size-cells : should be '1' if the device has sub-nodes | 89 | - #address-cells, #size-cells : should be '1' if the device has sub-nodes |
88 | with 'reg' property. | 90 | with 'reg' property. |
89 | - ranges: allows valid 1:1 translation between child's address space and | 91 | - ranges: allows valid 1:1 translation between child's address space and |
diff --git a/Documentation/devicetree/bindings/usb/pxa-usb.txt b/Documentation/devicetree/bindings/usb/pxa-usb.txt index 79729a948d5a..9c331799b87c 100644 --- a/Documentation/devicetree/bindings/usb/pxa-usb.txt +++ b/Documentation/devicetree/bindings/usb/pxa-usb.txt | |||
@@ -29,3 +29,25 @@ Example: | |||
29 | marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ | 29 | marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ |
30 | }; | 30 | }; |
31 | 31 | ||
32 | UDC | ||
33 | |||
34 | Required properties: | ||
35 | - compatible: Should be "marvell,pxa270-udc" for USB controllers | ||
36 | used in device mode. | ||
37 | - reg: usb device MMIO address space | ||
38 | - interrupts: single interrupt generated by the UDC IP | ||
39 | - clocks: input clock of the UDC IP (see clock-bindings.txt) | ||
40 | |||
41 | Optional properties: | ||
42 | - gpios: | ||
43 | - gpio activated to control the USB D+ pullup (see gpio.txt) | ||
44 | |||
45 | Example: | ||
46 | |||
47 | pxa27x_udc: udc@40600000 { | ||
48 | compatible = "marvell,pxa270-udc"; | ||
49 | reg = <0x40600000 0x10000>; | ||
50 | interrupts = <11>; | ||
51 | clocks = <&pxa2xx_clks 11>; | ||
52 | gpios = <&gpio 22 GPIO_ACTIVE_LOW>; | ||
53 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt index b968a1aea995..19233b7365e1 100644 --- a/Documentation/devicetree/bindings/usb/usb-ohci.txt +++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt | |||
@@ -9,6 +9,8 @@ Optional properties: | |||
9 | - big-endian-regs : boolean, set this for hcds with big-endian registers | 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 | 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 | 11 | - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc |
12 | - no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA | ||
13 | - num-ports : u32, to override the detected port count | ||
12 | - clocks : a list of phandle + clock specifier pairs | 14 | - clocks : a list of phandle + clock specifier pairs |
13 | - phys : phandle + phy specifier pair | 15 | - phys : phandle + phy specifier pair |
14 | - phy-names : "usb" | 16 | - phy-names : "usb" |
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 723999d73744..b1df0ad1306c 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -34,17 +34,20 @@ chipidea Chipidea, Inc | |||
34 | chrp Common Hardware Reference Platform | 34 | chrp Common Hardware Reference Platform |
35 | chunghwa Chunghwa Picture Tubes Ltd. | 35 | chunghwa Chunghwa Picture Tubes Ltd. |
36 | cirrus Cirrus Logic, Inc. | 36 | cirrus Cirrus Logic, Inc. |
37 | cnm Chips&Media, Inc. | ||
37 | cortina Cortina Systems, Inc. | 38 | cortina Cortina Systems, Inc. |
38 | crystalfontz Crystalfontz America, Inc. | 39 | crystalfontz Crystalfontz America, Inc. |
39 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) | 40 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) |
40 | davicom DAVICOM Semiconductor, Inc. | 41 | davicom DAVICOM Semiconductor, Inc. |
41 | denx Denx Software Engineering | 42 | denx Denx Software Engineering |
42 | digi Digi International Inc. | 43 | digi Digi International Inc. |
44 | digilent Diglent, Inc. | ||
43 | dlg Dialog Semiconductor | 45 | dlg Dialog Semiconductor |
44 | dlink D-Link Corporation | 46 | dlink D-Link Corporation |
45 | dmo Data Modul AG | 47 | dmo Data Modul AG |
46 | ebv EBV Elektronik | 48 | ebv EBV Elektronik |
47 | edt Emerging Display Technologies | 49 | edt Emerging Display Technologies |
50 | elan Elan Microelectronic Corp. | ||
48 | emmicro EM Microelectronic | 51 | emmicro EM Microelectronic |
49 | energymicro Silicon Laboratories (formerly Energy Micro AS) | 52 | energymicro Silicon Laboratories (formerly Energy Micro AS) |
50 | epcos EPCOS AG | 53 | epcos EPCOS AG |
@@ -64,8 +67,10 @@ gmt Global Mixed-mode Technology, Inc. | |||
64 | google Google, Inc. | 67 | google Google, Inc. |
65 | gumstix Gumstix, Inc. | 68 | gumstix Gumstix, Inc. |
66 | gw Gateworks Corporation | 69 | gw Gateworks Corporation |
70 | hannstar HannStar Display Corporation | ||
67 | haoyu Haoyu Microelectronic Co. Ltd. | 71 | haoyu Haoyu Microelectronic Co. Ltd. |
68 | hisilicon Hisilicon Limited. | 72 | hisilicon Hisilicon Limited. |
73 | hit Hitachi Ltd. | ||
69 | honeywell Honeywell | 74 | honeywell Honeywell |
70 | hp Hewlett Packard | 75 | hp Hewlett Packard |
71 | i2se I2SE GmbH | 76 | i2se I2SE GmbH |
@@ -77,6 +82,7 @@ innolux Innolux Corporation | |||
77 | intel Intel Corporation | 82 | intel Intel Corporation |
78 | intercontrol Inter Control Group | 83 | intercontrol Inter Control Group |
79 | isee ISEE 2007 S.L. | 84 | isee ISEE 2007 S.L. |
85 | isil Intersil (deprecated, use isl) | ||
80 | isl Intersil | 86 | isl Intersil |
81 | karo Ka-Ro electronics GmbH | 87 | karo Ka-Ro electronics GmbH |
82 | keymile Keymile GmbH | 88 | keymile Keymile GmbH |
@@ -90,12 +96,15 @@ lltc Linear Technology Corporation | |||
90 | marvell Marvell Technology Group Ltd. | 96 | marvell Marvell Technology Group Ltd. |
91 | maxim Maxim Integrated Products | 97 | maxim Maxim Integrated Products |
92 | mediatek MediaTek Inc. | 98 | mediatek MediaTek Inc. |
99 | merrii Merrii Technology Co., Ltd. | ||
93 | micrel Micrel Inc. | 100 | micrel Micrel Inc. |
94 | microchip Microchip Technology Inc. | 101 | microchip Microchip Technology Inc. |
102 | micron Micron Technology Inc. | ||
95 | mitsubishi Mitsubishi Electric Corporation | 103 | mitsubishi Mitsubishi Electric Corporation |
96 | mosaixtech Mosaix Technologies, Inc. | 104 | mosaixtech Mosaix Technologies, Inc. |
97 | moxa Moxa | 105 | moxa Moxa |
98 | mpl MPL AG | 106 | mpl MPL AG |
107 | mti Imagination Technologies Ltd. (formerly MIPS Technologies Inc.) | ||
99 | mundoreader Mundo Reader S.L. | 108 | mundoreader Mundo Reader S.L. |
100 | murata Murata Manufacturing Co., Ltd. | 109 | murata Murata Manufacturing Co., Ltd. |
101 | mxicy Macronix International Co., Ltd. | 110 | mxicy Macronix International Co., Ltd. |
@@ -110,6 +119,7 @@ nxp NXP Semiconductors | |||
110 | onnn ON Semiconductor Corp. | 119 | onnn ON Semiconductor Corp. |
111 | opencores OpenCores.org | 120 | opencores OpenCores.org |
112 | panasonic Panasonic Corporation | 121 | panasonic Panasonic Corporation |
122 | pericom Pericom Technology Inc. | ||
113 | phytec PHYTEC Messtechnik GmbH | 123 | phytec PHYTEC Messtechnik GmbH |
114 | picochip Picochip Ltd | 124 | picochip Picochip Ltd |
115 | plathome Plat'Home Co., Ltd. | 125 | plathome Plat'Home Co., Ltd. |
@@ -127,6 +137,7 @@ renesas Renesas Electronics Corporation | |||
127 | ricoh Ricoh Co. Ltd. | 137 | ricoh Ricoh Co. Ltd. |
128 | rockchip Fuzhou Rockchip Electronics Co., Ltd | 138 | rockchip Fuzhou Rockchip Electronics Co., Ltd |
129 | samsung Samsung Semiconductor | 139 | samsung Samsung Semiconductor |
140 | sandisk Sandisk Corporation | ||
130 | sbs Smart Battery System | 141 | sbs Smart Battery System |
131 | schindler Schindler | 142 | schindler Schindler |
132 | seagate Seagate Technology PLC | 143 | seagate Seagate Technology PLC |
@@ -138,7 +149,7 @@ silergy Silergy Corp. | |||
138 | sirf SiRF Technology, Inc. | 149 | sirf SiRF Technology, Inc. |
139 | sitronix Sitronix Technology Corporation | 150 | sitronix Sitronix Technology Corporation |
140 | smsc Standard Microsystems Corporation | 151 | smsc Standard Microsystems Corporation |
141 | snps Synopsys, Inc. | 152 | snps Synopsys, Inc. |
142 | solidrun SolidRun | 153 | solidrun SolidRun |
143 | sony Sony Corporation | 154 | sony Sony Corporation |
144 | spansion Spansion Inc. | 155 | spansion Spansion Inc. |
@@ -146,6 +157,7 @@ st STMicroelectronics | |||
146 | ste ST-Ericsson | 157 | ste ST-Ericsson |
147 | stericsson ST-Ericsson | 158 | stericsson ST-Ericsson |
148 | synology Synology, Inc. | 159 | synology Synology, Inc. |
160 | tbs TBS Technologies | ||
149 | thine THine Electronics, Inc. | 161 | thine THine Electronics, Inc. |
150 | ti Texas Instruments | 162 | ti Texas Instruments |
151 | tlm Trusted Logic Mobility | 163 | tlm Trusted Logic Mobility |
diff --git a/Documentation/devicetree/bindings/video/adi,adv7511.txt b/Documentation/devicetree/bindings/video/adi,adv7511.txt new file mode 100644 index 000000000000..96c25ee01501 --- /dev/null +++ b/Documentation/devicetree/bindings/video/adi,adv7511.txt | |||
@@ -0,0 +1,88 @@ | |||
1 | Analog Device ADV7511(W)/13 HDMI Encoders | ||
2 | ----------------------------------------- | ||
3 | |||
4 | The ADV7511, ADV7511W and ADV7513 are HDMI audio and video transmitters | ||
5 | compatible with HDMI 1.4 and DVI 1.0. They support color space conversion, | ||
6 | S/PDIF, CEC and HDCP. | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible: Should be one of "adi,adv7511", "adi,adv7511w" or "adi,adv7513" | ||
11 | - reg: I2C slave address | ||
12 | |||
13 | The ADV7511 supports a large number of input data formats that differ by their | ||
14 | color depth, color format, clock mode, bit justification and random | ||
15 | arrangement of components on the data bus. The combination of the following | ||
16 | properties describe the input and map directly to the video input tables of the | ||
17 | ADV7511 datasheet that document all the supported combinations. | ||
18 | |||
19 | - adi,input-depth: Number of bits per color component at the input (8, 10 or | ||
20 | 12). | ||
21 | - adi,input-colorspace: The input color space, one of "rgb", "yuv422" or | ||
22 | "yuv444". | ||
23 | - adi,input-clock: The input clock type, one of "1x" (one clock cycle per | ||
24 | pixel), "2x" (two clock cycles per pixel), "ddr" (one clock cycle per pixel, | ||
25 | data driven on both edges). | ||
26 | |||
27 | The following input format properties are required except in "rgb 1x" and | ||
28 | "yuv444 1x" modes, in which case they must not be specified. | ||
29 | |||
30 | - adi,input-style: The input components arrangement variant (1, 2 or 3), as | ||
31 | listed in the input format tables in the datasheet. | ||
32 | - adi,input-justification: The input bit justification ("left", "evenly", | ||
33 | "right"). | ||
34 | |||
35 | Optional properties: | ||
36 | |||
37 | - interrupts: Specifier for the ADV7511 interrupt | ||
38 | - pd-gpios: Specifier for the GPIO connected to the power down signal | ||
39 | |||
40 | - adi,clock-delay: Video data clock delay relative to the pixel clock, in ps | ||
41 | (-1200 ps .. 1600 ps). Defaults to no delay. | ||
42 | - adi,embedded-sync: The input uses synchronization signals embedded in the | ||
43 | data stream (similar to BT.656). Defaults to separate H/V synchronization | ||
44 | signals. | ||
45 | |||
46 | Required nodes: | ||
47 | |||
48 | The ADV7511 has two video ports. Their connections are modelled using the OF | ||
49 | graph bindings specified in Documentation/devicetree/bindings/graph.txt. | ||
50 | |||
51 | - Video port 0 for the RGB or YUV input | ||
52 | - Video port 1 for the HDMI output | ||
53 | |||
54 | |||
55 | Example | ||
56 | ------- | ||
57 | |||
58 | adv7511w: hdmi@39 { | ||
59 | compatible = "adi,adv7511w"; | ||
60 | reg = <39>; | ||
61 | interrupt-parent = <&gpio3>; | ||
62 | interrupts = <29 IRQ_TYPE_EDGE_FALLING>; | ||
63 | |||
64 | adi,input-depth = <8>; | ||
65 | adi,input-colorspace = "rgb"; | ||
66 | adi,input-clock = "1x"; | ||
67 | adi,input-style = <1>; | ||
68 | adi,input-justification = "evenly"; | ||
69 | |||
70 | ports { | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <0>; | ||
73 | |||
74 | port@0 { | ||
75 | reg = <0>; | ||
76 | adv7511w_in: endpoint { | ||
77 | remote-endpoint = <&dpi_out>; | ||
78 | }; | ||
79 | }; | ||
80 | |||
81 | port@1 { | ||
82 | reg = <1>; | ||
83 | adv7511_out: endpoint { | ||
84 | remote-endpoint = <&hdmi_connector_in>; | ||
85 | }; | ||
86 | }; | ||
87 | }; | ||
88 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/backlight/lp855x.txt b/Documentation/devicetree/bindings/video/backlight/lp855x.txt index 96e83a56048e..0a3ecbc3a1b9 100644 --- a/Documentation/devicetree/bindings/video/backlight/lp855x.txt +++ b/Documentation/devicetree/bindings/video/backlight/lp855x.txt | |||
@@ -12,6 +12,7 @@ Optional properties: | |||
12 | - pwm-period: PWM period value. Set only PWM input mode used (u32) | 12 | - pwm-period: PWM period value. Set only PWM input mode used (u32) |
13 | - rom-addr: Register address of ROM area to be updated (u8) | 13 | - rom-addr: Register address of ROM area to be updated (u8) |
14 | - rom-val: Register value to be updated (u8) | 14 | - rom-val: Register value to be updated (u8) |
15 | - power-supply: Regulator which controls the 3V rail | ||
15 | 16 | ||
16 | Example: | 17 | Example: |
17 | 18 | ||
@@ -56,6 +57,7 @@ Example: | |||
56 | backlight@2c { | 57 | backlight@2c { |
57 | compatible = "ti,lp8557"; | 58 | compatible = "ti,lp8557"; |
58 | reg = <0x2c>; | 59 | reg = <0x2c>; |
60 | power-supply = <&backlight_vdd>; | ||
59 | 61 | ||
60 | dev-ctrl = /bits/ 8 <0x41>; | 62 | dev-ctrl = /bits/ 8 <0x41>; |
61 | init-brt = /bits/ 8 <0x0a>; | 63 | init-brt = /bits/ 8 <0x0a>; |
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/video/exynos_dsim.txt index e74243b4b317..ca2b4aacd9af 100644 --- a/Documentation/devicetree/bindings/video/exynos_dsim.txt +++ b/Documentation/devicetree/bindings/video/exynos_dsim.txt | |||
@@ -4,6 +4,7 @@ Required properties: | |||
4 | - compatible: value should be one of the following | 4 | - compatible: value should be one of the following |
5 | "samsung,exynos3250-mipi-dsi" /* for Exynos3250/3472 SoCs */ | 5 | "samsung,exynos3250-mipi-dsi" /* for Exynos3250/3472 SoCs */ |
6 | "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */ | 6 | "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */ |
7 | "samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */ | ||
7 | "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */ | 8 | "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */ |
8 | - reg: physical base address and length of the registers set for the device | 9 | - reg: physical base address and length of the registers set for the device |
9 | - interrupts: should contain DSI interrupt | 10 | - interrupts: should contain DSI interrupt |
diff --git a/Documentation/devicetree/bindings/video/rockchip-drm.txt b/Documentation/devicetree/bindings/video/rockchip-drm.txt new file mode 100644 index 000000000000..7fff582495a2 --- /dev/null +++ b/Documentation/devicetree/bindings/video/rockchip-drm.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Rockchip DRM master device | ||
2 | ================================ | ||
3 | |||
4 | The Rockchip DRM master device is a virtual device needed to list all | ||
5 | vop devices or other display interface nodes that comprise the | ||
6 | graphics subsystem. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: Should be "rockchip,display-subsystem" | ||
10 | - ports: Should contain a list of phandles pointing to display interface port | ||
11 | of vop devices. vop definitions as defined in | ||
12 | Documentation/devicetree/bindings/video/rockchip-vop.txt | ||
13 | |||
14 | example: | ||
15 | |||
16 | display-subsystem { | ||
17 | compatible = "rockchip,display-subsystem"; | ||
18 | ports = <&vopl_out>, <&vopb_out>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/rockchip-vop.txt b/Documentation/devicetree/bindings/video/rockchip-vop.txt new file mode 100644 index 000000000000..d15351f2313d --- /dev/null +++ b/Documentation/devicetree/bindings/video/rockchip-vop.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | device-tree bindings for rockchip soc display controller (vop) | ||
2 | |||
3 | VOP (Visual Output Processor) is the Display Controller for the Rockchip | ||
4 | series of SoCs which transfers the image data from a video memory | ||
5 | buffer to an external LCD interface. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: value should be one of the following | ||
9 | "rockchip,rk3288-vop"; | ||
10 | |||
11 | - interrupts: should contain a list of all VOP IP block interrupts in the | ||
12 | order: VSYNC, LCD_SYSTEM. The interrupt specifier | ||
13 | format depends on the interrupt controller used. | ||
14 | |||
15 | - clocks: must include clock specifiers corresponding to entries in the | ||
16 | clock-names property. | ||
17 | |||
18 | - clock-names: Must contain | ||
19 | aclk_vop: for ddr buffer transfer. | ||
20 | hclk_vop: for ahb bus to R/W the phy regs. | ||
21 | dclk_vop: pixel clock. | ||
22 | |||
23 | - resets: Must contain an entry for each entry in reset-names. | ||
24 | See ../reset/reset.txt for details. | ||
25 | - reset-names: Must include the following entries: | ||
26 | - axi | ||
27 | - ahb | ||
28 | - dclk | ||
29 | |||
30 | - iommus: required a iommu node | ||
31 | |||
32 | - port: A port node with endpoint definitions as defined in | ||
33 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
34 | |||
35 | Example: | ||
36 | SoC specific DT entry: | ||
37 | vopb: vopb@ff930000 { | ||
38 | compatible = "rockchip,rk3288-vop"; | ||
39 | reg = <0xff930000 0x19c>; | ||
40 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | ||
41 | clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>; | ||
42 | clock-names = "aclk_vop", "dclk_vop", "hclk_vop"; | ||
43 | resets = <&cru SRST_LCDC1_AXI>, <&cru SRST_LCDC1_AHB>, <&cru SRST_LCDC1_DCLK>; | ||
44 | reset-names = "axi", "ahb", "dclk"; | ||
45 | iommus = <&vopb_mmu>; | ||
46 | vopb_out: port { | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <0>; | ||
49 | vopb_out_edp: endpoint@0 { | ||
50 | reg = <0>; | ||
51 | remote-endpoint=<&edp_in_vopb>; | ||
52 | }; | ||
53 | vopb_out_hdmi: endpoint@1 { | ||
54 | reg = <1>; | ||
55 | remote-endpoint=<&hdmi_in_vopb>; | ||
56 | }; | ||
57 | }; | ||
58 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/video/samsung-fimd.txt index 4e6c77c85546..cf1af6371021 100644 --- a/Documentation/devicetree/bindings/video/samsung-fimd.txt +++ b/Documentation/devicetree/bindings/video/samsung-fimd.txt | |||
@@ -11,6 +11,7 @@ Required properties: | |||
11 | "samsung,s5pv210-fimd"; /* for S5PV210 SoC */ | 11 | "samsung,s5pv210-fimd"; /* for S5PV210 SoC */ |
12 | "samsung,exynos3250-fimd"; /* for Exynos3250/3472 SoCs */ | 12 | "samsung,exynos3250-fimd"; /* for Exynos3250/3472 SoCs */ |
13 | "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */ | 13 | "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */ |
14 | "samsung,exynos4415-fimd"; /* for Exynos4415 SoC */ | ||
14 | "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */ | 15 | "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */ |
15 | 16 | ||
16 | - reg: physical base address and length of the FIMD registers set. | 17 | - reg: physical base address and length of the FIMD registers set. |
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt new file mode 100644 index 000000000000..c46ba641a1df --- /dev/null +++ b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Sunxi specific Simple Framebuffer bindings | ||
2 | |||
3 | This binding documents sunxi specific extensions to the simple-framebuffer | ||
4 | bindings. The sunxi simplefb u-boot code relies on the devicetree containing | ||
5 | pre-populated simplefb nodes. | ||
6 | |||
7 | These extensions are intended so that u-boot can select the right node based | ||
8 | on which pipeline is being used. As such they are solely intended for | ||
9 | firmware / bootloader use, and the OS should ignore them. | ||
10 | |||
11 | Required properties: | ||
12 | - compatible: "allwinner,simple-framebuffer" | ||
13 | - allwinner,pipeline, one of: | ||
14 | "de_be0-lcd0" | ||
15 | "de_be1-lcd1" | ||
16 | "de_be0-lcd0-hdmi" | ||
17 | "de_be1-lcd1-hdmi" | ||
18 | |||
19 | Example: | ||
20 | |||
21 | chosen { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | ranges; | ||
25 | |||
26 | framebuffer@0 { | ||
27 | compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; | ||
28 | allwinner,pipeline = "de_be0-lcd0-hdmi"; | ||
29 | clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, | ||
30 | <&ahb_gates 44>; | ||
31 | status = "disabled"; | ||
32 | }; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt index 70c26f3a5b9a..4474ef6e0b95 100644 --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt | |||
@@ -1,8 +1,40 @@ | |||
1 | Simple Framebuffer | 1 | Simple Framebuffer |
2 | 2 | ||
3 | A simple frame-buffer describes a raw memory region that may be rendered to, | 3 | A simple frame-buffer describes a frame-buffer setup by firmware or |
4 | with the assumption that the display hardware has already been set up to scan | 4 | the bootloader, with the assumption that the display hardware has already |
5 | out from that buffer. | 5 | been set up to scan out from the memory pointed to by the reg property. |
6 | |||
7 | Since simplefb nodes represent runtime information they must be sub-nodes of | ||
8 | the chosen node (*). Simplefb nodes must be named "framebuffer@<address>". | ||
9 | |||
10 | If the devicetree contains nodes for the display hardware used by a simplefb, | ||
11 | then the simplefb node must contain a property called "display", which | ||
12 | contains a phandle pointing to the primary display hw node, so that the OS | ||
13 | knows which simplefb to disable when handing over control to a driver for the | ||
14 | real hardware. The bindings for the hw nodes must specify which node is | ||
15 | considered the primary node. | ||
16 | |||
17 | It is advised to add display# aliases to help the OS determine how to number | ||
18 | things. If display# aliases are used, then if the simplefb node contains a | ||
19 | "display" property then the /aliases/display# path must point to the display | ||
20 | hw node the "display" property points to, otherwise it must point directly | ||
21 | to the simplefb node. | ||
22 | |||
23 | If a simplefb node represents the preferred console for user interaction, | ||
24 | then the chosen node's stdout-path property should point to it, or to the | ||
25 | primary display hw node, as with display# aliases. If display aliases are | ||
26 | used then it should be set to the alias instead. | ||
27 | |||
28 | It is advised that devicetree files contain pre-filled, disabled framebuffer | ||
29 | nodes, so that the firmware only needs to update the mode information and | ||
30 | enable them. This way if e.g. later on support for more display clocks get | ||
31 | added, the simplefb nodes will already contain this info and the firmware | ||
32 | does not need to be updated. | ||
33 | |||
34 | If pre-filled framebuffer nodes are used, the firmware may need extra | ||
35 | information to find the right node. In that case an extra platform specific | ||
36 | compatible and platform specific properties should be used and documented, | ||
37 | see e.g. simple-framebuffer-sunxi.txt . | ||
6 | 38 | ||
7 | Required properties: | 39 | Required properties: |
8 | - compatible: "simple-framebuffer" | 40 | - compatible: "simple-framebuffer" |
@@ -14,13 +46,41 @@ Required properties: | |||
14 | - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). | 46 | - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). |
15 | - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r). | 47 | - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r). |
16 | 48 | ||
49 | Optional properties: | ||
50 | - clocks : List of clocks used by the framebuffer. Clocks listed here | ||
51 | are expected to already be configured correctly. The OS must | ||
52 | ensure these clocks are not modified or disabled while the | ||
53 | simple framebuffer remains active. | ||
54 | - display : phandle pointing to the primary display hardware node | ||
55 | |||
17 | Example: | 56 | Example: |
18 | 57 | ||
19 | framebuffer { | 58 | aliases { |
59 | display0 = &lcdc0; | ||
60 | } | ||
61 | |||
62 | chosen { | ||
63 | framebuffer0: framebuffer@1d385000 { | ||
20 | compatible = "simple-framebuffer"; | 64 | compatible = "simple-framebuffer"; |
21 | reg = <0x1d385000 (1600 * 1200 * 2)>; | 65 | reg = <0x1d385000 (1600 * 1200 * 2)>; |
22 | width = <1600>; | 66 | width = <1600>; |
23 | height = <1200>; | 67 | height = <1200>; |
24 | stride = <(1600 * 2)>; | 68 | stride = <(1600 * 2)>; |
25 | format = "r5g6b5"; | 69 | format = "r5g6b5"; |
70 | clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>; | ||
71 | display = <&lcdc0>; | ||
72 | }; | ||
73 | stdout-path = "display0"; | ||
74 | }; | ||
75 | |||
76 | soc@01c00000 { | ||
77 | lcdc0: lcdc@1c0c000 { | ||
78 | compatible = "allwinner,sun4i-a10-lcdc"; | ||
79 | ... | ||
26 | }; | 80 | }; |
81 | }; | ||
82 | |||
83 | |||
84 | *) Older devicetree files may have a compatible = "simple-framebuffer" node | ||
85 | in a different place, operating systems must first enumerate any compatible | ||
86 | nodes found under chosen and then check for other compatible nodes. | ||
diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt new file mode 100644 index 000000000000..fef794741bd1 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * OMAP HDQ One wire bus master controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "ti,omap3-1w" | ||
5 | - reg : Address and length of the register set for the device | ||
6 | - interrupts : interrupt line. | ||
7 | - ti,hwmods : "hdq1w" | ||
8 | |||
9 | Example: | ||
10 | |||
11 | - From omap3.dtsi | ||
12 | hdqw1w: 1w@480b2000 { | ||
13 | compatible = "ti,omap3-1w"; | ||
14 | reg = <0x480b2000 0x1000>; | ||
15 | interrupts = <58>; | ||
16 | ti,hwmods = "hdq1w"; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt index 97223fddb7bd..858ed9221ac4 100644 --- a/Documentation/devicetree/bindings/watchdog/marvel.txt +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt | |||
@@ -17,6 +17,18 @@ For "marvell,armada-375-wdt" and "marvell,armada-380-wdt": | |||
17 | - reg : A third entry is mandatory and should contain the | 17 | - reg : A third entry is mandatory and should contain the |
18 | shared mask/unmask RSTOUT address. | 18 | shared mask/unmask RSTOUT address. |
19 | 19 | ||
20 | Clocks required for compatibles = "marvell,orion-wdt", | ||
21 | "marvell,armada-370-wdt": | ||
22 | - clocks : Must contain a single entry describing the clock input | ||
23 | |||
24 | Clocks required for compatibles = "marvell,armada-xp-wdt" | ||
25 | "marvell,armada-375-wdt" | ||
26 | "marvell,armada-380-wdt": | ||
27 | - clocks : Must contain an entry for each entry in clock-names. | ||
28 | - clock-names : Must include the following entries: | ||
29 | "nbclk" (L2/coherency fabric clock), | ||
30 | "fixed" (Reference 25 MHz fixed-clock). | ||
31 | |||
20 | Optional properties: | 32 | Optional properties: |
21 | 33 | ||
22 | - interrupts : Contains the IRQ for watchdog expiration | 34 | - interrupts : Contains the IRQ for watchdog expiration |
@@ -30,4 +42,5 @@ Example: | |||
30 | interrupts = <3>; | 42 | interrupts = <3>; |
31 | timeout-sec = <10>; | 43 | timeout-sec = <10>; |
32 | status = "okay"; | 44 | status = "okay"; |
45 | clocks = <&gate_clk 7>; | ||
33 | }; | 46 | }; |
diff --git a/Documentation/devicetree/of_selftest.txt b/Documentation/devicetree/of_selftest.txt index 1e3d5c92b5e3..57a808b588bf 100644 --- a/Documentation/devicetree/of_selftest.txt +++ b/Documentation/devicetree/of_selftest.txt | |||
@@ -63,7 +63,6 @@ struct device_node { | |||
63 | struct device_node *parent; | 63 | struct device_node *parent; |
64 | struct device_node *child; | 64 | struct device_node *child; |
65 | struct device_node *sibling; | 65 | struct device_node *sibling; |
66 | struct device_node *allnext; /* next in list of all nodes */ | ||
67 | ... | 66 | ... |
68 | }; | 67 | }; |
69 | 68 | ||
@@ -99,12 +98,6 @@ child11 -> sibling12 -> sibling13 -> sibling14 -> null | |||
99 | Figure 1: Generic structure of un-flattened device tree | 98 | Figure 1: Generic structure of un-flattened device tree |
100 | 99 | ||
101 | 100 | ||
102 | *allnext: it is used to link all the nodes of DT into a list. So, for the | ||
103 | above tree the list would be as follows: | ||
104 | |||
105 | root->child1->child11->sibling12->sibling13->child131->sibling14->sibling2-> | ||
106 | child21->sibling22->sibling23->sibling3->child31->sibling32->sibling4->null | ||
107 | |||
108 | Before executing OF selftest, it is required to attach the test data to | 101 | Before executing OF selftest, it is required to attach the test data to |
109 | machine's device tree (if present). So, when selftest_data_add() is called, | 102 | machine's device tree (if present). So, when selftest_data_add() is called, |
110 | at first it reads the flattened device tree data linked into the kernel image | 103 | at first it reads the flattened device tree data linked into the kernel image |
@@ -131,11 +124,6 @@ root ('/') | |||
131 | test-child01 null null null | 124 | test-child01 null null null |
132 | 125 | ||
133 | 126 | ||
134 | allnext list: | ||
135 | |||
136 | root->testcase-data->test-child0->test-child01->test-sibling1->test-sibling2 | ||
137 | ->test-sibling3->null | ||
138 | |||
139 | Figure 2: Example test data tree to be attached to live tree. | 127 | Figure 2: Example test data tree to be attached to live tree. |
140 | 128 | ||
141 | According to the scenario above, the live tree is already present so it isn't | 129 | According to the scenario above, the live tree is already present so it isn't |
@@ -204,8 +192,6 @@ detached and then moving up the parent nodes are removed, and eventually the | |||
204 | whole tree). selftest_data_remove() calls detach_node_and_children() that uses | 192 | whole tree). selftest_data_remove() calls detach_node_and_children() that uses |
205 | of_detach_node() to detach the nodes from the live device tree. | 193 | of_detach_node() to detach the nodes from the live device tree. |
206 | 194 | ||
207 | To detach a node, of_detach_node() first updates all_next linked list, by | 195 | To detach a node, of_detach_node() either updates the child pointer of given |
208 | attaching the previous node's allnext to current node's allnext pointer. And | 196 | node's parent to its sibling or attaches the previous sibling to the given |
209 | then, it either updates the child pointer of given node's parent to its | 197 | node's sibling, as appropriate. That is it :) |
210 | sibling or attaches the previous sibling to the given node's sibling, as | ||
211 | appropriate. That is it :) | ||
diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt new file mode 100644 index 000000000000..30ae758e3eef --- /dev/null +++ b/Documentation/devicetree/overlay-notes.txt | |||
@@ -0,0 +1,133 @@ | |||
1 | Device Tree Overlay Notes | ||
2 | ------------------------- | ||
3 | |||
4 | This document describes the implementation of the in-kernel | ||
5 | device tree overlay functionality residing in drivers/of/overlay.c and is a | ||
6 | companion document to Documentation/devicetree/dt-object-internal.txt[1] & | ||
7 | Documentation/devicetree/dynamic-resolution-notes.txt[2] | ||
8 | |||
9 | How overlays work | ||
10 | ----------------- | ||
11 | |||
12 | A Device Tree's overlay purpose is to modify the kernel's live tree, and | ||
13 | have the modification affecting the state of the the kernel in a way that | ||
14 | is reflecting the changes. | ||
15 | Since the kernel mainly deals with devices, any new device node that result | ||
16 | in an active device should have it created while if the device node is either | ||
17 | disabled or removed all together, the affected device should be deregistered. | ||
18 | |||
19 | Lets take an example where we have a foo board with the following base tree | ||
20 | which is taken from [1]. | ||
21 | |||
22 | ---- foo.dts ----------------------------------------------------------------- | ||
23 | /* FOO platform */ | ||
24 | / { | ||
25 | compatible = "corp,foo"; | ||
26 | |||
27 | /* shared resources */ | ||
28 | res: res { | ||
29 | }; | ||
30 | |||
31 | /* On chip peripherals */ | ||
32 | ocp: ocp { | ||
33 | /* peripherals that are always instantiated */ | ||
34 | peripheral1 { ... }; | ||
35 | } | ||
36 | }; | ||
37 | ---- foo.dts ----------------------------------------------------------------- | ||
38 | |||
39 | The overlay bar.dts, when loaded (and resolved as described in [2]) should | ||
40 | |||
41 | ---- bar.dts ----------------------------------------------------------------- | ||
42 | /plugin/; /* allow undefined label references and record them */ | ||
43 | / { | ||
44 | .... /* various properties for loader use; i.e. part id etc. */ | ||
45 | fragment@0 { | ||
46 | target = <&ocp>; | ||
47 | __overlay__ { | ||
48 | /* bar peripheral */ | ||
49 | bar { | ||
50 | compatible = "corp,bar"; | ||
51 | ... /* various properties and child nodes */ | ||
52 | } | ||
53 | }; | ||
54 | }; | ||
55 | }; | ||
56 | ---- bar.dts ----------------------------------------------------------------- | ||
57 | |||
58 | result in foo+bar.dts | ||
59 | |||
60 | ---- foo+bar.dts ------------------------------------------------------------- | ||
61 | /* FOO platform + bar peripheral */ | ||
62 | / { | ||
63 | compatible = "corp,foo"; | ||
64 | |||
65 | /* shared resources */ | ||
66 | res: res { | ||
67 | }; | ||
68 | |||
69 | /* On chip peripherals */ | ||
70 | ocp: ocp { | ||
71 | /* peripherals that are always instantiated */ | ||
72 | peripheral1 { ... }; | ||
73 | |||
74 | /* bar peripheral */ | ||
75 | bar { | ||
76 | compatible = "corp,bar"; | ||
77 | ... /* various properties and child nodes */ | ||
78 | } | ||
79 | } | ||
80 | }; | ||
81 | ---- foo+bar.dts ------------------------------------------------------------- | ||
82 | |||
83 | As a result of the the overlay, a new device node (bar) has been created | ||
84 | so a bar platform device will be registered and if a matching device driver | ||
85 | is loaded the device will be created as expected. | ||
86 | |||
87 | Overlay in-kernel API | ||
88 | -------------------------------- | ||
89 | |||
90 | The API is quite easy to use. | ||
91 | |||
92 | 1. Call of_overlay_create() to create and apply an overlay. The return value | ||
93 | is a cookie identifying this overlay. | ||
94 | |||
95 | 2. Call of_overlay_destroy() to remove and cleanup the overlay previously | ||
96 | created via the call to of_overlay_create(). Removal of an overlay that | ||
97 | is stacked by another will not be permitted. | ||
98 | |||
99 | Finally, if you need to remove all overlays in one-go, just call | ||
100 | of_overlay_destroy_all() which will remove every single one in the correct | ||
101 | order. | ||
102 | |||
103 | Overlay DTS Format | ||
104 | ------------------ | ||
105 | |||
106 | The DTS of an overlay should have the following format: | ||
107 | |||
108 | { | ||
109 | /* ignored properties by the overlay */ | ||
110 | |||
111 | fragment@0 { /* first child node */ | ||
112 | |||
113 | target=<phandle>; /* phandle target of the overlay */ | ||
114 | or | ||
115 | target-path="/path"; /* target path of the overlay */ | ||
116 | |||
117 | __overlay__ { | ||
118 | property-a; /* add property-a to the target */ | ||
119 | node-a { /* add to an existing, or create a node-a */ | ||
120 | ... | ||
121 | }; | ||
122 | }; | ||
123 | } | ||
124 | fragment@1 { /* second child node */ | ||
125 | ... | ||
126 | }; | ||
127 | /* more fragments follow */ | ||
128 | } | ||
129 | |||
130 | Using the non-phandle based target method allows one to use a base DT which does | ||
131 | not contain a __symbols__ node, i.e. it was not compiled with the -@ option. | ||
132 | The __symbols__ node is only required for the target=<phandle> method, since it | ||
133 | contains the information required to map from a phandle to a tree location. | ||
diff --git a/Documentation/devicetree/todo.txt b/Documentation/devicetree/todo.txt index c3cf0659bd19..b5139d1de811 100644 --- a/Documentation/devicetree/todo.txt +++ b/Documentation/devicetree/todo.txt | |||
@@ -2,7 +2,6 @@ Todo list for devicetree: | |||
2 | 2 | ||
3 | === General structure === | 3 | === General structure === |
4 | - Switch from custom lists to (h)list_head for nodes and properties structure | 4 | - Switch from custom lists to (h)list_head for nodes and properties structure |
5 | - Remove of_allnodes list and iterate using list of child nodes alone | ||
6 | 5 | ||
7 | === CONFIG_OF_DYNAMIC === | 6 | === CONFIG_OF_DYNAMIC === |
8 | - Switch to RCU for tree updates and get rid of global spinlock | 7 | - Switch to RCU for tree updates and get rid of global spinlock |
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine/client.txt index 11fb87ff6cd0..11fb87ff6cd0 100644 --- a/Documentation/dmaengine.txt +++ b/Documentation/dmaengine/client.txt | |||
diff --git a/Documentation/dmatest.txt b/Documentation/dmaengine/dmatest.txt index dd77a81bdb80..dd77a81bdb80 100644 --- a/Documentation/dmatest.txt +++ b/Documentation/dmaengine/dmatest.txt | |||
diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt new file mode 100644 index 000000000000..766658ccf235 --- /dev/null +++ b/Documentation/dmaengine/provider.txt | |||
@@ -0,0 +1,366 @@ | |||
1 | DMAengine controller documentation | ||
2 | ================================== | ||
3 | |||
4 | Hardware Introduction | ||
5 | +++++++++++++++++++++ | ||
6 | |||
7 | Most of the Slave DMA controllers have the same general principles of | ||
8 | operations. | ||
9 | |||
10 | They have a given number of channels to use for the DMA transfers, and | ||
11 | a given number of requests lines. | ||
12 | |||
13 | Requests and channels are pretty much orthogonal. Channels can be used | ||
14 | to serve several to any requests. To simplify, channels are the | ||
15 | entities that will be doing the copy, and requests what endpoints are | ||
16 | involved. | ||
17 | |||
18 | The request lines actually correspond to physical lines going from the | ||
19 | DMA-eligible devices to the controller itself. Whenever the device | ||
20 | will want to start a transfer, it will assert a DMA request (DRQ) by | ||
21 | asserting that request line. | ||
22 | |||
23 | A very simple DMA controller would only take into account a single | ||
24 | parameter: the transfer size. At each clock cycle, it would transfer a | ||
25 | byte of data from one buffer to another, until the transfer size has | ||
26 | been reached. | ||
27 | |||
28 | That wouldn't work well in the real world, since slave devices might | ||
29 | require a specific number of bits to be transferred in a single | ||
30 | cycle. For example, we may want to transfer as much data as the | ||
31 | physical bus allows to maximize performances when doing a simple | ||
32 | memory copy operation, but our audio device could have a narrower FIFO | ||
33 | that requires data to be written exactly 16 or 24 bits at a time. This | ||
34 | is why most if not all of the DMA controllers can adjust this, using a | ||
35 | parameter called the transfer width. | ||
36 | |||
37 | Moreover, some DMA controllers, whenever the RAM is used as a source | ||
38 | or destination, can group the reads or writes in memory into a buffer, | ||
39 | so instead of having a lot of small memory accesses, which is not | ||
40 | really efficient, you'll get several bigger transfers. This is done | ||
41 | using a parameter called the burst size, that defines how many single | ||
42 | reads/writes it's allowed to do without the controller splitting the | ||
43 | transfer into smaller sub-transfers. | ||
44 | |||
45 | Our theoretical DMA controller would then only be able to do transfers | ||
46 | that involve a single contiguous block of data. However, some of the | ||
47 | transfers we usually have are not, and want to copy data from | ||
48 | non-contiguous buffers to a contiguous buffer, which is called | ||
49 | scatter-gather. | ||
50 | |||
51 | DMAEngine, at least for mem2dev transfers, require support for | ||
52 | scatter-gather. So we're left with two cases here: either we have a | ||
53 | quite simple DMA controller that doesn't support it, and we'll have to | ||
54 | implement it in software, or we have a more advanced DMA controller, | ||
55 | that implements in hardware scatter-gather. | ||
56 | |||
57 | The latter are usually programmed using a collection of chunks to | ||
58 | transfer, and whenever the transfer is started, the controller will go | ||
59 | over that collection, doing whatever we programmed there. | ||
60 | |||
61 | This collection is usually either a table or a linked list. You will | ||
62 | then push either the address of the table and its number of elements, | ||
63 | or the first item of the list to one channel of the DMA controller, | ||
64 | and whenever a DRQ will be asserted, it will go through the collection | ||
65 | to know where to fetch the data from. | ||
66 | |||
67 | Either way, the format of this collection is completely dependent on | ||
68 | your hardware. Each DMA controller will require a different structure, | ||
69 | but all of them will require, for every chunk, at least the source and | ||
70 | destination addresses, whether it should increment these addresses or | ||
71 | not and the three parameters we saw earlier: the burst size, the | ||
72 | transfer width and the transfer size. | ||
73 | |||
74 | The one last thing is that usually, slave devices won't issue DRQ by | ||
75 | default, and you have to enable this in your slave device driver first | ||
76 | whenever you're willing to use DMA. | ||
77 | |||
78 | These were just the general memory-to-memory (also called mem2mem) or | ||
79 | memory-to-device (mem2dev) kind of transfers. Most devices often | ||
80 | support other kind of transfers or memory operations that dmaengine | ||
81 | support and will be detailed later in this document. | ||
82 | |||
83 | DMA Support in Linux | ||
84 | ++++++++++++++++++++ | ||
85 | |||
86 | Historically, DMA controller drivers have been implemented using the | ||
87 | async TX API, to offload operations such as memory copy, XOR, | ||
88 | cryptography, etc., basically any memory to memory operation. | ||
89 | |||
90 | Over time, the need for memory to device transfers arose, and | ||
91 | dmaengine was extended. Nowadays, the async TX API is written as a | ||
92 | layer on top of dmaengine, and acts as a client. Still, dmaengine | ||
93 | accommodates that API in some cases, and made some design choices to | ||
94 | ensure that it stayed compatible. | ||
95 | |||
96 | For more information on the Async TX API, please look the relevant | ||
97 | documentation file in Documentation/crypto/async-tx-api.txt. | ||
98 | |||
99 | DMAEngine Registration | ||
100 | ++++++++++++++++++++++ | ||
101 | |||
102 | struct dma_device Initialization | ||
103 | -------------------------------- | ||
104 | |||
105 | Just like any other kernel framework, the whole DMAEngine registration | ||
106 | relies on the driver filling a structure and registering against the | ||
107 | framework. In our case, that structure is dma_device. | ||
108 | |||
109 | The first thing you need to do in your driver is to allocate this | ||
110 | structure. Any of the usual memory allocators will do, but you'll also | ||
111 | need to initialize a few fields in there: | ||
112 | |||
113 | * channels: should be initialized as a list using the | ||
114 | INIT_LIST_HEAD macro for example | ||
115 | |||
116 | * dev: should hold the pointer to the struct device associated | ||
117 | to your current driver instance. | ||
118 | |||
119 | Supported transaction types | ||
120 | --------------------------- | ||
121 | |||
122 | The next thing you need is to set which transaction types your device | ||
123 | (and driver) supports. | ||
124 | |||
125 | Our dma_device structure has a field called cap_mask that holds the | ||
126 | various types of transaction supported, and you need to modify this | ||
127 | mask using the dma_cap_set function, with various flags depending on | ||
128 | transaction types you support as an argument. | ||
129 | |||
130 | All those capabilities are defined in the dma_transaction_type enum, | ||
131 | in include/linux/dmaengine.h | ||
132 | |||
133 | Currently, the types available are: | ||
134 | * DMA_MEMCPY | ||
135 | - The device is able to do memory to memory copies | ||
136 | |||
137 | * DMA_XOR | ||
138 | - The device is able to perform XOR operations on memory areas | ||
139 | - Used to accelerate XOR intensive tasks, such as RAID5 | ||
140 | |||
141 | * DMA_XOR_VAL | ||
142 | - The device is able to perform parity check using the XOR | ||
143 | algorithm against a memory buffer. | ||
144 | |||
145 | * DMA_PQ | ||
146 | - The device is able to perform RAID6 P+Q computations, P being a | ||
147 | simple XOR, and Q being a Reed-Solomon algorithm. | ||
148 | |||
149 | * DMA_PQ_VAL | ||
150 | - The device is able to perform parity check using RAID6 P+Q | ||
151 | algorithm against a memory buffer. | ||
152 | |||
153 | * DMA_INTERRUPT | ||
154 | - The device is able to trigger a dummy transfer that will | ||
155 | generate periodic interrupts | ||
156 | - Used by the client drivers to register a callback that will be | ||
157 | called on a regular basis through the DMA controller interrupt | ||
158 | |||
159 | * DMA_SG | ||
160 | - The device supports memory to memory scatter-gather | ||
161 | transfers. | ||
162 | - Even though a plain memcpy can look like a particular case of a | ||
163 | scatter-gather transfer, with a single chunk to transfer, it's a | ||
164 | distinct transaction type in the mem2mem transfers case | ||
165 | |||
166 | * DMA_PRIVATE | ||
167 | - The devices only supports slave transfers, and as such isn't | ||
168 | available for async transfers. | ||
169 | |||
170 | * DMA_ASYNC_TX | ||
171 | - Must not be set by the device, and will be set by the framework | ||
172 | if needed | ||
173 | - /* TODO: What is it about? */ | ||
174 | |||
175 | * DMA_SLAVE | ||
176 | - The device can handle device to memory transfers, including | ||
177 | scatter-gather transfers. | ||
178 | - While in the mem2mem case we were having two distinct types to | ||
179 | deal with a single chunk to copy or a collection of them, here, | ||
180 | we just have a single transaction type that is supposed to | ||
181 | handle both. | ||
182 | - If you want to transfer a single contiguous memory buffer, | ||
183 | simply build a scatter list with only one item. | ||
184 | |||
185 | * DMA_CYCLIC | ||
186 | - The device can handle cyclic transfers. | ||
187 | - A cyclic transfer is a transfer where the chunk collection will | ||
188 | loop over itself, with the last item pointing to the first. | ||
189 | - It's usually used for audio transfers, where you want to operate | ||
190 | on a single ring buffer that you will fill with your audio data. | ||
191 | |||
192 | * DMA_INTERLEAVE | ||
193 | - The device supports interleaved transfer. | ||
194 | - These transfers can transfer data from a non-contiguous buffer | ||
195 | to a non-contiguous buffer, opposed to DMA_SLAVE that can | ||
196 | transfer data from a non-contiguous data set to a continuous | ||
197 | destination buffer. | ||
198 | - It's usually used for 2d content transfers, in which case you | ||
199 | want to transfer a portion of uncompressed data directly to the | ||
200 | display to print it | ||
201 | |||
202 | These various types will also affect how the source and destination | ||
203 | addresses change over time. | ||
204 | |||
205 | Addresses pointing to RAM are typically incremented (or decremented) | ||
206 | after each transfer. In case of a ring buffer, they may loop | ||
207 | (DMA_CYCLIC). Addresses pointing to a device's register (e.g. a FIFO) | ||
208 | are typically fixed. | ||
209 | |||
210 | Device operations | ||
211 | ----------------- | ||
212 | |||
213 | Our dma_device structure also requires a few function pointers in | ||
214 | order to implement the actual logic, now that we described what | ||
215 | operations we were able to perform. | ||
216 | |||
217 | The functions that we have to fill in there, and hence have to | ||
218 | implement, obviously depend on the transaction types you reported as | ||
219 | supported. | ||
220 | |||
221 | * device_alloc_chan_resources | ||
222 | * device_free_chan_resources | ||
223 | - These functions will be called whenever a driver will call | ||
224 | dma_request_channel or dma_release_channel for the first/last | ||
225 | time on the channel associated to that driver. | ||
226 | - They are in charge of allocating/freeing all the needed | ||
227 | resources in order for that channel to be useful for your | ||
228 | driver. | ||
229 | - These functions can sleep. | ||
230 | |||
231 | * device_prep_dma_* | ||
232 | - These functions are matching the capabilities you registered | ||
233 | previously. | ||
234 | - These functions all take the buffer or the scatterlist relevant | ||
235 | for the transfer being prepared, and should create a hardware | ||
236 | descriptor or a list of hardware descriptors from it | ||
237 | - These functions can be called from an interrupt context | ||
238 | - Any allocation you might do should be using the GFP_NOWAIT | ||
239 | flag, in order not to potentially sleep, but without depleting | ||
240 | the emergency pool either. | ||
241 | - Drivers should try to pre-allocate any memory they might need | ||
242 | during the transfer setup at probe time to avoid putting to | ||
243 | much pressure on the nowait allocator. | ||
244 | |||
245 | - It should return a unique instance of the | ||
246 | dma_async_tx_descriptor structure, that further represents this | ||
247 | particular transfer. | ||
248 | |||
249 | - This structure can be initialized using the function | ||
250 | dma_async_tx_descriptor_init. | ||
251 | - You'll also need to set two fields in this structure: | ||
252 | + flags: | ||
253 | TODO: Can it be modified by the driver itself, or | ||
254 | should it be always the flags passed in the arguments | ||
255 | |||
256 | + tx_submit: A pointer to a function you have to implement, | ||
257 | that is supposed to push the current | ||
258 | transaction descriptor to a pending queue, waiting | ||
259 | for issue_pending to be called. | ||
260 | |||
261 | * device_issue_pending | ||
262 | - Takes the first transaction descriptor in the pending queue, | ||
263 | and starts the transfer. Whenever that transfer is done, it | ||
264 | should move to the next transaction in the list. | ||
265 | - This function can be called in an interrupt context | ||
266 | |||
267 | * device_tx_status | ||
268 | - Should report the bytes left to go over on the given channel | ||
269 | - Should only care about the transaction descriptor passed as | ||
270 | argument, not the currently active one on a given channel | ||
271 | - The tx_state argument might be NULL | ||
272 | - Should use dma_set_residue to report it | ||
273 | - In the case of a cyclic transfer, it should only take into | ||
274 | account the current period. | ||
275 | - This function can be called in an interrupt context. | ||
276 | |||
277 | * device_control | ||
278 | - Used by client drivers to control and configure the channel it | ||
279 | has a handle on. | ||
280 | - Called with a command and an argument | ||
281 | + The command is one of the values listed by the enum | ||
282 | dma_ctrl_cmd. The valid commands are: | ||
283 | + DMA_PAUSE | ||
284 | + Pauses a transfer on the channel | ||
285 | + This command should operate synchronously on the channel, | ||
286 | pausing right away the work of the given channel | ||
287 | + DMA_RESUME | ||
288 | + Restarts a transfer on the channel | ||
289 | + This command should operate synchronously on the channel, | ||
290 | resuming right away the work of the given channel | ||
291 | + DMA_TERMINATE_ALL | ||
292 | + Aborts all the pending and ongoing transfers on the | ||
293 | channel | ||
294 | + This command should operate synchronously on the channel, | ||
295 | terminating right away all the channels | ||
296 | + DMA_SLAVE_CONFIG | ||
297 | + Reconfigures the channel with passed configuration | ||
298 | + This command should NOT perform synchronously, or on any | ||
299 | currently queued transfers, but only on subsequent ones | ||
300 | + In this case, the function will receive a | ||
301 | dma_slave_config structure pointer as an argument, that | ||
302 | will detail which configuration to use. | ||
303 | + Even though that structure contains a direction field, | ||
304 | this field is deprecated in favor of the direction | ||
305 | argument given to the prep_* functions | ||
306 | + FSLDMA_EXTERNAL_START | ||
307 | + TODO: Why does that even exist? | ||
308 | + The argument is an opaque unsigned long. This actually is a | ||
309 | pointer to a struct dma_slave_config that should be used only | ||
310 | in the DMA_SLAVE_CONFIG. | ||
311 | |||
312 | * device_slave_caps | ||
313 | - Called through the framework by client drivers in order to have | ||
314 | an idea of what are the properties of the channel allocated to | ||
315 | them. | ||
316 | - Such properties are the buswidth, available directions, etc. | ||
317 | - Required for every generic layer doing DMA transfers, such as | ||
318 | ASoC. | ||
319 | |||
320 | Misc notes (stuff that should be documented, but don't really know | ||
321 | where to put them) | ||
322 | ------------------------------------------------------------------ | ||
323 | * dma_run_dependencies | ||
324 | - Should be called at the end of an async TX transfer, and can be | ||
325 | ignored in the slave transfers case. | ||
326 | - Makes sure that dependent operations are run before marking it | ||
327 | as complete. | ||
328 | |||
329 | * dma_cookie_t | ||
330 | - it's a DMA transaction ID that will increment over time. | ||
331 | - Not really relevant any more since the introduction of virt-dma | ||
332 | that abstracts it away. | ||
333 | |||
334 | * DMA_CTRL_ACK | ||
335 | - Undocumented feature | ||
336 | - No one really has an idea of what it's about, besides being | ||
337 | related to reusing the DMA transaction descriptors or having | ||
338 | additional transactions added to it in the async-tx API | ||
339 | - Useless in the case of the slave API | ||
340 | |||
341 | General Design Notes | ||
342 | -------------------- | ||
343 | |||
344 | Most of the DMAEngine drivers you'll see are based on a similar design | ||
345 | that handles the end of transfer interrupts in the handler, but defer | ||
346 | most work to a tasklet, including the start of a new transfer whenever | ||
347 | the previous transfer ended. | ||
348 | |||
349 | This is a rather inefficient design though, because the inter-transfer | ||
350 | latency will be not only the interrupt latency, but also the | ||
351 | scheduling latency of the tasklet, which will leave the channel idle | ||
352 | in between, which will slow down the global transfer rate. | ||
353 | |||
354 | You should avoid this kind of practice, and instead of electing a new | ||
355 | transfer in your tasklet, move that part to the interrupt handler in | ||
356 | order to have a shorter idle window (that we can't really avoid | ||
357 | anyway). | ||
358 | |||
359 | Glossary | ||
360 | -------- | ||
361 | |||
362 | Burst: A number of consecutive read or write operations | ||
363 | that can be queued to buffers before being flushed to | ||
364 | memory. | ||
365 | Chunk: A contiguous collection of bursts | ||
366 | Transfer: A collection of chunks (be it contiguous or not) | ||
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt index 9af538be3751..eede6088f978 100644 --- a/Documentation/email-clients.txt +++ b/Documentation/email-clients.txt | |||
@@ -77,6 +77,17 @@ should appear, and then pressing CTRL-R let you specify the patch file | |||
77 | to insert into the message. | 77 | to insert into the message. |
78 | 78 | ||
79 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 79 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
80 | Claws Mail (GUI) | ||
81 | |||
82 | Works. Some people use this successfully for patches. | ||
83 | |||
84 | To insert a patch use Message->Insert File (CTRL+i) or an external editor. | ||
85 | |||
86 | If the inserted patch has to be edited in the Claws composition window | ||
87 | "Auto wrapping" in Configuration->Preferences->Compose->Wrapping should be | ||
88 | disabled. | ||
89 | |||
90 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
80 | Evolution (GUI) | 91 | Evolution (GUI) |
81 | 92 | ||
82 | Some people use this successfully for patches. | 93 | Some people use this successfully for patches. |
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt index 3a863f692728..88ab81c79109 100644 --- a/Documentation/filesystems/debugfs.txt +++ b/Documentation/filesystems/debugfs.txt | |||
@@ -140,7 +140,7 @@ file. | |||
140 | struct dentry *parent, | 140 | struct dentry *parent, |
141 | struct debugfs_regset32 *regset); | 141 | struct debugfs_regset32 *regset); |
142 | 142 | ||
143 | int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, | 143 | void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, |
144 | int nregs, void __iomem *base, char *prefix); | 144 | int nregs, void __iomem *base, char *prefix); |
145 | 145 | ||
146 | The "base" argument may be 0, but you may want to build the reg32 array | 146 | The "base" argument may be 0, but you may want to build the reg32 array |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 2cca5a25ef89..e0950c483c22 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 | inline_dentry Enable the inline dir feature: data in new created | ||
126 | directory entries can be written into inode block. The | ||
127 | space of inode block which is used to store inline | ||
128 | dentries is limited to ~3.4k. | ||
125 | flush_merge Merge concurrent cache_flush commands as much as possible | 129 | flush_merge Merge concurrent cache_flush commands as much as possible |
126 | to eliminate redundant command issues. If the underlying | 130 | to eliminate redundant command issues. If the underlying |
127 | device handles the cache_flush command relatively slowly, | 131 | device handles the cache_flush command relatively slowly, |
@@ -131,6 +135,9 @@ nobarrier This option can be used if underlying storage guarantees | |||
131 | If this option is set, no cache_flush commands are issued | 135 | If this option is set, no cache_flush commands are issued |
132 | but f2fs still guarantees the write ordering of all the | 136 | but f2fs still guarantees the write ordering of all the |
133 | data writes. | 137 | data writes. |
138 | fastboot This option is used when a system wants to reduce mount | ||
139 | time as much as possible, even though normal performance | ||
140 | can be sacrificed. | ||
134 | 141 | ||
135 | ================================================================================ | 142 | ================================================================================ |
136 | DEBUGFS ENTRIES | 143 | DEBUGFS ENTRIES |
diff --git a/Documentation/filesystems/nfs/Exporting b/Documentation/filesystems/nfs/Exporting index c8f036a9b13f..520a4becb75c 100644 --- a/Documentation/filesystems/nfs/Exporting +++ b/Documentation/filesystems/nfs/Exporting | |||
@@ -72,24 +72,11 @@ c/ Helper routines to allocate anonymous dentries, and to help attach | |||
72 | DCACHE_DISCONNECTED) dentry is allocated and attached. | 72 | DCACHE_DISCONNECTED) dentry is allocated and attached. |
73 | In the case of a directory, care is taken that only one dentry | 73 | In the case of a directory, care is taken that only one dentry |
74 | can ever be attached. | 74 | can ever be attached. |
75 | d_splice_alias(inode, dentry) or d_materialise_unique(dentry, inode) | 75 | d_splice_alias(inode, dentry) will introduce a new dentry into the tree; |
76 | will introduce a new dentry into the tree; either the passed-in | 76 | either the passed-in dentry or a preexisting alias for the given inode |
77 | dentry or a preexisting alias for the given inode (such as an | 77 | (such as an anonymous one created by d_obtain_alias), if appropriate. |
78 | anonymous one created by d_obtain_alias), if appropriate. The two | 78 | It returns NULL when the passed-in dentry is used, following the calling |
79 | functions differ in their handling of directories with preexisting | 79 | convention of ->lookup. |
80 | aliases: | ||
81 | d_splice_alias will use any existing IS_ROOT dentry, but it will | ||
82 | return -EIO rather than try to move a dentry with a different | ||
83 | parent. This is appropriate for local filesystems, which | ||
84 | should never see such an alias unless the filesystem is | ||
85 | corrupted somehow (for example, if two on-disk directory | ||
86 | entries refer to the same directory.) | ||
87 | d_materialise_unique will attempt to move any dentry. This is | ||
88 | appropriate for distributed filesystems, where finding a | ||
89 | directory other than where we last cached it may be a normal | ||
90 | consequence of concurrent operations on other hosts. | ||
91 | Both functions return NULL when the passed-in dentry is used, | ||
92 | following the calling convention of ->lookup. | ||
93 | 80 | ||
94 | 81 | ||
95 | Filesystem Issues | 82 | Filesystem Issues |
diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt index 530850a72735..a27c950ece61 100644 --- a/Documentation/filesystems/overlayfs.txt +++ b/Documentation/filesystems/overlayfs.txt | |||
@@ -64,7 +64,7 @@ is formed. | |||
64 | At mount time, the two directories given as mount options "lowerdir" and | 64 | At mount time, the two directories given as mount options "lowerdir" and |
65 | "upperdir" are combined into a merged directory: | 65 | "upperdir" are combined into a merged directory: |
66 | 66 | ||
67 | mount -t overlayfs overlayfs -olowerdir=/lower,upperdir=/upper,\ | 67 | mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,\ |
68 | workdir=/work /merged | 68 | workdir=/work /merged |
69 | 69 | ||
70 | The "workdir" needs to be an empty directory on the same filesystem | 70 | The "workdir" needs to be an empty directory on the same filesystem |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 0f3a1390bf00..fa2db081505e 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -463,3 +463,11 @@ in your dentry operations instead. | |||
463 | of the in-tree instances did). inode_hash_lock is still held, | 463 | of the in-tree instances did). inode_hash_lock is still held, |
464 | of course, so they are still serialized wrt removal from inode hash, | 464 | of course, so they are still serialized wrt removal from inode hash, |
465 | as well as wrt set() callback of iget5_locked(). | 465 | as well as wrt set() callback of iget5_locked(). |
466 | -- | ||
467 | [mandatory] | ||
468 | d_materialise_unique() is gone; d_splice_alias() does everything you | ||
469 | need now. Remember that they have opposite orders of arguments ;-/ | ||
470 | -- | ||
471 | [mandatory] | ||
472 | f_dentry is gone; use f_path.dentry, or, better yet, see if you can avoid | ||
473 | it entirely. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index eb8a10e22f7c..aae9dd13c91f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1272,7 +1272,7 @@ softirq. | |||
1272 | 1272 | ||
1273 | 1273 | ||
1274 | 1.9 Ext4 file system parameters | 1274 | 1.9 Ext4 file system parameters |
1275 | ------------------------------ | 1275 | ------------------------------- |
1276 | 1276 | ||
1277 | Information about mounted ext4 file systems can be found in | 1277 | Information about mounted ext4 file systems can be found in |
1278 | /proc/fs/ext4. Each mounted filesystem will have a directory in | 1278 | /proc/fs/ext4. Each mounted filesystem will have a directory in |
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index 8ea3e90ace07..b797ed38de46 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt | |||
@@ -180,23 +180,19 @@ output must be passed to the seq_file code. Some utility functions have | |||
180 | been defined which make this task easy. | 180 | been defined which make this task easy. |
181 | 181 | ||
182 | Most code will simply use seq_printf(), which works pretty much like | 182 | Most code will simply use seq_printf(), which works pretty much like |
183 | printk(), but which requires the seq_file pointer as an argument. It is | 183 | printk(), but which requires the seq_file pointer as an argument. |
184 | common to ignore the return value from seq_printf(), but a function | ||
185 | producing complicated output may want to check that value and quit if | ||
186 | something non-zero is returned; an error return means that the seq_file | ||
187 | buffer has been filled and further output will be discarded. | ||
188 | 184 | ||
189 | For straight character output, the following functions may be used: | 185 | For straight character output, the following functions may be used: |
190 | 186 | ||
191 | int seq_putc(struct seq_file *m, char c); | 187 | seq_putc(struct seq_file *m, char c); |
192 | int seq_puts(struct seq_file *m, const char *s); | 188 | seq_puts(struct seq_file *m, const char *s); |
193 | int seq_escape(struct seq_file *m, const char *s, const char *esc); | 189 | seq_escape(struct seq_file *m, const char *s, const char *esc); |
194 | 190 | ||
195 | The first two output a single character and a string, just like one would | 191 | The first two output a single character and a string, just like one would |
196 | expect. seq_escape() is like seq_puts(), except that any character in s | 192 | expect. seq_escape() is like seq_puts(), except that any character in s |
197 | which is in the string esc will be represented in octal form in the output. | 193 | which is in the string esc will be represented in octal form in the output. |
198 | 194 | ||
199 | There is also a pair of functions for printing filenames: | 195 | There are also a pair of functions for printing filenames: |
200 | 196 | ||
201 | int seq_path(struct seq_file *m, struct path *path, char *esc); | 197 | int seq_path(struct seq_file *m, struct path *path, char *esc); |
202 | int seq_path_root(struct seq_file *m, struct path *path, | 198 | int seq_path_root(struct seq_file *m, struct path *path, |
@@ -209,6 +205,14 @@ root is desired, it can be used with seq_path_root(). Note that, if it | |||
209 | turns out that path cannot be reached from root, the value of root will be | 205 | turns out that path cannot be reached from root, the value of root will be |
210 | changed in seq_file_root() to a root which *does* work. | 206 | changed in seq_file_root() to a root which *does* work. |
211 | 207 | ||
208 | A function producing complicated output may want to check | ||
209 | bool seq_has_overflowed(struct seq_file *m); | ||
210 | and avoid further seq_<output> calls if true is returned. | ||
211 | |||
212 | A true return from seq_has_overflowed means that the seq_file buffer will | ||
213 | be discarded and the seq_show function will attempt to allocate a larger | ||
214 | buffer and retry printing. | ||
215 | |||
212 | 216 | ||
213 | Making it all work | 217 | Making it all work |
214 | 218 | ||
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt index 403c090aca39..e5274f84dc56 100644 --- a/Documentation/filesystems/squashfs.txt +++ b/Documentation/filesystems/squashfs.txt | |||
@@ -2,10 +2,10 @@ SQUASHFS 4.0 FILESYSTEM | |||
2 | ======================= | 2 | ======================= |
3 | 3 | ||
4 | Squashfs is a compressed read-only filesystem for Linux. | 4 | Squashfs is a compressed read-only filesystem for Linux. |
5 | It uses zlib/lzo/xz compression to compress files, inodes and directories. | 5 | It uses zlib, lz4, lzo, or xz compression to compress files, inodes and |
6 | Inodes in the system are very small and all blocks are packed to minimise | 6 | directories. Inodes in the system are very small and all blocks are packed to |
7 | data overhead. Block sizes greater than 4K are supported up to a maximum | 7 | minimise data overhead. Block sizes greater than 4K are supported up to a |
8 | of 1Mbytes (default block size 128K). | 8 | maximum of 1Mbytes (default block size 128K). |
9 | 9 | ||
10 | Squashfs is intended for general read-only filesystem use, for archival | 10 | Squashfs is intended for general read-only filesystem use, for archival |
11 | use (i.e. in cases where a .tar.gz file may be used), and in constrained | 11 | use (i.e. in cases where a .tar.gz file may be used), and in constrained |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 20bf204426ca..43ce0507ee25 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -835,7 +835,7 @@ struct file_operations { | |||
835 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | 835 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); |
836 | int (*setlease)(struct file *, long arg, struct file_lock **, void **); | 836 | int (*setlease)(struct file *, long arg, struct file_lock **, void **); |
837 | long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); | 837 | long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); |
838 | int (*show_fdinfo)(struct seq_file *m, struct file *f); | 838 | void (*show_fdinfo)(struct seq_file *m, struct file *f); |
839 | }; | 839 | }; |
840 | 840 | ||
841 | Again, all methods are called without any locks being held, unless | 841 | Again, all methods are called without any locks being held, unless |
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index 6ce544191ca6..d85fbae451ea 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt | |||
@@ -199,6 +199,33 @@ The active-low state of a GPIO can also be queried using the following call: | |||
199 | Note that these functions should only be used with great moderation ; a driver | 199 | Note that these functions should only be used with great moderation ; a driver |
200 | should not have to care about the physical line level. | 200 | should not have to care about the physical line level. |
201 | 201 | ||
202 | |||
203 | Set multiple GPIO outputs with a single function call | ||
204 | ----------------------------------------------------- | ||
205 | The following functions set the output values of an array of GPIOs: | ||
206 | |||
207 | void gpiod_set_array(unsigned int array_size, | ||
208 | struct gpio_desc **desc_array, | ||
209 | int *value_array) | ||
210 | void gpiod_set_raw_array(unsigned int array_size, | ||
211 | struct gpio_desc **desc_array, | ||
212 | int *value_array) | ||
213 | void gpiod_set_array_cansleep(unsigned int array_size, | ||
214 | struct gpio_desc **desc_array, | ||
215 | int *value_array) | ||
216 | void gpiod_set_raw_array_cansleep(unsigned int array_size, | ||
217 | struct gpio_desc **desc_array, | ||
218 | int *value_array) | ||
219 | |||
220 | The array can be an arbitrary set of GPIOs. The functions will try to set | ||
221 | GPIOs belonging to the same bank or chip simultaneously if supported by the | ||
222 | corresponding chip driver. In that case a significantly improved performance | ||
223 | can be expected. If simultaneous setting is not possible the GPIOs will be set | ||
224 | sequentially. | ||
225 | Note that for optimal performance GPIOs belonging to the same chip should be | ||
226 | contiguous within the array of descriptors. | ||
227 | |||
228 | |||
202 | GPIOs mapped to IRQs | 229 | GPIOs mapped to IRQs |
203 | -------------------- | 230 | -------------------- |
204 | GPIO lines can quite often be used as IRQs. You can get the IRQ number | 231 | GPIO lines can quite often be used as IRQs. You can get the IRQ number |
@@ -219,6 +246,24 @@ part of the IRQ interface, e.g. IRQF_TRIGGER_FALLING, as are system wakeup | |||
219 | capabilities. | 246 | capabilities. |
220 | 247 | ||
221 | 248 | ||
249 | GPIOs and ACPI | ||
250 | ============== | ||
251 | |||
252 | On ACPI systems, GPIOs are described by GpioIo()/GpioInt() resources listed by | ||
253 | the _CRS configuration objects of devices. Those resources do not provide | ||
254 | connection IDs (names) for GPIOs, so it is necessary to use an additional | ||
255 | mechanism for this purpose. | ||
256 | |||
257 | Systems compliant with ACPI 5.1 or newer may provide a _DSD configuration object | ||
258 | which, among other things, may be used to provide connection IDs for specific | ||
259 | GPIOs described by the GpioIo()/GpioInt() resources in _CRS. If that is the | ||
260 | case, it will be handled by the GPIO subsystem automatically. However, if the | ||
261 | _DSD is not present, the mappings between GpioIo()/GpioInt() resources and GPIO | ||
262 | connection IDs need to be provided by device drivers. | ||
263 | |||
264 | For details refer to Documentation/acpi/gpio-properties.txt | ||
265 | |||
266 | |||
222 | Interacting With the Legacy GPIO Subsystem | 267 | Interacting With the Legacy GPIO Subsystem |
223 | ========================================== | 268 | ========================================== |
224 | Many kernel subsystems still handle GPIOs using the legacy integer-based | 269 | Many kernel subsystems still handle GPIOs using the legacy integer-based |
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt index 31e0b5db55d8..90d0f6aba7a6 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/gpio/driver.txt | |||
@@ -158,12 +158,12 @@ Locking IRQ usage | |||
158 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested | 158 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested |
159 | to mark the GPIO as being used as an IRQ: | 159 | to mark the GPIO as being used as an IRQ: |
160 | 160 | ||
161 | int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset) | 161 | int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset) |
162 | 162 | ||
163 | This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock | 163 | This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock |
164 | is released: | 164 | is released: |
165 | 165 | ||
166 | void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) | 166 | void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) |
167 | 167 | ||
168 | When implementing an irqchip inside a GPIO driver, these two functions should | 168 | When implementing an irqchip inside a GPIO driver, these two functions should |
169 | typically be called in the .startup() and .shutdown() callbacks from the | 169 | typically be called in the .startup() and .shutdown() callbacks from the |
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75 index c6a5ff1b4641..67691a0aa41d 100644 --- a/Documentation/hwmon/lm75 +++ b/Documentation/hwmon/lm75 | |||
@@ -53,6 +53,11 @@ Supported chips: | |||
53 | http://www.ti.com/product/tmp75 | 53 | http://www.ti.com/product/tmp75 |
54 | http://www.ti.com/product/tmp175 | 54 | http://www.ti.com/product/tmp175 |
55 | http://www.ti.com/product/tmp275 | 55 | http://www.ti.com/product/tmp275 |
56 | * NXP LM75B | ||
57 | Prefix: 'lm75b' | ||
58 | Addresses scanned: none | ||
59 | Datasheet: Publicly available at the NXP website | ||
60 | http://www.nxp.com/documents/data_sheet/LM75B.pdf | ||
56 | 61 | ||
57 | Author: Frodo Looijaard <frodol@dds.nl> | 62 | Author: Frodo Looijaard <frodol@dds.nl> |
58 | 63 | ||
diff --git a/Documentation/hwmon/lm95234 b/Documentation/hwmon/lm95234 index a0e95ddfd372..32b777ef224c 100644 --- a/Documentation/hwmon/lm95234 +++ b/Documentation/hwmon/lm95234 | |||
@@ -2,6 +2,10 @@ Kernel driver lm95234 | |||
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * National Semiconductor / Texas Instruments LM95233 | ||
6 | Addresses scanned: I2C 0x18, 0x2a, 0x2b | ||
7 | Datasheet: Publicly available at the Texas Instruments website | ||
8 | http://www.ti.com/product/lm95233 | ||
5 | * National Semiconductor / Texas Instruments LM95234 | 9 | * National Semiconductor / Texas Instruments LM95234 |
6 | Addresses scanned: I2C 0x18, 0x4d, 0x4e | 10 | Addresses scanned: I2C 0x18, 0x4d, 0x4e |
7 | Datasheet: Publicly available at the Texas Instruments website | 11 | Datasheet: Publicly available at the Texas Instruments website |
@@ -13,11 +17,12 @@ Author: Guenter Roeck <linux@roeck-us.net> | |||
13 | Description | 17 | Description |
14 | ----------- | 18 | ----------- |
15 | 19 | ||
16 | LM95234 is an 11-bit digital temperature sensor with a 2-wire System Management | 20 | LM95233 and LM95234 are 11-bit digital temperature sensors with a 2-wire |
17 | Bus (SMBus) interface and TrueTherm technology that can very accurately monitor | 21 | System Management Bus (SMBus) interface and TrueTherm technology |
18 | the temperature of four remote diodes as well as its own temperature. | 22 | that can very accurately monitor the temperature of two (LM95233) |
19 | The four remote diodes can be external devices such as microprocessors, | 23 | or four (LM95234) remote diodes as well as its own temperature. |
20 | graphics processors or diode-connected 2N3904s. The LM95234's TruTherm | 24 | The remote diodes can be external devices such as microprocessors, |
25 | graphics processors or diode-connected 2N3904s. The chip's TruTherm | ||
21 | beta compensation technology allows sensing of 90 nm or 65 nm process | 26 | beta compensation technology allows sensing of 90 nm or 65 nm process |
22 | thermal diodes accurately. | 27 | thermal diodes accurately. |
23 | 28 | ||
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245 index 77eaf2812d25..d755901f58c4 100644 --- a/Documentation/hwmon/lm95245 +++ b/Documentation/hwmon/lm95245 | |||
@@ -2,10 +2,14 @@ Kernel driver lm95245 | |||
2 | ================== | 2 | ================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * National Semiconductor LM95245 | 5 | * TI LM95235 |
6 | Addresses scanned: I2C 0x18, 0x29, 0x4c | ||
7 | Datasheet: Publicly available at the TI website | ||
8 | http://www.ti.com/lit/ds/symlink/lm95235.pdf | ||
9 | * TI / National Semiconductor LM95245 | ||
6 | Addresses scanned: I2C 0x18, 0x19, 0x29, 0x4c, 0x4d | 10 | Addresses scanned: I2C 0x18, 0x19, 0x29, 0x4c, 0x4d |
7 | Datasheet: Publicly available at the National Semiconductor website | 11 | Datasheet: Publicly available at the TI website |
8 | http://www.national.com/mpf/LM/LM95245.html | 12 | http://www.ti.com/lit/ds/symlink/lm95245.pdf |
9 | 13 | ||
10 | 14 | ||
11 | Author: Alexander Stein <alexander.stein@systec-electronic.com> | 15 | Author: Alexander Stein <alexander.stein@systec-electronic.com> |
@@ -13,10 +17,10 @@ Author: Alexander Stein <alexander.stein@systec-electronic.com> | |||
13 | Description | 17 | Description |
14 | ----------- | 18 | ----------- |
15 | 19 | ||
16 | The LM95245 is an 11-bit digital temperature sensor with a 2-wire System | 20 | LM95235 and LM95245 are 11-bit digital temperature sensors with a 2-wire System |
17 | Management Bus (SMBus) interface and TruTherm technology that can monitor | 21 | Management Bus (SMBus) interface and TruTherm technology that can monitor |
18 | the temperature of a remote diode as well as its own temperature. | 22 | the temperature of a remote diode as well as its own temperature. |
19 | The LM95245 can be used to very accurately monitor the temperature of | 23 | The chips can be used to very accurately monitor the temperature of |
20 | external devices such as microprocessors. | 24 | external devices such as microprocessors. |
21 | 25 | ||
22 | All temperature values are given in millidegrees Celsius. Local temperature | 26 | All temperature values are given in millidegrees Celsius. Local temperature |
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775 index 4e9ef60e8c6c..f0dd3d2fec96 100644 --- a/Documentation/hwmon/nct6775 +++ b/Documentation/hwmon/nct6775 | |||
@@ -8,11 +8,15 @@ Kernel driver NCT6775 | |||
8 | ===================== | 8 | ===================== |
9 | 9 | ||
10 | Supported chips: | 10 | Supported chips: |
11 | * Nuvoton NCT6102D/NCT6104D/NCT6106D | ||
12 | Prefix: 'nct6106' | ||
13 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
14 | Datasheet: Available from the Nuvoton web site | ||
11 | * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I | 15 | * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I |
12 | Prefix: 'nct6775' | 16 | Prefix: 'nct6775' |
13 | Addresses scanned: ISA address retrieved from Super I/O registers | 17 | Addresses scanned: ISA address retrieved from Super I/O registers |
14 | Datasheet: Available from Nuvoton upon request | 18 | Datasheet: Available from Nuvoton upon request |
15 | * Nuvoton NCT5577D/NCT6776D/NCT6776F | 19 | * Nuvoton NCT5573D/NCT5577D/NCT6776D/NCT6776F |
16 | Prefix: 'nct6776' | 20 | Prefix: 'nct6776' |
17 | Addresses scanned: ISA address retrieved from Super I/O registers | 21 | Addresses scanned: ISA address retrieved from Super I/O registers |
18 | Datasheet: Available from Nuvoton upon request | 22 | Datasheet: Available from Nuvoton upon request |
@@ -20,6 +24,14 @@ Supported chips: | |||
20 | Prefix: 'nct6779' | 24 | Prefix: 'nct6779' |
21 | Addresses scanned: ISA address retrieved from Super I/O registers | 25 | Addresses scanned: ISA address retrieved from Super I/O registers |
22 | Datasheet: Available from Nuvoton upon request | 26 | Datasheet: Available from Nuvoton upon request |
27 | * Nuvoton NCT6791D | ||
28 | Prefix: 'nct6791' | ||
29 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
30 | Datasheet: Available from Nuvoton upon request | ||
31 | * Nuvoton NCT6792D | ||
32 | Prefix: 'nct6792' | ||
33 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
34 | Datasheet: Available from Nuvoton upon request | ||
23 | 35 | ||
24 | Authors: | 36 | Authors: |
25 | Guenter Roeck <linux@roeck-us.net> | 37 | Guenter Roeck <linux@roeck-us.net> |
diff --git a/Documentation/hwmon/nct7802 b/Documentation/hwmon/nct7802 new file mode 100644 index 000000000000..2e00f5e344bc --- /dev/null +++ b/Documentation/hwmon/nct7802 | |||
@@ -0,0 +1,32 @@ | |||
1 | Kernel driver nct7802 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Nuvoton NCT7802Y | ||
6 | Prefix: 'nct7802' | ||
7 | Addresses scanned: I2C 0x28..0x2f | ||
8 | Datasheet: Available from Nuvoton web site | ||
9 | |||
10 | Authors: | ||
11 | Guenter Roeck <linux@roeck-us.net> | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | This driver implements support for the Nuvoton NCT7802Y hardware monitoring | ||
17 | chip. NCT7802Y supports 6 temperature sensors, 5 voltage sensors, and 3 fan | ||
18 | speed sensors. | ||
19 | |||
20 | The chip also supports intelligent fan speed control. This functionality is | ||
21 | not currently supported by the driver. | ||
22 | |||
23 | Tested Boards and BIOS Versions | ||
24 | ------------------------------- | ||
25 | |||
26 | The driver has been reported to work with the following boards and | ||
27 | BIOS versions. | ||
28 | |||
29 | Board BIOS version | ||
30 | --------------------------------------------------------------- | ||
31 | Kontron COMe-bSC2 CHR2E934.001.GGO | ||
32 | Kontron COMe-bIP2 CCR2E212 | ||
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401 index f91e3fa7e5ec..8eb88e974055 100644 --- a/Documentation/hwmon/tmp401 +++ b/Documentation/hwmon/tmp401 | |||
@@ -18,6 +18,10 @@ Supported chips: | |||
18 | Prefix: 'tmp432' | 18 | Prefix: 'tmp432' |
19 | Addresses scanned: I2C 0x4c, 0x4d | 19 | Addresses scanned: I2C 0x4c, 0x4d |
20 | Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html | 20 | Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html |
21 | * Texas Instruments TMP435 | ||
22 | Prefix: 'tmp435' | ||
23 | Addresses scanned: I2C 0x37, 0x48 - 0x4f | ||
24 | Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html | ||
21 | 25 | ||
22 | Authors: | 26 | Authors: |
23 | Hans de Goede <hdegoede@redhat.com> | 27 | Hans de Goede <hdegoede@redhat.com> |
@@ -27,8 +31,8 @@ Description | |||
27 | ----------- | 31 | ----------- |
28 | 32 | ||
29 | This driver implements support for Texas Instruments TMP401, TMP411, | 33 | This driver implements support for Texas Instruments TMP401, TMP411, |
30 | TMP431, and TMP432 chips. These chips implement one or two remote and | 34 | TMP431, TMP432 and TMP435 chips. These chips implement one or two remote |
31 | one local temperature sensors. Temperature is measured in degrees | 35 | and one local temperature sensors. Temperature is measured in degrees |
32 | Celsius. Resolution of the remote sensor is 0.0625 degree. Local | 36 | Celsius. Resolution of the remote sensor is 0.0625 degree. Local |
33 | sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not | 37 | sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not |
34 | supported by the driver so far, so using the default resolution of 0.5 | 38 | supported by the driver so far, so using the default resolution of 0.5 |
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 793c83dac738..82f48f774afb 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -29,6 +29,7 @@ Supported adapters: | |||
29 | * Intel Wildcat Point-LP (PCH) | 29 | * Intel Wildcat Point-LP (PCH) |
30 | * Intel BayTrail (SOC) | 30 | * Intel BayTrail (SOC) |
31 | * Intel Sunrise Point-H (PCH) | 31 | * Intel Sunrise Point-H (PCH) |
32 | * Intel Sunrise Point-LP (PCH) | ||
32 | Datasheets: Publicly available at the Intel website | 33 | Datasheets: Publicly available at the Intel website |
33 | 34 | ||
34 | On Intel Patsburg and later chipsets, both the normal host SMBus controller | 35 | On Intel Patsburg and later chipsets, both the normal host SMBus controller |
diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients index 8e5fbd88c7d1..ccba3ffd6e80 100644 --- a/Documentation/i2c/upgrading-clients +++ b/Documentation/i2c/upgrading-clients | |||
@@ -79,11 +79,10 @@ static struct i2c_driver example_driver = { | |||
79 | .driver = { | 79 | .driver = { |
80 | .owner = THIS_MODULE, | 80 | .owner = THIS_MODULE, |
81 | .name = "example", | 81 | .name = "example", |
82 | .pm = &example_pm_ops, | ||
82 | }, | 83 | }, |
83 | .attach_adapter = example_attach_adapter, | 84 | .attach_adapter = example_attach_adapter, |
84 | .detach_client = example_detach, | 85 | .detach_client = example_detach, |
85 | .suspend = example_suspend, | ||
86 | .resume = example_resume, | ||
87 | }; | 86 | }; |
88 | 87 | ||
89 | 88 | ||
@@ -272,10 +271,9 @@ static struct i2c_driver example_driver = { | |||
272 | .driver = { | 271 | .driver = { |
273 | .owner = THIS_MODULE, | 272 | .owner = THIS_MODULE, |
274 | .name = "example", | 273 | .name = "example", |
274 | .pm = &example_pm_ops, | ||
275 | }, | 275 | }, |
276 | .id_table = example_idtable, | 276 | .id_table = example_idtable, |
277 | .probe = example_probe, | 277 | .probe = example_probe, |
278 | .remove = example_remove, | 278 | .remove = example_remove, |
279 | .suspend = example_suspend, | ||
280 | .resume = example_resume, | ||
281 | }; | 279 | }; |
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 6b344b516bff..a755b141fa4a 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -36,6 +36,7 @@ MODULE_DEVICE_TABLE(i2c, foo_idtable); | |||
36 | static struct i2c_driver foo_driver = { | 36 | static struct i2c_driver foo_driver = { |
37 | .driver = { | 37 | .driver = { |
38 | .name = "foo", | 38 | .name = "foo", |
39 | .pm = &foo_pm_ops, /* optional */ | ||
39 | }, | 40 | }, |
40 | 41 | ||
41 | .id_table = foo_idtable, | 42 | .id_table = foo_idtable, |
@@ -47,8 +48,6 @@ static struct i2c_driver foo_driver = { | |||
47 | .address_list = normal_i2c, | 48 | .address_list = normal_i2c, |
48 | 49 | ||
49 | .shutdown = foo_shutdown, /* optional */ | 50 | .shutdown = foo_shutdown, /* optional */ |
50 | .suspend = foo_suspend, /* optional */ | ||
51 | .resume = foo_resume, /* optional */ | ||
52 | .command = foo_command, /* optional, deprecated */ | 51 | .command = foo_command, /* optional, deprecated */ |
53 | } | 52 | } |
54 | 53 | ||
@@ -279,8 +278,9 @@ Power Management | |||
279 | 278 | ||
280 | If your I2C device needs special handling when entering a system low | 279 | If your I2C device needs special handling when entering a system low |
281 | power state -- like putting a transceiver into a low power mode, or | 280 | power state -- like putting a transceiver into a low power mode, or |
282 | activating a system wakeup mechanism -- do that in the suspend() method. | 281 | activating a system wakeup mechanism -- do that by implementing the |
283 | The resume() method should reverse what the suspend() method does. | 282 | appropriate callbacks for the dev_pm_ops of the driver (like suspend |
283 | and resume). | ||
284 | 284 | ||
285 | These are standard driver model calls, and they work just like they | 285 | These are standard driver model calls, and they work just like they |
286 | would for any other driver stack. The calls can sleep, and can use | 286 | would for any other driver stack. The calls can sleep, and can use |
diff --git a/Documentation/ia64/kvm.txt b/Documentation/ia64/kvm.txt deleted file mode 100644 index ffb5c80bec3e..000000000000 --- a/Documentation/ia64/kvm.txt +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | Currently, kvm module is in EXPERIMENTAL stage on IA64. This means that | ||
2 | interfaces are not stable enough to use. So, please don't run critical | ||
3 | applications in virtual machine. | ||
4 | We will try our best to improve it in future versions! | ||
5 | |||
6 | Guide: How to boot up guests on kvm/ia64 | ||
7 | |||
8 | This guide is to describe how to enable kvm support for IA-64 systems. | ||
9 | |||
10 | 1. Get the kvm source from git.kernel.org. | ||
11 | Userspace source: | ||
12 | git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git | ||
13 | Kernel Source: | ||
14 | git clone git://git.kernel.org/pub/scm/linux/kernel/git/xiantao/kvm-ia64.git | ||
15 | |||
16 | 2. Compile the source code. | ||
17 | 2.1 Compile userspace code: | ||
18 | (1)cd ./kvm-userspace | ||
19 | (2)./configure | ||
20 | (3)cd kernel | ||
21 | (4)make sync LINUX= $kernel_dir (kernel_dir is the directory of kernel source.) | ||
22 | (5)cd .. | ||
23 | (6)make qemu | ||
24 | (7)cd qemu; make install | ||
25 | |||
26 | 2.2 Compile kernel source code: | ||
27 | (1) cd ./$kernel_dir | ||
28 | (2) Make menuconfig | ||
29 | (3) Enter into virtualization option, and choose kvm. | ||
30 | (4) make | ||
31 | (5) Once (4) done, make modules_install | ||
32 | (6) Make initrd, and use new kernel to reboot up host machine. | ||
33 | (7) Once (6) done, cd $kernel_dir/arch/ia64/kvm | ||
34 | (8) insmod kvm.ko; insmod kvm-intel.ko | ||
35 | |||
36 | Note: For step 2, please make sure that host page size == TARGET_PAGE_SIZE of qemu, otherwise, may fail. | ||
37 | |||
38 | 3. Get Guest Firmware named as Flash.fd, and put it under right place: | ||
39 | (1) If you have the guest firmware (binary) released by Intel Corp for Xen, use it directly. | ||
40 | |||
41 | (2) If you have no firmware at hand, Please download its source from | ||
42 | hg clone http://xenbits.xensource.com/ext/efi-vfirmware.hg | ||
43 | you can get the firmware's binary in the directory of efi-vfirmware.hg/binaries. | ||
44 | |||
45 | (3) Rename the firmware you owned to Flash.fd, and copy it to /usr/local/share/qemu | ||
46 | |||
47 | 4. Boot up Linux or Windows guests: | ||
48 | 4.1 Create or install a image for guest boot. If you have xen experience, it should be easy. | ||
49 | |||
50 | 4.2 Boot up guests use the following command. | ||
51 | /usr/local/bin/qemu-system-ia64 -smp xx -m 512 -hda $your_image | ||
52 | (xx is the number of virtual processors for the guest, now the maximum value is 4) | ||
53 | |||
54 | 5. Known possible issue on some platforms with old Firmware. | ||
55 | |||
56 | In the event of strange host crash issues, try to solve it through either of the following ways: | ||
57 | |||
58 | (1): Upgrade your Firmware to the latest one. | ||
59 | |||
60 | (2): Applying the below patch to kernel source. | ||
61 | diff --git a/arch/ia64/kernel/pal.S b/arch/ia64/kernel/pal.S | ||
62 | index 0b53344..f02b0f7 100644 | ||
63 | --- a/arch/ia64/kernel/pal.S | ||
64 | +++ b/arch/ia64/kernel/pal.S | ||
65 | @@ -84,7 +84,8 @@ GLOBAL_ENTRY(ia64_pal_call_static) | ||
66 | mov ar.pfs = loc1 | ||
67 | mov rp = loc0 | ||
68 | ;; | ||
69 | - srlz.d // serialize restoration of psr.l | ||
70 | + srlz.i // serialize restoration of psr.l | ||
71 | + ;; | ||
72 | br.ret.sptk.many b0 | ||
73 | END(ia64_pal_call_static) | ||
74 | |||
75 | 6. Bug report: | ||
76 | If you found any issues when use kvm/ia64, Please post the bug info to kvm-ia64-devel mailing list. | ||
77 | https://lists.sourceforge.net/lists/listinfo/kvm-ia64-devel/ | ||
78 | |||
79 | Thanks for your interest! Let's work together, and make kvm/ia64 stronger and stronger! | ||
80 | |||
81 | |||
82 | Xiantao Zhang <xiantao.zhang@intel.com> | ||
83 | 2008.3.10 | ||
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt index e1ae127ed099..1ec0db7879d3 100644 --- a/Documentation/input/elantech.txt +++ b/Documentation/input/elantech.txt | |||
@@ -38,22 +38,38 @@ Contents | |||
38 | 7.2.1 Status packet | 38 | 7.2.1 Status packet |
39 | 7.2.2 Head packet | 39 | 7.2.2 Head packet |
40 | 7.2.3 Motion packet | 40 | 7.2.3 Motion packet |
41 | 8. Trackpoint (for Hardware version 3 and 4) | ||
42 | 8.1 Registers | ||
43 | 8.2 Native relative mode 6 byte packet format | ||
44 | 8.2.1 Status Packet | ||
41 | 45 | ||
42 | 46 | ||
43 | 47 | ||
44 | 1. Introduction | 48 | 1. Introduction |
45 | ~~~~~~~~~~~~ | 49 | ~~~~~~~~~~~~ |
46 | 50 | ||
47 | Currently the Linux Elantech touchpad driver is aware of two different | 51 | Currently the Linux Elantech touchpad driver is aware of four different |
48 | hardware versions unimaginatively called version 1 and version 2. Version 1 | 52 | hardware versions unimaginatively called version 1,version 2, version 3 |
49 | is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to | 53 | and version 4. Version 1 is found in "older" laptops and uses 4 bytes per |
50 | be introduced with the EeePC and uses 6 bytes per packet, and provides | 54 | packet. Version 2 seems to be introduced with the EeePC and uses 6 bytes |
51 | additional features such as position of two fingers, and width of the touch. | 55 | per packet, and provides additional features such as position of two fingers, |
56 | and width of the touch. Hardware version 3 uses 6 bytes per packet (and | ||
57 | for 2 fingers the concatenation of two 6 bytes packets) and allows tracking | ||
58 | of up to 3 fingers. Hardware version 4 uses 6 bytes per packet, and can | ||
59 | combine a status packet with multiple head or motion packets. Hardware version | ||
60 | 4 allows tracking up to 5 fingers. | ||
61 | |||
62 | Some Hardware version 3 and version 4 also have a trackpoint which uses a | ||
63 | separate packet format. It is also 6 bytes per packet. | ||
52 | 64 | ||
53 | The driver tries to support both hardware versions and should be compatible | 65 | The driver tries to support both hardware versions and should be compatible |
54 | with the Xorg Synaptics touchpad driver and its graphical configuration | 66 | with the Xorg Synaptics touchpad driver and its graphical configuration |
55 | utilities. | 67 | utilities. |
56 | 68 | ||
69 | Note that a mouse button is also associated with either the touchpad or the | ||
70 | trackpoint when a trackpoint is available. Disabling the Touchpad in xorg | ||
71 | (TouchPadOff=0) will also disable the buttons associated with the touchpad. | ||
72 | |||
57 | Additionally the operation of the touchpad can be altered by adjusting the | 73 | Additionally the operation of the touchpad can be altered by adjusting the |
58 | contents of some of its internal registers. These registers are represented | 74 | contents of some of its internal registers. These registers are represented |
59 | by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio? | 75 | by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio? |
@@ -78,7 +94,7 @@ completeness sake. | |||
78 | 2. Extra knobs | 94 | 2. Extra knobs |
79 | ~~~~~~~~~~~ | 95 | ~~~~~~~~~~~ |
80 | 96 | ||
81 | Currently the Linux Elantech touchpad driver provides two extra knobs under | 97 | Currently the Linux Elantech touchpad driver provides three extra knobs under |
82 | /sys/bus/serio/drivers/psmouse/serio? for the user. | 98 | /sys/bus/serio/drivers/psmouse/serio? for the user. |
83 | 99 | ||
84 | * debug | 100 | * debug |
@@ -112,6 +128,20 @@ Currently the Linux Elantech touchpad driver provides two extra knobs under | |||
112 | data consistency checking can be done. For now checking is disabled by | 128 | data consistency checking can be done. For now checking is disabled by |
113 | default. Currently even turning it on will do nothing. | 129 | default. Currently even turning it on will do nothing. |
114 | 130 | ||
131 | * crc_enabled | ||
132 | |||
133 | Sets crc_enabled to 0/1. The name "crc_enabled" is the official name of | ||
134 | this integrity check, even though it is not an actual cyclic redundancy | ||
135 | check. | ||
136 | |||
137 | Depending on the state of crc_enabled, certain basic data integrity | ||
138 | verification is done by the driver on hardware version 3 and 4. The | ||
139 | driver will reject any packet that appears corrupted. Using this knob, | ||
140 | The state of crc_enabled can be altered with this knob. | ||
141 | |||
142 | Reading the crc_enabled value will show the active value. Echoing | ||
143 | "0" or "1" to this file will set the state to "0" or "1". | ||
144 | |||
115 | ///////////////////////////////////////////////////////////////////////////// | 145 | ///////////////////////////////////////////////////////////////////////////// |
116 | 146 | ||
117 | 3. Differentiating hardware versions | 147 | 3. Differentiating hardware versions |
@@ -746,3 +776,42 @@ byte 5: | |||
746 | 776 | ||
747 | byte 0 ~ 2 for one finger | 777 | byte 0 ~ 2 for one finger |
748 | byte 3 ~ 5 for another | 778 | byte 3 ~ 5 for another |
779 | |||
780 | |||
781 | 8. Trackpoint (for Hardware version 3 and 4) | ||
782 | ========================================= | ||
783 | 8.1 Registers | ||
784 | ~~~~~~~~~ | ||
785 | No special registers have been identified. | ||
786 | |||
787 | 8.2 Native relative mode 6 byte packet format | ||
788 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
789 | 8.2.1 Status Packet | ||
790 | ~~~~~~~~~~~~~ | ||
791 | |||
792 | byte 0: | ||
793 | bit 7 6 5 4 3 2 1 0 | ||
794 | 0 0 sx sy 0 M R L | ||
795 | byte 1: | ||
796 | bit 7 6 5 4 3 2 1 0 | ||
797 | ~sx 0 0 0 0 0 0 0 | ||
798 | byte 2: | ||
799 | bit 7 6 5 4 3 2 1 0 | ||
800 | ~sy 0 0 0 0 0 0 0 | ||
801 | byte 3: | ||
802 | bit 7 6 5 4 3 2 1 0 | ||
803 | 0 0 ~sy ~sx 0 1 1 0 | ||
804 | byte 4: | ||
805 | bit 7 6 5 4 3 2 1 0 | ||
806 | x7 x6 x5 x4 x3 x2 x1 x0 | ||
807 | byte 5: | ||
808 | bit 7 6 5 4 3 2 1 0 | ||
809 | y7 y6 y5 y4 y3 y2 y1 y0 | ||
810 | |||
811 | |||
812 | x and y are written in two's complement spread | ||
813 | over 9 bits with sx/sy the relative top bit and | ||
814 | x7..x0 and y7..y0 the lower bits. | ||
815 | ~sx is the inverse of sx, ~sy is the inverse of sy. | ||
816 | The sign of y is opposite to what the input driver | ||
817 | expects for a relative movement | ||
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt index 7cc9a436e6a1..d1b23f295db4 100644 --- a/Documentation/input/xpad.txt +++ b/Documentation/input/xpad.txt | |||
@@ -1,18 +1,22 @@ | |||
1 | xpad - Linux USB driver for X-Box gamepads | 1 | xpad - Linux USB driver for Xbox compatible controllers |
2 | 2 | ||
3 | This is the very first release of a driver for X-Box gamepads. | 3 | This driver exposes all first-party and third-party Xbox compatible |
4 | Basically, this was hacked away in just a few hours, so don't expect | 4 | controllers. It has a long history and has enjoyed considerable usage |
5 | miracles. | 5 | as Window's xinput library caused most PC games to focus on Xbox |
6 | controller compatibility. | ||
6 | 7 | ||
7 | In particular, there is currently NO support for the rumble pack. | 8 | Due to backwards compatibility all buttons are reported as digital. |
8 | You won't find many ff-aware linux applications anyway. | 9 | This only effects Original Xbox controllers. All later controller models |
10 | have only digital face buttons. | ||
11 | |||
12 | Rumble is supported on some models of Xbox 360 controllers but not of | ||
13 | Original Xbox controllers nor on Xbox One controllers. As of writing | ||
14 | the Xbox One's rumble protocol has not been reverse engineered but in | ||
15 | the future could be supported. | ||
9 | 16 | ||
10 | 17 | ||
11 | 0. Notes | 18 | 0. Notes |
12 | -------- | 19 | -------- |
13 | |||
14 | Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.) | ||
15 | |||
16 | The number of buttons/axes reported varies based on 3 things: | 20 | The number of buttons/axes reported varies based on 3 things: |
17 | - if you are using a known controller | 21 | - if you are using a known controller |
18 | - if you are using a known dance pad | 22 | - if you are using a known dance pad |
@@ -20,12 +24,16 @@ The number of buttons/axes reported varies based on 3 things: | |||
20 | module configuration for "Map D-PAD to buttons rather than axes for unknown | 24 | module configuration for "Map D-PAD to buttons rather than axes for unknown |
21 | pads" (module option dpad_to_buttons) | 25 | pads" (module option dpad_to_buttons) |
22 | 26 | ||
23 | If you set dpad_to_buttons to 0 and you are using an unknown device (one | 27 | If you set dpad_to_buttons to N and you are using an unknown device |
24 | not listed below), the driver will map the directional pad to axes (X/Y), | 28 | the driver will map the directional pad to axes (X/Y). |
25 | if you said N it will map the d-pad to buttons, which is needed for dance | 29 | If you said Y it will map the d-pad to buttons, which is needed for dance |
26 | style games to function correctly. The default is Y. | 30 | style games to function correctly. The default is Y. |
31 | |||
32 | dpad_to_buttons has no effect for known pads. A erroneous commit message | ||
33 | claimed dpad_to_buttons could be used to force behavior on known devices. | ||
34 | This is not true. Both dpad_to_buttons and triggers_to_buttons only affect | ||
35 | unknown controllers. | ||
27 | 36 | ||
28 | dpad_to_buttons has no effect for known pads. | ||
29 | 37 | ||
30 | 0.1 Normal Controllers | 38 | 0.1 Normal Controllers |
31 | ---------------------- | 39 | ---------------------- |
@@ -80,17 +88,29 @@ to the list of supported devices, ensuring that it will work out of the | |||
80 | box in the future. | 88 | box in the future. |
81 | 89 | ||
82 | 90 | ||
83 | 1. USB adapter | 91 | 1. USB adapters |
84 | -------------- | 92 | -------------- |
93 | All generations of Xbox controllers speak USB over the wire. | ||
94 | - Original Xbox controllers use a proprietary connector and require adapters. | ||
95 | - Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver | ||
96 | for Windows' | ||
97 | - Wired Xbox 360 controllers use standard USB connectors. | ||
98 | - Xbox One controllers can be wireless but speak Wi-Fi Direct and are not | ||
99 | yet supported. | ||
100 | - Xbox One controllers can be wired and use standard Micro-USB connectors. | ||
101 | |||
85 | 102 | ||
86 | Before you can actually use the driver, you need to get yourself an | 103 | |
87 | adapter cable to connect the X-Box controller to your Linux-Box. You | 104 | 1.1 Original Xbox USB adapters |
88 | can buy these online fairly cheap, or build your own. | 105 | -------------- |
106 | Using this driver with an Original Xbox controller requires an | ||
107 | adapter cable to break out the proprietary connector's pins to USB. | ||
108 | You can buy these online fairly cheap, or build your own. | ||
89 | 109 | ||
90 | Such a cable is pretty easy to build. The Controller itself is a USB | 110 | Such a cable is pretty easy to build. The Controller itself is a USB |
91 | compound device (a hub with three ports for two expansion slots and | 111 | compound device (a hub with three ports for two expansion slots and |
92 | the controller device) with the only difference in a nonstandard connector | 112 | the controller device) with the only difference in a nonstandard connector |
93 | (5 pins vs. 4 on standard USB connector). | 113 | (5 pins vs. 4 on standard USB 1.0 connectors). |
94 | 114 | ||
95 | You just need to solder a USB connector onto the cable and keep the | 115 | You just need to solder a USB connector onto the cable and keep the |
96 | yellow wire unconnected. The other pins have the same order on both | 116 | yellow wire unconnected. The other pins have the same order on both |
@@ -102,26 +122,41 @@ original one. You can buy an extension cable and cut that instead. That way, | |||
102 | you can still use the controller with your X-Box, if you have one ;) | 122 | you can still use the controller with your X-Box, if you have one ;) |
103 | 123 | ||
104 | 124 | ||
125 | |||
105 | 2. Driver Installation | 126 | 2. Driver Installation |
106 | ---------------------- | 127 | ---------------------- |
107 | 128 | ||
108 | Once you have the adapter cable and the controller is connected, you need | 129 | Once you have the adapter cable, if needed, and the controller connected |
109 | to load your USB subsystem and should cat /proc/bus/usb/devices. | 130 | the xpad module should be auto loaded. To confirm you can cat |
110 | There should be an entry like the one at the end [4]. | 131 | /proc/bus/usb/devices. There should be an entry like the one at the end [4]. |
132 | |||
133 | |||
111 | 134 | ||
112 | Currently (as of version 0.0.6), the following devices are included: | 135 | 3. Supported Controllers |
113 | original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 | 136 | ------------------------ |
114 | smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 | 137 | For a full list of supported controllers and associated vendor and product |
138 | IDs see the xpad_device[] array[6]. | ||
139 | |||
140 | As of the historic version 0.0.6 (2006-10-10) the following devices | ||
141 | were supported: | ||
142 | original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 | ||
143 | smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 | ||
115 | original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 | 144 | original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 |
116 | InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a | 145 | InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a |
117 | RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 | 146 | RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 |
147 | |||
148 | Unrecognized models of Xbox controllers should function as Generic | ||
149 | Xbox controllers. Unrecognized Dance Pad controllers require setting | ||
150 | the module option 'dpad_to_buttons'. | ||
151 | |||
152 | If you have an unrecognized controller please see 0.3 - Unknown Controllers | ||
118 | 153 | ||
119 | The driver should work with xbox pads not listed above as well, however | ||
120 | you will need to do something extra for dance pads to work. | ||
121 | 154 | ||
122 | If you have a controller not listed above, see 0.3 - Unknown Controllers | 155 | 4. Manual Testing |
156 | ----------------- | ||
157 | To test this driver's functionality you may use 'jstest'. | ||
123 | 158 | ||
124 | If you compiled and installed the driver, test the functionality: | 159 | For example: |
125 | > modprobe xpad | 160 | > modprobe xpad |
126 | > modprobe joydev | 161 | > modprobe joydev |
127 | > jstest /dev/js0 | 162 | > jstest /dev/js0 |
@@ -134,7 +169,8 @@ show 20 inputs (6 axes, 14 buttons). | |||
134 | It works? Voila, you're done ;) | 169 | It works? Voila, you're done ;) |
135 | 170 | ||
136 | 171 | ||
137 | 3. Thanks | 172 | |
173 | 5. Thanks | ||
138 | --------- | 174 | --------- |
139 | 175 | ||
140 | I have to thank ITO Takayuki for the detailed info on his site | 176 | I have to thank ITO Takayuki for the detailed info on his site |
@@ -145,14 +181,14 @@ His useful info and both the usb-skeleton as well as the iforce input driver | |||
145 | the basic functionality. | 181 | the basic functionality. |
146 | 182 | ||
147 | 183 | ||
148 | 4. References | ||
149 | ------------- | ||
150 | 184 | ||
151 | 1. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) | 185 | 6. References |
152 | 2. http://xpad.xbox-scene.com/ | 186 | ------------- |
153 | 3. http://www.markosweb.com/www/xboxhackz.com/ | ||
154 | 187 | ||
155 | 4. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): | 188 | [1]: http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) |
189 | [2]: http://xpad.xbox-scene.com/ | ||
190 | [3]: http://www.markosweb.com/www/xboxhackz.com/ | ||
191 | [4]: /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): | ||
156 | 192 | ||
157 | T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 | 193 | T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 |
158 | D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 | 194 | D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 |
@@ -162,7 +198,7 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none) | |||
162 | E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms | 198 | E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms |
163 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms | 199 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms |
164 | 200 | ||
165 | 5. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): | 201 | [5]: /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): |
166 | 202 | ||
167 | T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 | 203 | T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 |
168 | D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | 204 | D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 |
@@ -173,7 +209,12 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad | |||
173 | E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms | 209 | E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms |
174 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms | 210 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms |
175 | 211 | ||
176 | -- | 212 | [6]: http://lxr.free-electrons.com/ident?i=xpad_device |
213 | |||
214 | |||
215 | |||
216 | 7. Historic Edits | ||
217 | ----------------- | ||
177 | Marko Friedemann <mfr@bmx-chemnitz.de> | 218 | Marko Friedemann <mfr@bmx-chemnitz.de> |
178 | 2002-07-16 | 219 | 2002-07-16 |
179 | - original doc | 220 | - original doc |
@@ -181,3 +222,5 @@ Marko Friedemann <mfr@bmx-chemnitz.de> | |||
181 | Dominic Cerquetti <binary1230@yahoo.com> | 222 | Dominic Cerquetti <binary1230@yahoo.com> |
182 | 2005-03-19 | 223 | 2005-03-19 |
183 | - added stuff for dance pads, new d-pad->axes mappings | 224 | - added stuff for dance pads, new d-pad->axes mappings |
225 | |||
226 | Later changes may be viewed with 'git log Documentation/input/xpad.txt' | ||
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index 6c0b9f27e465..bc4bd5a44b88 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt | |||
@@ -471,6 +471,13 @@ format. Crash is available on Dave Anderson's site at the following URL: | |||
471 | 471 | ||
472 | http://people.redhat.com/~anderson/ | 472 | http://people.redhat.com/~anderson/ |
473 | 473 | ||
474 | Trigger Kdump on WARN() | ||
475 | ======================= | ||
476 | |||
477 | The kernel parameter, panic_on_warn, calls panic() in all WARN() paths. This | ||
478 | will cause a kdump to occur at the panic() call. In cases where a user wants | ||
479 | to specify this during runtime, /proc/sys/kernel/panic_on_warn can be set to 1 | ||
480 | to achieve the same behaviour. | ||
474 | 481 | ||
475 | Contact | 482 | Contact |
476 | ======= | 483 | ======= |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 479f33204a37..4df73da11adc 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -829,6 +829,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
829 | CONFIG_DEBUG_PAGEALLOC, hence this option will not help | 829 | CONFIG_DEBUG_PAGEALLOC, hence this option will not help |
830 | tracking down these problems. | 830 | tracking down these problems. |
831 | 831 | ||
832 | debug_pagealloc= | ||
833 | [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this | ||
834 | parameter enables the feature at boot time. In | ||
835 | default, it is disabled. We can avoid allocating huge | ||
836 | chunk of memory for debug pagealloc if we don't enable | ||
837 | it at boot time and the system will work mostly same | ||
838 | with the kernel built without CONFIG_DEBUG_PAGEALLOC. | ||
839 | on: enable the feature | ||
840 | |||
832 | debugpat [X86] Enable PAT debugging | 841 | debugpat [X86] Enable PAT debugging |
833 | 842 | ||
834 | decnet.addr= [HW,NET] | 843 | decnet.addr= [HW,NET] |
@@ -1228,9 +1237,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1228 | multiple times interleaved with hugepages= to reserve | 1237 | multiple times interleaved with hugepages= to reserve |
1229 | huge pages of different sizes. Valid pages sizes on | 1238 | huge pages of different sizes. Valid pages sizes on |
1230 | x86-64 are 2M (when the CPU supports "pse") and 1G | 1239 | x86-64 are 2M (when the CPU supports "pse") and 1G |
1231 | (when the CPU supports the "pdpe1gb" cpuinfo flag) | 1240 | (when the CPU supports the "pdpe1gb" cpuinfo flag). |
1232 | Note that 1GB pages can only be allocated at boot time | ||
1233 | using hugepages= and not freed afterwards. | ||
1234 | 1241 | ||
1235 | hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) | 1242 | hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) |
1236 | terminal devices. Valid values: 0..8 | 1243 | terminal devices. Valid values: 0..8 |
@@ -1369,6 +1376,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1369 | Formats: { "ima" | "ima-ng" } | 1376 | Formats: { "ima" | "ima-ng" } |
1370 | Default: "ima-ng" | 1377 | Default: "ima-ng" |
1371 | 1378 | ||
1379 | ima_template_fmt= | ||
1380 | [IMA] Define a custom template format. | ||
1381 | Format: { "field1|...|fieldN" } | ||
1382 | |||
1372 | ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage | 1383 | ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage |
1373 | Format: <min_file_size> | 1384 | Format: <min_file_size> |
1374 | Set the minimal file size for using asynchronous hash. | 1385 | Set the minimal file size for using asynchronous hash. |
@@ -1446,6 +1457,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1446 | disable | 1457 | disable |
1447 | Do not enable intel_pstate as the default | 1458 | Do not enable intel_pstate as the default |
1448 | scaling driver for the supported processors | 1459 | scaling driver for the supported processors |
1460 | force | ||
1461 | Enable intel_pstate on systems that prohibit it by default | ||
1462 | in favor of acpi-cpufreq. Forcing the intel_pstate driver | ||
1463 | instead of acpi-cpufreq may disable platform features, such | ||
1464 | as thermal controls and power capping, that rely on ACPI | ||
1465 | P-States information being indicated to OSPM and therefore | ||
1466 | should be used with caution. This option does not work with | ||
1467 | processors that aren't supported by the intel_pstate driver | ||
1468 | or on platforms that use pcc-cpufreq instead of acpi-cpufreq. | ||
1469 | no_hwp | ||
1470 | Do not enable hardware P state control (HWP) | ||
1471 | if available. | ||
1449 | 1472 | ||
1450 | intremap= [X86-64, Intel-IOMMU] | 1473 | intremap= [X86-64, Intel-IOMMU] |
1451 | on enable Interrupt Remapping (default) | 1474 | on enable Interrupt Remapping (default) |
@@ -2503,12 +2526,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2503 | OSS [HW,OSS] | 2526 | OSS [HW,OSS] |
2504 | See Documentation/sound/oss/oss-parameters.txt | 2527 | See Documentation/sound/oss/oss-parameters.txt |
2505 | 2528 | ||
2529 | page_owner= [KNL] Boot-time page_owner enabling option. | ||
2530 | Storage of the information about who allocated | ||
2531 | each page is disabled in default. With this switch, | ||
2532 | we can turn it on. | ||
2533 | on: enable the feature | ||
2534 | |||
2506 | panic= [KNL] Kernel behaviour on panic: delay <timeout> | 2535 | panic= [KNL] Kernel behaviour on panic: delay <timeout> |
2507 | timeout > 0: seconds before rebooting | 2536 | timeout > 0: seconds before rebooting |
2508 | timeout = 0: wait forever | 2537 | timeout = 0: wait forever |
2509 | timeout < 0: reboot immediately | 2538 | timeout < 0: reboot immediately |
2510 | Format: <timeout> | 2539 | Format: <timeout> |
2511 | 2540 | ||
2541 | panic_on_warn panic() instead of WARN(). Useful to cause kdump | ||
2542 | on a WARN(). | ||
2543 | |||
2512 | crash_kexec_post_notifiers | 2544 | crash_kexec_post_notifiers |
2513 | Run kdump after running panic-notifiers and dumping | 2545 | Run kdump after running panic-notifiers and dumping |
2514 | kmsg. This only for the users who doubt kdump always | 2546 | kmsg. This only for the users who doubt kdump always |
@@ -2940,6 +2972,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2940 | quiescent states. Units are jiffies, minimum | 2972 | quiescent states. Units are jiffies, minimum |
2941 | value is one, and maximum value is HZ. | 2973 | value is one, and maximum value is HZ. |
2942 | 2974 | ||
2975 | rcutree.kthread_prio= [KNL,BOOT] | ||
2976 | Set the SCHED_FIFO priority of the RCU | ||
2977 | per-CPU kthreads (rcuc/N). This value is also | ||
2978 | used for the priority of the RCU boost threads | ||
2979 | (rcub/N). Valid values are 1-99 and the default | ||
2980 | is 1 (the least-favored priority). | ||
2981 | |||
2943 | rcutree.rcu_nocb_leader_stride= [KNL] | 2982 | rcutree.rcu_nocb_leader_stride= [KNL] |
2944 | Set the number of NOCB kthread groups, which | 2983 | Set the number of NOCB kthread groups, which |
2945 | defaults to the square root of the number of | 2984 | defaults to the square root of the number of |
@@ -3089,6 +3128,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3089 | messages. Disable with a value less than or equal | 3128 | messages. Disable with a value less than or equal |
3090 | to zero. | 3129 | to zero. |
3091 | 3130 | ||
3131 | rcupdate.rcu_self_test= [KNL] | ||
3132 | Run the RCU early boot self tests | ||
3133 | |||
3134 | rcupdate.rcu_self_test_bh= [KNL] | ||
3135 | Run the RCU bh early boot self tests | ||
3136 | |||
3137 | rcupdate.rcu_self_test_sched= [KNL] | ||
3138 | Run the RCU sched early boot self tests | ||
3139 | |||
3092 | rdinit= [KNL] | 3140 | rdinit= [KNL] |
3093 | Format: <full_path> | 3141 | Format: <full_path> |
3094 | Run specified binary instead of /init from the ramdisk, | 3142 | Run specified binary instead of /init from the ramdisk, |
@@ -3412,6 +3460,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3412 | neutralize any effect of /proc/sys/kernel/sysrq. | 3460 | neutralize any effect of /proc/sys/kernel/sysrq. |
3413 | Useful for debugging. | 3461 | Useful for debugging. |
3414 | 3462 | ||
3463 | tcpmhash_entries= [KNL,NET] | ||
3464 | Set the number of tcp_metrics_hash slots. | ||
3465 | Default value is 8192 or 16384 depending on total | ||
3466 | ram pages. This is used to specify the TCP metrics | ||
3467 | cache size. See Documentation/networking/ip-sysctl.txt | ||
3468 | "tcp_no_metrics_save" section for more details. | ||
3469 | |||
3415 | tdfx= [HW,DRM] | 3470 | tdfx= [HW,DRM] |
3416 | 3471 | ||
3417 | test_suspend= [SUSPEND][,N] | 3472 | test_suspend= [SUSPEND][,N] |
@@ -3501,7 +3556,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3501 | are saved. | 3556 | are saved. |
3502 | 3557 | ||
3503 | trace_buf_size=nn[KMG] | 3558 | trace_buf_size=nn[KMG] |
3504 | [FTRACE] will set tracing buffer size. | 3559 | [FTRACE] will set tracing buffer size on each cpu. |
3505 | 3560 | ||
3506 | trace_event=[event-list] | 3561 | trace_event=[event-list] |
3507 | [FTRACE] Set and start specified trace events in order | 3562 | [FTRACE] Set and start specified trace events in order |
@@ -3524,6 +3579,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3524 | See also Documentation/trace/ftrace.txt "trace options" | 3579 | See also Documentation/trace/ftrace.txt "trace options" |
3525 | section. | 3580 | section. |
3526 | 3581 | ||
3582 | tp_printk[FTRACE] | ||
3583 | Have the tracepoints sent to printk as well as the | ||
3584 | tracing ring buffer. This is useful for early boot up | ||
3585 | where the system hangs or reboots and does not give the | ||
3586 | option for reading the tracing buffer or performing a | ||
3587 | ftrace_dump_on_oops. | ||
3588 | |||
3589 | To turn off having tracepoints sent to printk, | ||
3590 | echo 0 > /proc/sys/kernel/tracepoint_printk | ||
3591 | Note, echoing 1 into this file without the | ||
3592 | tracepoint_printk kernel cmdline option has no effect. | ||
3593 | |||
3594 | ** CAUTION ** | ||
3595 | |||
3596 | Having tracepoints sent to printk() and activating high | ||
3597 | frequency tracepoints such as irq or sched, can cause | ||
3598 | the system to live lock. | ||
3599 | |||
3527 | traceoff_on_warning | 3600 | traceoff_on_warning |
3528 | [FTRACE] enable this option to disable tracing when a | 3601 | [FTRACE] enable this option to disable tracing when a |
3529 | warning is hit. This turns off "tracing_on". Tracing can | 3602 | warning is hit. This turns off "tracing_on". Tracing can |
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt index f87241dfed87..1be59a3a521c 100644 --- a/Documentation/kobject.txt +++ b/Documentation/kobject.txt | |||
@@ -173,7 +173,7 @@ This should be done only after any attributes or children of the kobject | |||
173 | have been initialized properly, as userspace will instantly start to look | 173 | have been initialized properly, as userspace will instantly start to look |
174 | for them when this call happens. | 174 | for them when this call happens. |
175 | 175 | ||
176 | When the kobject is removed from the kernel (details on how to do that is | 176 | When the kobject is removed from the kernel (details on how to do that are |
177 | below), the uevent for KOBJ_REMOVE will be automatically created by the | 177 | below), the uevent for KOBJ_REMOVE will be automatically created by the |
178 | kobject core, so the caller does not have to worry about doing that by | 178 | kobject core, so the caller does not have to worry about doing that by |
179 | hand. | 179 | hand. |
diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt new file mode 100644 index 000000000000..a87d840bacfe --- /dev/null +++ b/Documentation/kselftest.txt | |||
@@ -0,0 +1,69 @@ | |||
1 | Linux Kernel Selftests | ||
2 | |||
3 | The kernel contains a set of "self tests" under the tools/testing/selftests/ | ||
4 | directory. These are intended to be small unit tests to exercise individual | ||
5 | code paths in the kernel. | ||
6 | |||
7 | On some systems, hot-plug tests could hang forever waiting for cpu and | ||
8 | memory to be ready to be offlined. A special hot-plug target is created | ||
9 | to run full range of hot-plug tests. In default mode, hot-plug tests run | ||
10 | in safe mode with a limited scope. In limited mode, cpu-hotplug test is | ||
11 | run on a single cpu as opposed to all hotplug capable cpus, and memory | ||
12 | hotplug test is run on 2% of hotplug capable memory instead of 10%. | ||
13 | |||
14 | Running the selftests (hotplug tests are run in limited mode) | ||
15 | ============================================================= | ||
16 | |||
17 | To build the tests: | ||
18 | $ make -C tools/testing/selftests | ||
19 | |||
20 | |||
21 | To run the tests: | ||
22 | $ make -C tools/testing/selftests run_tests | ||
23 | |||
24 | To build and run the tests with a single command, use: | ||
25 | $ make kselftest | ||
26 | |||
27 | - note that some tests will require root privileges. | ||
28 | |||
29 | |||
30 | Running a subset of selftests | ||
31 | ======================================== | ||
32 | You can use the "TARGETS" variable on the make command line to specify | ||
33 | single test to run, or a list of tests to run. | ||
34 | |||
35 | To run only tests targeted for a single subsystem: | ||
36 | $ make -C tools/testing/selftests TARGETS=ptrace run_tests | ||
37 | |||
38 | You can specify multiple tests to build and run: | ||
39 | $ make TARGETS="size timers" kselftest | ||
40 | |||
41 | See the top-level tools/testing/selftests/Makefile for the list of all | ||
42 | possible targets. | ||
43 | |||
44 | |||
45 | Running the full range hotplug selftests | ||
46 | ======================================== | ||
47 | |||
48 | To build the hotplug tests: | ||
49 | $ make -C tools/testing/selftests hotplug | ||
50 | |||
51 | To run the hotplug tests: | ||
52 | $ make -C tools/testing/selftests run_hotplug | ||
53 | |||
54 | - note that some tests will require root privileges. | ||
55 | |||
56 | |||
57 | Contributing new tests | ||
58 | ====================== | ||
59 | |||
60 | In general, the rules for for selftests are | ||
61 | |||
62 | * Do as much as you can if you're not root; | ||
63 | |||
64 | * Don't take too long; | ||
65 | |||
66 | * Don't break the build on any architecture, and | ||
67 | |||
68 | * Don't cause the top-level "make run_tests" to fail if your feature is | ||
69 | unconfigured. | ||
diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt index 300da4bdfdbd..407576a23317 100644 --- a/Documentation/local_ops.txt +++ b/Documentation/local_ops.txt | |||
@@ -8,6 +8,11 @@ to implement them for any given architecture and shows how they can be used | |||
8 | properly. It also stresses on the precautions that must be taken when reading | 8 | properly. It also stresses on the precautions that must be taken when reading |
9 | those local variables across CPUs when the order of memory writes matters. | 9 | those local variables across CPUs when the order of memory writes matters. |
10 | 10 | ||
11 | Note that local_t based operations are not recommended for general kernel use. | ||
12 | Please use the this_cpu operations instead unless there is really a special purpose. | ||
13 | Most uses of local_t in the kernel have been replaced by this_cpu operations. | ||
14 | this_cpu operations combine the relocation with the local_t like semantics in | ||
15 | a single instruction and yield more compact and faster executing code. | ||
11 | 16 | ||
12 | 17 | ||
13 | * Purpose of local atomic operations | 18 | * Purpose of local atomic operations |
@@ -87,10 +92,10 @@ the per cpu variable. For instance : | |||
87 | local_inc(&get_cpu_var(counters)); | 92 | local_inc(&get_cpu_var(counters)); |
88 | put_cpu_var(counters); | 93 | put_cpu_var(counters); |
89 | 94 | ||
90 | If you are already in a preemption-safe context, you can directly use | 95 | If you are already in a preemption-safe context, you can use |
91 | __get_cpu_var() instead. | 96 | this_cpu_ptr() instead. |
92 | 97 | ||
93 | local_inc(&__get_cpu_var(counters)); | 98 | local_inc(this_cpu_ptr(&counters)); |
94 | 99 | ||
95 | 100 | ||
96 | 101 | ||
@@ -134,7 +139,7 @@ static void test_each(void *info) | |||
134 | { | 139 | { |
135 | /* Increment the counter from a non preemptible context */ | 140 | /* Increment the counter from a non preemptible context */ |
136 | printk("Increment on cpu %d\n", smp_processor_id()); | 141 | printk("Increment on cpu %d\n", smp_processor_id()); |
137 | local_inc(&__get_cpu_var(counters)); | 142 | local_inc(this_cpu_ptr(&counters)); |
138 | 143 | ||
139 | /* This is what incrementing the variable would look like within a | 144 | /* This is what incrementing the variable would look like within a |
140 | * preemptible context (it disables preemption) : | 145 | * preemptible context (it disables preemption) : |
diff --git a/Documentation/locking/lglock.txt b/Documentation/locking/lglock.txt new file mode 100644 index 000000000000..a6971e34fabe --- /dev/null +++ b/Documentation/locking/lglock.txt | |||
@@ -0,0 +1,166 @@ | |||
1 | lglock - local/global locks for mostly local access patterns | ||
2 | ------------------------------------------------------------ | ||
3 | |||
4 | Origin: Nick Piggin's VFS scalability series introduced during | ||
5 | 2.6.35++ [1] [2] | ||
6 | Location: kernel/locking/lglock.c | ||
7 | include/linux/lglock.h | ||
8 | Users: currently only the VFS and stop_machine related code | ||
9 | |||
10 | Design Goal: | ||
11 | ------------ | ||
12 | |||
13 | Improve scalability of globally used large data sets that are | ||
14 | distributed over all CPUs as per_cpu elements. | ||
15 | |||
16 | To manage global data structures that are partitioned over all CPUs | ||
17 | as per_cpu elements but can be mostly handled by CPU local actions | ||
18 | lglock will be used where the majority of accesses are cpu local | ||
19 | reading and occasional cpu local writing with very infrequent | ||
20 | global write access. | ||
21 | |||
22 | |||
23 | * deal with things locally whenever possible | ||
24 | - very fast access to the local per_cpu data | ||
25 | - reasonably fast access to specific per_cpu data on a different | ||
26 | CPU | ||
27 | * while making global action possible when needed | ||
28 | - by expensive access to all CPUs locks - effectively | ||
29 | resulting in a globally visible critical section. | ||
30 | |||
31 | Design: | ||
32 | ------- | ||
33 | |||
34 | Basically it is an array of per_cpu spinlocks with the | ||
35 | lg_local_lock/unlock accessing the local CPUs lock object and the | ||
36 | lg_local_lock_cpu/unlock_cpu accessing a remote CPUs lock object | ||
37 | the lg_local_lock has to disable preemption as migration protection so | ||
38 | that the reference to the local CPUs lock does not go out of scope. | ||
39 | Due to the lg_local_lock/unlock only touching cpu-local resources it | ||
40 | is fast. Taking the local lock on a different CPU will be more | ||
41 | expensive but still relatively cheap. | ||
42 | |||
43 | One can relax the migration constraints by acquiring the current | ||
44 | CPUs lock with lg_local_lock_cpu, remember the cpu, and release that | ||
45 | lock at the end of the critical section even if migrated. This should | ||
46 | give most of the performance benefits without inhibiting migration | ||
47 | though needs careful considerations for nesting of lglocks and | ||
48 | consideration of deadlocks with lg_global_lock. | ||
49 | |||
50 | The lg_global_lock/unlock locks all underlying spinlocks of all | ||
51 | possible CPUs (including those off-line). The preemption disable/enable | ||
52 | are needed in the non-RT kernels to prevent deadlocks like: | ||
53 | |||
54 | on cpu 1 | ||
55 | |||
56 | task A task B | ||
57 | lg_global_lock | ||
58 | got cpu 0 lock | ||
59 | <<<< preempt <<<< | ||
60 | lg_local_lock_cpu for cpu 0 | ||
61 | spin on cpu 0 lock | ||
62 | |||
63 | On -RT this deadlock scenario is resolved by the arch_spin_locks in the | ||
64 | lglocks being replaced by rt_mutexes which resolve the above deadlock | ||
65 | by boosting the lock-holder. | ||
66 | |||
67 | |||
68 | Implementation: | ||
69 | --------------- | ||
70 | |||
71 | The initial lglock implementation from Nick Piggin used some complex | ||
72 | macros to generate the lglock/brlock in lglock.h - they were later | ||
73 | turned into a set of functions by Andi Kleen [7]. The change to functions | ||
74 | was motivated by the presence of multiple lock users and also by them | ||
75 | being easier to maintain than the generating macros. This change to | ||
76 | functions is also the basis to eliminated the restriction of not | ||
77 | being initializeable in kernel modules (the remaining problem is that | ||
78 | locks are not explicitly initialized - see lockdep-design.txt) | ||
79 | |||
80 | Declaration and initialization: | ||
81 | ------------------------------- | ||
82 | |||
83 | #include <linux/lglock.h> | ||
84 | |||
85 | DEFINE_LGLOCK(name) | ||
86 | or: | ||
87 | DEFINE_STATIC_LGLOCK(name); | ||
88 | |||
89 | lg_lock_init(&name, "lockdep_name_string"); | ||
90 | |||
91 | on UP this is mapped to DEFINE_SPINLOCK(name) in both cases, note | ||
92 | also that as of 3.18-rc6 all declaration in use are of the _STATIC_ | ||
93 | variant (and it seems that the non-static was never in use). | ||
94 | lg_lock_init is initializing the lockdep map only. | ||
95 | |||
96 | Usage: | ||
97 | ------ | ||
98 | |||
99 | From the locking semantics it is a spinlock. It could be called a | ||
100 | locality aware spinlock. lg_local_* behaves like a per_cpu | ||
101 | spinlock and lg_global_* like a global spinlock. | ||
102 | No surprises in the API. | ||
103 | |||
104 | lg_local_lock(*lglock); | ||
105 | access to protected per_cpu object on this CPU | ||
106 | lg_local_unlock(*lglock); | ||
107 | |||
108 | lg_local_lock_cpu(*lglock, cpu); | ||
109 | access to protected per_cpu object on other CPU cpu | ||
110 | lg_local_unlock_cpu(*lglock, cpu); | ||
111 | |||
112 | lg_global_lock(*lglock); | ||
113 | access all protected per_cpu objects on all CPUs | ||
114 | lg_global_unlock(*lglock); | ||
115 | |||
116 | There are no _trylock variants of the lglocks. | ||
117 | |||
118 | Note that the lg_global_lock/unlock has to iterate over all possible | ||
119 | CPUs rather than the actually present CPUs or a CPU could go off-line | ||
120 | with a held lock [4] and that makes it very expensive. A discussion on | ||
121 | these issues can be found at [5] | ||
122 | |||
123 | Constraints: | ||
124 | ------------ | ||
125 | |||
126 | * currently the declaration of lglocks in kernel modules is not | ||
127 | possible, though this should be doable with little change. | ||
128 | * lglocks are not recursive. | ||
129 | * suitable for code that can do most operations on the CPU local | ||
130 | data and will very rarely need the global lock | ||
131 | * lg_global_lock/unlock is *very* expensive and does not scale | ||
132 | * on UP systems all lg_* primitives are simply spinlocks | ||
133 | * in PREEMPT_RT the spinlock becomes an rt-mutex and can sleep but | ||
134 | does not change the tasks state while sleeping [6]. | ||
135 | * in PREEMPT_RT the preempt_disable/enable in lg_local_lock/unlock | ||
136 | is downgraded to a migrate_disable/enable, the other | ||
137 | preempt_disable/enable are downgraded to barriers [6]. | ||
138 | The deadlock noted for non-RT above is resolved due to rt_mutexes | ||
139 | boosting the lock-holder in this case which arch_spin_locks do | ||
140 | not do. | ||
141 | |||
142 | lglocks were designed for very specific problems in the VFS and probably | ||
143 | only are the right answer in these corner cases. Any new user that looks | ||
144 | at lglocks probably wants to look at the seqlock and RCU alternatives as | ||
145 | her first choice. There are also efforts to resolve the RCU issues that | ||
146 | currently prevent using RCU in place of view remaining lglocks. | ||
147 | |||
148 | Note on brlock history: | ||
149 | ----------------------- | ||
150 | |||
151 | The 'Big Reader' read-write spinlocks were originally introduced by | ||
152 | Ingo Molnar in 2000 (2.4/2.5 kernel series) and removed in 2003. They | ||
153 | later were introduced by the VFS scalability patch set in 2.6 series | ||
154 | again as the "big reader lock" brlock [2] variant of lglock which has | ||
155 | been replaced by seqlock primitives or by RCU based primitives in the | ||
156 | 3.13 kernel series as was suggested in [3] in 2003. The brlock was | ||
157 | entirely removed in the 3.13 kernel series. | ||
158 | |||
159 | Link: 1 http://lkml.org/lkml/2010/8/2/81 | ||
160 | Link: 2 http://lwn.net/Articles/401738/ | ||
161 | Link: 3 http://lkml.org/lkml/2003/3/9/205 | ||
162 | Link: 4 https://lkml.org/lkml/2011/8/24/185 | ||
163 | Link: 5 http://lkml.org/lkml/2011/12/18/189 | ||
164 | Link: 6 https://www.kernel.org/pub/linux/kernel/projects/rt/ | ||
165 | patch series - lglocks-rt.patch.patch | ||
166 | Link: 7 http://lkml.org/lkml/2012/3/5/26 | ||
diff --git a/Documentation/mailbox.txt b/Documentation/mailbox.txt index 60f43ff629aa..1092ad9578da 100644 --- a/Documentation/mailbox.txt +++ b/Documentation/mailbox.txt | |||
@@ -53,7 +53,7 @@ static void message_from_remote(struct mbox_client *cl, void *mssg) | |||
53 | { | 53 | { |
54 | struct demo_client *dc = container_of(mbox_client, | 54 | struct demo_client *dc = container_of(mbox_client, |
55 | struct demo_client, cl); | 55 | struct demo_client, cl); |
56 | if (dc->aysnc) { | 56 | if (dc->async) { |
57 | if (is_an_ack(mssg)) { | 57 | if (is_an_ack(mssg)) { |
58 | /* An ACK to our last sample sent */ | 58 | /* An ACK to our last sample sent */ |
59 | return; /* Or do something else here */ | 59 | return; /* Or do something else here */ |
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 22a969cdd476..70a09f8a0383 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -121,22 +121,22 @@ For example, consider the following sequence of events: | |||
121 | The set of accesses as seen by the memory system in the middle can be arranged | 121 | The set of accesses as seen by the memory system in the middle can be arranged |
122 | in 24 different combinations: | 122 | in 24 different combinations: |
123 | 123 | ||
124 | STORE A=3, STORE B=4, x=LOAD A->3, y=LOAD B->4 | 124 | STORE A=3, STORE B=4, y=LOAD A->3, x=LOAD B->4 |
125 | STORE A=3, STORE B=4, y=LOAD B->4, x=LOAD A->3 | 125 | STORE A=3, STORE B=4, x=LOAD B->4, y=LOAD A->3 |
126 | STORE A=3, x=LOAD A->3, STORE B=4, y=LOAD B->4 | 126 | STORE A=3, y=LOAD A->3, STORE B=4, x=LOAD B->4 |
127 | STORE A=3, x=LOAD A->3, y=LOAD B->2, STORE B=4 | 127 | STORE A=3, y=LOAD A->3, x=LOAD B->2, STORE B=4 |
128 | STORE A=3, y=LOAD B->2, STORE B=4, x=LOAD A->3 | 128 | STORE A=3, x=LOAD B->2, STORE B=4, y=LOAD A->3 |
129 | STORE A=3, y=LOAD B->2, x=LOAD A->3, STORE B=4 | 129 | STORE A=3, x=LOAD B->2, y=LOAD A->3, STORE B=4 |
130 | STORE B=4, STORE A=3, x=LOAD A->3, y=LOAD B->4 | 130 | STORE B=4, STORE A=3, y=LOAD A->3, x=LOAD B->4 |
131 | STORE B=4, ... | 131 | STORE B=4, ... |
132 | ... | 132 | ... |
133 | 133 | ||
134 | and can thus result in four different combinations of values: | 134 | and can thus result in four different combinations of values: |
135 | 135 | ||
136 | x == 1, y == 2 | 136 | x == 2, y == 1 |
137 | x == 1, y == 4 | 137 | x == 2, y == 3 |
138 | x == 3, y == 2 | 138 | x == 4, y == 1 |
139 | x == 3, y == 4 | 139 | x == 4, y == 3 |
140 | 140 | ||
141 | 141 | ||
142 | Furthermore, the stores committed by a CPU to the memory system may not be | 142 | Furthermore, the stores committed by a CPU to the memory system may not be |
@@ -694,6 +694,24 @@ Please note once again that the stores to 'b' differ. If they were | |||
694 | identical, as noted earlier, the compiler could pull this store outside | 694 | identical, as noted earlier, the compiler could pull this store outside |
695 | of the 'if' statement. | 695 | of the 'if' statement. |
696 | 696 | ||
697 | You must also be careful not to rely too much on boolean short-circuit | ||
698 | evaluation. Consider this example: | ||
699 | |||
700 | q = ACCESS_ONCE(a); | ||
701 | if (a || 1 > 0) | ||
702 | ACCESS_ONCE(b) = 1; | ||
703 | |||
704 | Because the second condition is always true, the compiler can transform | ||
705 | this example as following, defeating control dependency: | ||
706 | |||
707 | q = ACCESS_ONCE(a); | ||
708 | ACCESS_ONCE(b) = 1; | ||
709 | |||
710 | This example underscores the need to ensure that the compiler cannot | ||
711 | out-guess your code. More generally, although ACCESS_ONCE() does force | ||
712 | the compiler to actually emit code for a given load, it does not force | ||
713 | the compiler to use the results. | ||
714 | |||
697 | Finally, control dependencies do -not- provide transitivity. This is | 715 | Finally, control dependencies do -not- provide transitivity. This is |
698 | demonstrated by two related examples, with the initial values of | 716 | demonstrated by two related examples, with the initial values of |
699 | x and y both being zero: | 717 | x and y both being zero: |
@@ -1615,6 +1633,48 @@ There are some more advanced barrier functions: | |||
1615 | operations" subsection for information on where to use these. | 1633 | operations" subsection for information on where to use these. |
1616 | 1634 | ||
1617 | 1635 | ||
1636 | (*) dma_wmb(); | ||
1637 | (*) dma_rmb(); | ||
1638 | |||
1639 | These are for use with consistent memory to guarantee the ordering | ||
1640 | of writes or reads of shared memory accessible to both the CPU and a | ||
1641 | DMA capable device. | ||
1642 | |||
1643 | For example, consider a device driver that shares memory with a device | ||
1644 | and uses a descriptor status value to indicate if the descriptor belongs | ||
1645 | to the device or the CPU, and a doorbell to notify it when new | ||
1646 | descriptors are available: | ||
1647 | |||
1648 | if (desc->status != DEVICE_OWN) { | ||
1649 | /* do not read data until we own descriptor */ | ||
1650 | dma_rmb(); | ||
1651 | |||
1652 | /* read/modify data */ | ||
1653 | read_data = desc->data; | ||
1654 | desc->data = write_data; | ||
1655 | |||
1656 | /* flush modifications before status update */ | ||
1657 | dma_wmb(); | ||
1658 | |||
1659 | /* assign ownership */ | ||
1660 | desc->status = DEVICE_OWN; | ||
1661 | |||
1662 | /* force memory to sync before notifying device via MMIO */ | ||
1663 | wmb(); | ||
1664 | |||
1665 | /* notify device of new descriptors */ | ||
1666 | writel(DESC_NOTIFY, doorbell); | ||
1667 | } | ||
1668 | |||
1669 | The dma_rmb() allows us guarantee the device has released ownership | ||
1670 | before we read the data from the descriptor, and he dma_wmb() allows | ||
1671 | us to guarantee the data is written to the descriptor before the device | ||
1672 | can see it now has ownership. The wmb() is needed to guarantee that the | ||
1673 | cache coherent memory writes have completed before attempting a write to | ||
1674 | the cache incoherent MMIO region. | ||
1675 | |||
1676 | See Documentation/DMA-API.txt for more information on consistent memory. | ||
1677 | |||
1618 | MMIO WRITE BARRIER | 1678 | MMIO WRITE BARRIER |
1619 | ------------------ | 1679 | ------------------ |
1620 | 1680 | ||
@@ -2465,10 +2525,15 @@ functions: | |||
2465 | Please refer to the PCI specification for more information on interactions | 2525 | Please refer to the PCI specification for more information on interactions |
2466 | between PCI transactions. | 2526 | between PCI transactions. |
2467 | 2527 | ||
2468 | (*) readX_relaxed() | 2528 | (*) readX_relaxed(), writeX_relaxed() |
2469 | 2529 | ||
2470 | These are similar to readX(), but are not guaranteed to be ordered in any | 2530 | These are similar to readX() and writeX(), but provide weaker memory |
2471 | way. Be aware that there is no I/O read barrier available. | 2531 | ordering guarantees. Specifically, they do not guarantee ordering with |
2532 | respect to normal memory accesses (e.g. DMA buffers) nor do they guarantee | ||
2533 | ordering with respect to LOCK or UNLOCK operations. If the latter is | ||
2534 | required, an mmiowb() barrier can be used. Note that relaxed accesses to | ||
2535 | the same peripheral are guaranteed to be ordered with respect to each | ||
2536 | other. | ||
2472 | 2537 | ||
2473 | (*) ioreadX(), iowriteX() | 2538 | (*) ioreadX(), iowriteX() |
2474 | 2539 | ||
diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile index 0f3156888048..f47fe6ba7300 100644 --- a/Documentation/mic/mpssd/Makefile +++ b/Documentation/mic/mpssd/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | # List of programs to build | 1 | # List of programs to build |
2 | hostprogs-y := mpssd | 2 | hostprogs-$(CONFIG_X86_64) := mpssd |
3 | 3 | ||
4 | mpssd-objs := mpssd.o sysfs.o | 4 | mpssd-objs := mpssd.o sysfs.o |
5 | 5 | ||
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index eeb5b2e97bed..83bf4986baea 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -2230,11 +2230,8 @@ balance-rr: This mode is the only mode that will permit a single | |||
2230 | 2230 | ||
2231 | It is possible to adjust TCP/IP's congestion limits by | 2231 | It is possible to adjust TCP/IP's congestion limits by |
2232 | altering the net.ipv4.tcp_reordering sysctl parameter. The | 2232 | altering the net.ipv4.tcp_reordering sysctl parameter. The |
2233 | usual default value is 3, and the maximum useful value is 127. | 2233 | usual default value is 3. But keep in mind TCP stack is able |
2234 | For a four interface balance-rr bond, expect that a single | 2234 | to automatically increase this when it detects reorders. |
2235 | TCP/IP stream will utilize no more than approximately 2.3 | ||
2236 | interface's worth of throughput, even after adjusting | ||
2237 | tcp_reordering. | ||
2238 | 2235 | ||
2239 | Note that the fraction of packets that will be delivered out of | 2236 | Note that the fraction of packets that will be delivered out of |
2240 | order is highly variable, and is unlikely to be zero. The level | 2237 | order is highly variable, and is unlikely to be zero. The level |
diff --git a/Documentation/networking/fib_trie.txt b/Documentation/networking/fib_trie.txt index 0723db7f8495..fe719388518b 100644 --- a/Documentation/networking/fib_trie.txt +++ b/Documentation/networking/fib_trie.txt | |||
@@ -73,8 +73,8 @@ trie_leaf_remove() | |||
73 | 73 | ||
74 | trie_rebalance() | 74 | trie_rebalance() |
75 | The key function for the dynamic trie after any change in the trie | 75 | The key function for the dynamic trie after any change in the trie |
76 | it is run to optimize and reorganize. Tt will walk the trie upwards | 76 | it is run to optimize and reorganize. It will walk the trie upwards |
77 | towards the root from a given tnode, doing a resize() at each step | 77 | towards the root from a given tnode, doing a resize() at each step |
78 | to implement level compression. | 78 | to implement level compression. |
79 | 79 | ||
80 | resize() | 80 | resize() |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 0307e2875f21..9bffdfc648dc 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -56,6 +56,13 @@ ip_forward_use_pmtu - BOOLEAN | |||
56 | 0 - disabled | 56 | 0 - disabled |
57 | 1 - enabled | 57 | 1 - enabled |
58 | 58 | ||
59 | fwmark_reflect - BOOLEAN | ||
60 | Controls the fwmark of kernel-generated IPv4 reply packets that are not | ||
61 | associated with a socket for example, TCP RSTs or ICMP echo replies). | ||
62 | If unset, these packets have a fwmark of zero. If set, they have the | ||
63 | fwmark of the packet they are replying to. | ||
64 | Default: 0 | ||
65 | |||
59 | route/max_size - INTEGER | 66 | route/max_size - INTEGER |
60 | Maximum number of routes allowed in the kernel. Increase | 67 | Maximum number of routes allowed in the kernel. Increase |
61 | this when using large numbers of interfaces and/or routes. | 68 | this when using large numbers of interfaces and/or routes. |
@@ -376,9 +383,17 @@ tcp_orphan_retries - INTEGER | |||
376 | may consume significant resources. Cf. tcp_max_orphans. | 383 | may consume significant resources. Cf. tcp_max_orphans. |
377 | 384 | ||
378 | tcp_reordering - INTEGER | 385 | tcp_reordering - INTEGER |
379 | Maximal reordering of packets in a TCP stream. | 386 | Initial reordering level of packets in a TCP stream. |
387 | TCP stack can then dynamically adjust flow reordering level | ||
388 | between this initial value and tcp_max_reordering | ||
380 | Default: 3 | 389 | Default: 3 |
381 | 390 | ||
391 | tcp_max_reordering - INTEGER | ||
392 | Maximal reordering level of packets in a TCP stream. | ||
393 | 300 is a fairly conservative value, but you might increase it | ||
394 | if paths are using per packet load balancing (like bonding rr mode) | ||
395 | Default: 300 | ||
396 | |||
382 | tcp_retrans_collapse - BOOLEAN | 397 | tcp_retrans_collapse - BOOLEAN |
383 | Bug-to-bug compatibility with some broken printers. | 398 | Bug-to-bug compatibility with some broken printers. |
384 | On retransmit try to send bigger packets to work around bugs in | 399 | On retransmit try to send bigger packets to work around bugs in |
@@ -1201,6 +1216,13 @@ conf/all/forwarding - BOOLEAN | |||
1201 | proxy_ndp - BOOLEAN | 1216 | proxy_ndp - BOOLEAN |
1202 | Do proxy ndp. | 1217 | Do proxy ndp. |
1203 | 1218 | ||
1219 | fwmark_reflect - BOOLEAN | ||
1220 | Controls the fwmark of kernel-generated IPv6 reply packets that are not | ||
1221 | associated with a socket for example, TCP RSTs or ICMPv6 echo replies). | ||
1222 | If unset, these packets have a fwmark of zero. If set, they have the | ||
1223 | fwmark of the packet they are replying to. | ||
1224 | Default: 0 | ||
1225 | |||
1204 | conf/interface/*: | 1226 | conf/interface/*: |
1205 | Change special settings per interface. | 1227 | Change special settings per interface. |
1206 | 1228 | ||
@@ -1452,6 +1474,19 @@ suppress_frag_ndisc - INTEGER | |||
1452 | 1 - (default) discard fragmented neighbor discovery packets | 1474 | 1 - (default) discard fragmented neighbor discovery packets |
1453 | 0 - allow fragmented neighbor discovery packets | 1475 | 0 - allow fragmented neighbor discovery packets |
1454 | 1476 | ||
1477 | optimistic_dad - BOOLEAN | ||
1478 | Whether to perform Optimistic Duplicate Address Detection (RFC 4429). | ||
1479 | 0: disabled (default) | ||
1480 | 1: enabled | ||
1481 | |||
1482 | use_optimistic - BOOLEAN | ||
1483 | If enabled, do not classify optimistic addresses as deprecated during | ||
1484 | source address selection. Preferred addresses will still be chosen | ||
1485 | before optimistic addresses, subject to other ranking in the source | ||
1486 | address selection algorithm. | ||
1487 | 0: disabled (default) | ||
1488 | 1: enabled | ||
1489 | |||
1455 | icmp/*: | 1490 | icmp/*: |
1456 | ratelimit - INTEGER | 1491 | ratelimit - INTEGER |
1457 | Limit the maximal rates for sending ICMPv6 packets. | 1492 | Limit the maximal rates for sending ICMPv6 packets. |
diff --git a/Documentation/networking/ipvlan.txt b/Documentation/networking/ipvlan.txt new file mode 100644 index 000000000000..cf996394e466 --- /dev/null +++ b/Documentation/networking/ipvlan.txt | |||
@@ -0,0 +1,107 @@ | |||
1 | |||
2 | IPVLAN Driver HOWTO | ||
3 | |||
4 | Initial Release: | ||
5 | Mahesh Bandewar <maheshb AT google.com> | ||
6 | |||
7 | 1. Introduction: | ||
8 | This is conceptually very similar to the macvlan driver with one major | ||
9 | exception of using L3 for mux-ing /demux-ing among slaves. This property makes | ||
10 | the master device share the L2 with it's slave devices. I have developed this | ||
11 | driver in conjuntion with network namespaces and not sure if there is use case | ||
12 | outside of it. | ||
13 | |||
14 | |||
15 | 2. Building and Installation: | ||
16 | In order to build the driver, please select the config item CONFIG_IPVLAN. | ||
17 | The driver can be built into the kernel (CONFIG_IPVLAN=y) or as a module | ||
18 | (CONFIG_IPVLAN=m). | ||
19 | |||
20 | |||
21 | 3. Configuration: | ||
22 | There are no module parameters for this driver and it can be configured | ||
23 | using IProute2/ip utility. | ||
24 | |||
25 | ip link add link <master-dev> <slave-dev> type ipvlan mode { l2 | L3 } | ||
26 | |||
27 | e.g. ip link add link ipvl0 eth0 type ipvlan mode l2 | ||
28 | |||
29 | |||
30 | 4. Operating modes: | ||
31 | IPvlan has two modes of operation - L2 and L3. For a given master device, | ||
32 | you can select one of these two modes and all slaves on that master will | ||
33 | operate in the same (selected) mode. The RX mode is almost identical except | ||
34 | that in L3 mode the slaves wont receive any multicast / broadcast traffic. | ||
35 | L3 mode is more restrictive since routing is controlled from the other (mostly) | ||
36 | default namespace. | ||
37 | |||
38 | 4.1 L2 mode: | ||
39 | In this mode TX processing happens on the stack instance attached to the | ||
40 | slave device and packets are switched and queued to the master device to send | ||
41 | out. In this mode the slaves will RX/TX multicast and broadcast (if applicable) | ||
42 | as well. | ||
43 | |||
44 | 4.2 L3 mode: | ||
45 | In this mode TX processing upto L3 happens on the stack instance attached | ||
46 | to the slave device and packets are switched to the stack instance of the | ||
47 | master device for the L2 processing and routing from that instance will be | ||
48 | used before packets are queued on the outbound device. In this mode the slaves | ||
49 | will not receive nor can send multicast / broadcast traffic. | ||
50 | |||
51 | |||
52 | 5. What to choose (macvlan vs. ipvlan)? | ||
53 | These two devices are very similar in many regards and the specific use | ||
54 | case could very well define which device to choose. if one of the following | ||
55 | situations defines your use case then you can choose to use ipvlan - | ||
56 | (a) The Linux host that is connected to the external switch / router has | ||
57 | policy configured that allows only one mac per port. | ||
58 | (b) No of virtual devices created on a master exceed the mac capacity and | ||
59 | puts the NIC in promiscous mode and degraded performance is a concern. | ||
60 | (c) If the slave device is to be put into the hostile / untrusted network | ||
61 | namespace where L2 on the slave could be changed / misused. | ||
62 | |||
63 | |||
64 | 6. Example configuration: | ||
65 | |||
66 | +=============================================================+ | ||
67 | | Host: host1 | | ||
68 | | | | ||
69 | | +----------------------+ +----------------------+ | | ||
70 | | | NS:ns0 | | NS:ns1 | | | ||
71 | | | | | | | | ||
72 | | | | | | | | ||
73 | | | ipvl0 | | ipvl1 | | | ||
74 | | +----------#-----------+ +-----------#----------+ | | ||
75 | | # # | | ||
76 | | ################################ | | ||
77 | | # eth0 | | ||
78 | +==============================#==============================+ | ||
79 | |||
80 | |||
81 | (a) Create two network namespaces - ns0, ns1 | ||
82 | ip netns add ns0 | ||
83 | ip netns add ns1 | ||
84 | |||
85 | (b) Create two ipvlan slaves on eth0 (master device) | ||
86 | ip link add link eth0 ipvl0 type ipvlan mode l2 | ||
87 | ip link add link eth0 ipvl1 type ipvlan mode l2 | ||
88 | |||
89 | (c) Assign slaves to the respective network namespaces | ||
90 | ip link set dev ipvl0 netns ns0 | ||
91 | ip link set dev ipvl1 netns ns1 | ||
92 | |||
93 | (d) Now switch to the namespace (ns0 or ns1) to configure the slave devices | ||
94 | - For ns0 | ||
95 | (1) ip netns exec ns0 bash | ||
96 | (2) ip link set dev ipvl0 up | ||
97 | (3) ip link set dev lo up | ||
98 | (4) ip -4 addr add 127.0.0.1 dev lo | ||
99 | (5) ip -4 addr add $IPADDR dev ipvl0 | ||
100 | (6) ip -4 route add default via $ROUTER dev ipvl0 | ||
101 | - For ns1 | ||
102 | (1) ip netns exec ns1 bash | ||
103 | (2) ip link set dev ipvl1 up | ||
104 | (3) ip link set dev lo up | ||
105 | (4) ip -4 addr add 127.0.0.1 dev lo | ||
106 | (5) ip -4 addr add $IPADDR dev ipvl1 | ||
107 | (6) ip -4 route add default via $ROUTER dev ipvl1 | ||
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt index 96cccebb839b..0ace6e776ac8 100644 --- a/Documentation/networking/ixgbe.txt +++ b/Documentation/networking/ixgbe.txt | |||
@@ -138,7 +138,7 @@ Other ethtool Commands: | |||
138 | To enable Flow Director | 138 | To enable Flow Director |
139 | ethtool -K ethX ntuple on | 139 | ethtool -K ethX ntuple on |
140 | To add a filter | 140 | To add a filter |
141 | Use -U switch. e.g., ethtool -U ethX flow-type tcp4 src-ip 0x178000a | 141 | Use -U switch. e.g., ethtool -U ethX flow-type tcp4 src-ip 10.0.128.23 |
142 | action 1 | 142 | action 1 |
143 | To see the list of filters currently present: | 143 | To see the list of filters currently present: |
144 | ethtool -u ethX | 144 | ethtool -u ethX |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index 2090895b08d4..e655e2453c98 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -1,12 +1,12 @@ | |||
1 | STMicroelectronics 10/100/1000 Synopsys Ethernet driver | 1 | STMicroelectronics 10/100/1000 Synopsys Ethernet driver |
2 | 2 | ||
3 | Copyright (C) 2007-2013 STMicroelectronics Ltd | 3 | Copyright (C) 2007-2014 STMicroelectronics Ltd |
4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | 4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> |
5 | 5 | ||
6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | 6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers |
7 | (Synopsys IP blocks). | 7 | (Synopsys IP blocks). |
8 | 8 | ||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | 9 | Currently this network device driver is for all STi embedded MAC/GMAC |
10 | (i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000 | 10 | (i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000 |
11 | FF1152AMT0221 D1215994A VIRTEX FPGA board. | 11 | FF1152AMT0221 D1215994A VIRTEX FPGA board. |
12 | 12 | ||
@@ -22,6 +22,9 @@ The kernel configuration option is STMMAC_ETH: | |||
22 | Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> | 22 | Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> |
23 | STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) | 23 | STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) |
24 | 24 | ||
25 | CONFIG_STMMAC_PLATFORM: is to enable the platform driver. | ||
26 | CONFIG_STMMAC_PCI: is to enable the pci driver. | ||
27 | |||
25 | 2) Driver parameters list: | 28 | 2) Driver parameters list: |
26 | debug: message level (0: no output, 16: all); | 29 | debug: message level (0: no output, 16: all); |
27 | phyaddr: to manually provide the physical address to the PHY device; | 30 | phyaddr: to manually provide the physical address to the PHY device; |
@@ -45,10 +48,11 @@ Driver parameters can be also passed in command line by using: | |||
45 | The xmit method is invoked when the kernel needs to transmit a packet; it sets | 48 | The xmit method is invoked when the kernel needs to transmit a packet; it sets |
46 | the descriptors in the ring and informs the DMA engine that there is a packet | 49 | the descriptors in the ring and informs the DMA engine that there is a packet |
47 | ready to be transmitted. | 50 | ready to be transmitted. |
48 | Once the controller has finished transmitting the packet, an interrupt is | ||
49 | triggered; So the driver will be able to release the socket buffers. | ||
50 | By default, the driver sets the NETIF_F_SG bit in the features field of the | 51 | By default, the driver sets the NETIF_F_SG bit in the features field of the |
51 | net_device structure enabling the scatter/gather feature. | 52 | net_device structure enabling the scatter-gather feature. This is true on |
53 | chips and configurations where the checksum can be done in hardware. | ||
54 | Once the controller has finished transmitting the packet, napi will be | ||
55 | scheduled to release the transmit resources. | ||
52 | 56 | ||
53 | 4.2) Receive process | 57 | 4.2) Receive process |
54 | When one or more packets are received, an interrupt happens. The interrupts | 58 | When one or more packets are received, an interrupt happens. The interrupts |
@@ -58,20 +62,12 @@ This is based on NAPI so the interrupt handler signals only if there is work | |||
58 | to be done, and it exits. | 62 | to be done, and it exits. |
59 | Then the poll method will be scheduled at some future point. | 63 | Then the poll method will be scheduled at some future point. |
60 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket | 64 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket |
61 | buffers in order to avoid the memcpy (Zero-copy). | 65 | buffers in order to avoid the memcpy (zero-copy). |
62 | 66 | ||
63 | 4.3) Interrupt Mitigation | 67 | 4.3) Interrupt Mitigation |
64 | The driver is able to mitigate the number of its DMA interrupts | 68 | The driver is able to mitigate the number of its DMA interrupts |
65 | using NAPI for the reception on chips older than the 3.50. | 69 | using NAPI for the reception on chips older than the 3.50. |
66 | New chips have an HW RX-Watchdog used for this mitigation. | 70 | New chips have an HW RX-Watchdog used for this mitigation. |
67 | |||
68 | On Tx-side, the mitigation schema is based on a SW timer that calls the | ||
69 | tx function (stmmac_tx) to reclaim the resource after transmitting the | ||
70 | frames. | ||
71 | Also there is another parameter (like a threshold) used to program | ||
72 | the descriptors avoiding to set the interrupt on completion bit in | ||
73 | when the frame is sent (xmit). | ||
74 | |||
75 | Mitigation parameters can be tuned by ethtool. | 71 | Mitigation parameters can be tuned by ethtool. |
76 | 72 | ||
77 | 4.4) WOL | 73 | 4.4) WOL |
@@ -79,7 +75,7 @@ Wake up on Lan feature through Magic and Unicast frames are supported for the | |||
79 | GMAC core. | 75 | GMAC core. |
80 | 76 | ||
81 | 4.5) DMA descriptors | 77 | 4.5) DMA descriptors |
82 | Driver handles both normal and enhanced descriptors. The latter has been only | 78 | Driver handles both normal and alternate descriptors. The latter has been only |
83 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a and later. | 79 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a and later. |
84 | 80 | ||
85 | STMMAC supports DMA descriptor to operate both in dual buffer (RING) | 81 | STMMAC supports DMA descriptor to operate both in dual buffer (RING) |
@@ -91,9 +87,20 @@ In CHAINED mode each descriptor will have pointer to next descriptor in | |||
91 | the list, hence creating the explicit chaining in the descriptor itself, | 87 | the list, hence creating the explicit chaining in the descriptor itself, |
92 | whereas such explicit chaining is not possible in RING mode. | 88 | whereas such explicit chaining is not possible in RING mode. |
93 | 89 | ||
90 | 4.5.1) Extended descriptors | ||
91 | The extended descriptors give us information about the Ethernet payload | ||
92 | when it is carrying PTP packets or TCP/UDP/ICMP over IP. | ||
93 | These are not available on GMAC Synopsys chips older than the 3.50. | ||
94 | At probe time the driver will decide if these can be actually used. | ||
95 | This support also is mandatory for PTPv2 because the extra descriptors | ||
96 | are used for saving the hardware timestamps and Extended Status. | ||
97 | |||
94 | 4.6) Ethtool support | 98 | 4.6) Ethtool support |
95 | Ethtool is supported. Driver statistics and internal errors can be taken using: | 99 | Ethtool is supported. |
96 | ethtool -S ethX command. It is possible to dump registers etc. | 100 | |
101 | For example, driver statistics (including RMON), internal errors can be taken | ||
102 | using: | ||
103 | # ethtool -S ethX command | ||
97 | 104 | ||
98 | 4.7) Jumbo and Segmentation Offloading | 105 | 4.7) Jumbo and Segmentation Offloading |
99 | Jumbo frames are supported and tested for the GMAC. | 106 | Jumbo frames are supported and tested for the GMAC. |
@@ -101,12 +108,11 @@ The GSO has been also added but it's performed in software. | |||
101 | LRO is not supported. | 108 | LRO is not supported. |
102 | 109 | ||
103 | 4.8) Physical | 110 | 4.8) Physical |
104 | The driver is compatible with PAL to work with PHY and GPHY devices. | 111 | The driver is compatible with Physical Abstraction Layer to be connected with |
112 | PHY and GPHY devices. | ||
105 | 113 | ||
106 | 4.9) Platform information | 114 | 4.9) Platform information |
107 | Several driver's information can be passed through the platform | 115 | Several information can be passed through the platform and device-tree. |
108 | These are included in the include/linux/stmmac.h header file | ||
109 | and detailed below as well: | ||
110 | 116 | ||
111 | struct plat_stmmacenet_data { | 117 | struct plat_stmmacenet_data { |
112 | char *phy_bus_name; | 118 | char *phy_bus_name; |
@@ -125,15 +131,18 @@ struct plat_stmmacenet_data { | |||
125 | int force_sf_dma_mode; | 131 | int force_sf_dma_mode; |
126 | int force_thresh_dma_mode; | 132 | int force_thresh_dma_mode; |
127 | int riwt_off; | 133 | int riwt_off; |
134 | int max_speed; | ||
135 | int maxmtu; | ||
128 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 136 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
129 | void (*bus_setup)(void __iomem *ioaddr); | 137 | void (*bus_setup)(void __iomem *ioaddr); |
130 | void *(*setup)(struct platform_device *pdev); | 138 | void *(*setup)(struct platform_device *pdev); |
139 | void (*free)(struct platform_device *pdev, void *priv); | ||
131 | int (*init)(struct platform_device *pdev, void *priv); | 140 | int (*init)(struct platform_device *pdev, void *priv); |
132 | void (*exit)(struct platform_device *pdev, void *priv); | 141 | void (*exit)(struct platform_device *pdev, void *priv); |
133 | void *custom_cfg; | 142 | void *custom_cfg; |
134 | void *custom_data; | 143 | void *custom_data; |
135 | void *bsp_priv; | 144 | void *bsp_priv; |
136 | }; | 145 | }; |
137 | 146 | ||
138 | Where: | 147 | Where: |
139 | o phy_bus_name: phy bus name to attach to the stmmac. | 148 | o phy_bus_name: phy bus name to attach to the stmmac. |
@@ -258,32 +267,43 @@ and the second one, with a real PHY device attached to the bus, | |||
258 | by using the stmmac_mdio_bus_data structure (to provide the id, the | 267 | by using the stmmac_mdio_bus_data structure (to provide the id, the |
259 | reset procedure etc). | 268 | reset procedure etc). |
260 | 269 | ||
261 | 4.10) List of source files: | 270 | Note that, starting from new chips, where it is available the HW capability |
262 | o Kconfig | 271 | register, many configurations are discovered at run-time for example to |
263 | o Makefile | 272 | understand if EEE, HW csum, PTP, enhanced descriptor etc are actually |
264 | o stmmac_main.c: main network device driver; | 273 | available. As strategy adopted in this driver, the information from the HW |
265 | o stmmac_mdio.c: mdio functions; | 274 | capability register can replace what has been passed from the platform. |
266 | o stmmac_pci: PCI driver; | 275 | |
267 | o stmmac_platform.c: platform driver | 276 | 4.10) Device-tree support. |
268 | o stmmac_ethtool.c: ethtool support; | 277 | |
269 | o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts | 278 | Please see the following document: |
270 | (only tested on ST40 platforms based); | 279 | Documentation/devicetree/bindings/net/stmmac.txt |
280 | |||
281 | and the stmmac_of_data structure inside the include/linux/stmmac.h header file. | ||
282 | |||
283 | 4.11) This is a summary of the content of some relevant files: | ||
284 | o stmmac_main.c: to implement the main network device driver; | ||
285 | o stmmac_mdio.c: to provide mdio functions; | ||
286 | o stmmac_pci: this the PCI driver; | ||
287 | o stmmac_platform.c: this the platform driver (OF supported) | ||
288 | o stmmac_ethtool.c: to implement the ethtool support; | ||
271 | o stmmac.h: private driver structure; | 289 | o stmmac.h: private driver structure; |
272 | o common.h: common definitions and VFTs; | 290 | o common.h: common definitions and VFTs; |
273 | o descs.h: descriptor structure definitions; | 291 | o descs.h: descriptor structure definitions; |
274 | o dwmac1000_core.c: GMAC core functions; | 292 | o dwmac1000_core.c: dwmac GiGa core functions; |
275 | o dwmac1000_dma.c: dma functions for the GMAC chip; | 293 | o dwmac1000_dma.c: dma functions for the GMAC chip; |
276 | o dwmac1000.h: specific header file for the GMAC; | 294 | o dwmac1000.h: specific header file for the dwmac GiGa; |
277 | o dwmac100_core: MAC 100 core and dma code; | 295 | o dwmac100_core: dwmac 100 core code; |
278 | o dwmac100_dma.c: dma functions for the MAC chip; | 296 | o dwmac100_dma.c: dma functions for the dwmac 100 chip; |
279 | o dwmac1000.h: specific header file for the MAC; | 297 | o dwmac1000.h: specific header file for the MAC; |
280 | o dwmac_lib.c: generic DMA functions shared among chips; | 298 | o dwmac_lib.c: generic DMA functions; |
281 | o enh_desc.c: functions for handling enhanced descriptors; | 299 | o enh_desc.c: functions for handling enhanced descriptors; |
282 | o norm_desc.c: functions for handling normal descriptors; | 300 | o norm_desc.c: functions for handling normal descriptors; |
283 | o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes; | 301 | o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes; |
284 | o mmc_core.c/mmc.h: Management MAC Counters; | 302 | o mmc_core.c/mmc.h: Management MAC Counters; |
285 | o stmmac_hwtstamp.c: HW timestamp support for PTP | 303 | o stmmac_hwtstamp.c: HW timestamp support for PTP; |
286 | o stmmac_ptp.c: PTP 1588 clock | 304 | o stmmac_ptp.c: PTP 1588 clock; |
305 | o dwmac-<XXX>.c: these are for the platform glue-logic file; e.g. dwmac-sti.c | ||
306 | for STMicroelectronics SoCs. | ||
287 | 307 | ||
288 | 5) Debug Information | 308 | 5) Debug Information |
289 | 309 | ||
@@ -298,23 +318,14 @@ to get statistics: e.g. using: ethtool -S ethX | |||
298 | (that shows the Management counters (MMC) if supported) | 318 | (that shows the Management counters (MMC) if supported) |
299 | or sees the MAC/DMA registers: e.g. using: ethtool -d ethX | 319 | or sees the MAC/DMA registers: e.g. using: ethtool -d ethX |
300 | 320 | ||
301 | Compiling the Kernel with CONFIG_DEBUG_FS and enabling the | 321 | Compiling the Kernel with CONFIG_DEBUG_FS the driver will export the following |
302 | STMMAC_DEBUG_FS option the driver will export the following | ||
303 | debugfs entries: | 322 | debugfs entries: |
304 | 323 | ||
305 | /sys/kernel/debug/stmmaceth/descriptors_status | 324 | /sys/kernel/debug/stmmaceth/descriptors_status |
306 | To show the DMA TX/RX descriptor rings | 325 | To show the DMA TX/RX descriptor rings |
307 | 326 | ||
308 | Developer can also use the "debug" module parameter to get | 327 | Developer can also use the "debug" module parameter to get further debug |
309 | further debug information. | 328 | information (please see: NETIF Msg Level). |
310 | |||
311 | In the end, there are other macros (that cannot be enabled | ||
312 | via menuconfig) to turn-on the RX/TX DMA debugging, | ||
313 | specific MAC core debug printk etc. Others to enable the | ||
314 | debug in the TX and RX processes. | ||
315 | All these are only useful during the developing stage | ||
316 | and should never enabled inside the code for general usage. | ||
317 | In fact, these can generate an huge amount of debug messages. | ||
318 | 329 | ||
319 | 6) Energy Efficient Ethernet | 330 | 6) Energy Efficient Ethernet |
320 | 331 | ||
@@ -337,15 +348,7 @@ To enter in Tx LPI mode the driver needs to have a software timer | |||
337 | that enable and disable the LPI mode when there is nothing to be | 348 | that enable and disable the LPI mode when there is nothing to be |
338 | transmitted. | 349 | transmitted. |
339 | 350 | ||
340 | 7) Extended descriptors | 351 | 7) Precision Time Protocol (PTP) |
341 | The extended descriptors give us information about the receive Ethernet payload | ||
342 | when it is carrying PTP packets or TCP/UDP/ICMP over IP. | ||
343 | These are not available on GMAC Synopsys chips older than the 3.50. | ||
344 | At probe time the driver will decide if these can be actually used. | ||
345 | This support also is mandatory for PTPv2 because the extra descriptors 6 and 7 | ||
346 | are used for saving the hardware timestamps. | ||
347 | |||
348 | 8) Precision Time Protocol (PTP) | ||
349 | The driver supports the IEEE 1588-2002, Precision Time Protocol (PTP), | 352 | The driver supports the IEEE 1588-2002, Precision Time Protocol (PTP), |
350 | which enables precise synchronization of clocks in measurement and | 353 | which enables precise synchronization of clocks in measurement and |
351 | control systems implemented with technologies such as network | 354 | control systems implemented with technologies such as network |
@@ -355,7 +358,7 @@ In addition to the basic timestamp features mentioned in IEEE 1588-2002 | |||
355 | Timestamps, new GMAC cores support the advanced timestamp features. | 358 | Timestamps, new GMAC cores support the advanced timestamp features. |
356 | IEEE 1588-2008 that can be enabled when configure the Kernel. | 359 | IEEE 1588-2008 that can be enabled when configure the Kernel. |
357 | 360 | ||
358 | 9) SGMII/RGMII supports | 361 | 8) SGMII/RGMII supports |
359 | New GMAC devices provide own way to manage RGMII/SGMII. | 362 | New GMAC devices provide own way to manage RGMII/SGMII. |
360 | This information is available at run-time by looking at the | 363 | This information is available at run-time by looking at the |
361 | HW capability register. This means that the stmmac can manage | 364 | HW capability register. This means that the stmmac can manage |
@@ -364,8 +367,3 @@ In fact, the HW provides a subset of extended registers to | |||
364 | restart the ANE, verify Full/Half duplex mode and Speed. | 367 | restart the ANE, verify Full/Half duplex mode and Speed. |
365 | Also thanks to these registers it is possible to look at the | 368 | Also thanks to these registers it is possible to look at the |
366 | Auto-negotiated Link Parter Ability. | 369 | Auto-negotiated Link Parter Ability. |
367 | |||
368 | 10) TODO: | ||
369 | o XGMAC is not supported. | ||
370 | o Complete the TBI & RTBI support. | ||
371 | o extend VLAN support for 3.70a SYNP GMAC. | ||
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt new file mode 100644 index 000000000000..f981a9295a39 --- /dev/null +++ b/Documentation/networking/switchdev.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | Switch (and switch-ish) device drivers HOWTO | ||
2 | =========================== | ||
3 | |||
4 | Please note that the word "switch" is here used in very generic meaning. | ||
5 | This include devices supporting L2/L3 but also various flow offloading chips, | ||
6 | including switches embedded into SR-IOV NICs. | ||
7 | |||
8 | Lets describe a topology a bit. Imagine the following example: | ||
9 | |||
10 | +----------------------------+ +---------------+ | ||
11 | | SOME switch chip | | CPU | | ||
12 | +----------------------------+ +---------------+ | ||
13 | port1 port2 port3 port4 MNGMNT | PCI-E | | ||
14 | | | | | | +---------------+ | ||
15 | PHY PHY | | | | NIC0 NIC1 | ||
16 | | | | | | | | ||
17 | | | +- PCI-E -+ | | | ||
18 | | +------- MII -------+ | | ||
19 | +------------- MII ------------+ | ||
20 | |||
21 | In this example, there are two independent lines between the switch silicon | ||
22 | and CPU. NIC0 and NIC1 drivers are not aware of a switch presence. They are | ||
23 | separate from the switch driver. SOME switch chip is by managed by a driver | ||
24 | via PCI-E device MNGMNT. Note that MNGMNT device, NIC0 and NIC1 may be | ||
25 | connected to some other type of bus. | ||
26 | |||
27 | Now, for the previous example show the representation in kernel: | ||
28 | |||
29 | +----------------------------+ +---------------+ | ||
30 | | SOME switch chip | | CPU | | ||
31 | +----------------------------+ +---------------+ | ||
32 | sw0p0 sw0p1 sw0p2 sw0p3 MNGMNT | PCI-E | | ||
33 | | | | | | +---------------+ | ||
34 | PHY PHY | | | | eth0 eth1 | ||
35 | | | | | | | | ||
36 | | | +- PCI-E -+ | | | ||
37 | | +------- MII -------+ | | ||
38 | +------------- MII ------------+ | ||
39 | |||
40 | Lets call the example switch driver for SOME switch chip "SOMEswitch". This | ||
41 | driver takes care of PCI-E device MNGMNT. There is a netdevice instance sw0pX | ||
42 | created for each port of a switch. These netdevices are instances | ||
43 | of "SOMEswitch" driver. sw0pX netdevices serve as a "representation" | ||
44 | of the switch chip. eth0 and eth1 are instances of some other existing driver. | ||
45 | |||
46 | The only difference of the switch-port netdevice from the ordinary netdevice | ||
47 | is that is implements couple more NDOs: | ||
48 | |||
49 | ndo_switch_parent_id_get - This returns the same ID for two port netdevices | ||
50 | of the same physical switch chip. This is | ||
51 | mandatory to be implemented by all switch drivers | ||
52 | and serves the caller for recognition of a port | ||
53 | netdevice. | ||
54 | ndo_switch_parent_* - Functions that serve for a manipulation of the switch | ||
55 | chip itself (it can be though of as a "parent" of the | ||
56 | port, therefore the name). They are not port-specific. | ||
57 | Caller might use arbitrary port netdevice of the same | ||
58 | switch and it will make no difference. | ||
59 | ndo_switch_port_* - Functions that serve for a port-specific manipulation. | ||
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index 412f45ca2d73..a5c784c89312 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -122,7 +122,7 @@ SOF_TIMESTAMPING_RAW_HARDWARE: | |||
122 | 122 | ||
123 | 1.3.3 Timestamp Options | 123 | 1.3.3 Timestamp Options |
124 | 124 | ||
125 | The interface supports one option | 125 | The interface supports the options |
126 | 126 | ||
127 | SOF_TIMESTAMPING_OPT_ID: | 127 | SOF_TIMESTAMPING_OPT_ID: |
128 | 128 | ||
@@ -130,19 +130,36 @@ SOF_TIMESTAMPING_OPT_ID: | |||
130 | have multiple concurrent timestamping requests outstanding. Packets | 130 | have multiple concurrent timestamping requests outstanding. Packets |
131 | can be reordered in the transmit path, for instance in the packet | 131 | can be reordered in the transmit path, for instance in the packet |
132 | scheduler. In that case timestamps will be queued onto the error | 132 | scheduler. In that case timestamps will be queued onto the error |
133 | queue out of order from the original send() calls. This option | 133 | queue out of order from the original send() calls. It is not always |
134 | embeds a counter that is incremented at send() time, to order | 134 | possible to uniquely match timestamps to the original send() calls |
135 | timestamps within a flow. | 135 | based on timestamp order or payload inspection alone, then. |
136 | |||
137 | This option associates each packet at send() with a unique | ||
138 | identifier and returns that along with the timestamp. The identifier | ||
139 | is derived from a per-socket u32 counter (that wraps). For datagram | ||
140 | sockets, the counter increments with each sent packet. For stream | ||
141 | sockets, it increments with every byte. | ||
142 | |||
143 | The counter starts at zero. It is initialized the first time that | ||
144 | the socket option is enabled. It is reset each time the option is | ||
145 | enabled after having been disabled. Resetting the counter does not | ||
146 | change the identifiers of existing packets in the system. | ||
136 | 147 | ||
137 | This option is implemented only for transmit timestamps. There, the | 148 | This option is implemented only for transmit timestamps. There, the |
138 | timestamp is always looped along with a struct sock_extended_err. | 149 | timestamp is always looped along with a struct sock_extended_err. |
139 | The option modifies field ee_info to pass an id that is unique | 150 | The option modifies field ee_data to pass an id that is unique |
140 | among all possibly concurrently outstanding timestamp requests for | 151 | among all possibly concurrently outstanding timestamp requests for |
141 | that socket. In practice, it is a monotonically increasing u32 | 152 | that socket. |
142 | (that wraps). | 153 | |
154 | |||
155 | SOF_TIMESTAMPING_OPT_CMSG: | ||
143 | 156 | ||
144 | In datagram sockets, the counter increments on each send call. In | 157 | Support recv() cmsg for all timestamped packets. Control messages |
145 | stream sockets, it increments with every byte. | 158 | are already supported unconditionally on all packets with receive |
159 | timestamps and on IPv6 packets with transmit timestamp. This option | ||
160 | extends them to IPv4 packets with transmit timestamp. One use case | ||
161 | is to correlate packets with their egress device, by enabling socket | ||
162 | option IP_PKTINFO simultaneously. | ||
146 | 163 | ||
147 | 164 | ||
148 | 1.4 Bytestream Timestamps | 165 | 1.4 Bytestream Timestamps |
diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c index b32fc2a07734..876f71c5625a 100644 --- a/Documentation/networking/timestamping/txtimestamp.c +++ b/Documentation/networking/timestamping/txtimestamp.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <netpacket/packet.h> | 46 | #include <netpacket/packet.h> |
47 | #include <poll.h> | 47 | #include <poll.h> |
48 | #include <stdarg.h> | 48 | #include <stdarg.h> |
49 | #include <stdbool.h> | ||
49 | #include <stdint.h> | 50 | #include <stdint.h> |
50 | #include <stdio.h> | 51 | #include <stdio.h> |
51 | #include <stdlib.h> | 52 | #include <stdlib.h> |
@@ -58,6 +59,14 @@ | |||
58 | #include <time.h> | 59 | #include <time.h> |
59 | #include <unistd.h> | 60 | #include <unistd.h> |
60 | 61 | ||
62 | /* ugly hack to work around netinet/in.h and linux/ipv6.h conflicts */ | ||
63 | #ifndef in6_pktinfo | ||
64 | struct in6_pktinfo { | ||
65 | struct in6_addr ipi6_addr; | ||
66 | int ipi6_ifindex; | ||
67 | }; | ||
68 | #endif | ||
69 | |||
61 | /* command line parameters */ | 70 | /* command line parameters */ |
62 | static int cfg_proto = SOCK_STREAM; | 71 | static int cfg_proto = SOCK_STREAM; |
63 | static int cfg_ipproto = IPPROTO_TCP; | 72 | static int cfg_ipproto = IPPROTO_TCP; |
@@ -65,6 +74,8 @@ static int cfg_num_pkts = 4; | |||
65 | static int do_ipv4 = 1; | 74 | static int do_ipv4 = 1; |
66 | static int do_ipv6 = 1; | 75 | static int do_ipv6 = 1; |
67 | static int cfg_payload_len = 10; | 76 | static int cfg_payload_len = 10; |
77 | static bool cfg_show_payload; | ||
78 | static bool cfg_do_pktinfo; | ||
68 | static uint16_t dest_port = 9000; | 79 | static uint16_t dest_port = 9000; |
69 | 80 | ||
70 | static struct sockaddr_in daddr; | 81 | static struct sockaddr_in daddr; |
@@ -131,6 +142,30 @@ static void print_timestamp(struct scm_timestamping *tss, int tstype, | |||
131 | __print_timestamp(tsname, &tss->ts[0], tskey, payload_len); | 142 | __print_timestamp(tsname, &tss->ts[0], tskey, payload_len); |
132 | } | 143 | } |
133 | 144 | ||
145 | /* TODO: convert to check_and_print payload once API is stable */ | ||
146 | static void print_payload(char *data, int len) | ||
147 | { | ||
148 | int i; | ||
149 | |||
150 | if (len > 70) | ||
151 | len = 70; | ||
152 | |||
153 | fprintf(stderr, "payload: "); | ||
154 | for (i = 0; i < len; i++) | ||
155 | fprintf(stderr, "%02hhx ", data[i]); | ||
156 | fprintf(stderr, "\n"); | ||
157 | } | ||
158 | |||
159 | static void print_pktinfo(int family, int ifindex, void *saddr, void *daddr) | ||
160 | { | ||
161 | char sa[INET6_ADDRSTRLEN], da[INET6_ADDRSTRLEN]; | ||
162 | |||
163 | fprintf(stderr, " pktinfo: ifindex=%u src=%s dst=%s\n", | ||
164 | ifindex, | ||
165 | saddr ? inet_ntop(family, saddr, sa, sizeof(sa)) : "unknown", | ||
166 | daddr ? inet_ntop(family, daddr, da, sizeof(da)) : "unknown"); | ||
167 | } | ||
168 | |||
134 | static void __poll(int fd) | 169 | static void __poll(int fd) |
135 | { | 170 | { |
136 | struct pollfd pollfd; | 171 | struct pollfd pollfd; |
@@ -156,10 +191,9 @@ static void __recv_errmsg_cmsg(struct msghdr *msg, int payload_len) | |||
156 | cm->cmsg_type == SCM_TIMESTAMPING) { | 191 | cm->cmsg_type == SCM_TIMESTAMPING) { |
157 | tss = (void *) CMSG_DATA(cm); | 192 | tss = (void *) CMSG_DATA(cm); |
158 | } else if ((cm->cmsg_level == SOL_IP && | 193 | } else if ((cm->cmsg_level == SOL_IP && |
159 | cm->cmsg_type == IP_RECVERR) || | 194 | cm->cmsg_type == IP_RECVERR) || |
160 | (cm->cmsg_level == SOL_IPV6 && | 195 | (cm->cmsg_level == SOL_IPV6 && |
161 | cm->cmsg_type == IPV6_RECVERR)) { | 196 | cm->cmsg_type == IPV6_RECVERR)) { |
162 | |||
163 | serr = (void *) CMSG_DATA(cm); | 197 | serr = (void *) CMSG_DATA(cm); |
164 | if (serr->ee_errno != ENOMSG || | 198 | if (serr->ee_errno != ENOMSG || |
165 | serr->ee_origin != SO_EE_ORIGIN_TIMESTAMPING) { | 199 | serr->ee_origin != SO_EE_ORIGIN_TIMESTAMPING) { |
@@ -168,6 +202,16 @@ static void __recv_errmsg_cmsg(struct msghdr *msg, int payload_len) | |||
168 | serr->ee_origin); | 202 | serr->ee_origin); |
169 | serr = NULL; | 203 | serr = NULL; |
170 | } | 204 | } |
205 | } else if (cm->cmsg_level == SOL_IP && | ||
206 | cm->cmsg_type == IP_PKTINFO) { | ||
207 | struct in_pktinfo *info = (void *) CMSG_DATA(cm); | ||
208 | print_pktinfo(AF_INET, info->ipi_ifindex, | ||
209 | &info->ipi_spec_dst, &info->ipi_addr); | ||
210 | } else if (cm->cmsg_level == SOL_IPV6 && | ||
211 | cm->cmsg_type == IPV6_PKTINFO) { | ||
212 | struct in6_pktinfo *info6 = (void *) CMSG_DATA(cm); | ||
213 | print_pktinfo(AF_INET6, info6->ipi6_ifindex, | ||
214 | NULL, &info6->ipi6_addr); | ||
171 | } else | 215 | } else |
172 | fprintf(stderr, "unknown cmsg %d,%d\n", | 216 | fprintf(stderr, "unknown cmsg %d,%d\n", |
173 | cm->cmsg_level, cm->cmsg_type); | 217 | cm->cmsg_level, cm->cmsg_type); |
@@ -206,7 +250,11 @@ static int recv_errmsg(int fd) | |||
206 | if (ret == -1 && errno != EAGAIN) | 250 | if (ret == -1 && errno != EAGAIN) |
207 | error(1, errno, "recvmsg"); | 251 | error(1, errno, "recvmsg"); |
208 | 252 | ||
209 | __recv_errmsg_cmsg(&msg, ret); | 253 | if (ret > 0) { |
254 | __recv_errmsg_cmsg(&msg, ret); | ||
255 | if (cfg_show_payload) | ||
256 | print_payload(data, cfg_payload_len); | ||
257 | } | ||
210 | 258 | ||
211 | free(data); | 259 | free(data); |
212 | return ret == -1; | 260 | return ret == -1; |
@@ -215,9 +263,9 @@ static int recv_errmsg(int fd) | |||
215 | static void do_test(int family, unsigned int opt) | 263 | static void do_test(int family, unsigned int opt) |
216 | { | 264 | { |
217 | char *buf; | 265 | char *buf; |
218 | int fd, i, val, total_len; | 266 | int fd, i, val = 1, total_len; |
219 | 267 | ||
220 | if (family == IPPROTO_IPV6 && cfg_proto != SOCK_STREAM) { | 268 | if (family == AF_INET6 && cfg_proto != SOCK_STREAM) { |
221 | /* due to lack of checksum generation code */ | 269 | /* due to lack of checksum generation code */ |
222 | fprintf(stderr, "test: skipping datagram over IPv6\n"); | 270 | fprintf(stderr, "test: skipping datagram over IPv6\n"); |
223 | return; | 271 | return; |
@@ -239,7 +287,6 @@ static void do_test(int family, unsigned int opt) | |||
239 | error(1, errno, "socket"); | 287 | error(1, errno, "socket"); |
240 | 288 | ||
241 | if (cfg_proto == SOCK_STREAM) { | 289 | if (cfg_proto == SOCK_STREAM) { |
242 | val = 1; | ||
243 | if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, | 290 | if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, |
244 | (char*) &val, sizeof(val))) | 291 | (char*) &val, sizeof(val))) |
245 | error(1, 0, "setsockopt no nagle"); | 292 | error(1, 0, "setsockopt no nagle"); |
@@ -253,7 +300,20 @@ static void do_test(int family, unsigned int opt) | |||
253 | } | 300 | } |
254 | } | 301 | } |
255 | 302 | ||
303 | if (cfg_do_pktinfo) { | ||
304 | if (family == AF_INET6) { | ||
305 | if (setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO, | ||
306 | &val, sizeof(val))) | ||
307 | error(1, errno, "setsockopt pktinfo ipv6"); | ||
308 | } else { | ||
309 | if (setsockopt(fd, SOL_IP, IP_PKTINFO, | ||
310 | &val, sizeof(val))) | ||
311 | error(1, errno, "setsockopt pktinfo ipv4"); | ||
312 | } | ||
313 | } | ||
314 | |||
256 | opt |= SOF_TIMESTAMPING_SOFTWARE | | 315 | opt |= SOF_TIMESTAMPING_SOFTWARE | |
316 | SOF_TIMESTAMPING_OPT_CMSG | | ||
257 | SOF_TIMESTAMPING_OPT_ID; | 317 | SOF_TIMESTAMPING_OPT_ID; |
258 | if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, | 318 | if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, |
259 | (char *) &opt, sizeof(opt))) | 319 | (char *) &opt, sizeof(opt))) |
@@ -262,8 +322,6 @@ static void do_test(int family, unsigned int opt) | |||
262 | for (i = 0; i < cfg_num_pkts; i++) { | 322 | for (i = 0; i < cfg_num_pkts; i++) { |
263 | memset(&ts_prev, 0, sizeof(ts_prev)); | 323 | memset(&ts_prev, 0, sizeof(ts_prev)); |
264 | memset(buf, 'a' + i, total_len); | 324 | memset(buf, 'a' + i, total_len); |
265 | buf[total_len - 2] = '\n'; | ||
266 | buf[total_len - 1] = '\0'; | ||
267 | 325 | ||
268 | if (cfg_proto == SOCK_RAW) { | 326 | if (cfg_proto == SOCK_RAW) { |
269 | struct udphdr *udph; | 327 | struct udphdr *udph; |
@@ -324,11 +382,13 @@ static void __attribute__((noreturn)) usage(const char *filepath) | |||
324 | " -4: only IPv4\n" | 382 | " -4: only IPv4\n" |
325 | " -6: only IPv6\n" | 383 | " -6: only IPv6\n" |
326 | " -h: show this message\n" | 384 | " -h: show this message\n" |
385 | " -I: request PKTINFO\n" | ||
327 | " -l N: send N bytes at a time\n" | 386 | " -l N: send N bytes at a time\n" |
328 | " -r: use raw\n" | 387 | " -r: use raw\n" |
329 | " -R: use raw (IP_HDRINCL)\n" | 388 | " -R: use raw (IP_HDRINCL)\n" |
330 | " -p N: connect to port N\n" | 389 | " -p N: connect to port N\n" |
331 | " -u: use udp\n", | 390 | " -u: use udp\n" |
391 | " -x: show payload (up to 70 bytes)\n", | ||
332 | filepath); | 392 | filepath); |
333 | exit(1); | 393 | exit(1); |
334 | } | 394 | } |
@@ -338,7 +398,7 @@ static void parse_opt(int argc, char **argv) | |||
338 | int proto_count = 0; | 398 | int proto_count = 0; |
339 | char c; | 399 | char c; |
340 | 400 | ||
341 | while ((c = getopt(argc, argv, "46hl:p:rRu")) != -1) { | 401 | while ((c = getopt(argc, argv, "46hIl:p:rRux")) != -1) { |
342 | switch (c) { | 402 | switch (c) { |
343 | case '4': | 403 | case '4': |
344 | do_ipv6 = 0; | 404 | do_ipv6 = 0; |
@@ -346,6 +406,9 @@ static void parse_opt(int argc, char **argv) | |||
346 | case '6': | 406 | case '6': |
347 | do_ipv4 = 0; | 407 | do_ipv4 = 0; |
348 | break; | 408 | break; |
409 | case 'I': | ||
410 | cfg_do_pktinfo = true; | ||
411 | break; | ||
349 | case 'r': | 412 | case 'r': |
350 | proto_count++; | 413 | proto_count++; |
351 | cfg_proto = SOCK_RAW; | 414 | cfg_proto = SOCK_RAW; |
@@ -367,6 +430,9 @@ static void parse_opt(int argc, char **argv) | |||
367 | case 'p': | 430 | case 'p': |
368 | dest_port = strtoul(optarg, NULL, 10); | 431 | dest_port = strtoul(optarg, NULL, 10); |
369 | break; | 432 | break; |
433 | case 'x': | ||
434 | cfg_show_payload = true; | ||
435 | break; | ||
370 | case 'h': | 436 | case 'h': |
371 | default: | 437 | default: |
372 | usage(argv[0]); | 438 | usage(argv[0]); |
diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000000000000..054a67d55563 --- /dev/null +++ b/Documentation/nios2/README | |||
@@ -0,0 +1,23 @@ | |||
1 | Linux on the Nios II architecture | ||
2 | ================================= | ||
3 | |||
4 | This is a port of Linux to Nios II (nios2) processor. | ||
5 | |||
6 | In order to compile for Nios II, you need a version of GCC with support for the generic | ||
7 | system call ABI. Please see this link for more information on how compiling and booting | ||
8 | software for the Nios II platform: | ||
9 | http://www.rocketboards.org/foswiki/Documentation/NiosIILinuxUserManual | ||
10 | |||
11 | For reference, please see the following link: | ||
12 | http://www.altera.com/literature/lit-nio2.jsp | ||
13 | |||
14 | What is Nios II? | ||
15 | ================ | ||
16 | Nios II is a 32-bit embedded-processor architecture designed specifically for the | ||
17 | Altera family of FPGAs. In order to support Linux, Nios II needs to be configured | ||
18 | with MMU and hardware multiplier enabled. | ||
19 | |||
20 | Nios II ABI | ||
21 | =========== | ||
22 | Please refer to chapter "Application Binary Interface" in Nios II Processor Reference | ||
23 | Handbook. | ||
diff --git a/Documentation/phy.txt b/Documentation/phy.txt index c6594af94d25..371361c69a4b 100644 --- a/Documentation/phy.txt +++ b/Documentation/phy.txt | |||
@@ -54,18 +54,14 @@ The PHY driver should create the PHY in order for other peripheral controllers | |||
54 | to make use of it. The PHY framework provides 2 APIs to create the PHY. | 54 | to make use of it. The PHY framework provides 2 APIs to create the PHY. |
55 | 55 | ||
56 | struct phy *phy_create(struct device *dev, struct device_node *node, | 56 | struct phy *phy_create(struct device *dev, struct device_node *node, |
57 | const struct phy_ops *ops, | 57 | const struct phy_ops *ops); |
58 | struct phy_init_data *init_data); | ||
59 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, | 58 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, |
60 | const struct phy_ops *ops, | 59 | const struct phy_ops *ops); |
61 | struct phy_init_data *init_data); | ||
62 | 60 | ||
63 | The PHY drivers can use one of the above 2 APIs to create the PHY by passing | 61 | The PHY drivers can use one of the above 2 APIs to create the PHY by passing |
64 | the device pointer, phy ops and init_data. | 62 | the device pointer and phy ops. |
65 | phy_ops is a set of function pointers for performing PHY operations such as | 63 | phy_ops is a set of function pointers for performing PHY operations such as |
66 | init, exit, power_on and power_off. *init_data* is mandatory to get a reference | 64 | init, exit, power_on and power_off. |
67 | to the PHY in the case of non-dt boot. See section *Board File Initialization* | ||
68 | on how init_data should be used. | ||
69 | 65 | ||
70 | Inorder to dereference the private data (in phy_ops), the phy provider driver | 66 | Inorder to dereference the private data (in phy_ops), the phy provider driver |
71 | can use phy_set_drvdata() after creating the PHY and use phy_get_drvdata() in | 67 | can use phy_set_drvdata() after creating the PHY and use phy_get_drvdata() in |
@@ -137,42 +133,18 @@ There are exported APIs like phy_pm_runtime_get, phy_pm_runtime_get_sync, | |||
137 | phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and | 133 | phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and |
138 | phy_pm_runtime_forbid for performing PM operations. | 134 | phy_pm_runtime_forbid for performing PM operations. |
139 | 135 | ||
140 | 8. Board File Initialization | 136 | 8. PHY Mappings |
141 | 137 | ||
142 | Certain board file initialization is necessary in order to get a reference | 138 | In order to get reference to a PHY without help from DeviceTree, the framework |
143 | to the PHY in the case of non-dt boot. | 139 | offers lookups which can be compared to clkdev that allow clk structures to be |
144 | Say we have a single device that implements 3 PHYs that of USB, SATA and PCIe, | 140 | bound to devices. A lookup can be made be made during runtime when a handle to |
145 | then in the board file the following initialization should be done. | 141 | the struct phy already exists. |
146 | 142 | ||
147 | struct phy_consumer consumers[] = { | 143 | The framework offers the following API for registering and unregistering the |
148 | PHY_CONSUMER("dwc3.0", "usb"), | 144 | lookups. |
149 | PHY_CONSUMER("pcie.0", "pcie"), | 145 | |
150 | PHY_CONSUMER("sata.0", "sata"), | 146 | int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id); |
151 | }; | 147 | void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id); |
152 | PHY_CONSUMER takes 2 parameters, first is the device name of the controller | ||
153 | (PHY consumer) and second is the port name. | ||
154 | |||
155 | struct phy_init_data init_data = { | ||
156 | .consumers = consumers, | ||
157 | .num_consumers = ARRAY_SIZE(consumers), | ||
158 | }; | ||
159 | |||
160 | static const struct platform_device pipe3_phy_dev = { | ||
161 | .name = "pipe3-phy", | ||
162 | .id = -1, | ||
163 | .dev = { | ||
164 | .platform_data = { | ||
165 | .init_data = &init_data, | ||
166 | }, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | then, while doing phy_create, the PHY driver should pass this init_data | ||
171 | phy_create(dev, ops, pdata->init_data); | ||
172 | |||
173 | and the controller driver (phy consumer) should pass the port name along with | ||
174 | the device to get a reference to the PHY | ||
175 | phy_get(dev, "pcie"); | ||
176 | 148 | ||
177 | 9. DeviceTree Binding | 149 | 9. DeviceTree Binding |
178 | 150 | ||
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index f32ce5419573..44fe1d28a163 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -229,13 +229,13 @@ defined in include/linux/pm.h: | |||
229 | - if set, the value of child_count is ignored (but still updated) | 229 | - if set, the value of child_count is ignored (but still updated) |
230 | 230 | ||
231 | unsigned int disable_depth; | 231 | unsigned int disable_depth; |
232 | - used for disabling the helper funcions (they work normally if this is | 232 | - used for disabling the helper functions (they work normally if this is |
233 | equal to zero); the initial value of it is 1 (i.e. runtime PM is | 233 | equal to zero); the initial value of it is 1 (i.e. runtime PM is |
234 | initially disabled for all devices) | 234 | initially disabled for all devices) |
235 | 235 | ||
236 | int runtime_error; | 236 | int runtime_error; |
237 | - if set, there was a fatal error (one of the callbacks returned error code | 237 | - if set, there was a fatal error (one of the callbacks returned error code |
238 | as described in Section 2), so the helper funtions will not work until | 238 | as described in Section 2), so the helper functions will not work until |
239 | this flag is cleared; this is the error code returned by the failing | 239 | this flag is cleared; this is the error code returned by the failing |
240 | callback | 240 | callback |
241 | 241 | ||
@@ -468,6 +468,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
468 | - set the power.irq_safe flag for the device, causing the runtime-PM | 468 | - set the power.irq_safe flag for the device, causing the runtime-PM |
469 | callbacks to be invoked with interrupts off | 469 | callbacks to be invoked with interrupts off |
470 | 470 | ||
471 | bool pm_runtime_is_irq_safe(struct device *dev); | ||
472 | - return true if power.irq_safe flag was set for the device, causing | ||
473 | the runtime-PM callbacks to be invoked with interrupts off | ||
474 | |||
471 | void pm_runtime_mark_last_busy(struct device *dev); | 475 | void pm_runtime_mark_last_busy(struct device *dev); |
472 | - set the power.last_busy field to the current time | 476 | - set the power.last_busy field to the current time |
473 | 477 | ||
@@ -524,7 +528,7 @@ pm_runtime_put_sync_autosuspend() | |||
524 | 5. Runtime PM Initialization, Device Probing and Removal | 528 | 5. Runtime PM Initialization, Device Probing and Removal |
525 | 529 | ||
526 | Initially, the runtime PM is disabled for all devices, which means that the | 530 | Initially, the runtime PM is disabled for all devices, which means that the |
527 | majority of the runtime PM helper funtions described in Section 4 will return | 531 | majority of the runtime PM helper functions described in Section 4 will return |
528 | -EAGAIN until pm_runtime_enable() is called for the device. | 532 | -EAGAIN until pm_runtime_enable() is called for the device. |
529 | 533 | ||
530 | In addition to that, the initial runtime PM status of all devices is | 534 | In addition to that, the initial runtime PM status of all devices is |
diff --git a/Documentation/power/suspend-and-interrupts.txt b/Documentation/power/suspend-and-interrupts.txt index 69663640dea5..2f9c5a5fcb25 100644 --- a/Documentation/power/suspend-and-interrupts.txt +++ b/Documentation/power/suspend-and-interrupts.txt | |||
@@ -77,7 +77,7 @@ Calling enable_irq_wake() causes suspend_device_irqs() to treat the given IRQ | |||
77 | in a special way. Namely, the IRQ remains enabled, by on the first interrupt | 77 | in a special way. Namely, the IRQ remains enabled, by on the first interrupt |
78 | it will be disabled, marked as pending and "suspended" so that it will be | 78 | it will be disabled, marked as pending and "suspended" so that it will be |
79 | re-enabled by resume_device_irqs() during the subsequent system resume. Also | 79 | re-enabled by resume_device_irqs() during the subsequent system resume. Also |
80 | the PM core is notified about the event which casues the system suspend in | 80 | the PM core is notified about the event which causes the system suspend in |
81 | progress to be aborted (that doesn't have to happen immediately, but at one | 81 | progress to be aborted (that doesn't have to happen immediately, but at one |
82 | of the points where the suspend thread looks for pending wakeup events). | 82 | of the points where the suspend thread looks for pending wakeup events). |
83 | 83 | ||
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt index 0e870825c1b9..bbfcd1bbedc5 100644 --- a/Documentation/power/userland-swsusp.txt +++ b/Documentation/power/userland-swsusp.txt | |||
@@ -99,7 +99,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to | |||
99 | The device's read() operation can be used to transfer the snapshot image from | 99 | The device's read() operation can be used to transfer the snapshot image from |
100 | the kernel. It has the following limitations: | 100 | the kernel. It has the following limitations: |
101 | - you cannot read() more than one virtual memory page at a time | 101 | - you cannot read() more than one virtual memory page at a time |
102 | - read()s across page boundaries are impossible (ie. if ypu read() 1/2 of | 102 | - read()s across page boundaries are impossible (ie. if you read() 1/2 of |
103 | a page in the previous call, you will only be able to read() | 103 | a page in the previous call, you will only be able to read() |
104 | _at_ _most_ 1/2 of the page in the next call) | 104 | _at_ _most_ 1/2 of the page in the next call) |
105 | 105 | ||
diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt index 69b3cac4749d..5d8675615e59 100644 --- a/Documentation/ramoops.txt +++ b/Documentation/ramoops.txt | |||
@@ -14,11 +14,19 @@ survive after a restart. | |||
14 | 14 | ||
15 | 1. Ramoops concepts | 15 | 1. Ramoops concepts |
16 | 16 | ||
17 | Ramoops uses a predefined memory area to store the dump. The start and size of | 17 | Ramoops uses a predefined memory area to store the dump. The start and size |
18 | the memory area are set using two variables: | 18 | and type of the memory area are set using three variables: |
19 | * "mem_address" for the start | 19 | * "mem_address" for the start |
20 | * "mem_size" for the size. The memory size will be rounded down to a | 20 | * "mem_size" for the size. The memory size will be rounded down to a |
21 | power of two. | 21 | power of two. |
22 | * "mem_type" to specifiy if the memory type (default is pgprot_writecombine). | ||
23 | |||
24 | Typically the default value of mem_type=0 should be used as that sets the pstore | ||
25 | mapping to pgprot_writecombine. Setting mem_type=1 attempts to use | ||
26 | pgprot_noncached, which only works on some platforms. This is because pstore | ||
27 | depends on atomic operations. At least on ARM, pgprot_noncached causes the | ||
28 | memory to be mapped strongly ordered, and atomic operations on strongly ordered | ||
29 | memory are implementation defined, and won't work on many ARMs such as omaps. | ||
22 | 30 | ||
23 | The memory area is divided into "record_size" chunks (also rounded down to | 31 | The memory area is divided into "record_size" chunks (also rounded down to |
24 | power of two) and each oops/panic writes a "record_size" chunk of | 32 | power of two) and each oops/panic writes a "record_size" chunk of |
@@ -55,6 +63,7 @@ Setting the ramoops parameters can be done in 2 different manners: | |||
55 | static struct ramoops_platform_data ramoops_data = { | 63 | static struct ramoops_platform_data ramoops_data = { |
56 | .mem_size = <...>, | 64 | .mem_size = <...>, |
57 | .mem_address = <...>, | 65 | .mem_address = <...>, |
66 | .mem_type = <...>, | ||
58 | .record_size = <...>, | 67 | .record_size = <...>, |
59 | .dump_oops = <...>, | 68 | .dump_oops = <...>, |
60 | .ecc = <...>, | 69 | .ecc = <...>, |
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt index 462321c1aeea..08911b5c6b0e 100644 --- a/Documentation/s390/Debugging390.txt +++ b/Documentation/s390/Debugging390.txt | |||
@@ -26,11 +26,6 @@ The Linux for s/390 & z/Architecture Kernel Task Structure | |||
26 | Register Usage & Stackframes on Linux for s/390 & z/Architecture | 26 | Register Usage & Stackframes on Linux for s/390 & z/Architecture |
27 | A sample program with comments | 27 | A sample program with comments |
28 | Compiling programs for debugging on Linux for s/390 & z/Architecture | 28 | Compiling programs for debugging on Linux for s/390 & z/Architecture |
29 | Figuring out gcc compile errors | ||
30 | Debugging Tools | ||
31 | objdump | ||
32 | strace | ||
33 | Performance Debugging | ||
34 | Debugging under VM | 29 | Debugging under VM |
35 | s/390 & z/Architecture IO Overview | 30 | s/390 & z/Architecture IO Overview |
36 | Debugging IO on s/390 & z/Architecture under VM | 31 | Debugging IO on s/390 & z/Architecture under VM |
@@ -114,28 +109,25 @@ s/390 z/Architecture | |||
114 | 109 | ||
115 | 16-17 16-17 Address Space Control | 110 | 16-17 16-17 Address Space Control |
116 | 111 | ||
117 | 00 Primary Space Mode when DAT on | 112 | 00 Primary Space Mode: |
118 | The linux kernel currently runs in this mode, CR1 is affiliated with | 113 | The register CR1 contains the primary address-space control ele- |
119 | this mode & points to the primary segment table origin etc. | 114 | ment (PASCE), which points to the primary space region/segment |
120 | 115 | table origin. | |
121 | 01 Access register mode this mode is used in functions to | 116 | |
122 | copy data between kernel & user space. | 117 | 01 Access register mode |
123 | 118 | ||
124 | 10 Secondary space mode not used in linux however CR7 the | 119 | 10 Secondary Space Mode: |
125 | register affiliated with this mode is & this & normally | 120 | The register CR7 contains the secondary address-space control |
126 | CR13=CR7 to allow us to copy data between kernel & user space. | 121 | element (SASCE), which points to the secondary space region or |
127 | We do this as follows: | 122 | segment table origin. |
128 | We set ar2 to 0 to designate its | 123 | |
129 | affiliated gpr ( gpr2 )to point to primary=kernel space. | 124 | 11 Home Space Mode: |
130 | We set ar4 to 1 to designate its | 125 | The register CR13 contains the home space address-space control |
131 | affiliated gpr ( gpr4 ) to point to secondary=home=user space | 126 | element (HASCE), which points to the home space region/segment |
132 | & then essentially do a memcopy(gpr2,gpr4,size) to | 127 | table origin. |
133 | copy data between the address spaces, the reason we use home space for the | 128 | |
134 | kernel & don't keep secondary space free is that code will not run in | 129 | See "Address Spaces on Linux for s/390 & z/Architecture" below |
135 | secondary space. | 130 | for more information about address space usage in Linux. |
136 | |||
137 | 11 Home Space Mode all user programs run in this mode. | ||
138 | it is affiliated with CR13. | ||
139 | 131 | ||
140 | 18-19 18-19 Condition codes (CC) | 132 | 18-19 18-19 Condition codes (CC) |
141 | 133 | ||
@@ -249,9 +241,9 @@ currently 4TB of physical memory currently on z/Architecture. | |||
249 | Address Spaces on Linux for s/390 & z/Architecture | 241 | Address Spaces on Linux for s/390 & z/Architecture |
250 | ================================================== | 242 | ================================================== |
251 | 243 | ||
252 | Our addressing scheme is as follows | 244 | Our addressing scheme is basically as follows: |
253 | |||
254 | 245 | ||
246 | Primary Space Home Space | ||
255 | Himem 0x7fffffff 2GB on s/390 ***************** **************** | 247 | Himem 0x7fffffff 2GB on s/390 ***************** **************** |
256 | currently 0x3ffffffffff (2^42)-1 * User Stack * * * | 248 | currently 0x3ffffffffff (2^42)-1 * User Stack * * * |
257 | on z/Architecture. ***************** * * | 249 | on z/Architecture. ***************** * * |
@@ -264,9 +256,46 @@ on z/Architecture. ***************** * * | |||
264 | * Sections * * * | 256 | * Sections * * * |
265 | 0x00000000 ***************** **************** | 257 | 0x00000000 ***************** **************** |
266 | 258 | ||
267 | This also means that we need to look at the PSW problem state bit | 259 | This also means that we need to look at the PSW problem state bit and the |
268 | or the addressing mode to decide whether we are looking at | 260 | addressing mode to decide whether we are looking at user or kernel space. |
269 | user or kernel space. | 261 | |
262 | User space runs in primary address mode (or access register mode within | ||
263 | the vdso code). | ||
264 | |||
265 | The kernel usually also runs in home space mode, however when accessing | ||
266 | user space the kernel switches to primary or secondary address mode if | ||
267 | the mvcos instruction is not available or if a compare-and-swap (futex) | ||
268 | instruction on a user space address is performed. | ||
269 | |||
270 | When also looking at the ASCE control registers, this means: | ||
271 | |||
272 | User space: | ||
273 | - runs in primary or access register mode | ||
274 | - cr1 contains the user asce | ||
275 | - cr7 contains the user asce | ||
276 | - cr13 contains the kernel asce | ||
277 | |||
278 | Kernel space: | ||
279 | - runs in home space mode | ||
280 | - cr1 contains the user or kernel asce | ||
281 | -> the kernel asce is loaded when a uaccess requires primary or | ||
282 | secondary address mode | ||
283 | - cr7 contains the user or kernel asce, (changed with set_fs()) | ||
284 | - cr13 contains the kernel asce | ||
285 | |||
286 | In case of uaccess the kernel changes to: | ||
287 | - primary space mode in case of a uaccess (copy_to_user) and uses | ||
288 | e.g. the mvcp instruction to access user space. However the kernel | ||
289 | will stay in home space mode if the mvcos instruction is available | ||
290 | - secondary space mode in case of futex atomic operations, so that the | ||
291 | instructions come from primary address space and data from secondary | ||
292 | space | ||
293 | |||
294 | In case of KVM, the kernel runs in home space mode, but cr1 gets switched | ||
295 | to contain the gmap asce before the SIE instruction gets executed. When | ||
296 | the SIE instruction is finished, cr1 will be switched back to contain the | ||
297 | user asce. | ||
298 | |||
270 | 299 | ||
271 | Virtual Addresses on s/390 & z/Architecture | 300 | Virtual Addresses on s/390 & z/Architecture |
272 | =========================================== | 301 | =========================================== |
@@ -706,376 +735,7 @@ Debugging with optimisation has since much improved after fixing | |||
706 | some bugs, please make sure you are using gdb-5.0 or later developed | 735 | some bugs, please make sure you are using gdb-5.0 or later developed |
707 | after Nov'2000. | 736 | after Nov'2000. |
708 | 737 | ||
709 | Figuring out gcc compile errors | ||
710 | =============================== | ||
711 | If you are getting a lot of syntax errors compiling a program & the problem | ||
712 | isn't blatantly obvious from the source. | ||
713 | It often helps to just preprocess the file, this is done with the -E | ||
714 | option in gcc. | ||
715 | What this does is that it runs through the very first phase of compilation | ||
716 | ( compilation in gcc is done in several stages & gcc calls many programs to | ||
717 | achieve its end result ) with the -E option gcc just calls the gcc preprocessor (cpp). | ||
718 | The c preprocessor does the following, it joins all the files #included together | ||
719 | recursively ( #include files can #include other files ) & also the c file you wish to compile. | ||
720 | It puts a fully qualified path of the #included files in a comment & it | ||
721 | does macro expansion. | ||
722 | This is useful for debugging because | ||
723 | 1) You can double check whether the files you expect to be included are the ones | ||
724 | that are being included ( e.g. double check that you aren't going to the i386 asm directory ). | ||
725 | 2) Check that macro definitions aren't clashing with typedefs, | ||
726 | 3) Check that definitions aren't being used before they are being included. | ||
727 | 4) Helps put the line emitting the error under the microscope if it contains macros. | ||
728 | |||
729 | For convenience the Linux kernel's makefile will do preprocessing automatically for you | ||
730 | by suffixing the file you want built with .i ( instead of .o ) | ||
731 | |||
732 | e.g. | ||
733 | from the linux directory type | ||
734 | make arch/s390/kernel/signal.i | ||
735 | this will build | ||
736 | |||
737 | s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | ||
738 | -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -E arch/s390/kernel/signal.c | ||
739 | > arch/s390/kernel/signal.i | ||
740 | |||
741 | Now look at signal.i you should see something like. | ||
742 | |||
743 | |||
744 | # 1 "/home1/barrow/linux/include/asm/types.h" 1 | ||
745 | typedef unsigned short umode_t; | ||
746 | typedef __signed__ char __s8; | ||
747 | typedef unsigned char __u8; | ||
748 | typedef __signed__ short __s16; | ||
749 | typedef unsigned short __u16; | ||
750 | |||
751 | If instead you are getting errors further down e.g. | ||
752 | unknown instruction:2515 "move.l" or better still unknown instruction:2515 | ||
753 | "Fixme not implemented yet, call Martin" you are probably are attempting to compile some code | ||
754 | meant for another architecture or code that is simply not implemented, with a fixme statement | ||
755 | stuck into the inline assembly code so that the author of the file now knows he has work to do. | ||
756 | To look at the assembly emitted by gcc just before it is about to call gas ( the gnu assembler ) | ||
757 | use the -S option. | ||
758 | Again for your convenience the Linux kernel's Makefile will hold your hand & | ||
759 | do all this donkey work for you also by building the file with the .s suffix. | ||
760 | e.g. | ||
761 | from the Linux directory type | ||
762 | make arch/s390/kernel/signal.s | ||
763 | |||
764 | s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | ||
765 | -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -S arch/s390/kernel/signal.c | ||
766 | -o arch/s390/kernel/signal.s | ||
767 | |||
768 | |||
769 | This will output something like, ( please note the constant pool & the useful comments | ||
770 | in the prologue to give you a hand at interpreting it ). | ||
771 | |||
772 | .LC54: | ||
773 | .string "misaligned (__u16 *) in __xchg\n" | ||
774 | .LC57: | ||
775 | .string "misaligned (__u32 *) in __xchg\n" | ||
776 | .L$PG1: # Pool sys_sigsuspend | ||
777 | .LC192: | ||
778 | .long -262401 | ||
779 | .LC193: | ||
780 | .long -1 | ||
781 | .LC194: | ||
782 | .long schedule-.L$PG1 | ||
783 | .LC195: | ||
784 | .long do_signal-.L$PG1 | ||
785 | .align 4 | ||
786 | .globl sys_sigsuspend | ||
787 | .type sys_sigsuspend,@function | ||
788 | sys_sigsuspend: | ||
789 | # leaf function 0 | ||
790 | # automatics 16 | ||
791 | # outgoing args 0 | ||
792 | # need frame pointer 0 | ||
793 | # call alloca 0 | ||
794 | # has varargs 0 | ||
795 | # incoming args (stack) 0 | ||
796 | # function length 168 | ||
797 | STM 8,15,32(15) | ||
798 | LR 0,15 | ||
799 | AHI 15,-112 | ||
800 | BASR 13,0 | ||
801 | .L$CO1: AHI 13,.L$PG1-.L$CO1 | ||
802 | ST 0,0(15) | ||
803 | LR 8,2 | ||
804 | N 5,.LC192-.L$PG1(13) | ||
805 | |||
806 | Adding -g to the above output makes the output even more useful | ||
807 | e.g. typing | ||
808 | make CC:="s390-gcc -g" kernel/sched.s | ||
809 | |||
810 | which compiles. | ||
811 | s390-gcc -g -D__KERNEL__ -I/home/barrow/linux-2.3/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -S kernel/sched.c -o kernel/sched.s | ||
812 | |||
813 | also outputs stabs ( debugger ) info, from this info you can find out the | ||
814 | offsets & sizes of various elements in structures. | ||
815 | e.g. the stab for the structure | ||
816 | struct rlimit { | ||
817 | unsigned long rlim_cur; | ||
818 | unsigned long rlim_max; | ||
819 | }; | ||
820 | is | ||
821 | .stabs "rlimit:T(151,2)=s8rlim_cur:(0,5),0,32;rlim_max:(0,5),32,32;;",128,0,0,0 | ||
822 | from this stab you can see that | ||
823 | rlimit_cur starts at bit offset 0 & is 32 bits in size | ||
824 | rlimit_max starts at bit offset 32 & is 32 bits in size. | ||
825 | |||
826 | |||
827 | Debugging Tools: | ||
828 | ================ | ||
829 | |||
830 | objdump | ||
831 | ======= | ||
832 | This is a tool with many options the most useful being ( if compiled with -g). | ||
833 | objdump --source <victim program or object file> > <victims debug listing > | ||
834 | |||
835 | |||
836 | The whole kernel can be compiled like this ( Doing this will make a 17MB kernel | ||
837 | & a 200 MB listing ) however you have to strip it before building the image | ||
838 | using the strip command to make it a more reasonable size to boot it. | ||
839 | |||
840 | A source/assembly mixed dump of the kernel can be done with the line | ||
841 | objdump --source vmlinux > vmlinux.lst | ||
842 | Also, if the file isn't compiled -g, this will output as much debugging information | ||
843 | as it can (e.g. function names). This is very slow as it spends lots | ||
844 | of time searching for debugging info. The following self explanatory line should be used | ||
845 | instead if the code isn't compiled -g, as it is much faster: | ||
846 | objdump --disassemble-all --syms vmlinux > vmlinux.lst | ||
847 | |||
848 | As hard drive space is valuable most of us use the following approach. | ||
849 | 1) Look at the emitted psw on the console to find the crash address in the kernel. | ||
850 | 2) Look at the file System.map ( in the linux directory ) produced when building | ||
851 | the kernel to find the closest address less than the current PSW to find the | ||
852 | offending function. | ||
853 | 3) use grep or similar to search the source tree looking for the source file | ||
854 | with this function if you don't know where it is. | ||
855 | 4) rebuild this object file with -g on, as an example suppose the file was | ||
856 | ( /arch/s390/kernel/signal.o ) | ||
857 | 5) Assuming the file with the erroneous function is signal.c Move to the base of the | ||
858 | Linux source tree. | ||
859 | 6) rm /arch/s390/kernel/signal.o | ||
860 | 7) make /arch/s390/kernel/signal.o | ||
861 | 8) watch the gcc command line emitted | ||
862 | 9) type it in again or alternatively cut & paste it on the console adding the -g option. | ||
863 | 10) objdump --source arch/s390/kernel/signal.o > signal.lst | ||
864 | This will output the source & the assembly intermixed, as the snippet below shows | ||
865 | This will unfortunately output addresses which aren't the same | ||
866 | as the kernel ones you should be able to get around the mental arithmetic | ||
867 | by playing with the --adjust-vma parameter to objdump. | ||
868 | |||
869 | |||
870 | |||
871 | |||
872 | static inline void spin_lock(spinlock_t *lp) | ||
873 | { | ||
874 | a0: 18 34 lr %r3,%r4 | ||
875 | a2: a7 3a 03 bc ahi %r3,956 | ||
876 | __asm__ __volatile(" lhi 1,-1\n" | ||
877 | a6: a7 18 ff ff lhi %r1,-1 | ||
878 | aa: 1f 00 slr %r0,%r0 | ||
879 | ac: ba 01 30 00 cs %r0,%r1,0(%r3) | ||
880 | b0: a7 44 ff fd jm aa <sys_sigsuspend+0x2e> | ||
881 | saveset = current->blocked; | ||
882 | b4: d2 07 f0 68 mvc 104(8,%r15),972(%r4) | ||
883 | b8: 43 cc | ||
884 | return (set->sig[0] & mask) != 0; | ||
885 | } | ||
886 | |||
887 | 6) If debugging under VM go down to that section in the document for more info. | ||
888 | |||
889 | |||
890 | I now have a tool which takes the pain out of --adjust-vma | ||
891 | & you are able to do something like | ||
892 | make /arch/s390/kernel/traps.lst | ||
893 | & it automatically generates the correctly relocated entries for | ||
894 | the text segment in traps.lst. | ||
895 | This tool is now standard in linux distro's in scripts/makelst | ||
896 | |||
897 | strace: | ||
898 | ------- | ||
899 | Q. What is it ? | ||
900 | A. It is a tool for intercepting calls to the kernel & logging them | ||
901 | to a file & on the screen. | ||
902 | |||
903 | Q. What use is it ? | ||
904 | A. You can use it to find out what files a particular program opens. | ||
905 | |||
906 | |||
907 | 738 | ||
908 | Example 1 | ||
909 | --------- | ||
910 | If you wanted to know does ping work but didn't have the source | ||
911 | strace ping -c 1 127.0.0.1 | ||
912 | & then look at the man pages for each of the syscalls below, | ||
913 | ( In fact this is sometimes easier than looking at some spaghetti | ||
914 | source which conditionally compiles for several architectures ). | ||
915 | Not everything that it throws out needs to make sense immediately. | ||
916 | |||
917 | Just looking quickly you can see that it is making up a RAW socket | ||
918 | for the ICMP protocol. | ||
919 | Doing an alarm(10) for a 10 second timeout | ||
920 | & doing a gettimeofday call before & after each read to see | ||
921 | how long the replies took, & writing some text to stdout so the user | ||
922 | has an idea what is going on. | ||
923 | |||
924 | socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3 | ||
925 | getuid() = 0 | ||
926 | setuid(0) = 0 | ||
927 | stat("/usr/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory) | ||
928 | stat("/usr/share/locale/libc/C", 0xbffff134) = -1 ENOENT (No such file or directory) | ||
929 | stat("/usr/local/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory) | ||
930 | getpid() = 353 | ||
931 | setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 | ||
932 | setsockopt(3, SOL_SOCKET, SO_RCVBUF, [49152], 4) = 0 | ||
933 | fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ...}) = 0 | ||
934 | mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000 | ||
935 | ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0 | ||
936 | write(1, "PING 127.0.0.1 (127.0.0.1): 56 d"..., 42PING 127.0.0.1 (127.0.0.1): 56 data bytes | ||
937 | ) = 42 | ||
938 | sigaction(SIGINT, {0x8049ba0, [], SA_RESTART}, {SIG_DFL}) = 0 | ||
939 | sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {SIG_DFL}) = 0 | ||
940 | gettimeofday({948904719, 138951}, NULL) = 0 | ||
941 | sendto(3, "\10\0D\201a\1\0\0\17#\2178\307\36"..., 64, 0, {sin_family=AF_INET, | ||
942 | sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 64 | ||
943 | sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0 | ||
944 | sigaction(SIGALRM, {0x8049ba0, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0 | ||
945 | alarm(10) = 0 | ||
946 | recvfrom(3, "E\0\0T\0005\0\0@\1|r\177\0\0\1\177"..., 192, 0, | ||
947 | {sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84 | ||
948 | gettimeofday({948904719, 160224}, NULL) = 0 | ||
949 | recvfrom(3, "E\0\0T\0006\0\0\377\1\275p\177\0"..., 192, 0, | ||
950 | {sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84 | ||
951 | gettimeofday({948904719, 166952}, NULL) = 0 | ||
952 | write(1, "64 bytes from 127.0.0.1: icmp_se"..., | ||
953 | 5764 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=28.0 ms | ||
954 | |||
955 | Example 2 | ||
956 | --------- | ||
957 | strace passwd 2>&1 | grep open | ||
958 | produces the following output | ||
959 | open("/etc/ld.so.cache", O_RDONLY) = 3 | ||
960 | open("/opt/kde/lib/libc.so.5", O_RDONLY) = -1 ENOENT (No such file or directory) | ||
961 | open("/lib/libc.so.5", O_RDONLY) = 3 | ||
962 | open("/dev", O_RDONLY) = 3 | ||
963 | open("/var/run/utmp", O_RDONLY) = 3 | ||
964 | open("/etc/passwd", O_RDONLY) = 3 | ||
965 | open("/etc/shadow", O_RDONLY) = 3 | ||
966 | open("/etc/login.defs", O_RDONLY) = 4 | ||
967 | open("/dev/tty", O_RDONLY) = 4 | ||
968 | |||
969 | The 2>&1 is done to redirect stderr to stdout & grep is then filtering this input | ||
970 | through the pipe for each line containing the string open. | ||
971 | |||
972 | |||
973 | Example 3 | ||
974 | --------- | ||
975 | Getting sophisticated | ||
976 | telnetd crashes & I don't know why | ||
977 | |||
978 | Steps | ||
979 | ----- | ||
980 | 1) Replace the following line in /etc/inetd.conf | ||
981 | telnet stream tcp nowait root /usr/sbin/in.telnetd -h | ||
982 | with | ||
983 | telnet stream tcp nowait root /blah | ||
984 | |||
985 | 2) Create the file /blah with the following contents to start tracing telnetd | ||
986 | #!/bin/bash | ||
987 | /usr/bin/strace -o/t1 -f /usr/sbin/in.telnetd -h | ||
988 | 3) chmod 700 /blah to make it executable only to root | ||
989 | 4) | ||
990 | killall -HUP inetd | ||
991 | or ps aux | grep inetd | ||
992 | get inetd's process id | ||
993 | & kill -HUP inetd to restart it. | ||
994 | |||
995 | Important options | ||
996 | ----------------- | ||
997 | -o is used to tell strace to output to a file in our case t1 in the root directory | ||
998 | -f is to follow children i.e. | ||
999 | e.g in our case above telnetd will start the login process & subsequently a shell like bash. | ||
1000 | You will be able to tell which is which from the process ID's listed on the left hand side | ||
1001 | of the strace output. | ||
1002 | -p<pid> will tell strace to attach to a running process, yup this can be done provided | ||
1003 | it isn't being traced or debugged already & you have enough privileges, | ||
1004 | the reason 2 processes cannot trace or debug the same program is that strace | ||
1005 | becomes the parent process of the one being debugged & processes ( unlike people ) | ||
1006 | can have only one parent. | ||
1007 | |||
1008 | |||
1009 | However the file /t1 will get big quite quickly | ||
1010 | to test it telnet 127.0.0.1 | ||
1011 | |||
1012 | now look at what files in.telnetd execve'd | ||
1013 | 413 execve("/usr/sbin/in.telnetd", ["/usr/sbin/in.telnetd", "-h"], [/* 17 vars */]) = 0 | ||
1014 | 414 execve("/bin/login", ["/bin/login", "-h", "localhost", "-p"], [/* 2 vars */]) = 0 | ||
1015 | |||
1016 | Whey it worked!. | ||
1017 | |||
1018 | |||
1019 | Other hints: | ||
1020 | ------------ | ||
1021 | If the program is not very interactive ( i.e. not much keyboard input ) | ||
1022 | & is crashing in one architecture but not in another you can do | ||
1023 | an strace of both programs under as identical a scenario as you can | ||
1024 | on both architectures outputting to a file then. | ||
1025 | do a diff of the two traces using the diff program | ||
1026 | i.e. | ||
1027 | diff output1 output2 | ||
1028 | & maybe you'll be able to see where the call paths differed, this | ||
1029 | is possibly near the cause of the crash. | ||
1030 | |||
1031 | More info | ||
1032 | --------- | ||
1033 | Look at man pages for strace & the various syscalls | ||
1034 | e.g. man strace, man alarm, man socket. | ||
1035 | |||
1036 | |||
1037 | Performance Debugging | ||
1038 | ===================== | ||
1039 | gcc is capable of compiling in profiling code just add the -p option | ||
1040 | to the CFLAGS, this obviously affects program size & performance. | ||
1041 | This can be used by the gprof gnu profiling tool or the | ||
1042 | gcov the gnu code coverage tool ( code coverage is a means of testing | ||
1043 | code quality by checking if all the code in an executable in exercised by | ||
1044 | a tester ). | ||
1045 | |||
1046 | |||
1047 | Using top to find out where processes are sleeping in the kernel | ||
1048 | ---------------------------------------------------------------- | ||
1049 | To do this copy the System.map from the root directory where | ||
1050 | the linux kernel was built to the /boot directory on your | ||
1051 | linux machine. | ||
1052 | Start top | ||
1053 | Now type fU<return> | ||
1054 | You should see a new field called WCHAN which | ||
1055 | tells you where each process is sleeping here is a typical output. | ||
1056 | |||
1057 | 6:59pm up 41 min, 1 user, load average: 0.00, 0.00, 0.00 | ||
1058 | 28 processes: 27 sleeping, 1 running, 0 zombie, 0 stopped | ||
1059 | CPU states: 0.0% user, 0.1% system, 0.0% nice, 99.8% idle | ||
1060 | Mem: 254900K av, 45976K used, 208924K free, 0K shrd, 28636K buff | ||
1061 | Swap: 0K av, 0K used, 0K free 8620K cached | ||
1062 | |||
1063 | PID USER PRI NI SIZE RSS SHARE WCHAN STAT LIB %CPU %MEM TIME COMMAND | ||
1064 | 750 root 12 0 848 848 700 do_select S 0 0.1 0.3 0:00 in.telnetd | ||
1065 | 767 root 16 0 1140 1140 964 R 0 0.1 0.4 0:00 top | ||
1066 | 1 root 8 0 212 212 180 do_select S 0 0.0 0.0 0:00 init | ||
1067 | 2 root 9 0 0 0 0 down_inte SW 0 0.0 0.0 0:00 kmcheck | ||
1068 | |||
1069 | The time command | ||
1070 | ---------------- | ||
1071 | Another related command is the time command which gives you an indication | ||
1072 | of where a process is spending the majority of its time. | ||
1073 | e.g. | ||
1074 | time ping -c 5 nc | ||
1075 | outputs | ||
1076 | real 0m4.054s | ||
1077 | user 0m0.010s | ||
1078 | sys 0m0.010s | ||
1079 | 739 | ||
1080 | Debugging under VM | 740 | Debugging under VM |
1081 | ================== | 741 | ================== |
diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt index 3cc9c7843e15..8cac6492aade 100644 --- a/Documentation/scsi/libsas.txt +++ b/Documentation/scsi/libsas.txt | |||
@@ -226,9 +226,6 @@ static int register_sas_ha(struct my_sas_ha *my_ha) | |||
226 | my_ha->sas_ha.lldd_dev_found = my_dev_found; | 226 | my_ha->sas_ha.lldd_dev_found = my_dev_found; |
227 | my_ha->sas_ha.lldd_dev_gone = my_dev_gone; | 227 | my_ha->sas_ha.lldd_dev_gone = my_dev_gone; |
228 | 228 | ||
229 | my_ha->sas_ha.lldd_max_execute_num = lldd_max_execute_num; (1) | ||
230 | |||
231 | my_ha->sas_ha.lldd_queue_size = ha_can_queue; | ||
232 | my_ha->sas_ha.lldd_execute_task = my_execute_task; | 229 | my_ha->sas_ha.lldd_execute_task = my_execute_task; |
233 | 230 | ||
234 | my_ha->sas_ha.lldd_abort_task = my_abort_task; | 231 | my_ha->sas_ha.lldd_abort_task = my_abort_task; |
@@ -247,28 +244,6 @@ static int register_sas_ha(struct my_sas_ha *my_ha) | |||
247 | return sas_register_ha(&my_ha->sas_ha); | 244 | return sas_register_ha(&my_ha->sas_ha); |
248 | } | 245 | } |
249 | 246 | ||
250 | (1) This is normally a LLDD parameter, something of the | ||
251 | lines of a task collector. What it tells the SAS Layer is | ||
252 | whether the SAS layer should run in Direct Mode (default: | ||
253 | value 0 or 1) or Task Collector Mode (value greater than 1). | ||
254 | |||
255 | In Direct Mode, the SAS Layer calls Execute Task as soon as | ||
256 | it has a command to send to the SDS, _and_ this is a single | ||
257 | command, i.e. not linked. | ||
258 | |||
259 | Some hardware (e.g. aic94xx) has the capability to DMA more | ||
260 | than one task at a time (interrupt) from host memory. Task | ||
261 | Collector Mode is an optional feature for HAs which support | ||
262 | this in their hardware. (Again, it is completely optional | ||
263 | even if your hardware supports it.) | ||
264 | |||
265 | In Task Collector Mode, the SAS Layer would do _natural_ | ||
266 | coalescing of tasks and at the appropriate moment it would | ||
267 | call your driver to DMA more than one task in a single HA | ||
268 | interrupt. DMBS may want to use this by insmod/modprobe | ||
269 | setting the lldd_max_execute_num to something greater than | ||
270 | 1. | ||
271 | |||
272 | (2) SAS 1.1 does not define I_T Nexus Reset TMF. | 247 | (2) SAS 1.1 does not define I_T Nexus Reset TMF. |
273 | 248 | ||
274 | Events | 249 | Events |
@@ -325,71 +300,22 @@ PHYE_SPINUP_HOLD -- SATA is present, COMWAKE not sent. | |||
325 | 300 | ||
326 | The Execute Command SCSI RPC: | 301 | The Execute Command SCSI RPC: |
327 | 302 | ||
328 | int (*lldd_execute_task)(struct sas_task *, int num, | 303 | int (*lldd_execute_task)(struct sas_task *, gfp_t gfp_flags); |
329 | unsigned long gfp_flags); | ||
330 | 304 | ||
331 | Used to queue a task to the SAS LLDD. @task is the tasks to | 305 | Used to queue a task to the SAS LLDD. @task is the task to be executed. |
332 | be executed. @num should be the number of tasks being | 306 | @gfp_mask is the gfp_mask defining the context of the caller. |
333 | queued at this function call (they are linked listed via | ||
334 | task::list), @gfp_mask should be the gfp_mask defining the | ||
335 | context of the caller. | ||
336 | 307 | ||
337 | This function should implement the Execute Command SCSI RPC, | 308 | This function should implement the Execute Command SCSI RPC, |
338 | or if you're sending a SCSI Task as linked commands, you | ||
339 | should also use this function. | ||
340 | 309 | ||
341 | That is, when lldd_execute_task() is called, the command(s) | 310 | That is, when lldd_execute_task() is called, the command |
342 | go out on the transport *immediately*. There is *no* | 311 | go out on the transport *immediately*. There is *no* |
343 | queuing of any sort and at any level in a SAS LLDD. | 312 | queuing of any sort and at any level in a SAS LLDD. |
344 | 313 | ||
345 | The use of task::list is two-fold, one for linked commands, | ||
346 | the other discussed below. | ||
347 | |||
348 | It is possible to queue up more than one task at a time, by | ||
349 | initializing the list element of struct sas_task, and | ||
350 | passing the number of tasks enlisted in this manner in num. | ||
351 | |||
352 | Returns: -SAS_QUEUE_FULL, -ENOMEM, nothing was queued; | 314 | Returns: -SAS_QUEUE_FULL, -ENOMEM, nothing was queued; |
353 | 0, the task(s) were queued. | 315 | 0, the task(s) were queued. |
354 | 316 | ||
355 | If you want to pass num > 1, then either | ||
356 | A) you're the only caller of this function and keep track | ||
357 | of what you've queued to the LLDD, or | ||
358 | B) you know what you're doing and have a strategy of | ||
359 | retrying. | ||
360 | |||
361 | As opposed to queuing one task at a time (function call), | ||
362 | batch queuing of tasks, by having num > 1, greatly | ||
363 | simplifies LLDD code, sequencer code, and _hardware design_, | ||
364 | and has some performance advantages in certain situations | ||
365 | (DBMS). | ||
366 | |||
367 | The LLDD advertises if it can take more than one command at | ||
368 | a time at lldd_execute_task(), by setting the | ||
369 | lldd_max_execute_num parameter (controlled by "collector" | ||
370 | module parameter in aic94xx SAS LLDD). | ||
371 | |||
372 | You should leave this to the default 1, unless you know what | ||
373 | you're doing. | ||
374 | |||
375 | This is a function of the LLDD, to which the SAS layer can | ||
376 | cater to. | ||
377 | |||
378 | int lldd_queue_size | ||
379 | The host adapter's queue size. This is the maximum | ||
380 | number of commands the lldd can have pending to domain | ||
381 | devices on behalf of all upper layers submitting through | ||
382 | lldd_execute_task(). | ||
383 | |||
384 | You really want to set this to something (much) larger than | ||
385 | 1. | ||
386 | |||
387 | This _really_ has absolutely nothing to do with queuing. | ||
388 | There is no queuing in SAS LLDDs. | ||
389 | |||
390 | struct sas_task { | 317 | struct sas_task { |
391 | dev -- the device this task is destined to | 318 | dev -- the device this task is destined to |
392 | list -- must be initialized (INIT_LIST_HEAD) | ||
393 | task_proto -- _one_ of enum sas_proto | 319 | task_proto -- _one_ of enum sas_proto |
394 | scatter -- pointer to scatter gather list array | 320 | scatter -- pointer to scatter gather list array |
395 | num_scatter -- number of elements in scatter | 321 | num_scatter -- number of elements in scatter |
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt index a0c85110a07e..8638f61c8c9d 100644 --- a/Documentation/scsi/scsi_eh.txt +++ b/Documentation/scsi/scsi_eh.txt | |||
@@ -172,7 +172,7 @@ ways. | |||
172 | 172 | ||
173 | - eh_strategy_handler() callback | 173 | - eh_strategy_handler() callback |
174 | This is one big callback which should perform whole error | 174 | This is one big callback which should perform whole error |
175 | handling. As such, it should do all choirs SCSI midlayer | 175 | handling. As such, it should do all chores the SCSI midlayer |
176 | performs during recovery. This will be discussed in [2-2]. | 176 | performs during recovery. This will be discussed in [2-2]. |
177 | 177 | ||
178 | Once recovery is complete, SCSI EH resumes normal operation by | 178 | Once recovery is complete, SCSI EH resumes normal operation by |
@@ -428,7 +428,7 @@ scmd->allowed. | |||
428 | scsi_unjam_host() and it is responsible for whole recovery process. | 428 | scsi_unjam_host() and it is responsible for whole recovery process. |
429 | On completion, the handler should have made lower layers forget about | 429 | On completion, the handler should have made lower layers forget about |
430 | all failed scmds and either ready for new commands or offline. Also, | 430 | all failed scmds and either ready for new commands or offline. Also, |
431 | it should perform SCSI EH maintenance choirs to maintain integrity of | 431 | it should perform SCSI EH maintenance chores to maintain integrity of |
432 | SCSI midlayer. IOW, of the steps described in [2-1-2], all steps | 432 | SCSI midlayer. IOW, of the steps described in [2-1-2], all steps |
433 | except for #1 must be implemented by eh_strategy_handler(). | 433 | except for #1 must be implemented by eh_strategy_handler(). |
434 | 434 | ||
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index d6a9bdeee7f2..731bc4f4c5e6 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt | |||
@@ -149,7 +149,7 @@ scsi_add_host() ----> | |||
149 | scsi_scan_host() -------+ | 149 | scsi_scan_host() -------+ |
150 | | | 150 | | |
151 | slave_alloc() | 151 | slave_alloc() |
152 | slave_configure() --> scsi_adjust_queue_depth() | 152 | slave_configure() --> scsi_change_queue_depth() |
153 | | | 153 | | |
154 | slave_alloc() | 154 | slave_alloc() |
155 | slave_configure() | 155 | slave_configure() |
@@ -159,7 +159,7 @@ scsi_scan_host() -------+ | |||
159 | ------------------------------------------------------------ | 159 | ------------------------------------------------------------ |
160 | 160 | ||
161 | If the LLD wants to adjust the default queue settings, it can invoke | 161 | If the LLD wants to adjust the default queue settings, it can invoke |
162 | scsi_adjust_queue_depth() in its slave_configure() routine. | 162 | scsi_change_queue_depth() in its slave_configure() routine. |
163 | 163 | ||
164 | *** For scsi devices that the mid level tries to scan but do not | 164 | *** For scsi devices that the mid level tries to scan but do not |
165 | respond, a slave_alloc(), slave_destroy() pair is called. | 165 | respond, a slave_alloc(), slave_destroy() pair is called. |
@@ -203,7 +203,7 @@ LLD mid level LLD | |||
203 | scsi_add_device() ------+ | 203 | scsi_add_device() ------+ |
204 | | | 204 | | |
205 | slave_alloc() | 205 | slave_alloc() |
206 | slave_configure() [--> scsi_adjust_queue_depth()] | 206 | slave_configure() [--> scsi_change_queue_depth()] |
207 | ------------------------------------------------------------ | 207 | ------------------------------------------------------------ |
208 | 208 | ||
209 | In a similar fashion, an LLD may become aware that a SCSI device has been | 209 | In a similar fashion, an LLD may become aware that a SCSI device has been |
@@ -261,7 +261,7 @@ init_this_scsi_driver() ----+ | |||
261 | | scsi_register() | 261 | | scsi_register() |
262 | | | 262 | | |
263 | slave_alloc() | 263 | slave_alloc() |
264 | slave_configure() --> scsi_adjust_queue_depth() | 264 | slave_configure() --> scsi_change_queue_depth() |
265 | slave_alloc() *** | 265 | slave_alloc() *** |
266 | slave_destroy() *** | 266 | slave_destroy() *** |
267 | | | 267 | | |
@@ -271,9 +271,9 @@ init_this_scsi_driver() ----+ | |||
271 | slave_destroy() *** | 271 | slave_destroy() *** |
272 | ------------------------------------------------------------ | 272 | ------------------------------------------------------------ |
273 | 273 | ||
274 | The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and | 274 | The mid level invokes scsi_change_queue_depth() with "cmd_per_lun" for that |
275 | "cmd_per_lun" for that host as the queue length. These settings can be | 275 | host as the queue length. These settings can be overridden by a |
276 | overridden by a slave_configure() supplied by the LLD. | 276 | slave_configure() supplied by the LLD. |
277 | 277 | ||
278 | *** For scsi devices that the mid level tries to scan but do not | 278 | *** For scsi devices that the mid level tries to scan but do not |
279 | respond, a slave_alloc(), slave_destroy() pair is called. | 279 | respond, a slave_alloc(), slave_destroy() pair is called. |
@@ -366,13 +366,11 @@ is initialized. The functions below are listed alphabetically and their | |||
366 | names all start with "scsi_". | 366 | names all start with "scsi_". |
367 | 367 | ||
368 | Summary: | 368 | Summary: |
369 | scsi_activate_tcq - turn on tag command queueing | ||
370 | scsi_add_device - creates new scsi device (lu) instance | 369 | scsi_add_device - creates new scsi device (lu) instance |
371 | scsi_add_host - perform sysfs registration and set up transport class | 370 | scsi_add_host - perform sysfs registration and set up transport class |
372 | scsi_adjust_queue_depth - change the queue depth on a SCSI device | 371 | scsi_change_queue_depth - change the queue depth on a SCSI device |
373 | scsi_bios_ptable - return copy of block device's partition table | 372 | scsi_bios_ptable - return copy of block device's partition table |
374 | scsi_block_requests - prevent further commands being queued to given host | 373 | scsi_block_requests - prevent further commands being queued to given host |
375 | scsi_deactivate_tcq - turn off tag command queueing | ||
376 | scsi_host_alloc - return a new scsi_host instance whose refcount==1 | 374 | scsi_host_alloc - return a new scsi_host instance whose refcount==1 |
377 | scsi_host_get - increments Scsi_Host instance's refcount | 375 | scsi_host_get - increments Scsi_Host instance's refcount |
378 | scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) | 376 | scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) |
@@ -390,24 +388,6 @@ Summary: | |||
390 | Details: | 388 | Details: |
391 | 389 | ||
392 | /** | 390 | /** |
393 | * scsi_activate_tcq - turn on tag command queueing ("ordered" task attribute) | ||
394 | * @sdev: device to turn on TCQ for | ||
395 | * @depth: queue depth | ||
396 | * | ||
397 | * Returns nothing | ||
398 | * | ||
399 | * Might block: no | ||
400 | * | ||
401 | * Notes: Eventually, it is hoped depth would be the maximum depth | ||
402 | * the device could cope with and the real queue depth | ||
403 | * would be adjustable from 0 to depth. | ||
404 | * | ||
405 | * Defined (inline) in: include/scsi/scsi_tcq.h | ||
406 | **/ | ||
407 | void scsi_activate_tcq(struct scsi_device *sdev, int depth) | ||
408 | |||
409 | |||
410 | /** | ||
411 | * scsi_add_device - creates new scsi device (lu) instance | 391 | * scsi_add_device - creates new scsi device (lu) instance |
412 | * @shost: pointer to scsi host instance | 392 | * @shost: pointer to scsi host instance |
413 | * @channel: channel number (rarely other than 0) | 393 | * @channel: channel number (rarely other than 0) |
@@ -456,11 +436,8 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) | |||
456 | 436 | ||
457 | 437 | ||
458 | /** | 438 | /** |
459 | * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device | 439 | * scsi_change_queue_depth - allow LLD to change queue depth on a SCSI device |
460 | * @sdev: pointer to SCSI device to change queue depth on | 440 | * @sdev: pointer to SCSI device to change queue depth on |
461 | * @tagged: 0 - no tagged queuing | ||
462 | * MSG_SIMPLE_TAG - simple tagged queuing | ||
463 | * MSG_ORDERED_TAG - ordered tagged queuing | ||
464 | * @tags Number of tags allowed if tagged queuing enabled, | 441 | * @tags Number of tags allowed if tagged queuing enabled, |
465 | * or number of commands the LLD can queue up | 442 | * or number of commands the LLD can queue up |
466 | * in non-tagged mode (as per cmd_per_lun). | 443 | * in non-tagged mode (as per cmd_per_lun). |
@@ -471,15 +448,12 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) | |||
471 | * | 448 | * |
472 | * Notes: Can be invoked any time on a SCSI device controlled by this | 449 | * Notes: Can be invoked any time on a SCSI device controlled by this |
473 | * LLD. [Specifically during and after slave_configure() and prior to | 450 | * LLD. [Specifically during and after slave_configure() and prior to |
474 | * slave_destroy().] Can safely be invoked from interrupt code. Actual | 451 | * slave_destroy().] Can safely be invoked from interrupt code. |
475 | * queue depth change may be delayed until the next command is being | ||
476 | * processed. See also scsi_activate_tcq() and scsi_deactivate_tcq(). | ||
477 | * | 452 | * |
478 | * Defined in: drivers/scsi/scsi.c [see source code for more notes] | 453 | * Defined in: drivers/scsi/scsi.c [see source code for more notes] |
479 | * | 454 | * |
480 | **/ | 455 | **/ |
481 | void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged, | 456 | int scsi_change_queue_depth(struct scsi_device *sdev, int tags) |
482 | int tags) | ||
483 | 457 | ||
484 | 458 | ||
485 | /** | 459 | /** |
@@ -515,20 +489,6 @@ void scsi_block_requests(struct Scsi_Host * shost) | |||
515 | 489 | ||
516 | 490 | ||
517 | /** | 491 | /** |
518 | * scsi_deactivate_tcq - turn off tag command queueing | ||
519 | * @sdev: device to turn off TCQ for | ||
520 | * @depth: queue depth (stored in sdev) | ||
521 | * | ||
522 | * Returns nothing | ||
523 | * | ||
524 | * Might block: no | ||
525 | * | ||
526 | * Defined (inline) in: include/scsi/scsi_tcq.h | ||
527 | **/ | ||
528 | void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) | ||
529 | |||
530 | |||
531 | /** | ||
532 | * scsi_host_alloc - create a scsi host adapter instance and perform basic | 492 | * scsi_host_alloc - create a scsi host adapter instance and perform basic |
533 | * initialization. | 493 | * initialization. |
534 | * @sht: pointer to scsi host template | 494 | * @sht: pointer to scsi host template |
@@ -1254,7 +1214,7 @@ of interest: | |||
1254 | for disk firmware uploads. | 1214 | for disk firmware uploads. |
1255 | cmd_per_lun - maximum number of commands that can be queued on devices | 1215 | cmd_per_lun - maximum number of commands that can be queued on devices |
1256 | controlled by the host. Overridden by LLD calls to | 1216 | controlled by the host. Overridden by LLD calls to |
1257 | scsi_adjust_queue_depth(). | 1217 | scsi_change_queue_depth(). |
1258 | unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing | 1218 | unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing |
1259 | restriction), 0=>can use full 32 bit (or better) DMA | 1219 | restriction), 0=>can use full 32 bit (or better) DMA |
1260 | address space | 1220 | address space |
@@ -1294,7 +1254,7 @@ struct scsi_cmnd | |||
1294 | Instances of this structure convey SCSI commands to the LLD and responses | 1254 | Instances of this structure convey SCSI commands to the LLD and responses |
1295 | back to the mid level. The SCSI mid level will ensure that no more SCSI | 1255 | back to the mid level. The SCSI mid level will ensure that no more SCSI |
1296 | commands become queued against the LLD than are indicated by | 1256 | commands become queued against the LLD than are indicated by |
1297 | scsi_adjust_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will | 1257 | scsi_change_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will |
1298 | be at least one instance of struct scsi_cmnd available for each SCSI device. | 1258 | be at least one instance of struct scsi_cmnd available for each SCSI device. |
1299 | Members of interest: | 1259 | Members of interest: |
1300 | cmnd - array containing SCSI command | 1260 | cmnd - array containing SCSI command |
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt index f346abbdd6ff..0d5bdb153d3b 100644 --- a/Documentation/scsi/st.txt +++ b/Documentation/scsi/st.txt | |||
@@ -506,9 +506,11 @@ user does not request data that far.) | |||
506 | 506 | ||
507 | DEBUGGING HINTS | 507 | DEBUGGING HINTS |
508 | 508 | ||
509 | To enable debugging messages, edit st.c and #define DEBUG 1. As seen | 509 | Debugging code is now compiled in by default but debugging is turned off |
510 | above, debugging can be switched off with an ioctl if debugging is | 510 | with the kernel module parameter debug_flag defaulting to 0. Debugging |
511 | compiled into the driver. The debugging output is not voluminous. | 511 | can still be switched on and off with an ioctl. To enable debug at |
512 | module load time add debug_flag=1 to the module load options, the | ||
513 | debugging output is not voluminous. | ||
512 | 514 | ||
513 | If the tape seems to hang, I would be very interested to hear where | 515 | If the tape seems to hang, I would be very interested to hear where |
514 | the driver is waiting. With the command 'ps -l' you can see the state | 516 | the driver is waiting. With the command 'ps -l' you can see the state |
diff --git a/Documentation/scsi/wd719x.txt b/Documentation/scsi/wd719x.txt new file mode 100644 index 000000000000..0816b0220238 --- /dev/null +++ b/Documentation/scsi/wd719x.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Driver for Western Digital WD7193, WD7197 and WD7296 SCSI cards | ||
2 | --------------------------------------------------------------- | ||
3 | |||
4 | The card requires firmware that can be cut out of the Windows NT driver that | ||
5 | can be downloaded from WD at: | ||
6 | http://support.wdc.com/product/download.asp?groupid=801&sid=27&lang=en | ||
7 | |||
8 | There is no license anywhere in the file or on the page - so the firmware | ||
9 | probably cannot be added to linux-firmware. | ||
10 | |||
11 | This script downloads and extracts the firmware, creating wd719x-risc.bin and | ||
12 | d719x-wcs.bin files. Put them in /lib/firmware/. | ||
13 | |||
14 | #!/bin/sh | ||
15 | wget http://support.wdc.com/download/archive/pciscsi.exe | ||
16 | lha xi pciscsi.exe pci-scsi.exe | ||
17 | lha xi pci-scsi.exe nt/wd7296a.sys | ||
18 | rm pci-scsi.exe | ||
19 | dd if=wd7296a.sys of=wd719x-risc.bin bs=1 skip=5760 count=14336 | ||
20 | dd if=wd7296a.sys of=wd719x-wcs.bin bs=1 skip=20096 count=514 | ||
21 | rm wd7296a.sys | ||
diff --git a/Documentation/security/IMA-templates.txt b/Documentation/security/IMA-templates.txt index a4e102dddfea..839b5dad9226 100644 --- a/Documentation/security/IMA-templates.txt +++ b/Documentation/security/IMA-templates.txt | |||
@@ -27,25 +27,22 @@ Managing templates with these structures is very simple. To support | |||
27 | a new data type, developers define the field identifier and implement | 27 | a new data type, developers define the field identifier and implement |
28 | two functions, init() and show(), respectively to generate and display | 28 | two functions, init() and show(), respectively to generate and display |
29 | measurement entries. Defining a new template descriptor requires | 29 | measurement entries. Defining a new template descriptor requires |
30 | specifying the template format, a string of field identifiers separated | 30 | specifying the template format (a string of field identifiers separated |
31 | by the '|' character. While in the current implementation it is possible | 31 | by the '|' character) through the 'ima_template_fmt' kernel command line |
32 | to define new template descriptors only by adding their definition in the | 32 | parameter. At boot time, IMA initializes the chosen template descriptor |
33 | template specific code (ima_template.c), in a future version it will be | 33 | by translating the format into an array of template fields structures taken |
34 | possible to register a new template on a running kernel by supplying to IMA | 34 | from the set of the supported ones. |
35 | the desired format string. In this version, IMA initializes at boot time | ||
36 | all defined template descriptors by translating the format into an array | ||
37 | of template fields structures taken from the set of the supported ones. | ||
38 | 35 | ||
39 | After the initialization step, IMA will call ima_alloc_init_template() | 36 | After the initialization step, IMA will call ima_alloc_init_template() |
40 | (new function defined within the patches for the new template management | 37 | (new function defined within the patches for the new template management |
41 | mechanism) to generate a new measurement entry by using the template | 38 | mechanism) to generate a new measurement entry by using the template |
42 | descriptor chosen through the kernel configuration or through the newly | 39 | descriptor chosen through the kernel configuration or through the newly |
43 | introduced 'ima_template=' kernel command line parameter. It is during this | 40 | introduced 'ima_template' and 'ima_template_fmt' kernel command line parameters. |
44 | phase that the advantages of the new architecture are clearly shown: | 41 | It is during this phase that the advantages of the new architecture are |
45 | the latter function will not contain specific code to handle a given template | 42 | clearly shown: the latter function will not contain specific code to handle |
46 | but, instead, it simply calls the init() method of the template fields | 43 | a given template but, instead, it simply calls the init() method of the template |
47 | associated to the chosen template descriptor and store the result (pointer | 44 | fields associated to the chosen template descriptor and store the result |
48 | to allocated data and data length) in the measurement entry structure. | 45 | (pointer to allocated data and data length) in the measurement entry structure. |
49 | 46 | ||
50 | The same mechanism is employed to display measurements entries. | 47 | The same mechanism is employed to display measurements entries. |
51 | The functions ima[_ascii]_measurements_show() retrieve, for each entry, | 48 | The functions ima[_ascii]_measurements_show() retrieve, for each entry, |
@@ -86,4 +83,6 @@ currently the following methods are supported: | |||
86 | - select a template descriptor among those supported in the kernel | 83 | - select a template descriptor among those supported in the kernel |
87 | configuration ('ima-ng' is the default choice); | 84 | configuration ('ima-ng' is the default choice); |
88 | - specify a template descriptor name from the kernel command line through | 85 | - specify a template descriptor name from the kernel command line through |
89 | the 'ima_template=' parameter. | 86 | the 'ima_template=' parameter; |
87 | - register a new template descriptor with custom format through the kernel | ||
88 | command line parameter 'ima_template_fmt='. | ||
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index ba64e4b892e9..c415b0ef4493 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -59,7 +59,9 @@ The core driver uses the info->tmpbuf_sem lock to prevent multi-threaded | |||
59 | access to the info->tmpbuf bouncebuffer used for port writes. | 59 | access to the info->tmpbuf bouncebuffer used for port writes. |
60 | 60 | ||
61 | The port_sem semaphore is used to protect against ports being added/ | 61 | The port_sem semaphore is used to protect against ports being added/ |
62 | removed or reconfigured at inappropriate times. | 62 | removed or reconfigured at inappropriate times. Since v2.6.27, this |
63 | semaphore has been the 'mutex' member of the tty_port struct, and | ||
64 | commonly referred to as the port mutex (or port->mutex). | ||
63 | 65 | ||
64 | 66 | ||
65 | uart_ops | 67 | uart_ops |
@@ -248,7 +250,7 @@ hardware. | |||
248 | Other flags may be used (eg, xon/xoff characters) if your | 250 | Other flags may be used (eg, xon/xoff characters) if your |
249 | hardware supports hardware "soft" flow control. | 251 | hardware supports hardware "soft" flow control. |
250 | 252 | ||
251 | Locking: none. | 253 | Locking: caller holds port->mutex |
252 | Interrupts: caller dependent. | 254 | Interrupts: caller dependent. |
253 | This call must not sleep | 255 | This call must not sleep |
254 | 256 | ||
diff --git a/Documentation/sound/alsa/ControlNames.txt b/Documentation/sound/alsa/ControlNames.txt index fea65bb6269e..79a6127863ca 100644 --- a/Documentation/sound/alsa/ControlNames.txt +++ b/Documentation/sound/alsa/ControlNames.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | This document describes standard names of mixer controls. | 1 | This document describes standard names of mixer controls. |
2 | 2 | ||
3 | Syntax: SOURCE [DIRECTION] FUNCTION | 3 | Syntax: [LOCATION] SOURCE [CHANNEL] [DIRECTION] FUNCTION |
4 | 4 | ||
5 | DIRECTION: | 5 | DIRECTION: |
6 | <nothing> (both directions) | 6 | <nothing> (both directions) |
@@ -14,12 +14,29 @@ FUNCTION: | |||
14 | Volume | 14 | Volume |
15 | Route (route control, hardware specific) | 15 | Route (route control, hardware specific) |
16 | 16 | ||
17 | CHANNEL: | ||
18 | <nothing> (channel independent, or applies to all channels) | ||
19 | Front | ||
20 | Surround (rear left/right in 4.0/5.1 surround) | ||
21 | CLFE | ||
22 | Center | ||
23 | LFE | ||
24 | Side (side left/right for 7.1 surround) | ||
25 | |||
26 | LOCATION: (physical location of source) | ||
27 | Front | ||
28 | Rear | ||
29 | Dock (docking station) | ||
30 | Internal | ||
31 | |||
17 | SOURCE: | 32 | SOURCE: |
18 | Master | 33 | Master |
19 | Master Mono | 34 | Master Mono |
20 | Hardware Master | 35 | Hardware Master |
21 | Speaker (internal speaker) | 36 | Speaker (internal speaker) |
37 | Bass Speaker (internal LFE speaker) | ||
22 | Headphone | 38 | Headphone |
39 | Line Out | ||
23 | Beep (beep generator) | 40 | Beep (beep generator) |
24 | Phone | 41 | Phone |
25 | Phone Input | 42 | Phone Input |
@@ -27,14 +44,14 @@ SOURCE: | |||
27 | Synth | 44 | Synth |
28 | FM | 45 | FM |
29 | Mic | 46 | Mic |
30 | Line | 47 | Headset Mic (mic part of combined headset jack - 4-pin headphone + mic) |
48 | Headphone Mic (mic part of either/or - 3-pin headphone or mic) | ||
49 | Line (input only, use "Line Out" for output) | ||
31 | CD | 50 | CD |
32 | Video | 51 | Video |
33 | Zoom Video | 52 | Zoom Video |
34 | Aux | 53 | Aux |
35 | PCM | 54 | PCM |
36 | PCM Front | ||
37 | PCM Rear | ||
38 | PCM Pan | 55 | PCM Pan |
39 | Loopback | 56 | Loopback |
40 | Analog Loopback (D/A -> A/D loopback) | 57 | Analog Loopback (D/A -> A/D loopback) |
@@ -47,8 +64,13 @@ SOURCE: | |||
47 | Music | 64 | Music |
48 | I2S | 65 | I2S |
49 | IEC958 | 66 | IEC958 |
67 | HDMI | ||
68 | SPDIF (output only) | ||
69 | SPDIF In | ||
70 | Digital In | ||
71 | HDMI/DP (either HDMI or DisplayPort) | ||
50 | 72 | ||
51 | Exceptions: | 73 | Exceptions (deprecated): |
52 | [Digital] Capture Source | 74 | [Digital] Capture Source |
53 | [Digital] Capture Switch (aka input gain switch) | 75 | [Digital] Capture Switch (aka input gain switch) |
54 | [Digital] Capture Volume (aka input gain volume) | 76 | [Digital] Capture Volume (aka input gain volume) |
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index a5e754714344..5a3163cac6c3 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -113,14 +113,10 @@ AD1984 | |||
113 | 113 | ||
114 | AD1986A | 114 | AD1986A |
115 | ======= | 115 | ======= |
116 | 6stack 6-jack, separate surrounds (default) | ||
117 | 3stack 3-stack, shared surrounds | 116 | 3stack 3-stack, shared surrounds |
118 | laptop 2-channel only (FSC V2060, Samsung M50) | 117 | laptop 2-channel only (FSC V2060, Samsung M50) |
119 | laptop-eapd 2-channel with EAPD (ASUS A6J) | 118 | laptop-imic 2-channel with built-in mic |
120 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) | 119 | eapd Turn on EAPD constantly |
121 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) | ||
122 | samsung 2-channel with EAPD (Samsung R65) | ||
123 | samsung-p50 2-channel with HP-automute (Samsung P50) | ||
124 | 120 | ||
125 | AD1988/AD1988B/AD1989A/AD1989B | 121 | AD1988/AD1988B/AD1989A/AD1989B |
126 | ============================== | 122 | ============================== |
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt index 7fcd1ad96fcc..7f8a0d325905 100644 --- a/Documentation/sound/alsa/Procfile.txt +++ b/Documentation/sound/alsa/Procfile.txt | |||
@@ -101,10 +101,6 @@ card*/pcm*/xrun_debug | |||
101 | bit 0 = Enable XRUN/jiffies debug messages | 101 | bit 0 = Enable XRUN/jiffies debug messages |
102 | bit 1 = Show stack trace at XRUN / jiffies check | 102 | bit 1 = Show stack trace at XRUN / jiffies check |
103 | bit 2 = Enable additional jiffies check | 103 | bit 2 = Enable additional jiffies check |
104 | bit 3 = Log hwptr update at each period interrupt | ||
105 | bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr() | ||
106 | bit 5 = Show last 10 positions on error | ||
107 | bit 6 = Do above only once | ||
108 | 104 | ||
109 | When the bit 0 is set, the driver will show the messages to | 105 | When the bit 0 is set, the driver will show the messages to |
110 | kernel log when an xrun is detected. The debug message is | 106 | kernel log when an xrun is detected. The debug message is |
@@ -121,15 +117,6 @@ card*/pcm*/xrun_debug | |||
121 | buggy) hardware that doesn't give smooth pointer updates. | 117 | buggy) hardware that doesn't give smooth pointer updates. |
122 | This feature is enabled via the bit 2. | 118 | This feature is enabled via the bit 2. |
123 | 119 | ||
124 | Bits 3 and 4 are for logging the hwptr records. Note that | ||
125 | these will give flood of kernel messages. | ||
126 | |||
127 | When bit 5 is set, the driver logs the last 10 xrun errors and | ||
128 | the proc file shows each jiffies, position, period_size, | ||
129 | buffer_size, old_hw_ptr, and hw_ptr_base values. | ||
130 | |||
131 | When bit 6 is set, the full xrun log is shown only once. | ||
132 | |||
133 | card*/pcm*/sub*/info | 120 | card*/pcm*/sub*/info |
134 | The general information of this PCM sub-stream. | 121 | The general information of this PCM sub-stream. |
135 | 122 | ||
@@ -146,6 +133,10 @@ card*/pcm*/sub*/sw_params | |||
146 | card*/pcm*/sub*/prealloc | 133 | card*/pcm*/sub*/prealloc |
147 | The buffer pre-allocation information. | 134 | The buffer pre-allocation information. |
148 | 135 | ||
136 | card*/pcm*/sub*/xrun_injection | ||
137 | Triggers an XRUN to the running stream when any value is | ||
138 | written to this proc file. Used for fault injection. | ||
139 | This entry is write-only. | ||
149 | 140 | ||
150 | AC97 Codec Information | 141 | AC97 Codec Information |
151 | ---------------------- | 142 | ---------------------- |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 57baff5bdb80..75511efefc64 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -54,8 +54,9 @@ show up in /proc/sys/kernel: | |||
54 | - overflowuid | 54 | - overflowuid |
55 | - panic | 55 | - panic |
56 | - panic_on_oops | 56 | - panic_on_oops |
57 | - panic_on_unrecovered_nmi | ||
58 | - panic_on_stackoverflow | 57 | - panic_on_stackoverflow |
58 | - panic_on_unrecovered_nmi | ||
59 | - panic_on_warn | ||
59 | - pid_max | 60 | - pid_max |
60 | - powersave-nap [ PPC only ] | 61 | - powersave-nap [ PPC only ] |
61 | - printk | 62 | - printk |
@@ -115,10 +116,12 @@ set during run time. | |||
115 | 116 | ||
116 | auto_msgmni: | 117 | auto_msgmni: |
117 | 118 | ||
118 | Enables/Disables automatic recomputing of msgmni upon memory add/remove | 119 | This variable has no effect and may be removed in future kernel |
119 | or upon ipc namespace creation/removal (see the msgmni description | 120 | releases. Reading it always returns 0. |
120 | above). Echoing "1" into this file enables msgmni automatic recomputing. | 121 | Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmni |
121 | Echoing "0" turns it off. auto_msgmni default value is 1. | 122 | upon memory add/remove or upon ipc namespace creation/removal. |
123 | Echoing "1" into this file enabled msgmni automatic recomputing. | ||
124 | Echoing "0" turned it off. auto_msgmni default value was 1. | ||
122 | 125 | ||
123 | 126 | ||
124 | ============================================================== | 127 | ============================================================== |
@@ -527,19 +530,6 @@ the recommended setting is 60. | |||
527 | 530 | ||
528 | ============================================================== | 531 | ============================================================== |
529 | 532 | ||
530 | panic_on_unrecovered_nmi: | ||
531 | |||
532 | The default Linux behaviour on an NMI of either memory or unknown is | ||
533 | to continue operation. For many environments such as scientific | ||
534 | computing it is preferable that the box is taken out and the error | ||
535 | dealt with than an uncorrected parity/ECC error get propagated. | ||
536 | |||
537 | A small number of systems do generate NMI's for bizarre random reasons | ||
538 | such as power management so the default is off. That sysctl works like | ||
539 | the existing panic controls already in that directory. | ||
540 | |||
541 | ============================================================== | ||
542 | |||
543 | panic_on_oops: | 533 | panic_on_oops: |
544 | 534 | ||
545 | Controls the kernel's behaviour when an oops or BUG is encountered. | 535 | Controls the kernel's behaviour when an oops or BUG is encountered. |
@@ -563,6 +553,30 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled. | |||
563 | 553 | ||
564 | ============================================================== | 554 | ============================================================== |
565 | 555 | ||
556 | panic_on_unrecovered_nmi: | ||
557 | |||
558 | The default Linux behaviour on an NMI of either memory or unknown is | ||
559 | to continue operation. For many environments such as scientific | ||
560 | computing it is preferable that the box is taken out and the error | ||
561 | dealt with than an uncorrected parity/ECC error get propagated. | ||
562 | |||
563 | A small number of systems do generate NMI's for bizarre random reasons | ||
564 | such as power management so the default is off. That sysctl works like | ||
565 | the existing panic controls already in that directory. | ||
566 | |||
567 | ============================================================== | ||
568 | |||
569 | panic_on_warn: | ||
570 | |||
571 | Calls panic() in the WARN() path when set to 1. This is useful to avoid | ||
572 | a kernel rebuild when attempting to kdump at the location of a WARN(). | ||
573 | |||
574 | 0: only WARN(), default behaviour. | ||
575 | |||
576 | 1: call panic() after printing out WARN() location. | ||
577 | |||
578 | ============================================================== | ||
579 | |||
566 | perf_cpu_time_max_percent: | 580 | perf_cpu_time_max_percent: |
567 | 581 | ||
568 | Hints to the kernel how much CPU time it should be allowed to | 582 | Hints to the kernel how much CPU time it should be allowed to |
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt index 04892b821157..666594b43cff 100644 --- a/Documentation/sysctl/net.txt +++ b/Documentation/sysctl/net.txt | |||
@@ -120,10 +120,14 @@ seconds. | |||
120 | warnings | 120 | warnings |
121 | -------- | 121 | -------- |
122 | 122 | ||
123 | This controls console messages from the networking stack that can occur because | 123 | This sysctl is now unused. |
124 | of problems on the network like duplicate address or bad checksums. Normally, | 124 | |
125 | this should be enabled, but if the problem persists the messages can be | 125 | This was used to control console messages from the networking stack that |
126 | disabled. | 126 | occur because of problems on the network like duplicate address or bad |
127 | checksums. | ||
128 | |||
129 | These messages are now emitted at KERN_DEBUG and can generally be enabled | ||
130 | and controlled by the dynamic_debug facility. | ||
127 | 131 | ||
128 | netdev_budget | 132 | netdev_budget |
129 | ------------- | 133 | ------------- |
@@ -138,6 +142,28 @@ netdev_max_backlog | |||
138 | Maximum number of packets, queued on the INPUT side, when the interface | 142 | Maximum number of packets, queued on the INPUT side, when the interface |
139 | receives packets faster than kernel can process them. | 143 | receives packets faster than kernel can process them. |
140 | 144 | ||
145 | netdev_rss_key | ||
146 | -------------- | ||
147 | |||
148 | RSS (Receive Side Scaling) enabled drivers use a 40 bytes host key that is | ||
149 | randomly generated. | ||
150 | Some user space might need to gather its content even if drivers do not | ||
151 | provide ethtool -x support yet. | ||
152 | |||
153 | myhost:~# cat /proc/sys/net/core/netdev_rss_key | ||
154 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8: ... (52 bytes total) | ||
155 | |||
156 | File contains nul bytes if no driver ever called netdev_rss_key_fill() function. | ||
157 | Note: | ||
158 | /proc/sys/net/core/netdev_rss_key contains 52 bytes of key, | ||
159 | but most drivers only use 40 bytes of it. | ||
160 | |||
161 | myhost:~# ethtool -x eth0 | ||
162 | RX flow hash indirection table for eth0 with 8 RX ring(s): | ||
163 | 0: 0 1 2 3 4 5 6 7 | ||
164 | RSS hash key: | ||
165 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89 | ||
166 | |||
141 | netdev_tstamp_prequeue | 167 | netdev_tstamp_prequeue |
142 | ---------------------- | 168 | ---------------------- |
143 | 169 | ||
diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt new file mode 100644 index 000000000000..bba7dbfc49ed --- /dev/null +++ b/Documentation/trace/coresight.txt | |||
@@ -0,0 +1,299 @@ | |||
1 | Coresight - HW Assisted Tracing on ARM | ||
2 | ====================================== | ||
3 | |||
4 | Author: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
5 | Date: September 11th, 2014 | ||
6 | |||
7 | Introduction | ||
8 | ------------ | ||
9 | |||
10 | Coresight is an umbrella of technologies allowing for the debugging of ARM | ||
11 | based SoC. It includes solutions for JTAG and HW assisted tracing. This | ||
12 | document is concerned with the latter. | ||
13 | |||
14 | HW assisted tracing is becoming increasingly useful when dealing with systems | ||
15 | that have many SoCs and other components like GPU and DMA engines. ARM has | ||
16 | developed a HW assisted tracing solution by means of different components, each | ||
17 | being added to a design at systhesis time to cater to specific tracing needs. | ||
18 | Compoments are generally categorised as source, link and sinks and are | ||
19 | (usually) discovered using the AMBA bus. | ||
20 | |||
21 | "Sources" generate a compressed stream representing the processor instruction | ||
22 | path based on tracing scenarios as configured by users. From there the stream | ||
23 | flows through the coresight system (via ATB bus) using links that are connecting | ||
24 | the emanating source to a sink(s). Sinks serve as endpoints to the coresight | ||
25 | implementation, either storing the compressed stream in a memory buffer or | ||
26 | creating an interface to the outside world where data can be transferred to a | ||
27 | host without fear of filling up the onboard coresight memory buffer. | ||
28 | |||
29 | At typical coresight system would look like this: | ||
30 | |||
31 | ***************************************************************** | ||
32 | **************************** AMBA AXI ****************************===|| | ||
33 | ***************************************************************** || | ||
34 | ^ ^ | || | ||
35 | | | * ** | ||
36 | 0000000 ::::: 0000000 ::::: ::::: @@@@@@@ |||||||||||| | ||
37 | 0 CPU 0<-->: C : 0 CPU 0<-->: C : : C : @ STM @ || System || | ||
38 | |->0000000 : T : |->0000000 : T : : T :<--->@@@@@ || Memory || | ||
39 | | #######<-->: I : | #######<-->: I : : I : @@@<-| |||||||||||| | ||
40 | | # ETM # ::::: | # PTM # ::::: ::::: @ | | ||
41 | | ##### ^ ^ | ##### ^ ! ^ ! . | ||||||||| | ||
42 | | |->### | ! | |->### | ! | ! . | || DAP || | ||
43 | | | # | ! | | # | ! | ! . | ||||||||| | ||
44 | | | . | ! | | . | ! | ! . | | | | ||
45 | | | . | ! | | . | ! | ! . | | * | ||
46 | | | . | ! | | . | ! | ! . | | SWD/ | ||
47 | | | . | ! | | . | ! | ! . | | JTAG | ||
48 | *****************************************************************<-| | ||
49 | *************************** AMBA Debug ABP ************************ | ||
50 | ***************************************************************** | ||
51 | | . ! . ! ! . | | ||
52 | | . * . * * . | | ||
53 | ***************************************************************** | ||
54 | ******************** Cross Trigger Matrix (CTM) ******************* | ||
55 | ***************************************************************** | ||
56 | | . ^ . . | | ||
57 | | * ! * * | | ||
58 | ***************************************************************** | ||
59 | ****************** AMBA Advanced Trace Bus (ATB) ****************** | ||
60 | ***************************************************************** | ||
61 | | ! =============== | | ||
62 | | * ===== F =====<---------| | ||
63 | | ::::::::: ==== U ==== | ||
64 | |-->:: CTI ::<!! === N === | ||
65 | | ::::::::: ! == N == | ||
66 | | ^ * == E == | ||
67 | | ! &&&&&&&&& IIIIIII == L == | ||
68 | |------>&& ETB &&<......II I ======= | ||
69 | | ! &&&&&&&&& II I . | ||
70 | | ! I I . | ||
71 | | ! I REP I<.......... | ||
72 | | ! I I | ||
73 | | !!>&&&&&&&&& II I *Source: ARM ltd. | ||
74 | |------>& TPIU &<......II I DAP = Debug Access Port | ||
75 | &&&&&&&&& IIIIIII ETM = Embedded Trace Macrocell | ||
76 | ; PTM = Program Trace Macrocell | ||
77 | ; CTI = Cross Trigger Interface | ||
78 | * ETB = Embedded Trace Buffer | ||
79 | To trace port TPIU= Trace Port Interface Unit | ||
80 | SWD = Serial Wire Debug | ||
81 | |||
82 | While on target configuration of the components is done via the ABP bus, | ||
83 | all trace data are carried out-of-band on the ATB bus. The CTM provides | ||
84 | a way to aggregate and distribute signals between CoreSight components. | ||
85 | |||
86 | The coresight framework provides a central point to represent, configure and | ||
87 | manage coresight devices on a platform. This first implementation centers on | ||
88 | the basic tracing functionality, enabling components such ETM/PTM, funnel, | ||
89 | replicator, TMC, TPIU and ETB. Future work will enable more | ||
90 | intricate IP blocks such as STM and CTI. | ||
91 | |||
92 | |||
93 | Acronyms and Classification | ||
94 | --------------------------- | ||
95 | |||
96 | Acronyms: | ||
97 | |||
98 | PTM: Program Trace Macrocell | ||
99 | ETM: Embedded Trace Macrocell | ||
100 | STM: System trace Macrocell | ||
101 | ETB: Embedded Trace Buffer | ||
102 | ITM: Instrumentation Trace Macrocell | ||
103 | TPIU: Trace Port Interface Unit | ||
104 | TMC-ETR: Trace Memory Controller, configured as Embedded Trace Router | ||
105 | TMC-ETF: Trace Memory Controller, configured as Embedded Trace FIFO | ||
106 | CTI: Cross Trigger Interface | ||
107 | |||
108 | Classification: | ||
109 | |||
110 | Source: | ||
111 | ETMv3.x ETMv4, PTMv1.0, PTMv1.1, STM, STM500, ITM | ||
112 | Link: | ||
113 | Funnel, replicator (intelligent or not), TMC-ETR | ||
114 | Sinks: | ||
115 | ETBv1.0, ETB1.1, TPIU, TMC-ETF | ||
116 | Misc: | ||
117 | CTI | ||
118 | |||
119 | |||
120 | Device Tree Bindings | ||
121 | ---------------------- | ||
122 | |||
123 | See Documentation/devicetree/bindings/arm/coresight.txt for details. | ||
124 | |||
125 | As of this writing drivers for ITM, STMs and CTIs are not provided but are | ||
126 | expected to be added as the solution matures. | ||
127 | |||
128 | |||
129 | Framework and implementation | ||
130 | ---------------------------- | ||
131 | |||
132 | The coresight framework provides a central point to represent, configure and | ||
133 | manage coresight devices on a platform. Any coresight compliant device can | ||
134 | register with the framework for as long as they use the right APIs: | ||
135 | |||
136 | struct coresight_device *coresight_register(struct coresight_desc *desc); | ||
137 | void coresight_unregister(struct coresight_device *csdev); | ||
138 | |||
139 | The registering function is taking a "struct coresight_device *csdev" and | ||
140 | register the device with the core framework. The unregister function takes | ||
141 | a reference to a "strut coresight_device", obtained at registration time. | ||
142 | |||
143 | If everything goes well during the registration process the new devices will | ||
144 | show up under /sys/bus/coresight/devices, as showns here for a TC2 platform: | ||
145 | |||
146 | root:~# ls /sys/bus/coresight/devices/ | ||
147 | replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm | ||
148 | 20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm | ||
149 | root:~# | ||
150 | |||
151 | The functions take a "struct coresight_device", which looks like this: | ||
152 | |||
153 | struct coresight_desc { | ||
154 | enum coresight_dev_type type; | ||
155 | struct coresight_dev_subtype subtype; | ||
156 | const struct coresight_ops *ops; | ||
157 | struct coresight_platform_data *pdata; | ||
158 | struct device *dev; | ||
159 | const struct attribute_group **groups; | ||
160 | }; | ||
161 | |||
162 | |||
163 | The "coresight_dev_type" identifies what the device is, i.e, source link or | ||
164 | sink while the "coresight_dev_subtype" will characterise that type further. | ||
165 | |||
166 | The "struct coresight_ops" is mandatory and will tell the framework how to | ||
167 | perform base operations related to the components, each component having | ||
168 | a different set of requirement. For that "struct coresight_ops_sink", | ||
169 | "struct coresight_ops_link" and "struct coresight_ops_source" have been | ||
170 | provided. | ||
171 | |||
172 | The next field, "struct coresight_platform_data *pdata" is acquired by calling | ||
173 | "of_get_coresight_platform_data()", as part of the driver's _probe routine and | ||
174 | "struct device *dev" gets the device reference embedded in the "amba_device": | ||
175 | |||
176 | static int etm_probe(struct amba_device *adev, const struct amba_id *id) | ||
177 | { | ||
178 | ... | ||
179 | ... | ||
180 | drvdata->dev = &adev->dev; | ||
181 | ... | ||
182 | } | ||
183 | |||
184 | Specific class of device (source, link, or sink) have generic operations | ||
185 | that can be performed on them (see "struct coresight_ops"). The | ||
186 | "**groups" is a list of sysfs entries pertaining to operations | ||
187 | specific to that component only. "Implementation defined" customisations are | ||
188 | expected to be accessed and controlled using those entries. | ||
189 | |||
190 | Last but not least, "struct module *owner" is expected to be set to reflect | ||
191 | the information carried in "THIS_MODULE". | ||
192 | |||
193 | How to use | ||
194 | ---------- | ||
195 | |||
196 | Before trace collection can start, a coresight sink needs to be identify. | ||
197 | There is no limit on the amount of sinks (nor sources) that can be enabled at | ||
198 | any given moment. As a generic operation, all device pertaining to the sink | ||
199 | class will have an "active" entry in sysfs: | ||
200 | |||
201 | root:/sys/bus/coresight/devices# ls | ||
202 | replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm | ||
203 | 20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm | ||
204 | root:/sys/bus/coresight/devices# ls 20010000.etb | ||
205 | enable_sink status trigger_cntr | ||
206 | root:/sys/bus/coresight/devices# echo 1 > 20010000.etb/enable_sink | ||
207 | root:/sys/bus/coresight/devices# cat 20010000.etb/enable_sink | ||
208 | 1 | ||
209 | root:/sys/bus/coresight/devices# | ||
210 | |||
211 | At boot time the current etm3x driver will configure the first address | ||
212 | comparator with "_stext" and "_etext", essentially tracing any instruction | ||
213 | that falls within that range. As such "enabling" a source will immediately | ||
214 | trigger a trace capture: | ||
215 | |||
216 | root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source | ||
217 | root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source | ||
218 | 1 | ||
219 | root:/sys/bus/coresight/devices# cat 20010000.etb/status | ||
220 | Depth: 0x2000 | ||
221 | Status: 0x1 | ||
222 | RAM read ptr: 0x0 | ||
223 | RAM wrt ptr: 0x19d3 <----- The write pointer is moving | ||
224 | Trigger cnt: 0x0 | ||
225 | Control: 0x1 | ||
226 | Flush status: 0x0 | ||
227 | Flush ctrl: 0x2001 | ||
228 | root:/sys/bus/coresight/devices# | ||
229 | |||
230 | Trace collection is stopped the same way: | ||
231 | |||
232 | root:/sys/bus/coresight/devices# echo 0 > 2201c000.ptm/enable_source | ||
233 | root:/sys/bus/coresight/devices# | ||
234 | |||
235 | The content of the ETB buffer can be harvested directly from /dev: | ||
236 | |||
237 | root:/sys/bus/coresight/devices# dd if=/dev/20010000.etb \ | ||
238 | of=~/cstrace.bin | ||
239 | |||
240 | 64+0 records in | ||
241 | 64+0 records out | ||
242 | 32768 bytes (33 kB) copied, 0.00125258 s, 26.2 MB/s | ||
243 | root:/sys/bus/coresight/devices# | ||
244 | |||
245 | The file cstrace.bin can be decompressed using "ptm2human", DS-5 or Trace32. | ||
246 | |||
247 | Following is a DS-5 output of an experimental loop that increments a variable up | ||
248 | to a certain value. The example is simple and yet provides a glimpse of the | ||
249 | wealth of possibilities that coresight provides. | ||
250 | |||
251 | Info Tracing enabled | ||
252 | Instruction 106378866 0x8026B53C E52DE004 false PUSH {lr} | ||
253 | Instruction 0 0x8026B540 E24DD00C false SUB sp,sp,#0xc | ||
254 | Instruction 0 0x8026B544 E3A03000 false MOV r3,#0 | ||
255 | Instruction 0 0x8026B548 E58D3004 false STR r3,[sp,#4] | ||
256 | Instruction 0 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
257 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
258 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
259 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
260 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
261 | Timestamp Timestamp: 17106715833 | ||
262 | Instruction 319 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
263 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
264 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
265 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
266 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
267 | Instruction 9 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
268 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
269 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
270 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
271 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
272 | Instruction 7 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
273 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
274 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
275 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
276 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
277 | Instruction 7 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
278 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
279 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
280 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
281 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
282 | Instruction 10 0x8026B54C E59D3004 false LDR r3,[sp,#4] | ||
283 | Instruction 0 0x8026B550 E3530004 false CMP r3,#4 | ||
284 | Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1 | ||
285 | Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4] | ||
286 | Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c | ||
287 | Instruction 6 0x8026B560 EE1D3F30 false MRC p15,#0x0,r3,c13,c0,#1 | ||
288 | Instruction 0 0x8026B564 E1A0100D false MOV r1,sp | ||
289 | Instruction 0 0x8026B568 E3C12D7F false BIC r2,r1,#0x1fc0 | ||
290 | Instruction 0 0x8026B56C E3C2203F false BIC r2,r2,#0x3f | ||
291 | Instruction 0 0x8026B570 E59D1004 false LDR r1,[sp,#4] | ||
292 | Instruction 0 0x8026B574 E59F0010 false LDR r0,[pc,#16] ; [0x8026B58C] = 0x80550368 | ||
293 | Instruction 0 0x8026B578 E592200C false LDR r2,[r2,#0xc] | ||
294 | Instruction 0 0x8026B57C E59221D0 false LDR r2,[r2,#0x1d0] | ||
295 | Instruction 0 0x8026B580 EB07A4CF true BL {pc}+0x1e9344 ; 0x804548c4 | ||
296 | Info Tracing enabled | ||
297 | Instruction 13570831 0x8026B584 E28DD00C false ADD sp,sp,#0xc | ||
298 | Instruction 0 0x8026B588 E8BD8000 true LDM sp!,{pc} | ||
299 | Timestamp Timestamp: 17107041535 | ||
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 4da42616939f..8408e040f06f 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -234,6 +234,11 @@ of ftrace. Here is a list of some of the key files: | |||
234 | will be displayed on the same line as the function that | 234 | will be displayed on the same line as the function that |
235 | is returning registers. | 235 | is returning registers. |
236 | 236 | ||
237 | If the callback registered to be traced by a function with | ||
238 | the "ip modify" attribute (thus the regs->ip can be changed), | ||
239 | an 'I' will be displayed on the same line as the function that | ||
240 | can be overridden. | ||
241 | |||
237 | function_profile_enabled: | 242 | function_profile_enabled: |
238 | 243 | ||
239 | When set it will enable all functions with either the function | 244 | When set it will enable all functions with either the function |
@@ -680,9 +685,11 @@ The above is mostly meaningful for kernel developers. | |||
680 | needs to be fixed to be only relative to the same CPU. | 685 | needs to be fixed to be only relative to the same CPU. |
681 | The marks are determined by the difference between this | 686 | The marks are determined by the difference between this |
682 | current trace and the next trace. | 687 | current trace and the next trace. |
683 | '!' - greater than preempt_mark_thresh (default 100) | 688 | '$' - greater than 1 second |
684 | '+' - greater than 1 microsecond | 689 | '#' - greater than 1000 microsecond |
685 | ' ' - less than or equal to 1 microsecond. | 690 | '!' - greater than 100 microsecond |
691 | '+' - greater than 10 microsecond | ||
692 | ' ' - less than or equal to 10 microsecond. | ||
686 | 693 | ||
687 | The rest is the same as the 'trace' file. | 694 | The rest is the same as the 'trace' file. |
688 | 695 | ||
@@ -1951,6 +1958,8 @@ want, depending on your needs. | |||
1951 | 1958 | ||
1952 | + means that the function exceeded 10 usecs. | 1959 | + means that the function exceeded 10 usecs. |
1953 | ! means that the function exceeded 100 usecs. | 1960 | ! means that the function exceeded 100 usecs. |
1961 | # means that the function exceeded 1000 usecs. | ||
1962 | $ means that the function exceeded 1 sec. | ||
1954 | 1963 | ||
1955 | 1964 | ||
1956 | - The task/pid field displays the thread cmdline and pid which | 1965 | - The task/pid field displays the thread cmdline and pid which |
diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt index 4cf53e406613..635e57493709 100644 --- a/Documentation/usb/gadget_configfs.txt +++ b/Documentation/usb/gadget_configfs.txt | |||
@@ -376,7 +376,7 @@ functions and binds them. This way the whole gadget is bound. | |||
376 | configured, so config_groups for particular functions are defined | 376 | configured, so config_groups for particular functions are defined |
377 | in the functions implementation files drivers/usb/gadget/f_*.c. | 377 | in the functions implementation files drivers/usb/gadget/f_*.c. |
378 | 378 | ||
379 | 5. Funciton's code is written in such a way that it uses | 379 | 5. Function's code is written in such a way that it uses |
380 | 380 | ||
381 | usb_get_function_instance(), which, in turn, calls request_module. | 381 | usb_get_function_instance(), which, in turn, calls request_module. |
382 | So, provided that modprobe works, modules for particular functions | 382 | So, provided that modprobe works, modules for particular functions |
diff --git a/Documentation/usb/gadget_hid.txt b/Documentation/usb/gadget_hid.txt index 12696c2e43fb..7a0fb8e16e27 100644 --- a/Documentation/usb/gadget_hid.txt +++ b/Documentation/usb/gadget_hid.txt | |||
@@ -74,6 +74,13 @@ static struct platform_device my_hid = { | |||
74 | You can add as many HID functions as you want, only limited by | 74 | You can add as many HID functions as you want, only limited by |
75 | the amount of interrupt endpoints your gadget driver supports. | 75 | the amount of interrupt endpoints your gadget driver supports. |
76 | 76 | ||
77 | Configuration with configfs | ||
78 | |||
79 | Instead of adding fake platform devices and drivers in order to pass | ||
80 | some data to the kernel, if HID is a part of a gadget composed with | ||
81 | configfs the hidg_func_descriptor.report_desc is passed to the kernel | ||
82 | by writing the appropriate stream of bytes to a configfs attribute. | ||
83 | |||
77 | Send and receive HID reports | 84 | Send and receive HID reports |
78 | 85 | ||
79 | HID reports can be sent/received using read/write on the | 86 | HID reports can be sent/received using read/write on the |
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index 7b90fe034c4b..b5f83911732a 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -47,14 +47,15 @@ dynamic PM is implemented in the USB subsystem, although system PM is | |||
47 | covered to some extent (see Documentation/power/*.txt for more | 47 | covered to some extent (see Documentation/power/*.txt for more |
48 | information about system PM). | 48 | information about system PM). |
49 | 49 | ||
50 | Note: Dynamic PM support for USB is present only if the kernel was | 50 | System PM support is present only if the kernel was built with CONFIG_SUSPEND |
51 | built with CONFIG_USB_SUSPEND enabled (which depends on | 51 | or CONFIG_HIBERNATION enabled. Dynamic PM support for USB is present whenever |
52 | CONFIG_PM_RUNTIME). System PM support is present only if the kernel | 52 | the kernel was built with CONFIG_PM enabled. |
53 | was built with CONFIG_SUSPEND or CONFIG_HIBERNATION enabled. | 53 | |
54 | 54 | [Historically, dynamic PM support for USB was present only if the | |
55 | (Starting with the 3.10 kernel release, dynamic PM support for USB is | 55 | kernel had been built with CONFIG_USB_SUSPEND enabled (which depended on |
56 | present whenever the kernel was built with CONFIG_PM_RUNTIME enabled. | 56 | CONFIG_PM_RUNTIME). Starting with the 3.10 kernel release, dynamic PM support |
57 | The CONFIG_USB_SUSPEND option has been eliminated.) | 57 | for USB was present whenever the kernel was built with CONFIG_PM_RUNTIME |
58 | enabled. The CONFIG_USB_SUSPEND option had been eliminated.] | ||
58 | 59 | ||
59 | 60 | ||
60 | What is Remote Wakeup? | 61 | What is Remote Wakeup? |
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 5bd7926185e8..947fa62bccf2 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt | |||
@@ -145,7 +145,7 @@ Keyspan PDA Serial Adapter | |||
145 | Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly | 145 | Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly |
146 | sold in Macintosh catalogs, comes in a translucent white/green dongle). | 146 | sold in Macintosh catalogs, comes in a translucent white/green dongle). |
147 | Fairly simple device. Firmware is homebrew. | 147 | Fairly simple device. Firmware is homebrew. |
148 | This driver also works for the Xircom/Entrgra single port serial adapter. | 148 | This driver also works for the Xircom/Entrega single port serial adapter. |
149 | 149 | ||
150 | Current status: | 150 | Current status: |
151 | Things that work: | 151 | Things that work: |
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index a74eeccfe700..4c84ec853265 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -43,3 +43,5 @@ | |||
43 | 42 -> Leadtek Winfast PxPVR2200 [107d:6f21] | 43 | 42 -> Leadtek Winfast PxPVR2200 [107d:6f21] |
44 | 43 -> Hauppauge ImpactVCB-e [0070:7133] | 44 | 43 -> Hauppauge ImpactVCB-e [0070:7133] |
45 | 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98] | 45 | 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98] |
46 | 45 -> DVBSky T9580 [4254:9580] | ||
47 | 46 -> DVBSky T980C [4254:980c] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index bc3351bb48b4..3700edb81db2 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -93,3 +93,4 @@ | |||
93 | 92 -> PCTV DVB-S2 Stick (461e) (em28178) | 93 | 92 -> PCTV DVB-S2 Stick (461e) (em28178) |
94 | 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] | 94 | 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] |
95 | 94 -> PCTV tripleStick (292e) (em28178) | 95 | 94 -> PCTV tripleStick (292e) (em28178) |
96 | 95 -> Leadtek VC100 (em2861) [0413:6f07] | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 8df17d063499..a93d86455233 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -191,3 +191,4 @@ | |||
191 | 190 -> Asus My Cinema PS3-100 [1043:48cd] | 191 | 190 -> Asus My Cinema PS3-100 [1043:48cd] |
192 | 191 -> Hawell HW-9004V1 | 192 | 191 -> Hawell HW-9004V1 |
193 | 192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] | 193 | 192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] |
194 | 193 -> WIS Voyager or compatible [1905:7007] | ||
diff --git a/Documentation/video4linux/soc-camera.txt b/Documentation/video4linux/soc-camera.txt index daa9e2ac162c..84f41cf1f3e8 100644 --- a/Documentation/video4linux/soc-camera.txt +++ b/Documentation/video4linux/soc-camera.txt | |||
@@ -151,7 +151,7 @@ they are transferred over a media bus. Soc-camera provides support to | |||
151 | conveniently manage these formats. A table of standard transformations is | 151 | conveniently manage these formats. A table of standard transformations is |
152 | maintained by soc-camera core, which describes, what FOURCC pixel format will | 152 | maintained by soc-camera core, which describes, what FOURCC pixel format will |
153 | be obtained, if a media-bus pixel format is stored in memory according to | 153 | be obtained, if a media-bus pixel format is stored in memory according to |
154 | certain rules. E.g. if V4L2_MBUS_FMT_YUYV8_2X8 data is sampled with 8 bits per | 154 | certain rules. E.g. if MEDIA_BUS_FMT_YUYV8_2X8 data is sampled with 8 bits per |
155 | sample and stored in memory in the little-endian order with no gaps between | 155 | sample and stored in memory in the little-endian order with no gaps between |
156 | bytes, data in memory will represent the V4L2_PIX_FMT_YUYV FOURCC format. These | 156 | bytes, data in memory will represent the V4L2_PIX_FMT_YUYV FOURCC format. These |
157 | standard transformations will be used by soc-camera or by camera host drivers to | 157 | standard transformations will be used by soc-camera or by camera host drivers to |
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt index e5a940e3d304..6cfc8541a362 100644 --- a/Documentation/video4linux/vivid.txt +++ b/Documentation/video4linux/vivid.txt | |||
@@ -640,6 +640,21 @@ Colorspace: selects which colorspace should be used when generating the image. | |||
640 | Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE | 640 | Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE |
641 | to be sent since it emulates a detected colorspace change. | 641 | to be sent since it emulates a detected colorspace change. |
642 | 642 | ||
643 | Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating | ||
644 | a Y'CbCr image. This only applies if the CSC Colorbar test pattern is | ||
645 | selected, and if the format is set to a Y'CbCr format as opposed to an | ||
646 | RGB format. | ||
647 | |||
648 | Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE | ||
649 | to be sent since it emulates a detected colorspace change. | ||
650 | |||
651 | Quantization: selects which quantization should be used for the RGB or Y'CbCr | ||
652 | encoding when generating the test pattern. This only applies if the CSC | ||
653 | Colorbar test pattern is selected. | ||
654 | |||
655 | Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE | ||
656 | to be sent since it emulates a detected colorspace change. | ||
657 | |||
643 | Limited RGB Range (16-235): selects if the RGB range of the HDMI source should | 658 | Limited RGB Range (16-235): selects if the RGB range of the HDMI source should |
644 | be limited or full range. This combines with the Digital Video 'Rx RGB | 659 | be limited or full range. This combines with the Digital Video 'Rx RGB |
645 | Quantization Range' control and can be used to test what happens if | 660 | Quantization Range' control and can be used to test what happens if |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 7610eaa4d491..0007fef4ed81 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -68,9 +68,12 @@ description: | |||
68 | 68 | ||
69 | Capability: which KVM extension provides this ioctl. Can be 'basic', | 69 | Capability: which KVM extension provides this ioctl. Can be 'basic', |
70 | which means that is will be provided by any kernel that supports | 70 | which means that is will be provided by any kernel that supports |
71 | API version 12 (see section 4.1), or a KVM_CAP_xyz constant, which | 71 | API version 12 (see section 4.1), a KVM_CAP_xyz constant, which |
72 | means availability needs to be checked with KVM_CHECK_EXTENSION | 72 | means availability needs to be checked with KVM_CHECK_EXTENSION |
73 | (see section 4.4). | 73 | (see section 4.4), or 'none' which means that while not all kernels |
74 | support this ioctl, there's no capability bit to check its | ||
75 | availability: for kernels that don't support the ioctl, | ||
76 | the ioctl returns -ENOTTY. | ||
74 | 77 | ||
75 | Architectures: which instruction set architectures provide this ioctl. | 78 | Architectures: which instruction set architectures provide this ioctl. |
76 | x86 includes both i386 and x86_64. | 79 | x86 includes both i386 and x86_64. |
@@ -604,7 +607,7 @@ struct kvm_fpu { | |||
604 | 4.24 KVM_CREATE_IRQCHIP | 607 | 4.24 KVM_CREATE_IRQCHIP |
605 | 608 | ||
606 | Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390) | 609 | Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390) |
607 | Architectures: x86, ia64, ARM, arm64, s390 | 610 | Architectures: x86, ARM, arm64, s390 |
608 | Type: vm ioctl | 611 | Type: vm ioctl |
609 | Parameters: none | 612 | Parameters: none |
610 | Returns: 0 on success, -1 on error | 613 | Returns: 0 on success, -1 on error |
@@ -612,7 +615,7 @@ Returns: 0 on success, -1 on error | |||
612 | Creates an interrupt controller model in the kernel. On x86, creates a virtual | 615 | Creates an interrupt controller model in the kernel. On x86, creates a virtual |
613 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | 616 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a |
614 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 617 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
615 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is | 618 | only go to the IOAPIC. On ARM/arm64, a GIC is |
616 | created. On s390, a dummy irq routing table is created. | 619 | created. On s390, a dummy irq routing table is created. |
617 | 620 | ||
618 | Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled | 621 | Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled |
@@ -622,7 +625,7 @@ before KVM_CREATE_IRQCHIP can be used. | |||
622 | 4.25 KVM_IRQ_LINE | 625 | 4.25 KVM_IRQ_LINE |
623 | 626 | ||
624 | Capability: KVM_CAP_IRQCHIP | 627 | Capability: KVM_CAP_IRQCHIP |
625 | Architectures: x86, ia64, arm, arm64 | 628 | Architectures: x86, arm, arm64 |
626 | Type: vm ioctl | 629 | Type: vm ioctl |
627 | Parameters: struct kvm_irq_level | 630 | Parameters: struct kvm_irq_level |
628 | Returns: 0 on success, -1 on error | 631 | Returns: 0 on success, -1 on error |
@@ -676,7 +679,7 @@ struct kvm_irq_level { | |||
676 | 4.26 KVM_GET_IRQCHIP | 679 | 4.26 KVM_GET_IRQCHIP |
677 | 680 | ||
678 | Capability: KVM_CAP_IRQCHIP | 681 | Capability: KVM_CAP_IRQCHIP |
679 | Architectures: x86, ia64 | 682 | Architectures: x86 |
680 | Type: vm ioctl | 683 | Type: vm ioctl |
681 | Parameters: struct kvm_irqchip (in/out) | 684 | Parameters: struct kvm_irqchip (in/out) |
682 | Returns: 0 on success, -1 on error | 685 | Returns: 0 on success, -1 on error |
@@ -698,7 +701,7 @@ struct kvm_irqchip { | |||
698 | 4.27 KVM_SET_IRQCHIP | 701 | 4.27 KVM_SET_IRQCHIP |
699 | 702 | ||
700 | Capability: KVM_CAP_IRQCHIP | 703 | Capability: KVM_CAP_IRQCHIP |
701 | Architectures: x86, ia64 | 704 | Architectures: x86 |
702 | Type: vm ioctl | 705 | Type: vm ioctl |
703 | Parameters: struct kvm_irqchip (in) | 706 | Parameters: struct kvm_irqchip (in) |
704 | Returns: 0 on success, -1 on error | 707 | Returns: 0 on success, -1 on error |
@@ -991,7 +994,7 @@ for vm-wide capabilities. | |||
991 | 4.38 KVM_GET_MP_STATE | 994 | 4.38 KVM_GET_MP_STATE |
992 | 995 | ||
993 | Capability: KVM_CAP_MP_STATE | 996 | Capability: KVM_CAP_MP_STATE |
994 | Architectures: x86, ia64, s390 | 997 | Architectures: x86, s390 |
995 | Type: vcpu ioctl | 998 | Type: vcpu ioctl |
996 | Parameters: struct kvm_mp_state (out) | 999 | Parameters: struct kvm_mp_state (out) |
997 | Returns: 0 on success; -1 on error | 1000 | Returns: 0 on success; -1 on error |
@@ -1005,16 +1008,15 @@ uniprocessor guests). | |||
1005 | 1008 | ||
1006 | Possible values are: | 1009 | Possible values are: |
1007 | 1010 | ||
1008 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64] | 1011 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86] |
1009 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) | 1012 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) |
1010 | which has not yet received an INIT signal [x86, | 1013 | which has not yet received an INIT signal [x86] |
1011 | ia64] | ||
1012 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is | 1014 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is |
1013 | now ready for a SIPI [x86, ia64] | 1015 | now ready for a SIPI [x86] |
1014 | - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and | 1016 | - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and |
1015 | is waiting for an interrupt [x86, ia64] | 1017 | is waiting for an interrupt [x86] |
1016 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector | 1018 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector |
1017 | accessible via KVM_GET_VCPU_EVENTS) [x86, ia64] | 1019 | accessible via KVM_GET_VCPU_EVENTS) [x86] |
1018 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] | 1020 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] |
1019 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] | 1021 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] |
1020 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) | 1022 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) |
@@ -1022,7 +1024,7 @@ Possible values are: | |||
1022 | - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state | 1024 | - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state |
1023 | [s390] | 1025 | [s390] |
1024 | 1026 | ||
1025 | On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | 1027 | On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an |
1026 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1028 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1027 | these architectures. | 1029 | these architectures. |
1028 | 1030 | ||
@@ -1030,7 +1032,7 @@ these architectures. | |||
1030 | 4.39 KVM_SET_MP_STATE | 1032 | 4.39 KVM_SET_MP_STATE |
1031 | 1033 | ||
1032 | Capability: KVM_CAP_MP_STATE | 1034 | Capability: KVM_CAP_MP_STATE |
1033 | Architectures: x86, ia64, s390 | 1035 | Architectures: x86, s390 |
1034 | Type: vcpu ioctl | 1036 | Type: vcpu ioctl |
1035 | Parameters: struct kvm_mp_state (in) | 1037 | Parameters: struct kvm_mp_state (in) |
1036 | Returns: 0 on success; -1 on error | 1038 | Returns: 0 on success; -1 on error |
@@ -1038,7 +1040,7 @@ Returns: 0 on success; -1 on error | |||
1038 | Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for | 1040 | Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for |
1039 | arguments. | 1041 | arguments. |
1040 | 1042 | ||
1041 | On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | 1043 | On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an |
1042 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1044 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1043 | these architectures. | 1045 | these architectures. |
1044 | 1046 | ||
@@ -1065,7 +1067,7 @@ documentation when it pops into existence). | |||
1065 | 4.41 KVM_SET_BOOT_CPU_ID | 1067 | 4.41 KVM_SET_BOOT_CPU_ID |
1066 | 1068 | ||
1067 | Capability: KVM_CAP_SET_BOOT_CPU_ID | 1069 | Capability: KVM_CAP_SET_BOOT_CPU_ID |
1068 | Architectures: x86, ia64 | 1070 | Architectures: x86 |
1069 | Type: vm ioctl | 1071 | Type: vm ioctl |
1070 | Parameters: unsigned long vcpu_id | 1072 | Parameters: unsigned long vcpu_id |
1071 | Returns: 0 on success, -1 on error | 1073 | Returns: 0 on success, -1 on error |
@@ -1257,8 +1259,8 @@ The flags bitmap is defined as: | |||
1257 | 1259 | ||
1258 | 4.48 KVM_ASSIGN_PCI_DEVICE | 1260 | 4.48 KVM_ASSIGN_PCI_DEVICE |
1259 | 1261 | ||
1260 | Capability: KVM_CAP_DEVICE_ASSIGNMENT | 1262 | Capability: none |
1261 | Architectures: x86 ia64 | 1263 | Architectures: x86 |
1262 | Type: vm ioctl | 1264 | Type: vm ioctl |
1263 | Parameters: struct kvm_assigned_pci_dev (in) | 1265 | Parameters: struct kvm_assigned_pci_dev (in) |
1264 | Returns: 0 on success, -1 on error | 1266 | Returns: 0 on success, -1 on error |
@@ -1298,25 +1300,36 @@ Only PCI header type 0 devices with PCI BAR resources are supported by | |||
1298 | device assignment. The user requesting this ioctl must have read/write | 1300 | device assignment. The user requesting this ioctl must have read/write |
1299 | access to the PCI sysfs resource files associated with the device. | 1301 | access to the PCI sysfs resource files associated with the device. |
1300 | 1302 | ||
1303 | Errors: | ||
1304 | ENOTTY: kernel does not support this ioctl | ||
1305 | |||
1306 | Other error conditions may be defined by individual device types or | ||
1307 | have their standard meanings. | ||
1308 | |||
1301 | 1309 | ||
1302 | 4.49 KVM_DEASSIGN_PCI_DEVICE | 1310 | 4.49 KVM_DEASSIGN_PCI_DEVICE |
1303 | 1311 | ||
1304 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT | 1312 | Capability: none |
1305 | Architectures: x86 ia64 | 1313 | Architectures: x86 |
1306 | Type: vm ioctl | 1314 | Type: vm ioctl |
1307 | Parameters: struct kvm_assigned_pci_dev (in) | 1315 | Parameters: struct kvm_assigned_pci_dev (in) |
1308 | Returns: 0 on success, -1 on error | 1316 | Returns: 0 on success, -1 on error |
1309 | 1317 | ||
1310 | Ends PCI device assignment, releasing all associated resources. | 1318 | Ends PCI device assignment, releasing all associated resources. |
1311 | 1319 | ||
1312 | See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is | 1320 | See KVM_ASSIGN_PCI_DEVICE for the data structure. Only assigned_dev_id is |
1313 | used in kvm_assigned_pci_dev to identify the device. | 1321 | used in kvm_assigned_pci_dev to identify the device. |
1314 | 1322 | ||
1323 | Errors: | ||
1324 | ENOTTY: kernel does not support this ioctl | ||
1325 | |||
1326 | Other error conditions may be defined by individual device types or | ||
1327 | have their standard meanings. | ||
1315 | 1328 | ||
1316 | 4.50 KVM_ASSIGN_DEV_IRQ | 1329 | 4.50 KVM_ASSIGN_DEV_IRQ |
1317 | 1330 | ||
1318 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | 1331 | Capability: KVM_CAP_ASSIGN_DEV_IRQ |
1319 | Architectures: x86 ia64 | 1332 | Architectures: x86 |
1320 | Type: vm ioctl | 1333 | Type: vm ioctl |
1321 | Parameters: struct kvm_assigned_irq (in) | 1334 | Parameters: struct kvm_assigned_irq (in) |
1322 | Returns: 0 on success, -1 on error | 1335 | Returns: 0 on success, -1 on error |
@@ -1346,11 +1359,17 @@ The following flags are defined: | |||
1346 | It is not valid to specify multiple types per host or guest IRQ. However, the | 1359 | It is not valid to specify multiple types per host or guest IRQ. However, the |
1347 | IRQ type of host and guest can differ or can even be null. | 1360 | IRQ type of host and guest can differ or can even be null. |
1348 | 1361 | ||
1362 | Errors: | ||
1363 | ENOTTY: kernel does not support this ioctl | ||
1364 | |||
1365 | Other error conditions may be defined by individual device types or | ||
1366 | have their standard meanings. | ||
1367 | |||
1349 | 1368 | ||
1350 | 4.51 KVM_DEASSIGN_DEV_IRQ | 1369 | 4.51 KVM_DEASSIGN_DEV_IRQ |
1351 | 1370 | ||
1352 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | 1371 | Capability: KVM_CAP_ASSIGN_DEV_IRQ |
1353 | Architectures: x86 ia64 | 1372 | Architectures: x86 |
1354 | Type: vm ioctl | 1373 | Type: vm ioctl |
1355 | Parameters: struct kvm_assigned_irq (in) | 1374 | Parameters: struct kvm_assigned_irq (in) |
1356 | Returns: 0 on success, -1 on error | 1375 | Returns: 0 on success, -1 on error |
@@ -1365,7 +1384,7 @@ KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. | |||
1365 | 4.52 KVM_SET_GSI_ROUTING | 1384 | 4.52 KVM_SET_GSI_ROUTING |
1366 | 1385 | ||
1367 | Capability: KVM_CAP_IRQ_ROUTING | 1386 | Capability: KVM_CAP_IRQ_ROUTING |
1368 | Architectures: x86 ia64 s390 | 1387 | Architectures: x86 s390 |
1369 | Type: vm ioctl | 1388 | Type: vm ioctl |
1370 | Parameters: struct kvm_irq_routing (in) | 1389 | Parameters: struct kvm_irq_routing (in) |
1371 | Returns: 0 on success, -1 on error | 1390 | Returns: 0 on success, -1 on error |
@@ -1423,8 +1442,8 @@ struct kvm_irq_routing_s390_adapter { | |||
1423 | 1442 | ||
1424 | 4.53 KVM_ASSIGN_SET_MSIX_NR | 1443 | 4.53 KVM_ASSIGN_SET_MSIX_NR |
1425 | 1444 | ||
1426 | Capability: KVM_CAP_DEVICE_MSIX | 1445 | Capability: none |
1427 | Architectures: x86 ia64 | 1446 | Architectures: x86 |
1428 | Type: vm ioctl | 1447 | Type: vm ioctl |
1429 | Parameters: struct kvm_assigned_msix_nr (in) | 1448 | Parameters: struct kvm_assigned_msix_nr (in) |
1430 | Returns: 0 on success, -1 on error | 1449 | Returns: 0 on success, -1 on error |
@@ -1445,8 +1464,8 @@ struct kvm_assigned_msix_nr { | |||
1445 | 1464 | ||
1446 | 4.54 KVM_ASSIGN_SET_MSIX_ENTRY | 1465 | 4.54 KVM_ASSIGN_SET_MSIX_ENTRY |
1447 | 1466 | ||
1448 | Capability: KVM_CAP_DEVICE_MSIX | 1467 | Capability: none |
1449 | Architectures: x86 ia64 | 1468 | Architectures: x86 |
1450 | Type: vm ioctl | 1469 | Type: vm ioctl |
1451 | Parameters: struct kvm_assigned_msix_entry (in) | 1470 | Parameters: struct kvm_assigned_msix_entry (in) |
1452 | Returns: 0 on success, -1 on error | 1471 | Returns: 0 on success, -1 on error |
@@ -1461,6 +1480,12 @@ struct kvm_assigned_msix_entry { | |||
1461 | __u16 padding[3]; | 1480 | __u16 padding[3]; |
1462 | }; | 1481 | }; |
1463 | 1482 | ||
1483 | Errors: | ||
1484 | ENOTTY: kernel does not support this ioctl | ||
1485 | |||
1486 | Other error conditions may be defined by individual device types or | ||
1487 | have their standard meanings. | ||
1488 | |||
1464 | 1489 | ||
1465 | 4.55 KVM_SET_TSC_KHZ | 1490 | 4.55 KVM_SET_TSC_KHZ |
1466 | 1491 | ||
@@ -2453,9 +2478,15 @@ return ENOEXEC for that vcpu. | |||
2453 | Note that because some registers reflect machine topology, all vcpus | 2478 | Note that because some registers reflect machine topology, all vcpus |
2454 | should be created before this ioctl is invoked. | 2479 | should be created before this ioctl is invoked. |
2455 | 2480 | ||
2481 | Userspace can call this function multiple times for a given vcpu, including | ||
2482 | after the vcpu has been run. This will reset the vcpu to its initial | ||
2483 | state. All calls to this function after the initial call must use the same | ||
2484 | target and same set of feature flags, otherwise EINVAL will be returned. | ||
2485 | |||
2456 | Possible features: | 2486 | Possible features: |
2457 | - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. | 2487 | - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. |
2458 | Depends on KVM_CAP_ARM_PSCI. | 2488 | Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on |
2489 | and execute guest code when KVM_RUN is called. | ||
2459 | - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. | 2490 | - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. |
2460 | Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). | 2491 | Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). |
2461 | - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU. | 2492 | - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU. |
@@ -2951,6 +2982,15 @@ HVC instruction based PSCI call from the vcpu. The 'type' field describes | |||
2951 | the system-level event type. The 'flags' field describes architecture | 2982 | the system-level event type. The 'flags' field describes architecture |
2952 | specific flags for the system-level event. | 2983 | specific flags for the system-level event. |
2953 | 2984 | ||
2985 | Valid values for 'type' are: | ||
2986 | KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the | ||
2987 | VM. Userspace is not obliged to honour this, and if it does honour | ||
2988 | this does not need to destroy the VM synchronously (ie it may call | ||
2989 | KVM_RUN again before shutdown finally occurs). | ||
2990 | KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM. | ||
2991 | As with SHUTDOWN, userspace can choose to ignore the request, or | ||
2992 | to schedule the reset to occur in the future and may call KVM_RUN again. | ||
2993 | |||
2954 | /* Fix the size of the union. */ | 2994 | /* Fix the size of the union. */ |
2955 | char padding[256]; | 2995 | char padding[256]; |
2956 | }; | 2996 | }; |
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt index 0d16f96c0eac..d426fc87fe93 100644 --- a/Documentation/virtual/kvm/devices/vm.txt +++ b/Documentation/virtual/kvm/devices/vm.txt | |||
@@ -12,14 +12,14 @@ specific. | |||
12 | 1. GROUP: KVM_S390_VM_MEM_CTRL | 12 | 1. GROUP: KVM_S390_VM_MEM_CTRL |
13 | Architectures: s390 | 13 | Architectures: s390 |
14 | 14 | ||
15 | 1.1. ATTRIBUTE: KVM_S390_VM_MEM_CTRL | 15 | 1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMA |
16 | Parameters: none | 16 | Parameters: none |
17 | Returns: -EBUSY if already a vcpus is defined, otherwise 0 | 17 | Returns: -EBUSY if a vcpu is already defined, otherwise 0 |
18 | 18 | ||
19 | Enables CMMA for the virtual machine | 19 | Enables Collaborative Memory Management Assist (CMMA) for the virtual machine. |
20 | 20 | ||
21 | 1.2. ATTRIBUTE: KVM_S390_VM_CLR_CMMA | 21 | 1.2. ATTRIBUTE: KVM_S390_VM_MEM_CLR_CMMA |
22 | Parameteres: none | 22 | Parameters: none |
23 | Returns: 0 | 23 | Returns: 0 |
24 | 24 | ||
25 | Clear the CMMA status for all guest pages, so any pages the guest marked | 25 | Clear the CMMA status for all guest pages, so any pages the guest marked |
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt index 6d470ae7b073..2a71c8f29f68 100644 --- a/Documentation/virtual/kvm/msr.txt +++ b/Documentation/virtual/kvm/msr.txt | |||
@@ -168,7 +168,7 @@ MSR_KVM_ASYNC_PF_EN: 0x4b564d02 | |||
168 | 64 byte memory area which must be in guest RAM and must be | 168 | 64 byte memory area which must be in guest RAM and must be |
169 | zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1 | 169 | zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1 |
170 | when asynchronous page faults are enabled on the vcpu 0 when | 170 | when asynchronous page faults are enabled on the vcpu 0 when |
171 | disabled. Bit 2 is 1 if asynchronous page faults can be injected | 171 | disabled. Bit 1 is 1 if asynchronous page faults can be injected |
172 | when vcpu is in cpl == 0. | 172 | when vcpu is in cpl == 0. |
173 | 173 | ||
174 | First 4 byte of 64 byte memory location will be written to by | 174 | First 4 byte of 64 byte memory location will be written to by |
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index b64e0af9cc56..f2d3a100fe38 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -1,8 +1,8 @@ | |||
1 | 1 | ||
2 | The intent of this file is to give a brief summary of hugetlbpage support in | 2 | The intent of this file is to give a brief summary of hugetlbpage support in |
3 | the Linux kernel. This support is built on top of multiple page size support | 3 | the Linux kernel. This support is built on top of multiple page size support |
4 | that is provided by most modern architectures. For example, i386 | 4 | that is provided by most modern architectures. For example, x86 CPUs normally |
5 | architecture supports 4K and 4M (2M in PAE mode) page sizes, ia64 | 5 | support 4K and 2M (1G if architecturally supported) page sizes, ia64 |
6 | architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, | 6 | architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, |
7 | 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical | 7 | 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical |
8 | translations. Typically this is a very scarce resource on processor. | 8 | translations. Typically this is a very scarce resource on processor. |
diff --git a/Documentation/vm/page_owner.txt b/Documentation/vm/page_owner.txt new file mode 100644 index 000000000000..8f3ce9b3aa11 --- /dev/null +++ b/Documentation/vm/page_owner.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | page owner: Tracking about who allocated each page | ||
2 | ----------------------------------------------------------- | ||
3 | |||
4 | * Introduction | ||
5 | |||
6 | page owner is for the tracking about who allocated each page. | ||
7 | It can be used to debug memory leak or to find a memory hogger. | ||
8 | When allocation happens, information about allocation such as call stack | ||
9 | and order of pages is stored into certain storage for each page. | ||
10 | When we need to know about status of all pages, we can get and analyze | ||
11 | this information. | ||
12 | |||
13 | Although we already have tracepoint for tracing page allocation/free, | ||
14 | using it for analyzing who allocate each page is rather complex. We need | ||
15 | to enlarge the trace buffer for preventing overlapping until userspace | ||
16 | program launched. And, launched program continually dump out the trace | ||
17 | buffer for later analysis and it would change system behviour with more | ||
18 | possibility rather than just keeping it in memory, so bad for debugging. | ||
19 | |||
20 | page owner can also be used for various purposes. For example, accurate | ||
21 | fragmentation statistics can be obtained through gfp flag information of | ||
22 | each page. It is already implemented and activated if page owner is | ||
23 | enabled. Other usages are more than welcome. | ||
24 | |||
25 | page owner is disabled in default. So, if you'd like to use it, you need | ||
26 | to add "page_owner=on" into your boot cmdline. If the kernel is built | ||
27 | with page owner and page owner is disabled in runtime due to no enabling | ||
28 | boot option, runtime overhead is marginal. If disabled in runtime, it | ||
29 | doesn't require memory to store owner information, so there is no runtime | ||
30 | memory overhead. And, page owner inserts just two unlikely branches into | ||
31 | the page allocator hotpath and if it returns false then allocation is | ||
32 | done like as the kernel without page owner. These two unlikely branches | ||
33 | would not affect to allocation performance. Following is the kernel's | ||
34 | code size change due to this facility. | ||
35 | |||
36 | - Without page owner | ||
37 | text data bss dec hex filename | ||
38 | 40662 1493 644 42799 a72f mm/page_alloc.o | ||
39 | |||
40 | - With page owner | ||
41 | text data bss dec hex filename | ||
42 | 40892 1493 644 43029 a815 mm/page_alloc.o | ||
43 | 1427 24 8 1459 5b3 mm/page_ext.o | ||
44 | 2722 50 0 2772 ad4 mm/page_owner.o | ||
45 | |||
46 | Although, roughly, 4 KB code is added in total, page_alloc.o increase by | ||
47 | 230 bytes and only half of it is in hotpath. Building the kernel with | ||
48 | page owner and turning it on if needed would be great option to debug | ||
49 | kernel memory problem. | ||
50 | |||
51 | There is one notice that is caused by implementation detail. page owner | ||
52 | stores information into the memory from struct page extension. This memory | ||
53 | is initialized some time later than that page allocator starts in sparse | ||
54 | memory system, so, until initialization, many pages can be allocated and | ||
55 | they would have no owner information. To fix it up, these early allocated | ||
56 | pages are investigated and marked as allocated in initialization phase. | ||
57 | Although it doesn't mean that they have the right owner information, | ||
58 | at least, we can tell whether the page is allocated or not, | ||
59 | more accurately. On 2GB memory x86-64 VM box, 13343 early allocated pages | ||
60 | are catched and marked, although they are mostly allocated from struct | ||
61 | page extension feature. Anyway, after that, no page is left in | ||
62 | un-tracking state. | ||
63 | |||
64 | * Usage | ||
65 | |||
66 | 1) Build user-space helper | ||
67 | cd tools/vm | ||
68 | make page_owner_sort | ||
69 | |||
70 | 2) Enable page owner | ||
71 | Add "page_owner=on" to boot cmdline. | ||
72 | |||
73 | 3) Do the job what you want to debug | ||
74 | |||
75 | 4) Analyze information from page owner | ||
76 | cat /sys/kernel/debug/page_owner > page_owner_full.txt | ||
77 | grep -v ^PFN page_owner_full.txt > page_owner.txt | ||
78 | ./page_owner_sort page_owner.txt sorted_page_owner.txt | ||
79 | |||
80 | See the result about who allocated each page | ||
81 | in the sorted_page_owner.txt. | ||
diff --git a/Documentation/x86/entry_64.txt b/Documentation/x86/entry_64.txt index bc7226ef5055..4a1c5c2dc5a9 100644 --- a/Documentation/x86/entry_64.txt +++ b/Documentation/x86/entry_64.txt | |||
@@ -7,9 +7,12 @@ http://lkml.kernel.org/r/<20110529191055.GC9835%40elte.hu> | |||
7 | The x86 architecture has quite a few different ways to jump into | 7 | The x86 architecture has quite a few different ways to jump into |
8 | kernel code. Most of these entry points are registered in | 8 | kernel code. Most of these entry points are registered in |
9 | arch/x86/kernel/traps.c and implemented in arch/x86/kernel/entry_64.S | 9 | arch/x86/kernel/traps.c and implemented in arch/x86/kernel/entry_64.S |
10 | and arch/x86/ia32/ia32entry.S. | 10 | for 64-bit, arch/x86/kernel/entry_32.S for 32-bit and finally |
11 | arch/x86/ia32/ia32entry.S which implements the 32-bit compatibility | ||
12 | syscall entry points and thus provides for 32-bit processes the | ||
13 | ability to execute syscalls when running on 64-bit kernels. | ||
11 | 14 | ||
12 | The IDT vector assignments are listed in arch/x86/include/irq_vectors.h. | 15 | The IDT vector assignments are listed in arch/x86/include/asm/irq_vectors.h. |
13 | 16 | ||
14 | Some of these entries are: | 17 | Some of these entries are: |
15 | 18 | ||