diff options
74 files changed, 1320 insertions, 516 deletions
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt index 1608a54e90e1..68ac65f82a1c 100644 --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt | |||
@@ -9,6 +9,7 @@ Required properties: | |||
9 | - compatible : Should contain "nvidia,tegra<chip>-pmc". | 9 | - compatible : Should contain "nvidia,tegra<chip>-pmc". |
10 | - reg : Offset and length of the register set for the device | 10 | - reg : Offset and length of the register set for the device |
11 | - clocks : Must contain an entry for each entry in clock-names. | 11 | - clocks : Must contain an entry for each entry in clock-names. |
12 | See ../clocks/clock-bindings.txt for details. | ||
12 | - clock-names : Must include the following entries: | 13 | - clock-names : Must include the following entries: |
13 | "pclk" (The Tegra clock of that name), | 14 | "pclk" (The Tegra clock of that name), |
14 | "clk32k_in" (The 32KHz clock input to Tegra). | 15 | "clk32k_in" (The 32KHz clock input to Tegra). |
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt index 0c80c2677104..9acea9d93160 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt | |||
@@ -15,6 +15,9 @@ Required properties : | |||
15 | In clock consumers, this cell represents the clock ID exposed by the | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | CAR. The assignments may be found in header file | 16 | CAR. The assignments may be found in header file |
17 | <dt-bindings/clock/tegra114-car.h>. | 17 | <dt-bindings/clock/tegra114-car.h>. |
18 | - #reset-cells : Should be 1. | ||
19 | In clock consumers, this cell represents the bit number in the CAR's | ||
20 | array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. | ||
18 | 21 | ||
19 | Example SoC include file: | 22 | Example SoC include file: |
20 | 23 | ||
@@ -23,6 +26,7 @@ Example SoC include file: | |||
23 | compatible = "nvidia,tegra114-car"; | 26 | compatible = "nvidia,tegra114-car"; |
24 | reg = <0x60006000 0x1000>; | 27 | reg = <0x60006000 0x1000>; |
25 | #clock-cells = <1>; | 28 | #clock-cells = <1>; |
29 | #reset-cells = <1>; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | usb@c5004000 { | 32 | usb@c5004000 { |
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt index 1a91ec60dee5..ded5d6212c84 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt | |||
@@ -15,6 +15,9 @@ Required properties : | |||
15 | In clock consumers, this cell represents the clock ID exposed by the | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | CAR. The assignments may be found in header file | 16 | CAR. The assignments may be found in header file |
17 | <dt-bindings/clock/tegra124-car.h>. | 17 | <dt-bindings/clock/tegra124-car.h>. |
18 | - #reset-cells : Should be 1. | ||
19 | In clock consumers, this cell represents the bit number in the CAR's | ||
20 | array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. | ||
18 | 21 | ||
19 | Example SoC include file: | 22 | Example SoC include file: |
20 | 23 | ||
@@ -23,6 +26,7 @@ Example SoC include file: | |||
23 | compatible = "nvidia,tegra124-car"; | 26 | compatible = "nvidia,tegra124-car"; |
24 | reg = <0x60006000 0x1000>; | 27 | reg = <0x60006000 0x1000>; |
25 | #clock-cells = <1>; | 28 | #clock-cells = <1>; |
29 | #reset-cells = <1>; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | usb@c5004000 { | 32 | usb@c5004000 { |
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt index fcfed5bf73fb..6c5901b503d0 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt | |||
@@ -15,6 +15,9 @@ Required properties : | |||
15 | In clock consumers, this cell represents the clock ID exposed by the | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | CAR. The assignments may be found in header file | 16 | CAR. The assignments may be found in header file |
17 | <dt-bindings/clock/tegra20-car.h>. | 17 | <dt-bindings/clock/tegra20-car.h>. |
18 | - #reset-cells : Should be 1. | ||
19 | In clock consumers, this cell represents the bit number in the CAR's | ||
20 | array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. | ||
18 | 21 | ||
19 | Example SoC include file: | 22 | Example SoC include file: |
20 | 23 | ||
@@ -23,6 +26,7 @@ Example SoC include file: | |||
23 | compatible = "nvidia,tegra20-car"; | 26 | compatible = "nvidia,tegra20-car"; |
24 | reg = <0x60006000 0x1000>; | 27 | reg = <0x60006000 0x1000>; |
25 | #clock-cells = <1>; | 28 | #clock-cells = <1>; |
29 | #reset-cells = <1>; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | usb@c5004000 { | 32 | usb@c5004000 { |
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt index 0f714081e986..63618cde12df 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt | |||
@@ -15,6 +15,9 @@ Required properties : | |||
15 | In clock consumers, this cell represents the clock ID exposed by the | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | CAR. The assignments may be found in header file | 16 | CAR. The assignments may be found in header file |
17 | <dt-bindings/clock/tegra30-car.h>. | 17 | <dt-bindings/clock/tegra30-car.h>. |
18 | - #reset-cells : Should be 1. | ||
19 | In clock consumers, this cell represents the bit number in the CAR's | ||
20 | array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. | ||
18 | 21 | ||
19 | Example SoC include file: | 22 | Example SoC include file: |
20 | 23 | ||
@@ -23,6 +26,7 @@ Example SoC include file: | |||
23 | compatible = "nvidia,tegra30-car"; | 26 | compatible = "nvidia,tegra30-car"; |
24 | reg = <0x60006000 0x1000>; | 27 | reg = <0x60006000 0x1000>; |
25 | #clock-cells = <1>; | 28 | #clock-cells = <1>; |
29 | #reset-cells = <1>; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | usb@c5004000 { | 32 | usb@c5004000 { |
diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt index 90fa7da525b8..c6908e7c42cc 100644 --- a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt +++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt | |||
@@ -5,6 +5,16 @@ Required properties: | |||
5 | - reg: Should contain DMA registers location and length. This shuld include | 5 | - reg: Should contain DMA registers location and length. This shuld include |
6 | all of the per-channel registers. | 6 | all of the per-channel registers. |
7 | - interrupts: Should contain all of the per-channel DMA interrupts. | 7 | - interrupts: Should contain all of the per-channel DMA interrupts. |
8 | - clocks: Must contain one entry, for the module clock. | ||
9 | See ../clocks/clock-bindings.txt for details. | ||
10 | - resets : Must contain an entry for each entry in reset-names. | ||
11 | See ../reset/reset.txt for details. | ||
12 | - reset-names : Must include the following entries: | ||
13 | - dma | ||
14 | - #dma-cells : Must be <1>. This dictates the length of DMA specifiers in | ||
15 | client nodes' dmas properties. The specifier represents the DMA request | ||
16 | select value for the peripheral. For more details, consult the Tegra TRM's | ||
17 | documentation of the APB DMA channel control register REQ_SEL field. | ||
8 | 18 | ||
9 | Examples: | 19 | Examples: |
10 | 20 | ||
@@ -27,4 +37,8 @@ apbdma: dma@6000a000 { | |||
27 | 0 149 0x04 | 37 | 0 149 0x04 |
28 | 0 150 0x04 | 38 | 0 150 0x04 |
29 | 0 151 0x04 >; | 39 | 0 151 0x04 >; |
40 | clocks = <&tegra_car 34>; | ||
41 | resets = <&tegra_car 34>; | ||
42 | reset-names = "dma"; | ||
43 | #dma-cells = <1>; | ||
30 | }; | 44 | }; |
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt index b4fa934ae3a2..ab45c02aa658 100644 --- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
@@ -9,6 +9,12 @@ Required properties: | |||
9 | - #size-cells: The number of cells used to represent the size of an address | 9 | - #size-cells: The number of cells used to represent the size of an address |
10 | range in the host1x address space. Should be 1. | 10 | range in the host1x address space. Should be 1. |
11 | - ranges: The mapping of the host1x address space to the CPU address space. | 11 | - ranges: The mapping of the host1x address space to the CPU address space. |
12 | - clocks: Must contain one entry, for the module clock. | ||
13 | See ../clocks/clock-bindings.txt for details. | ||
14 | - resets: Must contain an entry for each entry in reset-names. | ||
15 | See ../reset/reset.txt for details. | ||
16 | - reset-names: Must include the following entries: | ||
17 | - host1x | ||
12 | 18 | ||
13 | The host1x top-level node defines a number of children, each representing one | 19 | The host1x top-level node defines a number of children, each representing one |
14 | of the following host1x client modules: | 20 | of the following host1x client modules: |
@@ -19,6 +25,12 @@ of the following host1x client modules: | |||
19 | - compatible: "nvidia,tegra<chip>-mpe" | 25 | - compatible: "nvidia,tegra<chip>-mpe" |
20 | - reg: Physical base address and length of the controller's registers. | 26 | - reg: Physical base address and length of the controller's registers. |
21 | - interrupts: The interrupt outputs from the controller. | 27 | - interrupts: The interrupt outputs from the controller. |
28 | - clocks: Must contain one entry, for the module clock. | ||
29 | See ../clocks/clock-bindings.txt for details. | ||
30 | - resets: Must contain an entry for each entry in reset-names. | ||
31 | See ../reset/reset.txt for details. | ||
32 | - reset-names: Must include the following entries: | ||
33 | - mpe | ||
22 | 34 | ||
23 | - vi: video input | 35 | - vi: video input |
24 | 36 | ||
@@ -26,6 +38,12 @@ of the following host1x client modules: | |||
26 | - compatible: "nvidia,tegra<chip>-vi" | 38 | - compatible: "nvidia,tegra<chip>-vi" |
27 | - reg: Physical base address and length of the controller's registers. | 39 | - reg: Physical base address and length of the controller's registers. |
28 | - interrupts: The interrupt outputs from the controller. | 40 | - interrupts: The interrupt outputs from the controller. |
41 | - clocks: Must contain one entry, for the module clock. | ||
42 | See ../clocks/clock-bindings.txt for details. | ||
43 | - resets: Must contain an entry for each entry in reset-names. | ||
44 | See ../reset/reset.txt for details. | ||
45 | - reset-names: Must include the following entries: | ||
46 | - vi | ||
29 | 47 | ||
30 | - epp: encoder pre-processor | 48 | - epp: encoder pre-processor |
31 | 49 | ||
@@ -33,6 +51,12 @@ of the following host1x client modules: | |||
33 | - compatible: "nvidia,tegra<chip>-epp" | 51 | - compatible: "nvidia,tegra<chip>-epp" |
34 | - reg: Physical base address and length of the controller's registers. | 52 | - reg: Physical base address and length of the controller's registers. |
35 | - interrupts: The interrupt outputs from the controller. | 53 | - interrupts: The interrupt outputs from the controller. |
54 | - clocks: Must contain one entry, for the module clock. | ||
55 | See ../clocks/clock-bindings.txt for details. | ||
56 | - resets: Must contain an entry for each entry in reset-names. | ||
57 | See ../reset/reset.txt for details. | ||
58 | - reset-names: Must include the following entries: | ||
59 | - epp | ||
36 | 60 | ||
37 | - isp: image signal processor | 61 | - isp: image signal processor |
38 | 62 | ||
@@ -40,6 +64,12 @@ of the following host1x client modules: | |||
40 | - compatible: "nvidia,tegra<chip>-isp" | 64 | - compatible: "nvidia,tegra<chip>-isp" |
41 | - reg: Physical base address and length of the controller's registers. | 65 | - reg: Physical base address and length of the controller's registers. |
42 | - interrupts: The interrupt outputs from the controller. | 66 | - interrupts: The interrupt outputs from the controller. |
67 | - clocks: Must contain one entry, for the module clock. | ||
68 | See ../clocks/clock-bindings.txt for details. | ||
69 | - resets: Must contain an entry for each entry in reset-names. | ||
70 | See ../reset/reset.txt for details. | ||
71 | - reset-names: Must include the following entries: | ||
72 | - isp | ||
43 | 73 | ||
44 | - gr2d: 2D graphics engine | 74 | - gr2d: 2D graphics engine |
45 | 75 | ||
@@ -47,12 +77,30 @@ of the following host1x client modules: | |||
47 | - compatible: "nvidia,tegra<chip>-gr2d" | 77 | - compatible: "nvidia,tegra<chip>-gr2d" |
48 | - reg: Physical base address and length of the controller's registers. | 78 | - reg: Physical base address and length of the controller's registers. |
49 | - interrupts: The interrupt outputs from the controller. | 79 | - interrupts: The interrupt outputs from the controller. |
80 | - clocks: Must contain one entry, for the module clock. | ||
81 | See ../clocks/clock-bindings.txt for details. | ||
82 | - resets: Must contain an entry for each entry in reset-names. | ||
83 | See ../reset/reset.txt for details. | ||
84 | - reset-names: Must include the following entries: | ||
85 | - 2d | ||
50 | 86 | ||
51 | - gr3d: 3D graphics engine | 87 | - gr3d: 3D graphics engine |
52 | 88 | ||
53 | Required properties: | 89 | Required properties: |
54 | - compatible: "nvidia,tegra<chip>-gr3d" | 90 | - compatible: "nvidia,tegra<chip>-gr3d" |
55 | - reg: Physical base address and length of the controller's registers. | 91 | - reg: Physical base address and length of the controller's registers. |
92 | - clocks: Must contain an entry for each entry in clock-names. | ||
93 | See ../clocks/clock-bindings.txt for details. | ||
94 | - clock-names: Must include the following entries: | ||
95 | (This property may be omitted if the only clock in the list is "3d") | ||
96 | - 3d | ||
97 | This MUST be the first entry. | ||
98 | - 3d2 (Only required on SoCs with two 3D clocks) | ||
99 | - resets: Must contain an entry for each entry in reset-names. | ||
100 | See ../reset/reset.txt for details. | ||
101 | - reset-names: Must include the following entries: | ||
102 | - 3d | ||
103 | - 3d2 (Only required on SoCs with two 3D clocks) | ||
56 | 104 | ||
57 | - dc: display controller | 105 | - dc: display controller |
58 | 106 | ||
@@ -60,6 +108,16 @@ of the following host1x client modules: | |||
60 | - compatible: "nvidia,tegra<chip>-dc" | 108 | - compatible: "nvidia,tegra<chip>-dc" |
61 | - reg: Physical base address and length of the controller's registers. | 109 | - reg: Physical base address and length of the controller's registers. |
62 | - interrupts: The interrupt outputs from the controller. | 110 | - interrupts: The interrupt outputs from the controller. |
111 | - clocks: Must contain an entry for each entry in clock-names. | ||
112 | See ../clocks/clock-bindings.txt for details. | ||
113 | - clock-names: Must include the following entries: | ||
114 | - dc | ||
115 | This MUST be the first entry. | ||
116 | - parent | ||
117 | - resets: Must contain an entry for each entry in reset-names. | ||
118 | See ../reset/reset.txt for details. | ||
119 | - reset-names: Must include the following entries: | ||
120 | - dc | ||
63 | 121 | ||
64 | Each display controller node has a child node, named "rgb", that represents | 122 | Each display controller node has a child node, named "rgb", that represents |
65 | the RGB output associated with the controller. It can take the following | 123 | the RGB output associated with the controller. It can take the following |
@@ -76,6 +134,16 @@ of the following host1x client modules: | |||
76 | - interrupts: The interrupt outputs from the controller. | 134 | - interrupts: The interrupt outputs from the controller. |
77 | - vdd-supply: regulator for supply voltage | 135 | - vdd-supply: regulator for supply voltage |
78 | - pll-supply: regulator for PLL | 136 | - pll-supply: regulator for PLL |
137 | - clocks: Must contain an entry for each entry in clock-names. | ||
138 | See ../clocks/clock-bindings.txt for details. | ||
139 | - clock-names: Must include the following entries: | ||
140 | - hdmi | ||
141 | This MUST be the first entry. | ||
142 | - parent | ||
143 | - resets: Must contain an entry for each entry in reset-names. | ||
144 | See ../reset/reset.txt for details. | ||
145 | - reset-names: Must include the following entries: | ||
146 | - hdmi | ||
79 | 147 | ||
80 | Optional properties: | 148 | Optional properties: |
81 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | 149 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing |
@@ -88,12 +156,24 @@ of the following host1x client modules: | |||
88 | - compatible: "nvidia,tegra<chip>-tvo" | 156 | - compatible: "nvidia,tegra<chip>-tvo" |
89 | - reg: Physical base address and length of the controller's registers. | 157 | - reg: Physical base address and length of the controller's registers. |
90 | - interrupts: The interrupt outputs from the controller. | 158 | - interrupts: The interrupt outputs from the controller. |
159 | - clocks: Must contain one entry, for the module clock. | ||
160 | See ../clocks/clock-bindings.txt for details. | ||
91 | 161 | ||
92 | - dsi: display serial interface | 162 | - dsi: display serial interface |
93 | 163 | ||
94 | Required properties: | 164 | Required properties: |
95 | - compatible: "nvidia,tegra<chip>-dsi" | 165 | - compatible: "nvidia,tegra<chip>-dsi" |
96 | - reg: Physical base address and length of the controller's registers. | 166 | - reg: Physical base address and length of the controller's registers. |
167 | - clocks: Must contain an entry for each entry in clock-names. | ||
168 | See ../clocks/clock-bindings.txt for details. | ||
169 | - clock-names: Must include the following entries: | ||
170 | - dsi | ||
171 | This MUST be the first entry. | ||
172 | - parent | ||
173 | - resets: Must contain an entry for each entry in reset-names. | ||
174 | See ../reset/reset.txt for details. | ||
175 | - reset-names: Must include the following entries: | ||
176 | - dsi | ||
97 | 177 | ||
98 | Example: | 178 | Example: |
99 | 179 | ||
@@ -105,6 +185,9 @@ Example: | |||
105 | reg = <0x50000000 0x00024000>; | 185 | reg = <0x50000000 0x00024000>; |
106 | interrupts = <0 65 0x04 /* mpcore syncpt */ | 186 | interrupts = <0 65 0x04 /* mpcore syncpt */ |
107 | 0 67 0x04>; /* mpcore general */ | 187 | 0 67 0x04>; /* mpcore general */ |
188 | clocks = <&tegra_car TEGRA20_CLK_HOST1X>; | ||
189 | resets = <&tegra_car 28>; | ||
190 | reset-names = "host1x"; | ||
108 | 191 | ||
109 | #address-cells = <1>; | 192 | #address-cells = <1>; |
110 | #size-cells = <1>; | 193 | #size-cells = <1>; |
@@ -115,41 +198,64 @@ Example: | |||
115 | compatible = "nvidia,tegra20-mpe"; | 198 | compatible = "nvidia,tegra20-mpe"; |
116 | reg = <0x54040000 0x00040000>; | 199 | reg = <0x54040000 0x00040000>; |
117 | interrupts = <0 68 0x04>; | 200 | interrupts = <0 68 0x04>; |
201 | clocks = <&tegra_car TEGRA20_CLK_MPE>; | ||
202 | resets = <&tegra_car 60>; | ||
203 | reset-names = "mpe"; | ||
118 | }; | 204 | }; |
119 | 205 | ||
120 | vi { | 206 | vi { |
121 | compatible = "nvidia,tegra20-vi"; | 207 | compatible = "nvidia,tegra20-vi"; |
122 | reg = <0x54080000 0x00040000>; | 208 | reg = <0x54080000 0x00040000>; |
123 | interrupts = <0 69 0x04>; | 209 | interrupts = <0 69 0x04>; |
210 | clocks = <&tegra_car TEGRA20_CLK_VI>; | ||
211 | resets = <&tegra_car 100>; | ||
212 | reset-names = "vi"; | ||
124 | }; | 213 | }; |
125 | 214 | ||
126 | epp { | 215 | epp { |
127 | compatible = "nvidia,tegra20-epp"; | 216 | compatible = "nvidia,tegra20-epp"; |
128 | reg = <0x540c0000 0x00040000>; | 217 | reg = <0x540c0000 0x00040000>; |
129 | interrupts = <0 70 0x04>; | 218 | interrupts = <0 70 0x04>; |
219 | clocks = <&tegra_car TEGRA20_CLK_EPP>; | ||
220 | resets = <&tegra_car 19>; | ||
221 | reset-names = "epp"; | ||
130 | }; | 222 | }; |
131 | 223 | ||
132 | isp { | 224 | isp { |
133 | compatible = "nvidia,tegra20-isp"; | 225 | compatible = "nvidia,tegra20-isp"; |
134 | reg = <0x54100000 0x00040000>; | 226 | reg = <0x54100000 0x00040000>; |
135 | interrupts = <0 71 0x04>; | 227 | interrupts = <0 71 0x04>; |
228 | clocks = <&tegra_car TEGRA20_CLK_ISP>; | ||
229 | resets = <&tegra_car 23>; | ||
230 | reset-names = "isp"; | ||
136 | }; | 231 | }; |
137 | 232 | ||
138 | gr2d { | 233 | gr2d { |
139 | compatible = "nvidia,tegra20-gr2d"; | 234 | compatible = "nvidia,tegra20-gr2d"; |
140 | reg = <0x54140000 0x00040000>; | 235 | reg = <0x54140000 0x00040000>; |
141 | interrupts = <0 72 0x04>; | 236 | interrupts = <0 72 0x04>; |
237 | clocks = <&tegra_car TEGRA20_CLK_GR2D>; | ||
238 | resets = <&tegra_car 21>; | ||
239 | reset-names = "2d"; | ||
142 | }; | 240 | }; |
143 | 241 | ||
144 | gr3d { | 242 | gr3d { |
145 | compatible = "nvidia,tegra20-gr3d"; | 243 | compatible = "nvidia,tegra20-gr3d"; |
146 | reg = <0x54180000 0x00040000>; | 244 | reg = <0x54180000 0x00040000>; |
245 | clocks = <&tegra_car TEGRA20_CLK_GR3D>; | ||
246 | resets = <&tegra_car 24>; | ||
247 | reset-names = "3d"; | ||
147 | }; | 248 | }; |
148 | 249 | ||
149 | dc@54200000 { | 250 | dc@54200000 { |
150 | compatible = "nvidia,tegra20-dc"; | 251 | compatible = "nvidia,tegra20-dc"; |
151 | reg = <0x54200000 0x00040000>; | 252 | reg = <0x54200000 0x00040000>; |
152 | interrupts = <0 73 0x04>; | 253 | interrupts = <0 73 0x04>; |
254 | clocks = <&tegra_car TEGRA20_CLK_DISP1>, | ||
255 | <&tegra_car TEGRA20_CLK_PLL_P>; | ||
256 | clock-names = "disp1", "parent"; | ||
257 | resets = <&tegra_car 27>; | ||
258 | reset-names = "dc"; | ||
153 | 259 | ||
154 | rgb { | 260 | rgb { |
155 | status = "disabled"; | 261 | status = "disabled"; |
@@ -160,6 +266,11 @@ Example: | |||
160 | compatible = "nvidia,tegra20-dc"; | 266 | compatible = "nvidia,tegra20-dc"; |
161 | reg = <0x54240000 0x00040000>; | 267 | reg = <0x54240000 0x00040000>; |
162 | interrupts = <0 74 0x04>; | 268 | interrupts = <0 74 0x04>; |
269 | clocks = <&tegra_car TEGRA20_CLK_DISP2>, | ||
270 | <&tegra_car TEGRA20_CLK_PLL_P>; | ||
271 | clock-names = "disp2", "parent"; | ||
272 | resets = <&tegra_car 26>; | ||
273 | reset-names = "dc"; | ||
163 | 274 | ||
164 | rgb { | 275 | rgb { |
165 | status = "disabled"; | 276 | status = "disabled"; |
@@ -170,6 +281,11 @@ Example: | |||
170 | compatible = "nvidia,tegra20-hdmi"; | 281 | compatible = "nvidia,tegra20-hdmi"; |
171 | reg = <0x54280000 0x00040000>; | 282 | reg = <0x54280000 0x00040000>; |
172 | interrupts = <0 75 0x04>; | 283 | interrupts = <0 75 0x04>; |
284 | clocks = <&tegra_car TEGRA20_CLK_HDMI>, | ||
285 | <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; | ||
286 | clock-names = "hdmi", "parent"; | ||
287 | resets = <&tegra_car 51>; | ||
288 | reset-names = "hdmi"; | ||
173 | status = "disabled"; | 289 | status = "disabled"; |
174 | }; | 290 | }; |
175 | 291 | ||
@@ -177,12 +293,18 @@ Example: | |||
177 | compatible = "nvidia,tegra20-tvo"; | 293 | compatible = "nvidia,tegra20-tvo"; |
178 | reg = <0x542c0000 0x00040000>; | 294 | reg = <0x542c0000 0x00040000>; |
179 | interrupts = <0 76 0x04>; | 295 | interrupts = <0 76 0x04>; |
296 | clocks = <&tegra_car TEGRA20_CLK_TVO>; | ||
180 | status = "disabled"; | 297 | status = "disabled"; |
181 | }; | 298 | }; |
182 | 299 | ||
183 | dsi { | 300 | dsi { |
184 | compatible = "nvidia,tegra20-dsi"; | 301 | compatible = "nvidia,tegra20-dsi"; |
185 | reg = <0x54300000 0x00040000>; | 302 | reg = <0x54300000 0x00040000>; |
303 | clocks = <&tegra_car TEGRA20_CLK_DSI>, | ||
304 | <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; | ||
305 | clock-names = "dsi", "parent"; | ||
306 | resets = <&tegra_car 48>; | ||
307 | reset-names = "dsi"; | ||
186 | status = "disabled"; | 308 | status = "disabled"; |
187 | }; | 309 | }; |
188 | }; | 310 | }; |
diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt index ef77cc7a0e46..87507e9ce6db 100644 --- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | |||
@@ -39,12 +39,23 @@ Required properties: | |||
39 | - interrupts: Should contain I2C controller interrupts. | 39 | - interrupts: Should contain I2C controller interrupts. |
40 | - address-cells: Address cells for I2C device address. | 40 | - address-cells: Address cells for I2C device address. |
41 | - size-cells: Size of the I2C device address. | 41 | - size-cells: Size of the I2C device address. |
42 | - clocks: Clock ID as per | 42 | - clocks: Must contain an entry for each entry in clock-names. |
43 | Documentation/devicetree/bindings/clock/tegra<chip-id>.txt | 43 | See ../clocks/clock-bindings.txt for details. |
44 | for I2C controller. | 44 | - clock-names: Must include the following entries: |
45 | - clock-names: Name of the clock: | 45 | Tegra20/Tegra30: |
46 | Tegra20/Tegra30 I2C controller: "div-clk and "fast-clk". | 46 | - div-clk |
47 | Tegra114 I2C controller: "div-clk". | 47 | - fast-clk |
48 | Tegra114: | ||
49 | - div-clk | ||
50 | - resets: Must contain an entry for each entry in reset-names. | ||
51 | See ../reset/reset.txt for details. | ||
52 | - reset-names: Must include the following entries: | ||
53 | - i2c | ||
54 | - dmas: Must contain an entry for each entry in clock-names. | ||
55 | See ../dma/dma.txt for details. | ||
56 | - dma-names: Must include the following entries: | ||
57 | - rx | ||
58 | - tx | ||
48 | 59 | ||
49 | Example: | 60 | Example: |
50 | 61 | ||
@@ -56,5 +67,9 @@ Example: | |||
56 | #size-cells = <0>; | 67 | #size-cells = <0>; |
57 | clocks = <&tegra_car 12>, <&tegra_car 124>; | 68 | clocks = <&tegra_car 12>, <&tegra_car 124>; |
58 | clock-names = "div-clk", "fast-clk"; | 69 | clock-names = "div-clk", "fast-clk"; |
70 | resets = <&tegra_car 12>; | ||
71 | reset-names = "i2c"; | ||
72 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
73 | dma-names = "rx", "tx"; | ||
59 | status = "disabled"; | 74 | status = "disabled"; |
60 | }; | 75 | }; |
diff --git a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt index 2995fae7ee47..0382b8bd69c6 100644 --- a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt +++ b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt | |||
@@ -13,6 +13,12 @@ Required properties: | |||
13 | array of pin numbers which is used as column. | 13 | array of pin numbers which is used as column. |
14 | - linux,keymap: The keymap for keys as described in the binding document | 14 | - linux,keymap: The keymap for keys as described in the binding document |
15 | devicetree/bindings/input/matrix-keymap.txt. | 15 | devicetree/bindings/input/matrix-keymap.txt. |
16 | - clocks: Must contain one entry, for the module clock. | ||
17 | See ../clocks/clock-bindings.txt for details. | ||
18 | - resets: Must contain an entry for each entry in reset-names. | ||
19 | See ../reset/reset.txt for details. | ||
20 | - reset-names: Must include the following entries: | ||
21 | - kbc | ||
16 | 22 | ||
17 | Optional properties, in addition to those specified by the shared | 23 | Optional properties, in addition to those specified by the shared |
18 | matrix-keyboard bindings: | 24 | matrix-keyboard bindings: |
@@ -31,6 +37,9 @@ keyboard: keyboard { | |||
31 | compatible = "nvidia,tegra20-kbc"; | 37 | compatible = "nvidia,tegra20-kbc"; |
32 | reg = <0x7000e200 0x100>; | 38 | reg = <0x7000e200 0x100>; |
33 | interrupts = <0 85 0x04>; | 39 | interrupts = <0 85 0x04>; |
40 | clocks = <&tegra_car 36>; | ||
41 | resets = <&tegra_car 36>; | ||
42 | reset-names = "kbc"; | ||
34 | nvidia,ghost-filter; | 43 | nvidia,ghost-filter; |
35 | nvidia,debounce-delay-ms = <640>; | 44 | nvidia,debounce-delay-ms = <640>; |
36 | nvidia,kbc-row-pins = <0 1 2>; /* pin 0, 1, 2 as rows */ | 45 | nvidia,kbc-row-pins = <0 1 2>; /* pin 0, 1, 2 as rows */ |
diff --git a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt index c6d7b11db9eb..f357c16ea815 100644 --- a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | |||
@@ -8,6 +8,12 @@ by mmc.txt and the properties used by the sdhci-tegra driver. | |||
8 | 8 | ||
9 | Required properties: | 9 | Required properties: |
10 | - compatible : Should be "nvidia,<chip>-sdhci" | 10 | - compatible : Should be "nvidia,<chip>-sdhci" |
11 | - clocks : Must contain one entry, for the module clock. | ||
12 | See ../clocks/clock-bindings.txt for details. | ||
13 | - resets : Must contain an entry for each entry in reset-names. | ||
14 | See ../reset/reset.txt for details. | ||
15 | - reset-names : Must include the following entries: | ||
16 | - sdhci | ||
11 | 17 | ||
12 | Optional properties: | 18 | Optional properties: |
13 | - power-gpios : Specify GPIOs for power control | 19 | - power-gpios : Specify GPIOs for power control |
@@ -18,6 +24,9 @@ sdhci@c8000200 { | |||
18 | compatible = "nvidia,tegra20-sdhci"; | 24 | compatible = "nvidia,tegra20-sdhci"; |
19 | reg = <0xc8000200 0x200>; | 25 | reg = <0xc8000200 0x200>; |
20 | interrupts = <47>; | 26 | interrupts = <47>; |
27 | clocks = <&tegra_car 14>; | ||
28 | resets = <&tegra_car 14>; | ||
29 | reset-names = "sdhci"; | ||
21 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 30 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
22 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 31 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
23 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | 32 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
diff --git a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt index 5aeee53ff9f4..5ae601e7f51f 100644 --- a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt +++ b/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt | |||
@@ -7,3 +7,15 @@ Required properties: | |||
7 | - clock-frequency : the frequency of the i2c bus | 7 | - clock-frequency : the frequency of the i2c bus |
8 | - gpios : the gpio used for ec request | 8 | - gpios : the gpio used for ec request |
9 | - slave-addr: the i2c address of the slave controller | 9 | - slave-addr: the i2c address of the slave controller |
10 | - clocks : Must contain an entry for each entry in clock-names. | ||
11 | See ../clocks/clock-bindings.txt for details. | ||
12 | - clock-names : Must include the following entries: | ||
13 | Tegra20/Tegra30: | ||
14 | - div-clk | ||
15 | - fast-clk | ||
16 | Tegra114: | ||
17 | - div-clk | ||
18 | - resets : Must contain an entry for each entry in reset-names. | ||
19 | See ../reset/reset.txt for details. | ||
20 | - reset-names : Must include the following entries: | ||
21 | - i2c | ||
diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt index 6b7510775c50..24cee06915c9 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | |||
@@ -42,14 +42,19 @@ Required properties: | |||
42 | - 0xc2000000: prefetchable memory region | 42 | - 0xc2000000: prefetchable memory region |
43 | Please refer to the standard PCI bus binding document for a more detailed | 43 | Please refer to the standard PCI bus binding document for a more detailed |
44 | explanation. | 44 | explanation. |
45 | - clocks: List of clock inputs of the controller. Must contain an entry for | 45 | - clocks: Must contain an entry for each entry in clock-names. |
46 | each entry in the clock-names property. | 46 | See ../clocks/clock-bindings.txt for details. |
47 | - clock-names: Must include the following entries: | 47 | - clock-names: Must include the following entries: |
48 | "pex": The Tegra clock of that name | 48 | - pex |
49 | "afi": The Tegra clock of that name | 49 | - afi |
50 | "pcie_xclk": The Tegra clock of that name | 50 | - pll_e |
51 | "pll_e": The Tegra clock of that name | 51 | - cml (not required for Tegra20) |
52 | "cml": The Tegra clock of that name (not required for Tegra20) | 52 | - resets: Must contain an entry for each entry in reset-names. |
53 | See ../reset/reset.txt for details. | ||
54 | - reset-names: Must include the following entries: | ||
55 | - pex | ||
56 | - afi | ||
57 | - pcie_x | ||
53 | 58 | ||
54 | Root ports are defined as subnodes of the PCIe controller node. | 59 | Root ports are defined as subnodes of the PCIe controller node. |
55 | 60 | ||
@@ -91,9 +96,10 @@ SoC DTSI: | |||
91 | 0x82000000 0 0xa0000000 0xa0000000 0 0x10000000 /* non-prefetchable memory */ | 96 | 0x82000000 0 0xa0000000 0xa0000000 0 0x10000000 /* non-prefetchable memory */ |
92 | 0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */ | 97 | 0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */ |
93 | 98 | ||
94 | clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>, | 99 | clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>; |
95 | <&tegra_car 118>; | 100 | clock-names = "pex", "afi", "pll_e"; |
96 | clock-names = "pex", "afi", "pcie_xclk", "pll_e"; | 101 | resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>; |
102 | reset-names = "pex", "afi", "pcie_x"; | ||
97 | status = "disabled"; | 103 | status = "disabled"; |
98 | 104 | ||
99 | pci@1,0 { | 105 | pci@1,0 { |
diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt index c3fc57af8772..c7ea9d4a988b 100644 --- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt +++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | |||
@@ -7,6 +7,12 @@ Required properties: | |||
7 | - reg: physical base address and length of the controller's registers | 7 | - reg: physical base address and length of the controller's registers |
8 | - #pwm-cells: should be 2. See pwm.txt in this directory for a description of | 8 | - #pwm-cells: should be 2. See pwm.txt in this directory for a description of |
9 | the cells format. | 9 | the cells format. |
10 | - clocks: Must contain one entry, for the module clock. | ||
11 | See ../clocks/clock-bindings.txt for details. | ||
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 following entries: | ||
15 | - pwm | ||
10 | 16 | ||
11 | Example: | 17 | Example: |
12 | 18 | ||
@@ -14,4 +20,7 @@ Example: | |||
14 | compatible = "nvidia,tegra20-pwm"; | 20 | compatible = "nvidia,tegra20-pwm"; |
15 | reg = <0x7000a000 0x100>; | 21 | reg = <0x7000a000 0x100>; |
16 | #pwm-cells = <2>; | 22 | #pwm-cells = <2>; |
23 | clocks = <&tegra_car 17>; | ||
24 | resets = <&tegra_car 17>; | ||
25 | reset-names = "pwm"; | ||
17 | }; | 26 | }; |
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt index 93f45e9dce7c..652d1ff2e8be 100644 --- a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt | |||
@@ -9,6 +9,8 @@ Required properties: | |||
9 | - compatible : should be "nvidia,tegra20-rtc". | 9 | - compatible : should be "nvidia,tegra20-rtc". |
10 | - reg : Specifies base physical address and size of the registers. | 10 | - reg : Specifies base physical address and size of the registers. |
11 | - interrupts : A single interrupt specifier. | 11 | - interrupts : A single interrupt specifier. |
12 | - clocks : Must contain one entry, for the module clock. | ||
13 | See ../clocks/clock-bindings.txt for details. | ||
12 | 14 | ||
13 | Example: | 15 | Example: |
14 | 16 | ||
@@ -16,4 +18,5 @@ timer { | |||
16 | compatible = "nvidia,tegra20-rtc"; | 18 | compatible = "nvidia,tegra20-rtc"; |
17 | reg = <0x7000e000 0x100>; | 19 | reg = <0x7000e000 0x100>; |
18 | interrupts = <0 2 0x04>; | 20 | interrupts = <0 2 0x04>; |
21 | clocks = <&tegra_car 4>; | ||
19 | }; | 22 | }; |
diff --git a/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt b/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt index 392a4493eebd..845850caf088 100644 --- a/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt +++ b/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt | |||
@@ -4,8 +4,17 @@ Required properties: | |||
4 | - compatible : should be "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart". | 4 | - compatible : should be "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart". |
5 | - reg: Should contain UART controller registers location and length. | 5 | - reg: Should contain UART controller registers location and length. |
6 | - interrupts: Should contain UART controller interrupts. | 6 | - interrupts: Should contain UART controller interrupts. |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - clocks: Must contain one entry, for the module clock. |
8 | request selector for this UART controller. | 8 | See ../clocks/clock-bindings.txt for details. |
9 | - resets : Must contain an entry for each entry in reset-names. | ||
10 | See ../reset/reset.txt for details. | ||
11 | - reset-names : Must include the following entries: | ||
12 | - serial | ||
13 | - dmas : Must contain an entry for each entry in clock-names. | ||
14 | See ../dma/dma.txt for details. | ||
15 | - dma-names : Must include the following entries: | ||
16 | - rx | ||
17 | - tx | ||
9 | 18 | ||
10 | Optional properties: | 19 | Optional properties: |
11 | - nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable | 20 | - nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable |
@@ -18,7 +27,11 @@ serial@70006000 { | |||
18 | reg = <0x70006000 0x40>; | 27 | reg = <0x70006000 0x40>; |
19 | reg-shift = <2>; | 28 | reg-shift = <2>; |
20 | interrupts = <0 36 0x04>; | 29 | interrupts = <0 36 0x04>; |
21 | nvidia,dma-request-selector = <&apbdma 8>; | ||
22 | nvidia,enable-modem-interrupt; | 30 | nvidia,enable-modem-interrupt; |
31 | clocks = <&tegra_car 6>; | ||
32 | resets = <&tegra_car 6>; | ||
33 | reset-names = "serial"; | ||
34 | dmas = <&apbdma 8>, <&apbdma 8>; | ||
35 | dma-names = "rx", "tx"; | ||
23 | status = "disabled"; | 36 | status = "disabled"; |
24 | }; | 37 | }; |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt index 8b8903ef0800..57f40f93453e 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt | |||
@@ -3,10 +3,11 @@ NVIDIA Tegra audio complex | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra-audio-alc5632" | 4 | - compatible : "nvidia,tegra-audio-alc5632" |
5 | - clocks : Must contain an entry for each entry in clock-names. | 5 | - clocks : Must contain an entry for each entry in clock-names. |
6 | See ../clocks/clock-bindings.txt for details. | ||
6 | - clock-names : Must include the following entries: | 7 | - clock-names : Must include the following entries: |
7 | "pll_a" (The Tegra clock of that name), | 8 | - pll_a |
8 | "pll_a_out0" (The Tegra clock of that name), | 9 | - pll_a_out0 |
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | 10 | - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) |
10 | - nvidia,model : The user-visible name of this sound complex. | 11 | - nvidia,model : The user-visible name of this sound complex. |
11 | - nvidia,audio-routing : A list of the connections between audio components. | 12 | - nvidia,audio-routing : A list of the connections between audio components. |
12 | Each entry is a pair of strings, the first being the connection's sink, | 13 | Each entry is a pair of strings, the first being the connection's sink, |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt index dc6224994d69..7788808dcd0b 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt | |||
@@ -3,10 +3,11 @@ NVIDIA Tegra audio complex, with RT5640 CODEC | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra-audio-rt5640" | 4 | - compatible : "nvidia,tegra-audio-rt5640" |
5 | - clocks : Must contain an entry for each entry in clock-names. | 5 | - clocks : Must contain an entry for each entry in clock-names. |
6 | See ../clocks/clock-bindings.txt for details. | ||
6 | - clock-names : Must include the following entries: | 7 | - clock-names : Must include the following entries: |
7 | "pll_a" (The Tegra clock of that name), | 8 | - pll_a |
8 | "pll_a_out0" (The Tegra clock of that name), | 9 | - pll_a_out0 |
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | 10 | - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) |
10 | - nvidia,model : The user-visible name of this sound complex. | 11 | - nvidia,model : The user-visible name of this sound complex. |
11 | - nvidia,audio-routing : A list of the connections between audio components. | 12 | - nvidia,audio-routing : A list of the connections between audio components. |
12 | Each entry is a pair of strings, the first being the connection's sink, | 13 | Each entry is a pair of strings, the first being the connection's sink, |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt index aab6ce0ad2fc..96f6a57dd6b4 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt | |||
@@ -3,10 +3,11 @@ NVIDIA Tegra audio complex | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra-audio-wm8753" | 4 | - compatible : "nvidia,tegra-audio-wm8753" |
5 | - clocks : Must contain an entry for each entry in clock-names. | 5 | - clocks : Must contain an entry for each entry in clock-names. |
6 | See ../clocks/clock-bindings.txt for details. | ||
6 | - clock-names : Must include the following entries: | 7 | - clock-names : Must include the following entries: |
7 | "pll_a" (The Tegra clock of that name), | 8 | - pll_a |
8 | "pll_a_out0" (The Tegra clock of that name), | 9 | - pll_a_out0 |
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | 10 | - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) |
10 | - nvidia,model : The user-visible name of this sound complex. | 11 | - nvidia,model : The user-visible name of this sound complex. |
11 | - nvidia,audio-routing : A list of the connections between audio components. | 12 | - nvidia,audio-routing : A list of the connections between audio components. |
12 | Each entry is a pair of strings, the first being the connection's sink, | 13 | Each entry is a pair of strings, the first being the connection's sink, |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt index 4b44dfb6ca0d..b795d282818d 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt | |||
@@ -3,10 +3,11 @@ NVIDIA Tegra audio complex | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra-audio-wm8903" | 4 | - compatible : "nvidia,tegra-audio-wm8903" |
5 | - clocks : Must contain an entry for each entry in clock-names. | 5 | - clocks : Must contain an entry for each entry in clock-names. |
6 | See ../clocks/clock-bindings.txt for details. | ||
6 | - clock-names : Must include the following entries: | 7 | - clock-names : Must include the following entries: |
7 | "pll_a" (The Tegra clock of that name), | 8 | - pll_a |
8 | "pll_a_out0" (The Tegra clock of that name), | 9 | - pll_a_out0 |
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | 10 | - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) |
10 | - nvidia,model : The user-visible name of this sound complex. | 11 | - nvidia,model : The user-visible name of this sound complex. |
11 | - nvidia,audio-routing : A list of the connections between audio components. | 12 | - nvidia,audio-routing : A list of the connections between audio components. |
12 | Each entry is a pair of strings, the first being the connection's sink, | 13 | Each entry is a pair of strings, the first being the connection's sink, |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt index ad589b163639..436f6cd9d07c 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt | |||
@@ -3,10 +3,11 @@ NVIDIA Tegra audio complex | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra-audio-wm9712" | 4 | - compatible : "nvidia,tegra-audio-wm9712" |
5 | - clocks : Must contain an entry for each entry in clock-names. | 5 | - clocks : Must contain an entry for each entry in clock-names. |
6 | See ../clocks/clock-bindings.txt for details. | ||
6 | - clock-names : Must include the following entries: | 7 | - clock-names : Must include the following entries: |
7 | "pll_a" (The Tegra clock of that name), | 8 | - pll_a |
8 | "pll_a_out0" (The Tegra clock of that name), | 9 | - pll_a_out0 |
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | 10 | - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) |
10 | - nvidia,model : The user-visible name of this sound complex. | 11 | - nvidia,model : The user-visible name of this sound complex. |
11 | - nvidia,audio-routing : A list of the connections between audio components. | 12 | - nvidia,audio-routing : A list of the connections between audio components. |
12 | Each entry is a pair of strings, the first being the connection's sink, | 13 | Each entry is a pair of strings, the first being the connection's sink, |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt index c1454979c1ef..eaf00102d92c 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt | |||
@@ -4,19 +4,33 @@ Required properties: | |||
4 | - compatible : "nvidia,tegra20-ac97" | 4 | - compatible : "nvidia,tegra20-ac97" |
5 | - reg : Should contain AC97 controller registers location and length | 5 | - reg : Should contain AC97 controller registers location and length |
6 | - interrupts : Should contain AC97 interrupt | 6 | - interrupts : Should contain AC97 interrupt |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - resets : Must contain an entry for each entry in reset-names. |
8 | request selector for the AC97 controller | 8 | See ../reset/reset.txt for details. |
9 | - reset-names : Must include the following entries: | ||
10 | - ac97 | ||
11 | - dmas : Must contain an entry for each entry in clock-names. | ||
12 | See ../dma/dma.txt for details. | ||
13 | - dma-names : Must include the following entries: | ||
14 | - rx | ||
15 | - tx | ||
16 | - clocks : Must contain one entry, for the module clock. | ||
17 | See ../clocks/clock-bindings.txt for details. | ||
9 | - nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number | 18 | - nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number |
10 | of the GPIO used to reset the external AC97 codec | 19 | of the GPIO used to reset the external AC97 codec |
11 | - nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number | 20 | - nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number |
12 | of the GPIO corresponding with the AC97 DAP _FS line | 21 | of the GPIO corresponding with the AC97 DAP _FS line |
22 | |||
13 | Example: | 23 | Example: |
14 | 24 | ||
15 | ac97@70002000 { | 25 | ac97@70002000 { |
16 | compatible = "nvidia,tegra20-ac97"; | 26 | compatible = "nvidia,tegra20-ac97"; |
17 | reg = <0x70002000 0x200>; | 27 | reg = <0x70002000 0x200>; |
18 | interrupts = <0 81 0x04>; | 28 | interrupts = <0 81 0x04>; |
19 | nvidia,dma-request-selector = <&apbdma 12>; | ||
20 | nvidia,codec-reset-gpio = <&gpio 170 0>; | 29 | nvidia,codec-reset-gpio = <&gpio 170 0>; |
21 | nvidia,codec-sync-gpio = <&gpio 120 0>; | 30 | nvidia,codec-sync-gpio = <&gpio 120 0>; |
31 | clocks = <&tegra_car 3>; | ||
32 | resets = <&tegra_car 3>; | ||
33 | reset-names = "ac97"; | ||
34 | dmas = <&apbdma 12>, <&apbdma 12>; | ||
35 | dma-names = "rx", "tx"; | ||
22 | }; | 36 | }; |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt index 0df2b5c816e3..dc30c6bfbe95 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt | |||
@@ -4,8 +4,17 @@ Required properties: | |||
4 | - compatible : "nvidia,tegra20-i2s" | 4 | - compatible : "nvidia,tegra20-i2s" |
5 | - reg : Should contain I2S registers location and length | 5 | - reg : Should contain I2S registers location and length |
6 | - interrupts : Should contain I2S interrupt | 6 | - interrupts : Should contain I2S interrupt |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - resets : Must contain an entry for each entry in reset-names. |
8 | request selector for this I2S controller | 8 | See ../reset/reset.txt for details. |
9 | - reset-names : Must include the following entries: | ||
10 | - i2s | ||
11 | - dmas : Must contain an entry for each entry in clock-names. | ||
12 | See ../dma/dma.txt for details. | ||
13 | - dma-names : Must include the following entries: | ||
14 | - rx | ||
15 | - tx | ||
16 | - clocks : Must contain one entry, for the module clock. | ||
17 | See ../clocks/clock-bindings.txt for details. | ||
9 | 18 | ||
10 | Example: | 19 | Example: |
11 | 20 | ||
@@ -13,5 +22,9 @@ i2s@70002800 { | |||
13 | compatible = "nvidia,tegra20-i2s"; | 22 | compatible = "nvidia,tegra20-i2s"; |
14 | reg = <0x70002800 0x200>; | 23 | reg = <0x70002800 0x200>; |
15 | interrupts = < 45 >; | 24 | interrupts = < 45 >; |
16 | nvidia,dma-request-selector = < &apbdma 2 >; | 25 | clocks = <&tegra_car 11>; |
26 | resets = <&tegra_car 11>; | ||
27 | reset-names = "i2s"; | ||
28 | dmas = <&apbdma 21>, <&apbdma 21>; | ||
29 | dma-names = "rx", "tx"; | ||
17 | }; | 30 | }; |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-ahub.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-ahub.txt index 0e5c12c66523..946e2ac46091 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-ahub.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-ahub.txt | |||
@@ -7,18 +7,48 @@ Required properties: | |||
7 | - Tegra30 requires 2 entries, for the APBIF and AHUB/AUDIO register blocks. | 7 | - Tegra30 requires 2 entries, for the APBIF and AHUB/AUDIO register blocks. |
8 | - Tegra114 requires an additional entry, for the APBIF2 register block. | 8 | - Tegra114 requires an additional entry, for the APBIF2 register block. |
9 | - interrupts : Should contain AHUB interrupt | 9 | - interrupts : Should contain AHUB interrupt |
10 | - nvidia,dma-request-selector : A list of the DMA channel specifiers. Each | 10 | - clocks : Must contain an entry for each entry in clock-names. |
11 | entry contains the Tegra DMA controller's phandle and request selector. | 11 | See ../clocks/clock-bindings.txt for details. |
12 | If a single entry is present, the request selectors for the channels are | ||
13 | assumed to be contiguous, and increment from this value. | ||
14 | If multiple values are given, one value must be given per channel. | ||
15 | - clocks : Must contain an entry for each required entry in clock-names. | ||
16 | - clock-names : Must include the following entries: | 12 | - clock-names : Must include the following entries: |
17 | - Tegra30: Requires d_audio, apbif, i2s0, i2s1, i2s2, i2s3, i2s4, dam0, | 13 | - d_audio |
18 | dam1, dam2, spdif_in. | 14 | - apbif |
19 | - Tegra114: Additionally requires amx, adx. | 15 | - resets : Must contain an entry for each entry in reset-names. |
16 | See ../reset/reset.txt for details. | ||
17 | - reset-names : Must include the following entries: | ||
18 | Tegra30 and later: | ||
19 | - d_audio | ||
20 | - apbif | ||
21 | - i2s0 | ||
22 | - i2s1 | ||
23 | - i2s2 | ||
24 | - i2s3 | ||
25 | - i2s4 | ||
26 | - dam0 | ||
27 | - dam1 | ||
28 | - dam2 | ||
29 | - spdif | ||
30 | Tegra114 and later additionally require: | ||
31 | - amx | ||
32 | - adx | ||
33 | Tegra124 and later additionally require: | ||
34 | - amx1 | ||
35 | - adx1 | ||
36 | - afc0 | ||
37 | - afc1 | ||
38 | - afc2 | ||
39 | - afc3 | ||
40 | - afc4 | ||
41 | - afc5 | ||
20 | - ranges : The bus address mapping for the configlink register bus. | 42 | - ranges : The bus address mapping for the configlink register bus. |
21 | Can be empty since the mapping is 1:1. | 43 | Can be empty since the mapping is 1:1. |
44 | - dmas : Must contain an entry for each entry in clock-names. | ||
45 | See ../dma/dma.txt for details. | ||
46 | - dma-names : Must include the following entries: | ||
47 | - rx0 .. rx<n> | ||
48 | - tx0 .. tx<n> | ||
49 | ... where n is: | ||
50 | Tegra30: 3 | ||
51 | Tegra114, Tegra124: 9 | ||
22 | - #address-cells : For the configlink bus. Should be <1>; | 52 | - #address-cells : For the configlink bus. Should be <1>; |
23 | - #size-cells : For the configlink bus. Should be <1>. | 53 | - #size-cells : For the configlink bus. Should be <1>. |
24 | 54 | ||
@@ -35,13 +65,20 @@ ahub@70080000 { | |||
35 | reg = <0x70080000 0x200 0x70080200 0x100>; | 65 | reg = <0x70080000 0x200 0x70080200 0x100>; |
36 | interrupts = < 0 103 0x04 >; | 66 | interrupts = < 0 103 0x04 >; |
37 | nvidia,dma-request-selector = <&apbdma 1>; | 67 | nvidia,dma-request-selector = <&apbdma 1>; |
38 | clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, | 68 | clocks = <&tegra_car 106>, <&tegra_car 107>; |
69 | clock-names = "d_audio", "apbif"; | ||
70 | resets = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, | ||
39 | <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, | 71 | <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, |
40 | <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, | 72 | <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, |
41 | <&tegra_car 110>, <&tegra_car 162>; | 73 | <&tegra_car 110>, <&tegra_car 10>; |
42 | clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", | 74 | reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", |
43 | "i2s3", "i2s4", "dam0", "dam1", "dam2", | 75 | "i2s3", "i2s4", "dam0", "dam1", "dam2", |
44 | "spdif_in"; | 76 | "spdif"; |
77 | dmas = <&apbdma 1>, <&apbdma 1>; | ||
78 | <&apbdma 2>, <&apbdma 2>; | ||
79 | <&apbdma 3>, <&apbdma 3>; | ||
80 | <&apbdma 4>, <&apbdma 4>; | ||
81 | dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", "rx3", "tx3"; | ||
45 | ranges; | 82 | ranges; |
46 | #address-cells = <1>; | 83 | #address-cells = <1>; |
47 | #size-cells = <1>; | 84 | #size-cells = <1>; |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt index dfa6c037124a..0c113ffe3814 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt | |||
@@ -3,13 +3,22 @@ NVIDIA Tegra30 I2S controller | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra30-i2s" | 4 | - compatible : "nvidia,tegra30-i2s" |
5 | - reg : Should contain I2S registers location and length | 5 | - reg : Should contain I2S registers location and length |
6 | - clocks : Must contain one entry, for the module clock. | ||
7 | See ../clocks/clock-bindings.txt for details. | ||
8 | - resets : Must contain an entry for each entry in reset-names. | ||
9 | See ../reset/reset.txt for details. | ||
10 | - reset-names : Must include the following entries: | ||
11 | - i2s | ||
6 | - nvidia,ahub-cif-ids : The list of AHUB CIF IDs for this port, rx (playback) | 12 | - nvidia,ahub-cif-ids : The list of AHUB CIF IDs for this port, rx (playback) |
7 | first, tx (capture) second. See nvidia,tegra30-ahub.txt for values. | 13 | first, tx (capture) second. See nvidia,tegra30-ahub.txt for values. |
8 | 14 | ||
9 | Example: | 15 | Example: |
10 | 16 | ||
11 | i2s@70002800 { | 17 | i2s@70080300 { |
12 | compatible = "nvidia,tegra30-i2s"; | 18 | compatible = "nvidia,tegra30-i2s"; |
13 | reg = <0x70080300 0x100>; | 19 | reg = <0x70080300 0x100>; |
14 | nvidia,ahub-cif-ids = <4 4>; | 20 | nvidia,ahub-cif-ids = <4 4>; |
21 | clocks = <&tegra_car 11>; | ||
22 | resets = <&tegra_car 11>; | ||
23 | reset-names = "i2s"; | ||
15 | }; | 24 | }; |
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt index 91ff771c7e77..7ea701e07dc2 100644 --- a/Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt | |||
@@ -4,10 +4,19 @@ Required properties: | |||
4 | - compatible : should be "nvidia,tegra114-spi". | 4 | - compatible : should be "nvidia,tegra114-spi". |
5 | - reg: Should contain SPI registers location and length. | 5 | - reg: Should contain SPI registers location and length. |
6 | - interrupts: Should contain SPI interrupts. | 6 | - interrupts: Should contain SPI interrupts. |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - clock-names : Must include the following entries: |
8 | request selector for this SPI controller. | 8 | - spi |
9 | - This is also require clock named "spi" as per binding document | 9 | - resets : Must contain an entry for each entry in reset-names. |
10 | Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 | See ../reset/reset.txt for details. |
11 | - reset-names : Must include the following entries: | ||
12 | - spi | ||
13 | - dmas : Must contain an entry for each entry in clock-names. | ||
14 | See ../dma/dma.txt for details. | ||
15 | - dma-names : Must include the following entries: | ||
16 | - rx | ||
17 | - tx | ||
18 | - clocks : Must contain an entry for each entry in clock-names. | ||
19 | See ../clocks/clock-bindings.txt for details. | ||
11 | 20 | ||
12 | Recommended properties: | 21 | Recommended properties: |
13 | - spi-max-frequency: Definition as per | 22 | - spi-max-frequency: Definition as per |
@@ -18,9 +27,14 @@ spi@7000d600 { | |||
18 | compatible = "nvidia,tegra114-spi"; | 27 | compatible = "nvidia,tegra114-spi"; |
19 | reg = <0x7000d600 0x200>; | 28 | reg = <0x7000d600 0x200>; |
20 | interrupts = <0 82 0x04>; | 29 | interrupts = <0 82 0x04>; |
21 | nvidia,dma-request-selector = <&apbdma 16>; | ||
22 | spi-max-frequency = <25000000>; | 30 | spi-max-frequency = <25000000>; |
23 | #address-cells = <1>; | 31 | #address-cells = <1>; |
24 | #size-cells = <0>; | 32 | #size-cells = <0>; |
33 | clocks = <&tegra_car 44>; | ||
34 | clock-names = "spi"; | ||
35 | resets = <&tegra_car 44>; | ||
36 | reset-names = "spi"; | ||
37 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
38 | dma-names = "rx", "tx"; | ||
25 | status = "disabled"; | 39 | status = "disabled"; |
26 | }; | 40 | }; |
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt index 7b53da5cb75b..bdf08e6dec9b 100644 --- a/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt | |||
@@ -4,8 +4,17 @@ Required properties: | |||
4 | - compatible : should be "nvidia,tegra20-sflash". | 4 | - compatible : should be "nvidia,tegra20-sflash". |
5 | - reg: Should contain SFLASH registers location and length. | 5 | - reg: Should contain SFLASH registers location and length. |
6 | - interrupts: Should contain SFLASH interrupts. | 6 | - interrupts: Should contain SFLASH interrupts. |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - clocks : Must contain one entry, for the module clock. |
8 | request selector for this SFLASH controller. | 8 | See ../clocks/clock-bindings.txt for details. |
9 | - resets : Must contain an entry for each entry in reset-names. | ||
10 | See ../reset/reset.txt for details. | ||
11 | - reset-names : Must include the following entries: | ||
12 | - spi | ||
13 | - dmas : Must contain an entry for each entry in clock-names. | ||
14 | See ../dma/dma.txt for details. | ||
15 | - dma-names : Must include the following entries: | ||
16 | - rx | ||
17 | - tx | ||
9 | 18 | ||
10 | Recommended properties: | 19 | Recommended properties: |
11 | - spi-max-frequency: Definition as per | 20 | - spi-max-frequency: Definition as per |
@@ -17,10 +26,13 @@ spi@7000c380 { | |||
17 | compatible = "nvidia,tegra20-sflash"; | 26 | compatible = "nvidia,tegra20-sflash"; |
18 | reg = <0x7000c380 0x80>; | 27 | reg = <0x7000c380 0x80>; |
19 | interrupts = <0 39 0x04>; | 28 | interrupts = <0 39 0x04>; |
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | 29 | spi-max-frequency = <25000000>; |
22 | #address-cells = <1>; | 30 | #address-cells = <1>; |
23 | #size-cells = <0>; | 31 | #size-cells = <0>; |
32 | clocks = <&tegra_car 43>; | ||
33 | resets = <&tegra_car 43>; | ||
34 | reset-names = "spi"; | ||
35 | dmas = <&apbdma 11>, <&apbdma 11>; | ||
36 | dma-names = "rx", "tx"; | ||
24 | status = "disabled"; | 37 | status = "disabled"; |
25 | }; | 38 | }; |
26 | |||
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt index eefe15e3d95e..5db9144a33c8 100644 --- a/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt | |||
@@ -4,8 +4,17 @@ Required properties: | |||
4 | - compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink". | 4 | - compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink". |
5 | - reg: Should contain SLINK registers location and length. | 5 | - reg: Should contain SLINK registers location and length. |
6 | - interrupts: Should contain SLINK interrupts. | 6 | - interrupts: Should contain SLINK interrupts. |
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | 7 | - clocks : Must contain one entry, for the module clock. |
8 | request selector for this SLINK controller. | 8 | See ../clocks/clock-bindings.txt for details. |
9 | - resets : Must contain an entry for each entry in reset-names. | ||
10 | See ../reset/reset.txt for details. | ||
11 | - reset-names : Must include the following entries: | ||
12 | - spi | ||
13 | - dmas : Must contain an entry for each entry in clock-names. | ||
14 | See ../dma/dma.txt for details. | ||
15 | - dma-names : Must include the following entries: | ||
16 | - rx | ||
17 | - tx | ||
9 | 18 | ||
10 | Recommended properties: | 19 | Recommended properties: |
11 | - spi-max-frequency: Definition as per | 20 | - spi-max-frequency: Definition as per |
@@ -17,10 +26,13 @@ spi@7000d600 { | |||
17 | compatible = "nvidia,tegra20-slink"; | 26 | compatible = "nvidia,tegra20-slink"; |
18 | reg = <0x7000d600 0x200>; | 27 | reg = <0x7000d600 0x200>; |
19 | interrupts = <0 82 0x04>; | 28 | interrupts = <0 82 0x04>; |
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | 29 | spi-max-frequency = <25000000>; |
22 | #address-cells = <1>; | 30 | #address-cells = <1>; |
23 | #size-cells = <0>; | 31 | #size-cells = <0>; |
32 | clocks = <&tegra_car 44>; | ||
33 | resets = <&tegra_car 44>; | ||
34 | reset-names = "spi"; | ||
35 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
36 | dma-names = "rx", "tx"; | ||
24 | status = "disabled"; | 37 | status = "disabled"; |
25 | }; | 38 | }; |
26 | |||
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt index e019fdc38773..4a864bd10d3d 100644 --- a/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt +++ b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt | |||
@@ -8,6 +8,8 @@ Required properties: | |||
8 | - compatible : should be "nvidia,tegra20-timer". | 8 | - compatible : should be "nvidia,tegra20-timer". |
9 | - reg : Specifies base physical address and size of the registers. | 9 | - reg : Specifies base physical address and size of the registers. |
10 | - interrupts : A list of 4 interrupts; one per timer channel. | 10 | - interrupts : A list of 4 interrupts; one per timer channel. |
11 | - clocks : Must contain one entry, for the module clock. | ||
12 | See ../clocks/clock-bindings.txt for details. | ||
11 | 13 | ||
12 | Example: | 14 | Example: |
13 | 15 | ||
@@ -18,4 +20,5 @@ timer { | |||
18 | 0 1 0x04 | 20 | 0 1 0x04 |
19 | 0 41 0x04 | 21 | 0 41 0x04 |
20 | 0 42 0x04>; | 22 | 0 42 0x04>; |
23 | clocks = <&tegra_car 132>; | ||
21 | }; | 24 | }; |
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt index 906109d4c593..b5082a1cf461 100644 --- a/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt +++ b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt | |||
@@ -10,6 +10,8 @@ Required properties: | |||
10 | - reg : Specifies base physical address and size of the registers. | 10 | - reg : Specifies base physical address and size of the registers. |
11 | - interrupts : A list of 6 interrupts; one per each of timer channels 1 | 11 | - interrupts : A list of 6 interrupts; one per each of timer channels 1 |
12 | through 5, and one for the shared interrupt for the remaining channels. | 12 | through 5, and one for the shared interrupt for the remaining channels. |
13 | - clocks : Must contain one entry, for the module clock. | ||
14 | See ../clocks/clock-bindings.txt for details. | ||
13 | 15 | ||
14 | timer { | 16 | timer { |
15 | compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; | 17 | compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; |
@@ -20,4 +22,5 @@ timer { | |||
20 | 0 42 0x04 | 22 | 0 42 0x04 |
21 | 0 121 0x04 | 23 | 0 121 0x04 |
22 | 0 122 0x04>; | 24 | 0 122 0x04>; |
25 | clocks = <&tegra_car 214>; | ||
23 | }; | 26 | }; |
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt index df0933043a5b..3dc9140e3dfb 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt | |||
@@ -8,7 +8,12 @@ and additions : | |||
8 | Required properties : | 8 | Required properties : |
9 | - compatible : Should be "nvidia,tegra20-ehci". | 9 | - compatible : Should be "nvidia,tegra20-ehci". |
10 | - nvidia,phy : phandle of the PHY that the controller is connected to. | 10 | - nvidia,phy : phandle of the PHY that the controller is connected to. |
11 | - clocks : Contains a single entry which defines the USB controller's clock. | 11 | - clocks : Must contain one entry, for the module clock. |
12 | See ../clocks/clock-bindings.txt for details. | ||
13 | - resets : Must contain an entry for each entry in reset-names. | ||
14 | See ../reset/reset.txt for details. | ||
15 | - reset-names : Must include the following entries: | ||
16 | - usb | ||
12 | 17 | ||
13 | Optional properties: | 18 | Optional properties: |
14 | - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20 | 19 | - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20 |
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi index 8d42787c8ff1..731249fbe206 100644 --- a/arch/arm/boot/dts/tegra114.dtsi +++ b/arch/arm/boot/dts/tegra114.dtsi | |||
@@ -43,6 +43,7 @@ | |||
43 | compatible = "nvidia,tegra114-car"; | 43 | compatible = "nvidia,tegra114-car"; |
44 | reg = <0x60006000 0x1000>; | 44 | reg = <0x60006000 0x1000>; |
45 | #clock-cells = <1>; | 45 | #clock-cells = <1>; |
46 | #reset-cells = <1>; | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | apbdma: dma { | 49 | apbdma: dma { |
@@ -81,6 +82,9 @@ | |||
81 | <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, | 82 | <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, |
82 | <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; | 83 | <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; |
83 | clocks = <&tegra_car TEGRA114_CLK_APBDMA>; | 84 | clocks = <&tegra_car TEGRA114_CLK_APBDMA>; |
85 | resets = <&tegra_car 34>; | ||
86 | reset-names = "dma"; | ||
87 | #dma-cells = <1>; | ||
84 | }; | 88 | }; |
85 | 89 | ||
86 | ahb: ahb { | 90 | ahb: ahb { |
@@ -124,9 +128,12 @@ | |||
124 | reg = <0x70006000 0x40>; | 128 | reg = <0x70006000 0x40>; |
125 | reg-shift = <2>; | 129 | reg-shift = <2>; |
126 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; | 130 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; |
127 | nvidia,dma-request-selector = <&apbdma 8>; | ||
128 | status = "disabled"; | ||
129 | clocks = <&tegra_car TEGRA114_CLK_UARTA>; | 131 | clocks = <&tegra_car TEGRA114_CLK_UARTA>; |
132 | resets = <&tegra_car 6>; | ||
133 | reset-names = "serial"; | ||
134 | dmas = <&apbdma 8>, <&apbdma 8>; | ||
135 | dma-names = "rx", "tx"; | ||
136 | status = "disabled"; | ||
130 | }; | 137 | }; |
131 | 138 | ||
132 | uartb: serial@70006040 { | 139 | uartb: serial@70006040 { |
@@ -134,9 +141,12 @@ | |||
134 | reg = <0x70006040 0x40>; | 141 | reg = <0x70006040 0x40>; |
135 | reg-shift = <2>; | 142 | reg-shift = <2>; |
136 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; | 143 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; |
137 | nvidia,dma-request-selector = <&apbdma 9>; | ||
138 | status = "disabled"; | ||
139 | clocks = <&tegra_car TEGRA114_CLK_UARTB>; | 144 | clocks = <&tegra_car TEGRA114_CLK_UARTB>; |
145 | resets = <&tegra_car 7>; | ||
146 | reset-names = "serial"; | ||
147 | dmas = <&apbdma 9>, <&apbdma 9>; | ||
148 | dma-names = "rx", "tx"; | ||
149 | status = "disabled"; | ||
140 | }; | 150 | }; |
141 | 151 | ||
142 | uartc: serial@70006200 { | 152 | uartc: serial@70006200 { |
@@ -144,9 +154,12 @@ | |||
144 | reg = <0x70006200 0x100>; | 154 | reg = <0x70006200 0x100>; |
145 | reg-shift = <2>; | 155 | reg-shift = <2>; |
146 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; | 156 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; |
147 | nvidia,dma-request-selector = <&apbdma 10>; | ||
148 | status = "disabled"; | ||
149 | clocks = <&tegra_car TEGRA114_CLK_UARTC>; | 157 | clocks = <&tegra_car TEGRA114_CLK_UARTC>; |
158 | resets = <&tegra_car 55>; | ||
159 | reset-names = "serial"; | ||
160 | dmas = <&apbdma 10>, <&apbdma 10>; | ||
161 | dma-names = "rx", "tx"; | ||
162 | status = "disabled"; | ||
150 | }; | 163 | }; |
151 | 164 | ||
152 | uartd: serial@70006300 { | 165 | uartd: serial@70006300 { |
@@ -154,9 +167,12 @@ | |||
154 | reg = <0x70006300 0x100>; | 167 | reg = <0x70006300 0x100>; |
155 | reg-shift = <2>; | 168 | reg-shift = <2>; |
156 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; | 169 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; |
157 | nvidia,dma-request-selector = <&apbdma 19>; | ||
158 | status = "disabled"; | ||
159 | clocks = <&tegra_car TEGRA114_CLK_UARTD>; | 170 | clocks = <&tegra_car TEGRA114_CLK_UARTD>; |
171 | resets = <&tegra_car 65>; | ||
172 | reset-names = "serial"; | ||
173 | dmas = <&apbdma 19>, <&apbdma 19>; | ||
174 | dma-names = "rx", "tx"; | ||
175 | status = "disabled"; | ||
160 | }; | 176 | }; |
161 | 177 | ||
162 | pwm: pwm { | 178 | pwm: pwm { |
@@ -164,6 +180,8 @@ | |||
164 | reg = <0x7000a000 0x100>; | 180 | reg = <0x7000a000 0x100>; |
165 | #pwm-cells = <2>; | 181 | #pwm-cells = <2>; |
166 | clocks = <&tegra_car TEGRA114_CLK_PWM>; | 182 | clocks = <&tegra_car TEGRA114_CLK_PWM>; |
183 | resets = <&tegra_car 17>; | ||
184 | reset-names = "pwm"; | ||
167 | status = "disabled"; | 185 | status = "disabled"; |
168 | }; | 186 | }; |
169 | 187 | ||
@@ -175,6 +193,10 @@ | |||
175 | #size-cells = <0>; | 193 | #size-cells = <0>; |
176 | clocks = <&tegra_car TEGRA114_CLK_I2C1>; | 194 | clocks = <&tegra_car TEGRA114_CLK_I2C1>; |
177 | clock-names = "div-clk"; | 195 | clock-names = "div-clk"; |
196 | resets = <&tegra_car 12>; | ||
197 | reset-names = "i2c"; | ||
198 | dmas = <&apbdma 21>, <&apbdma 21>; | ||
199 | dma-names = "rx", "tx"; | ||
178 | status = "disabled"; | 200 | status = "disabled"; |
179 | }; | 201 | }; |
180 | 202 | ||
@@ -186,6 +208,10 @@ | |||
186 | #size-cells = <0>; | 208 | #size-cells = <0>; |
187 | clocks = <&tegra_car TEGRA114_CLK_I2C2>; | 209 | clocks = <&tegra_car TEGRA114_CLK_I2C2>; |
188 | clock-names = "div-clk"; | 210 | clock-names = "div-clk"; |
211 | resets = <&tegra_car 54>; | ||
212 | reset-names = "i2c"; | ||
213 | dmas = <&apbdma 22>, <&apbdma 22>; | ||
214 | dma-names = "rx", "tx"; | ||
189 | status = "disabled"; | 215 | status = "disabled"; |
190 | }; | 216 | }; |
191 | 217 | ||
@@ -197,6 +223,10 @@ | |||
197 | #size-cells = <0>; | 223 | #size-cells = <0>; |
198 | clocks = <&tegra_car TEGRA114_CLK_I2C3>; | 224 | clocks = <&tegra_car TEGRA114_CLK_I2C3>; |
199 | clock-names = "div-clk"; | 225 | clock-names = "div-clk"; |
226 | resets = <&tegra_car 67>; | ||
227 | reset-names = "i2c"; | ||
228 | dmas = <&apbdma 23>, <&apbdma 23>; | ||
229 | dma-names = "rx", "tx"; | ||
200 | status = "disabled"; | 230 | status = "disabled"; |
201 | }; | 231 | }; |
202 | 232 | ||
@@ -208,6 +238,10 @@ | |||
208 | #size-cells = <0>; | 238 | #size-cells = <0>; |
209 | clocks = <&tegra_car TEGRA114_CLK_I2C4>; | 239 | clocks = <&tegra_car TEGRA114_CLK_I2C4>; |
210 | clock-names = "div-clk"; | 240 | clock-names = "div-clk"; |
241 | resets = <&tegra_car 103>; | ||
242 | reset-names = "i2c"; | ||
243 | dmas = <&apbdma 26>, <&apbdma 26>; | ||
244 | dma-names = "rx", "tx"; | ||
211 | status = "disabled"; | 245 | status = "disabled"; |
212 | }; | 246 | }; |
213 | 247 | ||
@@ -219,6 +253,10 @@ | |||
219 | #size-cells = <0>; | 253 | #size-cells = <0>; |
220 | clocks = <&tegra_car TEGRA114_CLK_I2C5>; | 254 | clocks = <&tegra_car TEGRA114_CLK_I2C5>; |
221 | clock-names = "div-clk"; | 255 | clock-names = "div-clk"; |
256 | resets = <&tegra_car 47>; | ||
257 | reset-names = "i2c"; | ||
258 | dmas = <&apbdma 24>, <&apbdma 24>; | ||
259 | dma-names = "rx", "tx"; | ||
222 | status = "disabled"; | 260 | status = "disabled"; |
223 | }; | 261 | }; |
224 | 262 | ||
@@ -226,11 +264,14 @@ | |||
226 | compatible = "nvidia,tegra114-spi"; | 264 | compatible = "nvidia,tegra114-spi"; |
227 | reg = <0x7000d400 0x200>; | 265 | reg = <0x7000d400 0x200>; |
228 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; | 266 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; |
229 | nvidia,dma-request-selector = <&apbdma 15>; | ||
230 | #address-cells = <1>; | 267 | #address-cells = <1>; |
231 | #size-cells = <0>; | 268 | #size-cells = <0>; |
232 | clocks = <&tegra_car TEGRA114_CLK_SBC1>; | 269 | clocks = <&tegra_car TEGRA114_CLK_SBC1>; |
233 | clock-names = "spi"; | 270 | clock-names = "spi"; |
271 | resets = <&tegra_car 41>; | ||
272 | reset-names = "spi"; | ||
273 | dmas = <&apbdma 15>, <&apbdma 15>; | ||
274 | dma-names = "rx", "tx"; | ||
234 | status = "disabled"; | 275 | status = "disabled"; |
235 | }; | 276 | }; |
236 | 277 | ||
@@ -238,11 +279,14 @@ | |||
238 | compatible = "nvidia,tegra114-spi"; | 279 | compatible = "nvidia,tegra114-spi"; |
239 | reg = <0x7000d600 0x200>; | 280 | reg = <0x7000d600 0x200>; |
240 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; | 281 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; |
241 | nvidia,dma-request-selector = <&apbdma 16>; | ||
242 | #address-cells = <1>; | 282 | #address-cells = <1>; |
243 | #size-cells = <0>; | 283 | #size-cells = <0>; |
244 | clocks = <&tegra_car TEGRA114_CLK_SBC2>; | 284 | clocks = <&tegra_car TEGRA114_CLK_SBC2>; |
245 | clock-names = "spi"; | 285 | clock-names = "spi"; |
286 | resets = <&tegra_car 44>; | ||
287 | reset-names = "spi"; | ||
288 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
289 | dma-names = "rx", "tx"; | ||
246 | status = "disabled"; | 290 | status = "disabled"; |
247 | }; | 291 | }; |
248 | 292 | ||
@@ -250,11 +294,14 @@ | |||
250 | compatible = "nvidia,tegra114-spi"; | 294 | compatible = "nvidia,tegra114-spi"; |
251 | reg = <0x7000d800 0x200>; | 295 | reg = <0x7000d800 0x200>; |
252 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; | 296 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; |
253 | nvidia,dma-request-selector = <&apbdma 17>; | ||
254 | #address-cells = <1>; | 297 | #address-cells = <1>; |
255 | #size-cells = <0>; | 298 | #size-cells = <0>; |
256 | clocks = <&tegra_car TEGRA114_CLK_SBC3>; | 299 | clocks = <&tegra_car TEGRA114_CLK_SBC3>; |
257 | clock-names = "spi"; | 300 | clock-names = "spi"; |
301 | resets = <&tegra_car 46>; | ||
302 | reset-names = "spi"; | ||
303 | dmas = <&apbdma 17>, <&apbdma 17>; | ||
304 | dma-names = "rx", "tx"; | ||
258 | status = "disabled"; | 305 | status = "disabled"; |
259 | }; | 306 | }; |
260 | 307 | ||
@@ -262,11 +309,14 @@ | |||
262 | compatible = "nvidia,tegra114-spi"; | 309 | compatible = "nvidia,tegra114-spi"; |
263 | reg = <0x7000da00 0x200>; | 310 | reg = <0x7000da00 0x200>; |
264 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | 311 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; |
265 | nvidia,dma-request-selector = <&apbdma 18>; | ||
266 | #address-cells = <1>; | 312 | #address-cells = <1>; |
267 | #size-cells = <0>; | 313 | #size-cells = <0>; |
268 | clocks = <&tegra_car TEGRA114_CLK_SBC4>; | 314 | clocks = <&tegra_car TEGRA114_CLK_SBC4>; |
269 | clock-names = "spi"; | 315 | clock-names = "spi"; |
316 | resets = <&tegra_car 68>; | ||
317 | reset-names = "spi"; | ||
318 | dmas = <&apbdma 18>, <&apbdma 18>; | ||
319 | dma-names = "rx", "tx"; | ||
270 | status = "disabled"; | 320 | status = "disabled"; |
271 | }; | 321 | }; |
272 | 322 | ||
@@ -274,11 +324,14 @@ | |||
274 | compatible = "nvidia,tegra114-spi"; | 324 | compatible = "nvidia,tegra114-spi"; |
275 | reg = <0x7000dc00 0x200>; | 325 | reg = <0x7000dc00 0x200>; |
276 | interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; | 326 | interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; |
277 | nvidia,dma-request-selector = <&apbdma 27>; | ||
278 | #address-cells = <1>; | 327 | #address-cells = <1>; |
279 | #size-cells = <0>; | 328 | #size-cells = <0>; |
280 | clocks = <&tegra_car TEGRA114_CLK_SBC5>; | 329 | clocks = <&tegra_car TEGRA114_CLK_SBC5>; |
281 | clock-names = "spi"; | 330 | clock-names = "spi"; |
331 | resets = <&tegra_car 104>; | ||
332 | reset-names = "spi"; | ||
333 | dmas = <&apbdma 27>, <&apbdma 27>; | ||
334 | dma-names = "rx", "tx"; | ||
282 | status = "disabled"; | 335 | status = "disabled"; |
283 | }; | 336 | }; |
284 | 337 | ||
@@ -286,11 +339,14 @@ | |||
286 | compatible = "nvidia,tegra114-spi"; | 339 | compatible = "nvidia,tegra114-spi"; |
287 | reg = <0x7000de00 0x200>; | 340 | reg = <0x7000de00 0x200>; |
288 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; | 341 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; |
289 | nvidia,dma-request-selector = <&apbdma 28>; | ||
290 | #address-cells = <1>; | 342 | #address-cells = <1>; |
291 | #size-cells = <0>; | 343 | #size-cells = <0>; |
292 | clocks = <&tegra_car TEGRA114_CLK_SBC6>; | 344 | clocks = <&tegra_car TEGRA114_CLK_SBC6>; |
293 | clock-names = "spi"; | 345 | clock-names = "spi"; |
346 | resets = <&tegra_car 105>; | ||
347 | reset-names = "spi"; | ||
348 | dmas = <&apbdma 28>, <&apbdma 28>; | ||
349 | dma-names = "rx", "tx"; | ||
294 | status = "disabled"; | 350 | status = "disabled"; |
295 | }; | 351 | }; |
296 | 352 | ||
@@ -306,6 +362,8 @@ | |||
306 | reg = <0x7000e200 0x100>; | 362 | reg = <0x7000e200 0x100>; |
307 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; | 363 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; |
308 | clocks = <&tegra_car TEGRA114_CLK_KBC>; | 364 | clocks = <&tegra_car TEGRA114_CLK_KBC>; |
365 | resets = <&tegra_car 36>; | ||
366 | reset-names = "kbc"; | ||
309 | status = "disabled"; | 367 | status = "disabled"; |
310 | }; | 368 | }; |
311 | 369 | ||
@@ -333,26 +391,39 @@ | |||
333 | <0x70080200 0x100>, | 391 | <0x70080200 0x100>, |
334 | <0x70081000 0x200>; | 392 | <0x70081000 0x200>; |
335 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; | 393 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; |
336 | nvidia,dma-request-selector = <&apbdma 1>, <&apbdma 2>, | ||
337 | <&apbdma 3>, <&apbdma 4>, <&apbdma 6>, <&apbdma 7>, | ||
338 | <&apbdma 12>, <&apbdma 13>, <&apbdma 14>, | ||
339 | <&apbdma 29>; | ||
340 | clocks = <&tegra_car TEGRA114_CLK_D_AUDIO>, | 394 | clocks = <&tegra_car TEGRA114_CLK_D_AUDIO>, |
341 | <&tegra_car TEGRA114_CLK_APBIF>, | 395 | <&tegra_car TEGRA114_CLK_APBIF>; |
342 | <&tegra_car TEGRA114_CLK_I2S0>, | 396 | clock-names = "d_audio", "apbif"; |
343 | <&tegra_car TEGRA114_CLK_I2S1>, | 397 | resets = <&tegra_car 106>, /* d_audio */ |
344 | <&tegra_car TEGRA114_CLK_I2S2>, | 398 | <&tegra_car 107>, /* apbif */ |
345 | <&tegra_car TEGRA114_CLK_I2S3>, | 399 | <&tegra_car 30>, /* i2s0 */ |
346 | <&tegra_car TEGRA114_CLK_I2S4>, | 400 | <&tegra_car 11>, /* i2s1 */ |
347 | <&tegra_car TEGRA114_CLK_DAM0>, | 401 | <&tegra_car 18>, /* i2s2 */ |
348 | <&tegra_car TEGRA114_CLK_DAM1>, | 402 | <&tegra_car 101>, /* i2s3 */ |
349 | <&tegra_car TEGRA114_CLK_DAM2>, | 403 | <&tegra_car 102>, /* i2s4 */ |
350 | <&tegra_car TEGRA114_CLK_SPDIF_IN>, | 404 | <&tegra_car 108>, /* dam0 */ |
351 | <&tegra_car TEGRA114_CLK_AMX>, | 405 | <&tegra_car 109>, /* dam1 */ |
352 | <&tegra_car TEGRA114_CLK_ADX>; | 406 | <&tegra_car 110>, /* dam2 */ |
353 | clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", | 407 | <&tegra_car 10>, /* spdif */ |
408 | <&tegra_car 153>, /* amx */ | ||
409 | <&tegra_car 154>; /* adx */ | ||
410 | reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", | ||
354 | "i2s3", "i2s4", "dam0", "dam1", "dam2", | 411 | "i2s3", "i2s4", "dam0", "dam1", "dam2", |
355 | "spdif_in", "amx", "adx"; | 412 | "spdif", "amx", "adx"; |
413 | dmas = <&apbdma 1>, <&apbdma 1>, | ||
414 | <&apbdma 2>, <&apbdma 2>, | ||
415 | <&apbdma 3>, <&apbdma 3>, | ||
416 | <&apbdma 4>, <&apbdma 4>, | ||
417 | <&apbdma 6>, <&apbdma 6>, | ||
418 | <&apbdma 7>, <&apbdma 7>, | ||
419 | <&apbdma 12>, <&apbdma 12>, | ||
420 | <&apbdma 13>, <&apbdma 13>, | ||
421 | <&apbdma 14>, <&apbdma 14>, | ||
422 | <&apbdma 29>, <&apbdma 29>; | ||
423 | dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", | ||
424 | "rx3", "tx3", "rx4", "tx4", "rx5", "tx5", | ||
425 | "rx6", "tx6", "rx7", "tx7", "rx8", "tx8", | ||
426 | "rx9", "tx9"; | ||
356 | ranges; | 427 | ranges; |
357 | #address-cells = <1>; | 428 | #address-cells = <1>; |
358 | #size-cells = <1>; | 429 | #size-cells = <1>; |
@@ -362,6 +433,8 @@ | |||
362 | reg = <0x70080300 0x100>; | 433 | reg = <0x70080300 0x100>; |
363 | nvidia,ahub-cif-ids = <4 4>; | 434 | nvidia,ahub-cif-ids = <4 4>; |
364 | clocks = <&tegra_car TEGRA114_CLK_I2S0>; | 435 | clocks = <&tegra_car TEGRA114_CLK_I2S0>; |
436 | resets = <&tegra_car 30>; | ||
437 | reset-names = "i2s"; | ||
365 | status = "disabled"; | 438 | status = "disabled"; |
366 | }; | 439 | }; |
367 | 440 | ||
@@ -370,6 +443,8 @@ | |||
370 | reg = <0x70080400 0x100>; | 443 | reg = <0x70080400 0x100>; |
371 | nvidia,ahub-cif-ids = <5 5>; | 444 | nvidia,ahub-cif-ids = <5 5>; |
372 | clocks = <&tegra_car TEGRA114_CLK_I2S1>; | 445 | clocks = <&tegra_car TEGRA114_CLK_I2S1>; |
446 | resets = <&tegra_car 11>; | ||
447 | reset-names = "i2s"; | ||
373 | status = "disabled"; | 448 | status = "disabled"; |
374 | }; | 449 | }; |
375 | 450 | ||
@@ -378,6 +453,8 @@ | |||
378 | reg = <0x70080500 0x100>; | 453 | reg = <0x70080500 0x100>; |
379 | nvidia,ahub-cif-ids = <6 6>; | 454 | nvidia,ahub-cif-ids = <6 6>; |
380 | clocks = <&tegra_car TEGRA114_CLK_I2S2>; | 455 | clocks = <&tegra_car TEGRA114_CLK_I2S2>; |
456 | resets = <&tegra_car 18>; | ||
457 | reset-names = "i2s"; | ||
381 | status = "disabled"; | 458 | status = "disabled"; |
382 | }; | 459 | }; |
383 | 460 | ||
@@ -386,6 +463,8 @@ | |||
386 | reg = <0x70080600 0x100>; | 463 | reg = <0x70080600 0x100>; |
387 | nvidia,ahub-cif-ids = <7 7>; | 464 | nvidia,ahub-cif-ids = <7 7>; |
388 | clocks = <&tegra_car TEGRA114_CLK_I2S3>; | 465 | clocks = <&tegra_car TEGRA114_CLK_I2S3>; |
466 | resets = <&tegra_car 101>; | ||
467 | reset-names = "i2s"; | ||
389 | status = "disabled"; | 468 | status = "disabled"; |
390 | }; | 469 | }; |
391 | 470 | ||
@@ -394,6 +473,8 @@ | |||
394 | reg = <0x70080700 0x100>; | 473 | reg = <0x70080700 0x100>; |
395 | nvidia,ahub-cif-ids = <8 8>; | 474 | nvidia,ahub-cif-ids = <8 8>; |
396 | clocks = <&tegra_car TEGRA114_CLK_I2S4>; | 475 | clocks = <&tegra_car TEGRA114_CLK_I2S4>; |
476 | resets = <&tegra_car 102>; | ||
477 | reset-names = "i2s"; | ||
397 | status = "disabled"; | 478 | status = "disabled"; |
398 | }; | 479 | }; |
399 | }; | 480 | }; |
@@ -403,6 +484,8 @@ | |||
403 | reg = <0x78000000 0x200>; | 484 | reg = <0x78000000 0x200>; |
404 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; | 485 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; |
405 | clocks = <&tegra_car TEGRA114_CLK_SDMMC1>; | 486 | clocks = <&tegra_car TEGRA114_CLK_SDMMC1>; |
487 | resets = <&tegra_car 14>; | ||
488 | reset-names = "sdhci"; | ||
406 | status = "disable"; | 489 | status = "disable"; |
407 | }; | 490 | }; |
408 | 491 | ||
@@ -411,6 +494,8 @@ | |||
411 | reg = <0x78000200 0x200>; | 494 | reg = <0x78000200 0x200>; |
412 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 495 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
413 | clocks = <&tegra_car TEGRA114_CLK_SDMMC2>; | 496 | clocks = <&tegra_car TEGRA114_CLK_SDMMC2>; |
497 | resets = <&tegra_car 9>; | ||
498 | reset-names = "sdhci"; | ||
414 | status = "disable"; | 499 | status = "disable"; |
415 | }; | 500 | }; |
416 | 501 | ||
@@ -419,6 +504,8 @@ | |||
419 | reg = <0x78000400 0x200>; | 504 | reg = <0x78000400 0x200>; |
420 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; | 505 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; |
421 | clocks = <&tegra_car TEGRA114_CLK_SDMMC3>; | 506 | clocks = <&tegra_car TEGRA114_CLK_SDMMC3>; |
507 | resets = <&tegra_car 69>; | ||
508 | reset-names = "sdhci"; | ||
422 | status = "disable"; | 509 | status = "disable"; |
423 | }; | 510 | }; |
424 | 511 | ||
@@ -427,6 +514,8 @@ | |||
427 | reg = <0x78000600 0x200>; | 514 | reg = <0x78000600 0x200>; |
428 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; | 515 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; |
429 | clocks = <&tegra_car TEGRA114_CLK_SDMMC4>; | 516 | clocks = <&tegra_car TEGRA114_CLK_SDMMC4>; |
517 | resets = <&tegra_car 15>; | ||
518 | reset-names = "sdhci"; | ||
430 | status = "disable"; | 519 | status = "disable"; |
431 | }; | 520 | }; |
432 | 521 | ||
@@ -436,6 +525,8 @@ | |||
436 | interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; | 525 | interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; |
437 | phy_type = "utmi"; | 526 | phy_type = "utmi"; |
438 | clocks = <&tegra_car TEGRA114_CLK_USBD>; | 527 | clocks = <&tegra_car TEGRA114_CLK_USBD>; |
528 | resets = <&tegra_car 22>; | ||
529 | reset-names = "usb"; | ||
439 | nvidia,phy = <&phy1>; | 530 | nvidia,phy = <&phy1>; |
440 | status = "disabled"; | 531 | status = "disabled"; |
441 | }; | 532 | }; |
@@ -467,6 +558,8 @@ | |||
467 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | 558 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; |
468 | phy_type = "utmi"; | 559 | phy_type = "utmi"; |
469 | clocks = <&tegra_car TEGRA114_CLK_USB3>; | 560 | clocks = <&tegra_car TEGRA114_CLK_USB3>; |
561 | resets = <&tegra_car 59>; | ||
562 | reset-names = "usb"; | ||
470 | nvidia,phy = <&phy3>; | 563 | nvidia,phy = <&phy3>; |
471 | status = "disabled"; | 564 | status = "disabled"; |
472 | }; | 565 | }; |
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts index 8d71fc9d8a2f..e57fb3aefc2a 100644 --- a/arch/arm/boot/dts/tegra20-paz00.dts +++ b/arch/arm/boot/dts/tegra20-paz00.dts | |||
@@ -280,6 +280,8 @@ | |||
280 | clocks = <&tegra_car TEGRA20_CLK_I2C3>, | 280 | clocks = <&tegra_car TEGRA20_CLK_I2C3>, |
281 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; | 281 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; |
282 | clock-names = "div-clk", "fast-clk"; | 282 | clock-names = "div-clk", "fast-clk"; |
283 | resets = <&tegra_car 67>; | ||
284 | reset-names = "i2c"; | ||
283 | }; | 285 | }; |
284 | 286 | ||
285 | i2c@7000d000 { | 287 | i2c@7000d000 { |
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index df40b54fd8bc..c90d0aac3afe 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -22,6 +22,8 @@ | |||
22 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ | 22 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ |
23 | <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ | 23 | <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ |
24 | clocks = <&tegra_car TEGRA20_CLK_HOST1X>; | 24 | clocks = <&tegra_car TEGRA20_CLK_HOST1X>; |
25 | resets = <&tegra_car 28>; | ||
26 | reset-names = "host1x"; | ||
25 | 27 | ||
26 | #address-cells = <1>; | 28 | #address-cells = <1>; |
27 | #size-cells = <1>; | 29 | #size-cells = <1>; |
@@ -33,6 +35,8 @@ | |||
33 | reg = <0x54040000 0x00040000>; | 35 | reg = <0x54040000 0x00040000>; |
34 | interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; | 36 | interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; |
35 | clocks = <&tegra_car TEGRA20_CLK_MPE>; | 37 | clocks = <&tegra_car TEGRA20_CLK_MPE>; |
38 | resets = <&tegra_car 60>; | ||
39 | reset-names = "mpe"; | ||
36 | }; | 40 | }; |
37 | 41 | ||
38 | vi { | 42 | vi { |
@@ -40,6 +44,8 @@ | |||
40 | reg = <0x54080000 0x00040000>; | 44 | reg = <0x54080000 0x00040000>; |
41 | interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; | 45 | interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; |
42 | clocks = <&tegra_car TEGRA20_CLK_VI>; | 46 | clocks = <&tegra_car TEGRA20_CLK_VI>; |
47 | resets = <&tegra_car 20>; | ||
48 | reset-names = "vi"; | ||
43 | }; | 49 | }; |
44 | 50 | ||
45 | epp { | 51 | epp { |
@@ -47,6 +53,8 @@ | |||
47 | reg = <0x540c0000 0x00040000>; | 53 | reg = <0x540c0000 0x00040000>; |
48 | interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; | 54 | interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; |
49 | clocks = <&tegra_car TEGRA20_CLK_EPP>; | 55 | clocks = <&tegra_car TEGRA20_CLK_EPP>; |
56 | resets = <&tegra_car 19>; | ||
57 | reset-names = "epp"; | ||
50 | }; | 58 | }; |
51 | 59 | ||
52 | isp { | 60 | isp { |
@@ -54,6 +62,8 @@ | |||
54 | reg = <0x54100000 0x00040000>; | 62 | reg = <0x54100000 0x00040000>; |
55 | interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; | 63 | interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; |
56 | clocks = <&tegra_car TEGRA20_CLK_ISP>; | 64 | clocks = <&tegra_car TEGRA20_CLK_ISP>; |
65 | resets = <&tegra_car 23>; | ||
66 | reset-names = "isp"; | ||
57 | }; | 67 | }; |
58 | 68 | ||
59 | gr2d { | 69 | gr2d { |
@@ -61,12 +71,16 @@ | |||
61 | reg = <0x54140000 0x00040000>; | 71 | reg = <0x54140000 0x00040000>; |
62 | interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; | 72 | interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; |
63 | clocks = <&tegra_car TEGRA20_CLK_GR2D>; | 73 | clocks = <&tegra_car TEGRA20_CLK_GR2D>; |
74 | resets = <&tegra_car 21>; | ||
75 | reset-names = "2d"; | ||
64 | }; | 76 | }; |
65 | 77 | ||
66 | gr3d { | 78 | gr3d { |
67 | compatible = "nvidia,tegra20-gr3d"; | 79 | compatible = "nvidia,tegra20-gr3d"; |
68 | reg = <0x54180000 0x00040000>; | 80 | reg = <0x54180000 0x00040000>; |
69 | clocks = <&tegra_car TEGRA20_CLK_GR3D>; | 81 | clocks = <&tegra_car TEGRA20_CLK_GR3D>; |
82 | resets = <&tegra_car 24>; | ||
83 | reset-names = "3d"; | ||
70 | }; | 84 | }; |
71 | 85 | ||
72 | dc@54200000 { | 86 | dc@54200000 { |
@@ -75,7 +89,9 @@ | |||
75 | interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; | 89 | interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; |
76 | clocks = <&tegra_car TEGRA20_CLK_DISP1>, | 90 | clocks = <&tegra_car TEGRA20_CLK_DISP1>, |
77 | <&tegra_car TEGRA20_CLK_PLL_P>; | 91 | <&tegra_car TEGRA20_CLK_PLL_P>; |
78 | clock-names = "disp1", "parent"; | 92 | clock-names = "dc", "parent"; |
93 | resets = <&tegra_car 27>; | ||
94 | reset-names = "dc"; | ||
79 | 95 | ||
80 | rgb { | 96 | rgb { |
81 | status = "disabled"; | 97 | status = "disabled"; |
@@ -88,7 +104,9 @@ | |||
88 | interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; | 104 | interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; |
89 | clocks = <&tegra_car TEGRA20_CLK_DISP2>, | 105 | clocks = <&tegra_car TEGRA20_CLK_DISP2>, |
90 | <&tegra_car TEGRA20_CLK_PLL_P>; | 106 | <&tegra_car TEGRA20_CLK_PLL_P>; |
91 | clock-names = "disp2", "parent"; | 107 | clock-names = "dc", "parent"; |
108 | resets = <&tegra_car 26>; | ||
109 | reset-names = "dc"; | ||
92 | 110 | ||
93 | rgb { | 111 | rgb { |
94 | status = "disabled"; | 112 | status = "disabled"; |
@@ -102,6 +120,8 @@ | |||
102 | clocks = <&tegra_car TEGRA20_CLK_HDMI>, | 120 | clocks = <&tegra_car TEGRA20_CLK_HDMI>, |
103 | <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; | 121 | <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; |
104 | clock-names = "hdmi", "parent"; | 122 | clock-names = "hdmi", "parent"; |
123 | resets = <&tegra_car 51>; | ||
124 | reset-names = "hdmi"; | ||
105 | status = "disabled"; | 125 | status = "disabled"; |
106 | }; | 126 | }; |
107 | 127 | ||
@@ -117,6 +137,8 @@ | |||
117 | compatible = "nvidia,tegra20-dsi"; | 137 | compatible = "nvidia,tegra20-dsi"; |
118 | reg = <0x54300000 0x00040000>; | 138 | reg = <0x54300000 0x00040000>; |
119 | clocks = <&tegra_car TEGRA20_CLK_DSI>; | 139 | clocks = <&tegra_car TEGRA20_CLK_DSI>; |
140 | resets = <&tegra_car 48>; | ||
141 | reset-names = "dsi"; | ||
120 | status = "disabled"; | 142 | status = "disabled"; |
121 | }; | 143 | }; |
122 | }; | 144 | }; |
@@ -160,6 +182,7 @@ | |||
160 | compatible = "nvidia,tegra20-car"; | 182 | compatible = "nvidia,tegra20-car"; |
161 | reg = <0x60006000 0x1000>; | 183 | reg = <0x60006000 0x1000>; |
162 | #clock-cells = <1>; | 184 | #clock-cells = <1>; |
185 | #reset-cells = <1>; | ||
163 | }; | 186 | }; |
164 | 187 | ||
165 | apbdma: dma { | 188 | apbdma: dma { |
@@ -182,6 +205,9 @@ | |||
182 | <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, | 205 | <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, |
183 | <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; | 206 | <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; |
184 | clocks = <&tegra_car TEGRA20_CLK_APBDMA>; | 207 | clocks = <&tegra_car TEGRA20_CLK_APBDMA>; |
208 | resets = <&tegra_car 34>; | ||
209 | reset-names = "dma"; | ||
210 | #dma-cells = <1>; | ||
185 | }; | 211 | }; |
186 | 212 | ||
187 | ahb { | 213 | ahb { |
@@ -222,8 +248,11 @@ | |||
222 | compatible = "nvidia,tegra20-ac97"; | 248 | compatible = "nvidia,tegra20-ac97"; |
223 | reg = <0x70002000 0x200>; | 249 | reg = <0x70002000 0x200>; |
224 | interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; | 250 | interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; |
225 | nvidia,dma-request-selector = <&apbdma 12>; | ||
226 | clocks = <&tegra_car TEGRA20_CLK_AC97>; | 251 | clocks = <&tegra_car TEGRA20_CLK_AC97>; |
252 | resets = <&tegra_car 3>; | ||
253 | reset-names = "ac97"; | ||
254 | dmas = <&apbdma 12>, <&apbdma 12>; | ||
255 | dma-names = "rx", "tx"; | ||
227 | status = "disabled"; | 256 | status = "disabled"; |
228 | }; | 257 | }; |
229 | 258 | ||
@@ -231,8 +260,11 @@ | |||
231 | compatible = "nvidia,tegra20-i2s"; | 260 | compatible = "nvidia,tegra20-i2s"; |
232 | reg = <0x70002800 0x200>; | 261 | reg = <0x70002800 0x200>; |
233 | interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; | 262 | interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; |
234 | nvidia,dma-request-selector = <&apbdma 2>; | ||
235 | clocks = <&tegra_car TEGRA20_CLK_I2S1>; | 263 | clocks = <&tegra_car TEGRA20_CLK_I2S1>; |
264 | resets = <&tegra_car 11>; | ||
265 | reset-names = "i2s"; | ||
266 | dmas = <&apbdma 2>, <&apbdma 2>; | ||
267 | dma-names = "rx", "tx"; | ||
236 | status = "disabled"; | 268 | status = "disabled"; |
237 | }; | 269 | }; |
238 | 270 | ||
@@ -240,8 +272,11 @@ | |||
240 | compatible = "nvidia,tegra20-i2s"; | 272 | compatible = "nvidia,tegra20-i2s"; |
241 | reg = <0x70002a00 0x200>; | 273 | reg = <0x70002a00 0x200>; |
242 | interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; | 274 | interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; |
243 | nvidia,dma-request-selector = <&apbdma 1>; | ||
244 | clocks = <&tegra_car TEGRA20_CLK_I2S2>; | 275 | clocks = <&tegra_car TEGRA20_CLK_I2S2>; |
276 | resets = <&tegra_car 18>; | ||
277 | reset-names = "i2s"; | ||
278 | dmas = <&apbdma 1>, <&apbdma 1>; | ||
279 | dma-names = "rx", "tx"; | ||
245 | status = "disabled"; | 280 | status = "disabled"; |
246 | }; | 281 | }; |
247 | 282 | ||
@@ -257,8 +292,11 @@ | |||
257 | reg = <0x70006000 0x40>; | 292 | reg = <0x70006000 0x40>; |
258 | reg-shift = <2>; | 293 | reg-shift = <2>; |
259 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; | 294 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; |
260 | nvidia,dma-request-selector = <&apbdma 8>; | ||
261 | clocks = <&tegra_car TEGRA20_CLK_UARTA>; | 295 | clocks = <&tegra_car TEGRA20_CLK_UARTA>; |
296 | resets = <&tegra_car 6>; | ||
297 | reset-names = "serial"; | ||
298 | dmas = <&apbdma 8>, <&apbdma 8>; | ||
299 | dma-names = "rx", "tx"; | ||
262 | status = "disabled"; | 300 | status = "disabled"; |
263 | }; | 301 | }; |
264 | 302 | ||
@@ -267,8 +305,11 @@ | |||
267 | reg = <0x70006040 0x40>; | 305 | reg = <0x70006040 0x40>; |
268 | reg-shift = <2>; | 306 | reg-shift = <2>; |
269 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; | 307 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; |
270 | nvidia,dma-request-selector = <&apbdma 9>; | ||
271 | clocks = <&tegra_car TEGRA20_CLK_UARTB>; | 308 | clocks = <&tegra_car TEGRA20_CLK_UARTB>; |
309 | resets = <&tegra_car 7>; | ||
310 | reset-names = "serial"; | ||
311 | dmas = <&apbdma 9>, <&apbdma 9>; | ||
312 | dma-names = "rx", "tx"; | ||
272 | status = "disabled"; | 313 | status = "disabled"; |
273 | }; | 314 | }; |
274 | 315 | ||
@@ -277,8 +318,11 @@ | |||
277 | reg = <0x70006200 0x100>; | 318 | reg = <0x70006200 0x100>; |
278 | reg-shift = <2>; | 319 | reg-shift = <2>; |
279 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; | 320 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; |
280 | nvidia,dma-request-selector = <&apbdma 10>; | ||
281 | clocks = <&tegra_car TEGRA20_CLK_UARTC>; | 321 | clocks = <&tegra_car TEGRA20_CLK_UARTC>; |
322 | resets = <&tegra_car 55>; | ||
323 | reset-names = "serial"; | ||
324 | dmas = <&apbdma 10>, <&apbdma 10>; | ||
325 | dma-names = "rx", "tx"; | ||
282 | status = "disabled"; | 326 | status = "disabled"; |
283 | }; | 327 | }; |
284 | 328 | ||
@@ -287,8 +331,11 @@ | |||
287 | reg = <0x70006300 0x100>; | 331 | reg = <0x70006300 0x100>; |
288 | reg-shift = <2>; | 332 | reg-shift = <2>; |
289 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; | 333 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; |
290 | nvidia,dma-request-selector = <&apbdma 19>; | ||
291 | clocks = <&tegra_car TEGRA20_CLK_UARTD>; | 334 | clocks = <&tegra_car TEGRA20_CLK_UARTD>; |
335 | resets = <&tegra_car 65>; | ||
336 | reset-names = "serial"; | ||
337 | dmas = <&apbdma 19>, <&apbdma 19>; | ||
338 | dma-names = "rx", "tx"; | ||
292 | status = "disabled"; | 339 | status = "disabled"; |
293 | }; | 340 | }; |
294 | 341 | ||
@@ -297,8 +344,11 @@ | |||
297 | reg = <0x70006400 0x100>; | 344 | reg = <0x70006400 0x100>; |
298 | reg-shift = <2>; | 345 | reg-shift = <2>; |
299 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; | 346 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; |
300 | nvidia,dma-request-selector = <&apbdma 20>; | ||
301 | clocks = <&tegra_car TEGRA20_CLK_UARTE>; | 347 | clocks = <&tegra_car TEGRA20_CLK_UARTE>; |
348 | resets = <&tegra_car 66>; | ||
349 | reset-names = "serial"; | ||
350 | dmas = <&apbdma 20>, <&apbdma 20>; | ||
351 | dma-names = "rx", "tx"; | ||
302 | status = "disabled"; | 352 | status = "disabled"; |
303 | }; | 353 | }; |
304 | 354 | ||
@@ -307,6 +357,8 @@ | |||
307 | reg = <0x7000a000 0x100>; | 357 | reg = <0x7000a000 0x100>; |
308 | #pwm-cells = <2>; | 358 | #pwm-cells = <2>; |
309 | clocks = <&tegra_car TEGRA20_CLK_PWM>; | 359 | clocks = <&tegra_car TEGRA20_CLK_PWM>; |
360 | resets = <&tegra_car 17>; | ||
361 | reset-names = "pwm"; | ||
310 | status = "disabled"; | 362 | status = "disabled"; |
311 | }; | 363 | }; |
312 | 364 | ||
@@ -326,6 +378,10 @@ | |||
326 | clocks = <&tegra_car TEGRA20_CLK_I2C1>, | 378 | clocks = <&tegra_car TEGRA20_CLK_I2C1>, |
327 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; | 379 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; |
328 | clock-names = "div-clk", "fast-clk"; | 380 | clock-names = "div-clk", "fast-clk"; |
381 | resets = <&tegra_car 12>; | ||
382 | reset-names = "i2c"; | ||
383 | dmas = <&apbdma 21>, <&apbdma 21>; | ||
384 | dma-names = "rx", "tx"; | ||
329 | status = "disabled"; | 385 | status = "disabled"; |
330 | }; | 386 | }; |
331 | 387 | ||
@@ -333,10 +389,13 @@ | |||
333 | compatible = "nvidia,tegra20-sflash"; | 389 | compatible = "nvidia,tegra20-sflash"; |
334 | reg = <0x7000c380 0x80>; | 390 | reg = <0x7000c380 0x80>; |
335 | interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; | 391 | interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; |
336 | nvidia,dma-request-selector = <&apbdma 11>; | ||
337 | #address-cells = <1>; | 392 | #address-cells = <1>; |
338 | #size-cells = <0>; | 393 | #size-cells = <0>; |
339 | clocks = <&tegra_car TEGRA20_CLK_SPI>; | 394 | clocks = <&tegra_car TEGRA20_CLK_SPI>; |
395 | resets = <&tegra_car 43>; | ||
396 | reset-names = "spi"; | ||
397 | dmas = <&apbdma 11>, <&apbdma 11>; | ||
398 | dma-names = "rx", "tx"; | ||
340 | status = "disabled"; | 399 | status = "disabled"; |
341 | }; | 400 | }; |
342 | 401 | ||
@@ -349,6 +408,10 @@ | |||
349 | clocks = <&tegra_car TEGRA20_CLK_I2C2>, | 408 | clocks = <&tegra_car TEGRA20_CLK_I2C2>, |
350 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; | 409 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; |
351 | clock-names = "div-clk", "fast-clk"; | 410 | clock-names = "div-clk", "fast-clk"; |
411 | resets = <&tegra_car 54>; | ||
412 | reset-names = "i2c"; | ||
413 | dmas = <&apbdma 22>, <&apbdma 22>; | ||
414 | dma-names = "rx", "tx"; | ||
352 | status = "disabled"; | 415 | status = "disabled"; |
353 | }; | 416 | }; |
354 | 417 | ||
@@ -361,6 +424,10 @@ | |||
361 | clocks = <&tegra_car TEGRA20_CLK_I2C3>, | 424 | clocks = <&tegra_car TEGRA20_CLK_I2C3>, |
362 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; | 425 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; |
363 | clock-names = "div-clk", "fast-clk"; | 426 | clock-names = "div-clk", "fast-clk"; |
427 | resets = <&tegra_car 67>; | ||
428 | reset-names = "i2c"; | ||
429 | dmas = <&apbdma 23>, <&apbdma 23>; | ||
430 | dma-names = "rx", "tx"; | ||
364 | status = "disabled"; | 431 | status = "disabled"; |
365 | }; | 432 | }; |
366 | 433 | ||
@@ -373,6 +440,10 @@ | |||
373 | clocks = <&tegra_car TEGRA20_CLK_DVC>, | 440 | clocks = <&tegra_car TEGRA20_CLK_DVC>, |
374 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; | 441 | <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; |
375 | clock-names = "div-clk", "fast-clk"; | 442 | clock-names = "div-clk", "fast-clk"; |
443 | resets = <&tegra_car 47>; | ||
444 | reset-names = "i2c"; | ||
445 | dmas = <&apbdma 24>, <&apbdma 24>; | ||
446 | dma-names = "rx", "tx"; | ||
376 | status = "disabled"; | 447 | status = "disabled"; |
377 | }; | 448 | }; |
378 | 449 | ||
@@ -380,10 +451,13 @@ | |||
380 | compatible = "nvidia,tegra20-slink"; | 451 | compatible = "nvidia,tegra20-slink"; |
381 | reg = <0x7000d400 0x200>; | 452 | reg = <0x7000d400 0x200>; |
382 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; | 453 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; |
383 | nvidia,dma-request-selector = <&apbdma 15>; | ||
384 | #address-cells = <1>; | 454 | #address-cells = <1>; |
385 | #size-cells = <0>; | 455 | #size-cells = <0>; |
386 | clocks = <&tegra_car TEGRA20_CLK_SBC1>; | 456 | clocks = <&tegra_car TEGRA20_CLK_SBC1>; |
457 | resets = <&tegra_car 41>; | ||
458 | reset-names = "spi"; | ||
459 | dmas = <&apbdma 15>, <&apbdma 15>; | ||
460 | dma-names = "rx", "tx"; | ||
387 | status = "disabled"; | 461 | status = "disabled"; |
388 | }; | 462 | }; |
389 | 463 | ||
@@ -391,10 +465,13 @@ | |||
391 | compatible = "nvidia,tegra20-slink"; | 465 | compatible = "nvidia,tegra20-slink"; |
392 | reg = <0x7000d600 0x200>; | 466 | reg = <0x7000d600 0x200>; |
393 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; | 467 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; |
394 | nvidia,dma-request-selector = <&apbdma 16>; | ||
395 | #address-cells = <1>; | 468 | #address-cells = <1>; |
396 | #size-cells = <0>; | 469 | #size-cells = <0>; |
397 | clocks = <&tegra_car TEGRA20_CLK_SBC2>; | 470 | clocks = <&tegra_car TEGRA20_CLK_SBC2>; |
471 | resets = <&tegra_car 44>; | ||
472 | reset-names = "spi"; | ||
473 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
474 | dma-names = "rx", "tx"; | ||
398 | status = "disabled"; | 475 | status = "disabled"; |
399 | }; | 476 | }; |
400 | 477 | ||
@@ -402,10 +479,13 @@ | |||
402 | compatible = "nvidia,tegra20-slink"; | 479 | compatible = "nvidia,tegra20-slink"; |
403 | reg = <0x7000d800 0x200>; | 480 | reg = <0x7000d800 0x200>; |
404 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; | 481 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; |
405 | nvidia,dma-request-selector = <&apbdma 17>; | ||
406 | #address-cells = <1>; | 482 | #address-cells = <1>; |
407 | #size-cells = <0>; | 483 | #size-cells = <0>; |
408 | clocks = <&tegra_car TEGRA20_CLK_SBC3>; | 484 | clocks = <&tegra_car TEGRA20_CLK_SBC3>; |
485 | resets = <&tegra_car 46>; | ||
486 | reset-names = "spi"; | ||
487 | dmas = <&apbdma 17>, <&apbdma 17>; | ||
488 | dma-names = "rx", "tx"; | ||
409 | status = "disabled"; | 489 | status = "disabled"; |
410 | }; | 490 | }; |
411 | 491 | ||
@@ -413,10 +493,13 @@ | |||
413 | compatible = "nvidia,tegra20-slink"; | 493 | compatible = "nvidia,tegra20-slink"; |
414 | reg = <0x7000da00 0x200>; | 494 | reg = <0x7000da00 0x200>; |
415 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | 495 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; |
416 | nvidia,dma-request-selector = <&apbdma 18>; | ||
417 | #address-cells = <1>; | 496 | #address-cells = <1>; |
418 | #size-cells = <0>; | 497 | #size-cells = <0>; |
419 | clocks = <&tegra_car TEGRA20_CLK_SBC4>; | 498 | clocks = <&tegra_car TEGRA20_CLK_SBC4>; |
499 | resets = <&tegra_car 68>; | ||
500 | reset-names = "spi"; | ||
501 | dmas = <&apbdma 18>, <&apbdma 18>; | ||
502 | dma-names = "rx", "tx"; | ||
420 | status = "disabled"; | 503 | status = "disabled"; |
421 | }; | 504 | }; |
422 | 505 | ||
@@ -425,6 +508,8 @@ | |||
425 | reg = <0x7000e200 0x100>; | 508 | reg = <0x7000e200 0x100>; |
426 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; | 509 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; |
427 | clocks = <&tegra_car TEGRA20_CLK_KBC>; | 510 | clocks = <&tegra_car TEGRA20_CLK_KBC>; |
511 | resets = <&tegra_car 36>; | ||
512 | reset-names = "kbc"; | ||
428 | status = "disabled"; | 513 | status = "disabled"; |
429 | }; | 514 | }; |
430 | 515 | ||
@@ -478,9 +563,12 @@ | |||
478 | 563 | ||
479 | clocks = <&tegra_car TEGRA20_CLK_PEX>, | 564 | clocks = <&tegra_car TEGRA20_CLK_PEX>, |
480 | <&tegra_car TEGRA20_CLK_AFI>, | 565 | <&tegra_car TEGRA20_CLK_AFI>, |
481 | <&tegra_car TEGRA20_CLK_PCIE_XCLK>, | ||
482 | <&tegra_car TEGRA20_CLK_PLL_E>; | 566 | <&tegra_car TEGRA20_CLK_PLL_E>; |
483 | clock-names = "pex", "afi", "pcie_xclk", "pll_e"; | 567 | clock-names = "pex", "afi", "pll_e"; |
568 | resets = <&tegra_car 70>, | ||
569 | <&tegra_car 72>, | ||
570 | <&tegra_car 74>; | ||
571 | reset-names = "pex", "afi", "pcie_x"; | ||
484 | status = "disabled"; | 572 | status = "disabled"; |
485 | 573 | ||
486 | pci@1,0 { | 574 | pci@1,0 { |
@@ -517,6 +605,8 @@ | |||
517 | phy_type = "utmi"; | 605 | phy_type = "utmi"; |
518 | nvidia,has-legacy-mode; | 606 | nvidia,has-legacy-mode; |
519 | clocks = <&tegra_car TEGRA20_CLK_USBD>; | 607 | clocks = <&tegra_car TEGRA20_CLK_USBD>; |
608 | resets = <&tegra_car 22>; | ||
609 | reset-names = "usb"; | ||
520 | nvidia,needs-double-reset; | 610 | nvidia,needs-double-reset; |
521 | nvidia,phy = <&phy1>; | 611 | nvidia,phy = <&phy1>; |
522 | status = "disabled"; | 612 | status = "disabled"; |
@@ -548,6 +638,8 @@ | |||
548 | interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; | 638 | interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; |
549 | phy_type = "ulpi"; | 639 | phy_type = "ulpi"; |
550 | clocks = <&tegra_car TEGRA20_CLK_USB2>; | 640 | clocks = <&tegra_car TEGRA20_CLK_USB2>; |
641 | resets = <&tegra_car 58>; | ||
642 | reset-names = "usb"; | ||
551 | nvidia,phy = <&phy2>; | 643 | nvidia,phy = <&phy2>; |
552 | status = "disabled"; | 644 | status = "disabled"; |
553 | }; | 645 | }; |
@@ -569,6 +661,8 @@ | |||
569 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | 661 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; |
570 | phy_type = "utmi"; | 662 | phy_type = "utmi"; |
571 | clocks = <&tegra_car TEGRA20_CLK_USB3>; | 663 | clocks = <&tegra_car TEGRA20_CLK_USB3>; |
664 | resets = <&tegra_car 59>; | ||
665 | reset-names = "usb"; | ||
572 | nvidia,phy = <&phy3>; | 666 | nvidia,phy = <&phy3>; |
573 | status = "disabled"; | 667 | status = "disabled"; |
574 | }; | 668 | }; |
@@ -597,6 +691,8 @@ | |||
597 | reg = <0xc8000000 0x200>; | 691 | reg = <0xc8000000 0x200>; |
598 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; | 692 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; |
599 | clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; | 693 | clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; |
694 | resets = <&tegra_car 14>; | ||
695 | reset-names = "sdhci"; | ||
600 | status = "disabled"; | 696 | status = "disabled"; |
601 | }; | 697 | }; |
602 | 698 | ||
@@ -605,6 +701,8 @@ | |||
605 | reg = <0xc8000200 0x200>; | 701 | reg = <0xc8000200 0x200>; |
606 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 702 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
607 | clocks = <&tegra_car TEGRA20_CLK_SDMMC2>; | 703 | clocks = <&tegra_car TEGRA20_CLK_SDMMC2>; |
704 | resets = <&tegra_car 9>; | ||
705 | reset-names = "sdhci"; | ||
608 | status = "disabled"; | 706 | status = "disabled"; |
609 | }; | 707 | }; |
610 | 708 | ||
@@ -613,6 +711,8 @@ | |||
613 | reg = <0xc8000400 0x200>; | 711 | reg = <0xc8000400 0x200>; |
614 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; | 712 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; |
615 | clocks = <&tegra_car TEGRA20_CLK_SDMMC3>; | 713 | clocks = <&tegra_car TEGRA20_CLK_SDMMC3>; |
714 | resets = <&tegra_car 69>; | ||
715 | reset-names = "sdhci"; | ||
616 | status = "disabled"; | 716 | status = "disabled"; |
617 | }; | 717 | }; |
618 | 718 | ||
@@ -621,6 +721,8 @@ | |||
621 | reg = <0xc8000600 0x200>; | 721 | reg = <0xc8000600 0x200>; |
622 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; | 722 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; |
623 | clocks = <&tegra_car TEGRA20_CLK_SDMMC4>; | 723 | clocks = <&tegra_car TEGRA20_CLK_SDMMC4>; |
724 | resets = <&tegra_car 15>; | ||
725 | reset-names = "sdhci"; | ||
624 | status = "disabled"; | 726 | status = "disabled"; |
625 | }; | 727 | }; |
626 | 728 | ||
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 2bd55cfd88ad..31259b09e7cc 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -40,10 +40,13 @@ | |||
40 | 40 | ||
41 | clocks = <&tegra_car TEGRA30_CLK_PCIE>, | 41 | clocks = <&tegra_car TEGRA30_CLK_PCIE>, |
42 | <&tegra_car TEGRA30_CLK_AFI>, | 42 | <&tegra_car TEGRA30_CLK_AFI>, |
43 | <&tegra_car TEGRA30_CLK_PCIEX>, | ||
44 | <&tegra_car TEGRA30_CLK_PLL_E>, | 43 | <&tegra_car TEGRA30_CLK_PLL_E>, |
45 | <&tegra_car TEGRA30_CLK_CML0>; | 44 | <&tegra_car TEGRA30_CLK_CML0>; |
46 | clock-names = "pex", "afi", "pcie_xclk", "pll_e", "cml"; | 45 | clock-names = "pex", "afi", "pll_e", "cml"; |
46 | resets = <&tegra_car 70>, | ||
47 | <&tegra_car 72>, | ||
48 | <&tegra_car 74>; | ||
49 | reset-names = "pex", "afi", "pcie_x"; | ||
47 | status = "disabled"; | 50 | status = "disabled"; |
48 | 51 | ||
49 | pci@1,0 { | 52 | pci@1,0 { |
@@ -92,6 +95,8 @@ | |||
92 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ | 95 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ |
93 | <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ | 96 | <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ |
94 | clocks = <&tegra_car TEGRA30_CLK_HOST1X>; | 97 | clocks = <&tegra_car TEGRA30_CLK_HOST1X>; |
98 | resets = <&tegra_car 28>; | ||
99 | reset-names = "host1x"; | ||
95 | 100 | ||
96 | #address-cells = <1>; | 101 | #address-cells = <1>; |
97 | #size-cells = <1>; | 102 | #size-cells = <1>; |
@@ -103,6 +108,8 @@ | |||
103 | reg = <0x54040000 0x00040000>; | 108 | reg = <0x54040000 0x00040000>; |
104 | interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; | 109 | interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; |
105 | clocks = <&tegra_car TEGRA30_CLK_MPE>; | 110 | clocks = <&tegra_car TEGRA30_CLK_MPE>; |
111 | resets = <&tegra_car 60>; | ||
112 | reset-names = "mpe"; | ||
106 | }; | 113 | }; |
107 | 114 | ||
108 | vi { | 115 | vi { |
@@ -110,6 +117,8 @@ | |||
110 | reg = <0x54080000 0x00040000>; | 117 | reg = <0x54080000 0x00040000>; |
111 | interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; | 118 | interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; |
112 | clocks = <&tegra_car TEGRA30_CLK_VI>; | 119 | clocks = <&tegra_car TEGRA30_CLK_VI>; |
120 | resets = <&tegra_car 20>; | ||
121 | reset-names = "vi"; | ||
113 | }; | 122 | }; |
114 | 123 | ||
115 | epp { | 124 | epp { |
@@ -117,6 +126,8 @@ | |||
117 | reg = <0x540c0000 0x00040000>; | 126 | reg = <0x540c0000 0x00040000>; |
118 | interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; | 127 | interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; |
119 | clocks = <&tegra_car TEGRA30_CLK_EPP>; | 128 | clocks = <&tegra_car TEGRA30_CLK_EPP>; |
129 | resets = <&tegra_car 19>; | ||
130 | reset-names = "epp"; | ||
120 | }; | 131 | }; |
121 | 132 | ||
122 | isp { | 133 | isp { |
@@ -124,12 +135,16 @@ | |||
124 | reg = <0x54100000 0x00040000>; | 135 | reg = <0x54100000 0x00040000>; |
125 | interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; | 136 | interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; |
126 | clocks = <&tegra_car TEGRA30_CLK_ISP>; | 137 | clocks = <&tegra_car TEGRA30_CLK_ISP>; |
138 | resets = <&tegra_car 23>; | ||
139 | reset-names = "isp"; | ||
127 | }; | 140 | }; |
128 | 141 | ||
129 | gr2d { | 142 | gr2d { |
130 | compatible = "nvidia,tegra30-gr2d"; | 143 | compatible = "nvidia,tegra30-gr2d"; |
131 | reg = <0x54140000 0x00040000>; | 144 | reg = <0x54140000 0x00040000>; |
132 | interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; | 145 | interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; |
146 | resets = <&tegra_car 21>; | ||
147 | reset-names = "2d"; | ||
133 | clocks = <&tegra_car TEGRA30_CLK_GR2D>; | 148 | clocks = <&tegra_car TEGRA30_CLK_GR2D>; |
134 | }; | 149 | }; |
135 | 150 | ||
@@ -139,6 +154,9 @@ | |||
139 | clocks = <&tegra_car TEGRA30_CLK_GR3D | 154 | clocks = <&tegra_car TEGRA30_CLK_GR3D |
140 | &tegra_car TEGRA30_CLK_GR3D2>; | 155 | &tegra_car TEGRA30_CLK_GR3D2>; |
141 | clock-names = "3d", "3d2"; | 156 | clock-names = "3d", "3d2"; |
157 | resets = <&tegra_car 24>, | ||
158 | <&tegra_car 98>; | ||
159 | reset-names = "3d", "3d2"; | ||
142 | }; | 160 | }; |
143 | 161 | ||
144 | dc@54200000 { | 162 | dc@54200000 { |
@@ -147,7 +165,9 @@ | |||
147 | interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; | 165 | interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; |
148 | clocks = <&tegra_car TEGRA30_CLK_DISP1>, | 166 | clocks = <&tegra_car TEGRA30_CLK_DISP1>, |
149 | <&tegra_car TEGRA30_CLK_PLL_P>; | 167 | <&tegra_car TEGRA30_CLK_PLL_P>; |
150 | clock-names = "disp1", "parent"; | 168 | clock-names = "dc", "parent"; |
169 | resets = <&tegra_car 27>; | ||
170 | reset-names = "dc"; | ||
151 | 171 | ||
152 | rgb { | 172 | rgb { |
153 | status = "disabled"; | 173 | status = "disabled"; |
@@ -160,7 +180,9 @@ | |||
160 | interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; | 180 | interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; |
161 | clocks = <&tegra_car TEGRA30_CLK_DISP2>, | 181 | clocks = <&tegra_car TEGRA30_CLK_DISP2>, |
162 | <&tegra_car TEGRA30_CLK_PLL_P>; | 182 | <&tegra_car TEGRA30_CLK_PLL_P>; |
163 | clock-names = "disp2", "parent"; | 183 | clock-names = "dc", "parent"; |
184 | resets = <&tegra_car 26>; | ||
185 | reset-names = "dc"; | ||
164 | 186 | ||
165 | rgb { | 187 | rgb { |
166 | status = "disabled"; | 188 | status = "disabled"; |
@@ -174,6 +196,8 @@ | |||
174 | clocks = <&tegra_car TEGRA30_CLK_HDMI>, | 196 | clocks = <&tegra_car TEGRA30_CLK_HDMI>, |
175 | <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>; | 197 | <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>; |
176 | clock-names = "hdmi", "parent"; | 198 | clock-names = "hdmi", "parent"; |
199 | resets = <&tegra_car 51>; | ||
200 | reset-names = "hdmi"; | ||
177 | status = "disabled"; | 201 | status = "disabled"; |
178 | }; | 202 | }; |
179 | 203 | ||
@@ -189,6 +213,8 @@ | |||
189 | compatible = "nvidia,tegra30-dsi"; | 213 | compatible = "nvidia,tegra30-dsi"; |
190 | reg = <0x54300000 0x00040000>; | 214 | reg = <0x54300000 0x00040000>; |
191 | clocks = <&tegra_car TEGRA30_CLK_DSIA>; | 215 | clocks = <&tegra_car TEGRA30_CLK_DSIA>; |
216 | resets = <&tegra_car 48>; | ||
217 | reset-names = "dsi"; | ||
192 | status = "disabled"; | 218 | status = "disabled"; |
193 | }; | 219 | }; |
194 | }; | 220 | }; |
@@ -234,6 +260,7 @@ | |||
234 | compatible = "nvidia,tegra30-car"; | 260 | compatible = "nvidia,tegra30-car"; |
235 | reg = <0x60006000 0x1000>; | 261 | reg = <0x60006000 0x1000>; |
236 | #clock-cells = <1>; | 262 | #clock-cells = <1>; |
263 | #reset-cells = <1>; | ||
237 | }; | 264 | }; |
238 | 265 | ||
239 | apbdma: dma { | 266 | apbdma: dma { |
@@ -272,6 +299,9 @@ | |||
272 | <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, | 299 | <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, |
273 | <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; | 300 | <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; |
274 | clocks = <&tegra_car TEGRA30_CLK_APBDMA>; | 301 | clocks = <&tegra_car TEGRA30_CLK_APBDMA>; |
302 | resets = <&tegra_car 34>; | ||
303 | reset-names = "dma"; | ||
304 | #dma-cells = <1>; | ||
275 | }; | 305 | }; |
276 | 306 | ||
277 | ahb: ahb { | 307 | ahb: ahb { |
@@ -315,8 +345,11 @@ | |||
315 | reg = <0x70006000 0x40>; | 345 | reg = <0x70006000 0x40>; |
316 | reg-shift = <2>; | 346 | reg-shift = <2>; |
317 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; | 347 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; |
318 | nvidia,dma-request-selector = <&apbdma 8>; | ||
319 | clocks = <&tegra_car TEGRA30_CLK_UARTA>; | 348 | clocks = <&tegra_car TEGRA30_CLK_UARTA>; |
349 | resets = <&tegra_car 6>; | ||
350 | reset-names = "serial"; | ||
351 | dmas = <&apbdma 8>, <&apbdma 8>; | ||
352 | dma-names = "rx", "tx"; | ||
320 | status = "disabled"; | 353 | status = "disabled"; |
321 | }; | 354 | }; |
322 | 355 | ||
@@ -325,8 +358,11 @@ | |||
325 | reg = <0x70006040 0x40>; | 358 | reg = <0x70006040 0x40>; |
326 | reg-shift = <2>; | 359 | reg-shift = <2>; |
327 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; | 360 | interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; |
328 | nvidia,dma-request-selector = <&apbdma 9>; | ||
329 | clocks = <&tegra_car TEGRA30_CLK_UARTB>; | 361 | clocks = <&tegra_car TEGRA30_CLK_UARTB>; |
362 | resets = <&tegra_car 7>; | ||
363 | reset-names = "serial"; | ||
364 | dmas = <&apbdma 9>, <&apbdma 9>; | ||
365 | dma-names = "rx", "tx"; | ||
330 | status = "disabled"; | 366 | status = "disabled"; |
331 | }; | 367 | }; |
332 | 368 | ||
@@ -335,8 +371,11 @@ | |||
335 | reg = <0x70006200 0x100>; | 371 | reg = <0x70006200 0x100>; |
336 | reg-shift = <2>; | 372 | reg-shift = <2>; |
337 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; | 373 | interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; |
338 | nvidia,dma-request-selector = <&apbdma 10>; | ||
339 | clocks = <&tegra_car TEGRA30_CLK_UARTC>; | 374 | clocks = <&tegra_car TEGRA30_CLK_UARTC>; |
375 | resets = <&tegra_car 55>; | ||
376 | reset-names = "serial"; | ||
377 | dmas = <&apbdma 10>, <&apbdma 10>; | ||
378 | dma-names = "rx", "tx"; | ||
340 | status = "disabled"; | 379 | status = "disabled"; |
341 | }; | 380 | }; |
342 | 381 | ||
@@ -345,8 +384,11 @@ | |||
345 | reg = <0x70006300 0x100>; | 384 | reg = <0x70006300 0x100>; |
346 | reg-shift = <2>; | 385 | reg-shift = <2>; |
347 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; | 386 | interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; |
348 | nvidia,dma-request-selector = <&apbdma 19>; | ||
349 | clocks = <&tegra_car TEGRA30_CLK_UARTD>; | 387 | clocks = <&tegra_car TEGRA30_CLK_UARTD>; |
388 | resets = <&tegra_car 65>; | ||
389 | reset-names = "serial"; | ||
390 | dmas = <&apbdma 19>, <&apbdma 19>; | ||
391 | dma-names = "rx", "tx"; | ||
350 | status = "disabled"; | 392 | status = "disabled"; |
351 | }; | 393 | }; |
352 | 394 | ||
@@ -355,8 +397,11 @@ | |||
355 | reg = <0x70006400 0x100>; | 397 | reg = <0x70006400 0x100>; |
356 | reg-shift = <2>; | 398 | reg-shift = <2>; |
357 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; | 399 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; |
358 | nvidia,dma-request-selector = <&apbdma 20>; | ||
359 | clocks = <&tegra_car TEGRA30_CLK_UARTE>; | 400 | clocks = <&tegra_car TEGRA30_CLK_UARTE>; |
401 | resets = <&tegra_car 66>; | ||
402 | reset-names = "serial"; | ||
403 | dmas = <&apbdma 20>, <&apbdma 20>; | ||
404 | dma-names = "rx", "tx"; | ||
360 | status = "disabled"; | 405 | status = "disabled"; |
361 | }; | 406 | }; |
362 | 407 | ||
@@ -365,6 +410,8 @@ | |||
365 | reg = <0x7000a000 0x100>; | 410 | reg = <0x7000a000 0x100>; |
366 | #pwm-cells = <2>; | 411 | #pwm-cells = <2>; |
367 | clocks = <&tegra_car TEGRA30_CLK_PWM>; | 412 | clocks = <&tegra_car TEGRA30_CLK_PWM>; |
413 | resets = <&tegra_car 17>; | ||
414 | reset-names = "pwm"; | ||
368 | status = "disabled"; | 415 | status = "disabled"; |
369 | }; | 416 | }; |
370 | 417 | ||
@@ -384,6 +431,10 @@ | |||
384 | clocks = <&tegra_car TEGRA30_CLK_I2C1>, | 431 | clocks = <&tegra_car TEGRA30_CLK_I2C1>, |
385 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; | 432 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; |
386 | clock-names = "div-clk", "fast-clk"; | 433 | clock-names = "div-clk", "fast-clk"; |
434 | resets = <&tegra_car 12>; | ||
435 | reset-names = "i2c"; | ||
436 | dmas = <&apbdma 21>, <&apbdma 21>; | ||
437 | dma-names = "rx", "tx"; | ||
387 | status = "disabled"; | 438 | status = "disabled"; |
388 | }; | 439 | }; |
389 | 440 | ||
@@ -396,6 +447,10 @@ | |||
396 | clocks = <&tegra_car TEGRA30_CLK_I2C2>, | 447 | clocks = <&tegra_car TEGRA30_CLK_I2C2>, |
397 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; | 448 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; |
398 | clock-names = "div-clk", "fast-clk"; | 449 | clock-names = "div-clk", "fast-clk"; |
450 | resets = <&tegra_car 54>; | ||
451 | reset-names = "i2c"; | ||
452 | dmas = <&apbdma 22>, <&apbdma 22>; | ||
453 | dma-names = "rx", "tx"; | ||
399 | status = "disabled"; | 454 | status = "disabled"; |
400 | }; | 455 | }; |
401 | 456 | ||
@@ -408,6 +463,10 @@ | |||
408 | clocks = <&tegra_car TEGRA30_CLK_I2C3>, | 463 | clocks = <&tegra_car TEGRA30_CLK_I2C3>, |
409 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; | 464 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; |
410 | clock-names = "div-clk", "fast-clk"; | 465 | clock-names = "div-clk", "fast-clk"; |
466 | resets = <&tegra_car 67>; | ||
467 | reset-names = "i2c"; | ||
468 | dmas = <&apbdma 23>, <&apbdma 23>; | ||
469 | dma-names = "rx", "tx"; | ||
411 | status = "disabled"; | 470 | status = "disabled"; |
412 | }; | 471 | }; |
413 | 472 | ||
@@ -419,7 +478,11 @@ | |||
419 | #size-cells = <0>; | 478 | #size-cells = <0>; |
420 | clocks = <&tegra_car TEGRA30_CLK_I2C4>, | 479 | clocks = <&tegra_car TEGRA30_CLK_I2C4>, |
421 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; | 480 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; |
481 | resets = <&tegra_car 103>; | ||
482 | reset-names = "i2c"; | ||
422 | clock-names = "div-clk", "fast-clk"; | 483 | clock-names = "div-clk", "fast-clk"; |
484 | dmas = <&apbdma 26>, <&apbdma 26>; | ||
485 | dma-names = "rx", "tx"; | ||
423 | status = "disabled"; | 486 | status = "disabled"; |
424 | }; | 487 | }; |
425 | 488 | ||
@@ -432,6 +495,10 @@ | |||
432 | clocks = <&tegra_car TEGRA30_CLK_I2C5>, | 495 | clocks = <&tegra_car TEGRA30_CLK_I2C5>, |
433 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; | 496 | <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; |
434 | clock-names = "div-clk", "fast-clk"; | 497 | clock-names = "div-clk", "fast-clk"; |
498 | resets = <&tegra_car 47>; | ||
499 | reset-names = "i2c"; | ||
500 | dmas = <&apbdma 24>, <&apbdma 24>; | ||
501 | dma-names = "rx", "tx"; | ||
435 | status = "disabled"; | 502 | status = "disabled"; |
436 | }; | 503 | }; |
437 | 504 | ||
@@ -439,10 +506,13 @@ | |||
439 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 506 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
440 | reg = <0x7000d400 0x200>; | 507 | reg = <0x7000d400 0x200>; |
441 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; | 508 | interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; |
442 | nvidia,dma-request-selector = <&apbdma 15>; | ||
443 | #address-cells = <1>; | 509 | #address-cells = <1>; |
444 | #size-cells = <0>; | 510 | #size-cells = <0>; |
445 | clocks = <&tegra_car TEGRA30_CLK_SBC1>; | 511 | clocks = <&tegra_car TEGRA30_CLK_SBC1>; |
512 | resets = <&tegra_car 41>; | ||
513 | reset-names = "spi"; | ||
514 | dmas = <&apbdma 15>, <&apbdma 15>; | ||
515 | dma-names = "rx", "tx"; | ||
446 | status = "disabled"; | 516 | status = "disabled"; |
447 | }; | 517 | }; |
448 | 518 | ||
@@ -450,10 +520,13 @@ | |||
450 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 520 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
451 | reg = <0x7000d600 0x200>; | 521 | reg = <0x7000d600 0x200>; |
452 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; | 522 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; |
453 | nvidia,dma-request-selector = <&apbdma 16>; | ||
454 | #address-cells = <1>; | 523 | #address-cells = <1>; |
455 | #size-cells = <0>; | 524 | #size-cells = <0>; |
456 | clocks = <&tegra_car TEGRA30_CLK_SBC2>; | 525 | clocks = <&tegra_car TEGRA30_CLK_SBC2>; |
526 | resets = <&tegra_car 44>; | ||
527 | reset-names = "spi"; | ||
528 | dmas = <&apbdma 16>, <&apbdma 16>; | ||
529 | dma-names = "rx", "tx"; | ||
457 | status = "disabled"; | 530 | status = "disabled"; |
458 | }; | 531 | }; |
459 | 532 | ||
@@ -461,10 +534,13 @@ | |||
461 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 534 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
462 | reg = <0x7000d800 0x200>; | 535 | reg = <0x7000d800 0x200>; |
463 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; | 536 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; |
464 | nvidia,dma-request-selector = <&apbdma 17>; | ||
465 | #address-cells = <1>; | 537 | #address-cells = <1>; |
466 | #size-cells = <0>; | 538 | #size-cells = <0>; |
467 | clocks = <&tegra_car TEGRA30_CLK_SBC3>; | 539 | clocks = <&tegra_car TEGRA30_CLK_SBC3>; |
540 | resets = <&tegra_car 46>; | ||
541 | reset-names = "spi"; | ||
542 | dmas = <&apbdma 17>, <&apbdma 17>; | ||
543 | dma-names = "rx", "tx"; | ||
468 | status = "disabled"; | 544 | status = "disabled"; |
469 | }; | 545 | }; |
470 | 546 | ||
@@ -472,10 +548,13 @@ | |||
472 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 548 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
473 | reg = <0x7000da00 0x200>; | 549 | reg = <0x7000da00 0x200>; |
474 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | 550 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; |
475 | nvidia,dma-request-selector = <&apbdma 18>; | ||
476 | #address-cells = <1>; | 551 | #address-cells = <1>; |
477 | #size-cells = <0>; | 552 | #size-cells = <0>; |
478 | clocks = <&tegra_car TEGRA30_CLK_SBC4>; | 553 | clocks = <&tegra_car TEGRA30_CLK_SBC4>; |
554 | resets = <&tegra_car 68>; | ||
555 | reset-names = "spi"; | ||
556 | dmas = <&apbdma 18>, <&apbdma 18>; | ||
557 | dma-names = "rx", "tx"; | ||
479 | status = "disabled"; | 558 | status = "disabled"; |
480 | }; | 559 | }; |
481 | 560 | ||
@@ -483,10 +562,13 @@ | |||
483 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 562 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
484 | reg = <0x7000dc00 0x200>; | 563 | reg = <0x7000dc00 0x200>; |
485 | interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; | 564 | interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; |
486 | nvidia,dma-request-selector = <&apbdma 27>; | ||
487 | #address-cells = <1>; | 565 | #address-cells = <1>; |
488 | #size-cells = <0>; | 566 | #size-cells = <0>; |
489 | clocks = <&tegra_car TEGRA30_CLK_SBC5>; | 567 | clocks = <&tegra_car TEGRA30_CLK_SBC5>; |
568 | resets = <&tegra_car 104>; | ||
569 | reset-names = "spi"; | ||
570 | dmas = <&apbdma 27>, <&apbdma 27>; | ||
571 | dma-names = "rx", "tx"; | ||
490 | status = "disabled"; | 572 | status = "disabled"; |
491 | }; | 573 | }; |
492 | 574 | ||
@@ -494,10 +576,13 @@ | |||
494 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; | 576 | compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; |
495 | reg = <0x7000de00 0x200>; | 577 | reg = <0x7000de00 0x200>; |
496 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; | 578 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; |
497 | nvidia,dma-request-selector = <&apbdma 28>; | ||
498 | #address-cells = <1>; | 579 | #address-cells = <1>; |
499 | #size-cells = <0>; | 580 | #size-cells = <0>; |
500 | clocks = <&tegra_car TEGRA30_CLK_SBC6>; | 581 | clocks = <&tegra_car TEGRA30_CLK_SBC6>; |
582 | resets = <&tegra_car 106>; | ||
583 | reset-names = "spi"; | ||
584 | dmas = <&apbdma 28>, <&apbdma 28>; | ||
585 | dma-names = "rx", "tx"; | ||
501 | status = "disabled"; | 586 | status = "disabled"; |
502 | }; | 587 | }; |
503 | 588 | ||
@@ -506,6 +591,8 @@ | |||
506 | reg = <0x7000e200 0x100>; | 591 | reg = <0x7000e200 0x100>; |
507 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; | 592 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; |
508 | clocks = <&tegra_car TEGRA30_CLK_KBC>; | 593 | clocks = <&tegra_car TEGRA30_CLK_KBC>; |
594 | resets = <&tegra_car 36>; | ||
595 | reset-names = "kbc"; | ||
509 | status = "disabled"; | 596 | status = "disabled"; |
510 | }; | 597 | }; |
511 | 598 | ||
@@ -540,21 +627,29 @@ | |||
540 | reg = <0x70080000 0x200 | 627 | reg = <0x70080000 0x200 |
541 | 0x70080200 0x100>; | 628 | 0x70080200 0x100>; |
542 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; | 629 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; |
543 | nvidia,dma-request-selector = <&apbdma 1>; | ||
544 | clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>, | 630 | clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>, |
545 | <&tegra_car TEGRA30_CLK_APBIF>, | 631 | <&tegra_car TEGRA30_CLK_APBIF>; |
546 | <&tegra_car TEGRA30_CLK_I2S0>, | 632 | clock-names = "d_audio", "apbif"; |
547 | <&tegra_car TEGRA30_CLK_I2S1>, | 633 | resets = <&tegra_car 106>, /* d_audio */ |
548 | <&tegra_car TEGRA30_CLK_I2S2>, | 634 | <&tegra_car 107>, /* apbif */ |
549 | <&tegra_car TEGRA30_CLK_I2S3>, | 635 | <&tegra_car 30>, /* i2s0 */ |
550 | <&tegra_car TEGRA30_CLK_I2S4>, | 636 | <&tegra_car 11>, /* i2s1 */ |
551 | <&tegra_car TEGRA30_CLK_DAM0>, | 637 | <&tegra_car 18>, /* i2s2 */ |
552 | <&tegra_car TEGRA30_CLK_DAM1>, | 638 | <&tegra_car 101>, /* i2s3 */ |
553 | <&tegra_car TEGRA30_CLK_DAM2>, | 639 | <&tegra_car 102>, /* i2s4 */ |
554 | <&tegra_car TEGRA30_CLK_SPDIF_IN>; | 640 | <&tegra_car 108>, /* dam0 */ |
555 | clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", | 641 | <&tegra_car 109>, /* dam1 */ |
642 | <&tegra_car 110>, /* dam2 */ | ||
643 | <&tegra_car 10>; /* spdif */ | ||
644 | reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", | ||
556 | "i2s3", "i2s4", "dam0", "dam1", "dam2", | 645 | "i2s3", "i2s4", "dam0", "dam1", "dam2", |
557 | "spdif_in"; | 646 | "spdif"; |
647 | dmas = <&apbdma 1>, <&apbdma 1>, | ||
648 | <&apbdma 2>, <&apbdma 2>, | ||
649 | <&apbdma 3>, <&apbdma 3>, | ||
650 | <&apbdma 4>, <&apbdma 4>; | ||
651 | dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", | ||
652 | "rx3", "tx3"; | ||
558 | ranges; | 653 | ranges; |
559 | #address-cells = <1>; | 654 | #address-cells = <1>; |
560 | #size-cells = <1>; | 655 | #size-cells = <1>; |
@@ -564,6 +659,8 @@ | |||
564 | reg = <0x70080300 0x100>; | 659 | reg = <0x70080300 0x100>; |
565 | nvidia,ahub-cif-ids = <4 4>; | 660 | nvidia,ahub-cif-ids = <4 4>; |
566 | clocks = <&tegra_car TEGRA30_CLK_I2S0>; | 661 | clocks = <&tegra_car TEGRA30_CLK_I2S0>; |
662 | resets = <&tegra_car 30>; | ||
663 | reset-names = "i2s"; | ||
567 | status = "disabled"; | 664 | status = "disabled"; |
568 | }; | 665 | }; |
569 | 666 | ||
@@ -572,6 +669,8 @@ | |||
572 | reg = <0x70080400 0x100>; | 669 | reg = <0x70080400 0x100>; |
573 | nvidia,ahub-cif-ids = <5 5>; | 670 | nvidia,ahub-cif-ids = <5 5>; |
574 | clocks = <&tegra_car TEGRA30_CLK_I2S1>; | 671 | clocks = <&tegra_car TEGRA30_CLK_I2S1>; |
672 | resets = <&tegra_car 11>; | ||
673 | reset-names = "i2s"; | ||
575 | status = "disabled"; | 674 | status = "disabled"; |
576 | }; | 675 | }; |
577 | 676 | ||
@@ -580,6 +679,8 @@ | |||
580 | reg = <0x70080500 0x100>; | 679 | reg = <0x70080500 0x100>; |
581 | nvidia,ahub-cif-ids = <6 6>; | 680 | nvidia,ahub-cif-ids = <6 6>; |
582 | clocks = <&tegra_car TEGRA30_CLK_I2S2>; | 681 | clocks = <&tegra_car TEGRA30_CLK_I2S2>; |
682 | resets = <&tegra_car 18>; | ||
683 | reset-names = "i2s"; | ||
583 | status = "disabled"; | 684 | status = "disabled"; |
584 | }; | 685 | }; |
585 | 686 | ||
@@ -588,6 +689,8 @@ | |||
588 | reg = <0x70080600 0x100>; | 689 | reg = <0x70080600 0x100>; |
589 | nvidia,ahub-cif-ids = <7 7>; | 690 | nvidia,ahub-cif-ids = <7 7>; |
590 | clocks = <&tegra_car TEGRA30_CLK_I2S3>; | 691 | clocks = <&tegra_car TEGRA30_CLK_I2S3>; |
692 | resets = <&tegra_car 101>; | ||
693 | reset-names = "i2s"; | ||
591 | status = "disabled"; | 694 | status = "disabled"; |
592 | }; | 695 | }; |
593 | 696 | ||
@@ -596,6 +699,8 @@ | |||
596 | reg = <0x70080700 0x100>; | 699 | reg = <0x70080700 0x100>; |
597 | nvidia,ahub-cif-ids = <8 8>; | 700 | nvidia,ahub-cif-ids = <8 8>; |
598 | clocks = <&tegra_car TEGRA30_CLK_I2S4>; | 701 | clocks = <&tegra_car TEGRA30_CLK_I2S4>; |
702 | resets = <&tegra_car 102>; | ||
703 | reset-names = "i2s"; | ||
599 | status = "disabled"; | 704 | status = "disabled"; |
600 | }; | 705 | }; |
601 | }; | 706 | }; |
@@ -605,6 +710,8 @@ | |||
605 | reg = <0x78000000 0x200>; | 710 | reg = <0x78000000 0x200>; |
606 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; | 711 | interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; |
607 | clocks = <&tegra_car TEGRA30_CLK_SDMMC1>; | 712 | clocks = <&tegra_car TEGRA30_CLK_SDMMC1>; |
713 | resets = <&tegra_car 14>; | ||
714 | reset-names = "sdhci"; | ||
608 | status = "disabled"; | 715 | status = "disabled"; |
609 | }; | 716 | }; |
610 | 717 | ||
@@ -613,6 +720,8 @@ | |||
613 | reg = <0x78000200 0x200>; | 720 | reg = <0x78000200 0x200>; |
614 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 721 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
615 | clocks = <&tegra_car TEGRA30_CLK_SDMMC2>; | 722 | clocks = <&tegra_car TEGRA30_CLK_SDMMC2>; |
723 | resets = <&tegra_car 9>; | ||
724 | reset-names = "sdhci"; | ||
616 | status = "disabled"; | 725 | status = "disabled"; |
617 | }; | 726 | }; |
618 | 727 | ||
@@ -621,6 +730,8 @@ | |||
621 | reg = <0x78000400 0x200>; | 730 | reg = <0x78000400 0x200>; |
622 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; | 731 | interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; |
623 | clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; | 732 | clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; |
733 | resets = <&tegra_car 69>; | ||
734 | reset-names = "sdhci"; | ||
624 | status = "disabled"; | 735 | status = "disabled"; |
625 | }; | 736 | }; |
626 | 737 | ||
@@ -629,6 +740,8 @@ | |||
629 | reg = <0x78000600 0x200>; | 740 | reg = <0x78000600 0x200>; |
630 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; | 741 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; |
631 | clocks = <&tegra_car TEGRA30_CLK_SDMMC4>; | 742 | clocks = <&tegra_car TEGRA30_CLK_SDMMC4>; |
743 | resets = <&tegra_car 15>; | ||
744 | reset-names = "sdhci"; | ||
632 | status = "disabled"; | 745 | status = "disabled"; |
633 | }; | 746 | }; |
634 | 747 | ||
@@ -638,6 +751,8 @@ | |||
638 | interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; | 751 | interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; |
639 | phy_type = "utmi"; | 752 | phy_type = "utmi"; |
640 | clocks = <&tegra_car TEGRA30_CLK_USBD>; | 753 | clocks = <&tegra_car TEGRA30_CLK_USBD>; |
754 | resets = <&tegra_car 22>; | ||
755 | reset-names = "usb"; | ||
641 | nvidia,needs-double-reset; | 756 | nvidia,needs-double-reset; |
642 | nvidia,phy = <&phy1>; | 757 | nvidia,phy = <&phy1>; |
643 | status = "disabled"; | 758 | status = "disabled"; |
@@ -671,6 +786,8 @@ | |||
671 | interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; | 786 | interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; |
672 | phy_type = "ulpi"; | 787 | phy_type = "ulpi"; |
673 | clocks = <&tegra_car TEGRA30_CLK_USB2>; | 788 | clocks = <&tegra_car TEGRA30_CLK_USB2>; |
789 | resets = <&tegra_car 58>; | ||
790 | reset-names = "usb"; | ||
674 | nvidia,phy = <&phy2>; | 791 | nvidia,phy = <&phy2>; |
675 | status = "disabled"; | 792 | status = "disabled"; |
676 | }; | 793 | }; |
@@ -692,6 +809,8 @@ | |||
692 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | 809 | interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; |
693 | phy_type = "utmi"; | 810 | phy_type = "utmi"; |
694 | clocks = <&tegra_car TEGRA30_CLK_USB3>; | 811 | clocks = <&tegra_car TEGRA30_CLK_USB3>; |
812 | resets = <&tegra_car 59>; | ||
813 | reset-names = "usb"; | ||
695 | nvidia,phy = <&phy3>; | 814 | nvidia,phy = <&phy3>; |
696 | status = "disabled"; | 815 | status = "disabled"; |
697 | }; | 816 | }; |
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 09e740f58b27..15c09294effa 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig | |||
@@ -14,6 +14,8 @@ config ARCH_TEGRA | |||
14 | select MIGHT_HAVE_CACHE_L2X0 | 14 | select MIGHT_HAVE_CACHE_L2X0 |
15 | select MIGHT_HAVE_PCI | 15 | select MIGHT_HAVE_PCI |
16 | select PINCTRL | 16 | select PINCTRL |
17 | select ARCH_HAS_RESET_CONTROLLER | ||
18 | select RESET_CONTROLLER | ||
17 | select SOC_BUS | 19 | select SOC_BUS |
18 | select SPARSE_IRQ | 20 | select SPARSE_IRQ |
19 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | 21 | select USB_ARCH_HAS_EHCI if USB_SUPPORT |
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c index 85d28e756bb7..f6f5b54ff95e 100644 --- a/arch/arm/mach-tegra/powergate.c +++ b/arch/arm/mach-tegra/powergate.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/export.h> | 25 | #include <linux/export.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/reset.h> | ||
28 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/clk/tegra.h> | 31 | #include <linux/clk/tegra.h> |
@@ -144,11 +145,12 @@ int tegra_powergate_remove_clamping(int id) | |||
144 | } | 145 | } |
145 | 146 | ||
146 | /* Must be called with clk disabled, and returns with clk enabled */ | 147 | /* Must be called with clk disabled, and returns with clk enabled */ |
147 | int tegra_powergate_sequence_power_up(int id, struct clk *clk) | 148 | int tegra_powergate_sequence_power_up(int id, struct clk *clk, |
149 | struct reset_control *rst) | ||
148 | { | 150 | { |
149 | int ret; | 151 | int ret; |
150 | 152 | ||
151 | tegra_periph_reset_assert(clk); | 153 | reset_control_assert(rst); |
152 | 154 | ||
153 | ret = tegra_powergate_power_on(id); | 155 | ret = tegra_powergate_power_on(id); |
154 | if (ret) | 156 | if (ret) |
@@ -165,7 +167,7 @@ int tegra_powergate_sequence_power_up(int id, struct clk *clk) | |||
165 | goto err_clamp; | 167 | goto err_clamp; |
166 | 168 | ||
167 | udelay(10); | 169 | udelay(10); |
168 | tegra_periph_reset_deassert(clk); | 170 | reset_control_deassert(rst); |
169 | 171 | ||
170 | return 0; | 172 | return 0; |
171 | 173 | ||
diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c index f38f33e3c65d..507015314827 100644 --- a/drivers/clk/tegra/clk-periph-gate.c +++ b/drivers/clk/tegra/clk-periph-gate.c | |||
@@ -36,8 +36,6 @@ static DEFINE_SPINLOCK(periph_ref_lock); | |||
36 | 36 | ||
37 | #define read_rst(gate) \ | 37 | #define read_rst(gate) \ |
38 | readl_relaxed(gate->clk_base + (gate->regs->rst_reg)) | 38 | readl_relaxed(gate->clk_base + (gate->regs->rst_reg)) |
39 | #define write_rst_set(val, gate) \ | ||
40 | writel_relaxed(val, gate->clk_base + (gate->regs->rst_set_reg)) | ||
41 | #define write_rst_clr(val, gate) \ | 39 | #define write_rst_clr(val, gate) \ |
42 | writel_relaxed(val, gate->clk_base + (gate->regs->rst_clr_reg)) | 40 | writel_relaxed(val, gate->clk_base + (gate->regs->rst_clr_reg)) |
43 | 41 | ||
@@ -123,26 +121,6 @@ static void clk_periph_disable(struct clk_hw *hw) | |||
123 | spin_unlock_irqrestore(&periph_ref_lock, flags); | 121 | spin_unlock_irqrestore(&periph_ref_lock, flags); |
124 | } | 122 | } |
125 | 123 | ||
126 | void tegra_periph_reset(struct tegra_clk_periph_gate *gate, bool assert) | ||
127 | { | ||
128 | if (gate->flags & TEGRA_PERIPH_NO_RESET) | ||
129 | return; | ||
130 | |||
131 | if (assert) { | ||
132 | /* | ||
133 | * If peripheral is in the APB bus then read the APB bus to | ||
134 | * flush the write operation in apb bus. This will avoid the | ||
135 | * peripheral access after disabling clock | ||
136 | */ | ||
137 | if (gate->flags & TEGRA_PERIPH_ON_APB) | ||
138 | tegra_read_chipid(); | ||
139 | |||
140 | write_rst_set(periph_clk_to_bit(gate), gate); | ||
141 | } else { | ||
142 | write_rst_clr(periph_clk_to_bit(gate), gate); | ||
143 | } | ||
144 | } | ||
145 | |||
146 | const struct clk_ops tegra_clk_periph_gate_ops = { | 124 | const struct clk_ops tegra_clk_periph_gate_ops = { |
147 | .is_enabled = clk_periph_is_enabled, | 125 | .is_enabled = clk_periph_is_enabled, |
148 | .enable = clk_periph_enable, | 126 | .enable = clk_periph_enable, |
diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c index d62b396863c1..c534043c0481 100644 --- a/drivers/clk/tegra/clk-periph.c +++ b/drivers/clk/tegra/clk-periph.c | |||
@@ -111,46 +111,6 @@ static void clk_periph_disable(struct clk_hw *hw) | |||
111 | gate_ops->disable(gate_hw); | 111 | gate_ops->disable(gate_hw); |
112 | } | 112 | } |
113 | 113 | ||
114 | void tegra_periph_reset_deassert(struct clk *c) | ||
115 | { | ||
116 | struct clk_hw *hw = __clk_get_hw(c); | ||
117 | struct tegra_clk_periph *periph = to_clk_periph(hw); | ||
118 | struct tegra_clk_periph_gate *gate; | ||
119 | |||
120 | if (periph->magic != TEGRA_CLK_PERIPH_MAGIC) { | ||
121 | gate = to_clk_periph_gate(hw); | ||
122 | if (gate->magic != TEGRA_CLK_PERIPH_GATE_MAGIC) { | ||
123 | WARN_ON(1); | ||
124 | return; | ||
125 | } | ||
126 | } else { | ||
127 | gate = &periph->gate; | ||
128 | } | ||
129 | |||
130 | tegra_periph_reset(gate, 0); | ||
131 | } | ||
132 | EXPORT_SYMBOL(tegra_periph_reset_deassert); | ||
133 | |||
134 | void tegra_periph_reset_assert(struct clk *c) | ||
135 | { | ||
136 | struct clk_hw *hw = __clk_get_hw(c); | ||
137 | struct tegra_clk_periph *periph = to_clk_periph(hw); | ||
138 | struct tegra_clk_periph_gate *gate; | ||
139 | |||
140 | if (periph->magic != TEGRA_CLK_PERIPH_MAGIC) { | ||
141 | gate = to_clk_periph_gate(hw); | ||
142 | if (gate->magic != TEGRA_CLK_PERIPH_GATE_MAGIC) { | ||
143 | WARN_ON(1); | ||
144 | return; | ||
145 | } | ||
146 | } else { | ||
147 | gate = &periph->gate; | ||
148 | } | ||
149 | |||
150 | tegra_periph_reset(gate, 1); | ||
151 | } | ||
152 | EXPORT_SYMBOL(tegra_periph_reset_assert); | ||
153 | |||
154 | const struct clk_ops tegra_clk_periph_ops = { | 114 | const struct clk_ops tegra_clk_periph_ops = { |
155 | .get_parent = clk_periph_get_parent, | 115 | .get_parent = clk_periph_get_parent, |
156 | .set_parent = clk_periph_set_parent, | 116 | .set_parent = clk_periph_set_parent, |
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c index 29b912582e3d..90d9d25f2228 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c | |||
@@ -1460,7 +1460,8 @@ static void __init tegra114_clock_init(struct device_node *np) | |||
1460 | return; | 1460 | return; |
1461 | } | 1461 | } |
1462 | 1462 | ||
1463 | clks = tegra_clk_init(TEGRA114_CLK_CLK_MAX, TEGRA114_CLK_PERIPH_BANKS); | 1463 | clks = tegra_clk_init(clk_base, TEGRA114_CLK_CLK_MAX, |
1464 | TEGRA114_CLK_PERIPH_BANKS); | ||
1464 | if (!clks) | 1465 | if (!clks) |
1465 | return; | 1466 | return; |
1466 | 1467 | ||
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c index 0ef4485e9b0a..aff86b5bc745 100644 --- a/drivers/clk/tegra/clk-tegra124.c +++ b/drivers/clk/tegra/clk-tegra124.c | |||
@@ -1398,7 +1398,7 @@ static void __init tegra124_clock_init(struct device_node *np) | |||
1398 | return; | 1398 | return; |
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | clks = tegra_clk_init(TEGRA124_CLK_CLK_MAX, 6); | 1401 | clks = tegra_clk_init(clk_base, TEGRA124_CLK_CLK_MAX, 6); |
1402 | if (!clks) | 1402 | if (!clks) |
1403 | return; | 1403 | return; |
1404 | 1404 | ||
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index b3b7204acfe7..dbace152b2fa 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c | |||
@@ -468,7 +468,6 @@ static struct tegra_devclk devclks[] __initdata = { | |||
468 | { .con_id = "isp", .dev_id = "tegra_camera", .dt_id = TEGRA20_CLK_ISP }, | 468 | { .con_id = "isp", .dev_id = "tegra_camera", .dt_id = TEGRA20_CLK_ISP }, |
469 | { .con_id = "pex", .dt_id = TEGRA20_CLK_PEX }, | 469 | { .con_id = "pex", .dt_id = TEGRA20_CLK_PEX }, |
470 | { .con_id = "afi", .dt_id = TEGRA20_CLK_AFI }, | 470 | { .con_id = "afi", .dt_id = TEGRA20_CLK_AFI }, |
471 | { .con_id = "pcie_xclk", .dt_id = TEGRA20_CLK_PCIE_XCLK }, | ||
472 | { .con_id = "cdev1", .dt_id = TEGRA20_CLK_CDEV1 }, | 471 | { .con_id = "cdev1", .dt_id = TEGRA20_CLK_CDEV1 }, |
473 | { .con_id = "cdev2", .dt_id = TEGRA20_CLK_CDEV2 }, | 472 | { .con_id = "cdev2", .dt_id = TEGRA20_CLK_CDEV2 }, |
474 | { .con_id = "clk_32k", .dt_id = TEGRA20_CLK_CLK_32K }, | 473 | { .con_id = "clk_32k", .dt_id = TEGRA20_CLK_CLK_32K }, |
@@ -834,11 +833,6 @@ static void __init tegra20_periph_clk_init(void) | |||
834 | periph_clk_enb_refcnt); | 833 | periph_clk_enb_refcnt); |
835 | clks[TEGRA20_CLK_PEX] = clk; | 834 | clks[TEGRA20_CLK_PEX] = clk; |
836 | 835 | ||
837 | /* pcie_xclk */ | ||
838 | clk = tegra_clk_register_periph_gate("pcie_xclk", "clk_m", 0, clk_base, | ||
839 | 0, 74, periph_clk_enb_refcnt); | ||
840 | clks[TEGRA20_CLK_PCIE_XCLK] = clk; | ||
841 | |||
842 | /* cdev1 */ | 836 | /* cdev1 */ |
843 | clk = clk_register_fixed_rate(NULL, "cdev1_fixed", NULL, CLK_IS_ROOT, | 837 | clk = clk_register_fixed_rate(NULL, "cdev1_fixed", NULL, CLK_IS_ROOT, |
844 | 26000000); | 838 | 26000000); |
@@ -1109,7 +1103,8 @@ static void __init tegra20_clock_init(struct device_node *np) | |||
1109 | BUG(); | 1103 | BUG(); |
1110 | } | 1104 | } |
1111 | 1105 | ||
1112 | clks = tegra_clk_init(TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_PERIPH_BANKS); | 1106 | clks = tegra_clk_init(clk_base, TEGRA20_CLK_CLK_MAX, |
1107 | TEGRA20_CLK_PERIPH_BANKS); | ||
1113 | if (!clks) | 1108 | if (!clks) |
1114 | return; | 1109 | return; |
1115 | 1110 | ||
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index dcb6843b3a89..8b10c38b6e3c 100644 --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c | |||
@@ -649,7 +649,6 @@ static struct tegra_devclk devclks[] __initdata = { | |||
649 | { .con_id = "isp", .dev_id = "tegra_camera", .dt_id = TEGRA30_CLK_ISP }, | 649 | { .con_id = "isp", .dev_id = "tegra_camera", .dt_id = TEGRA30_CLK_ISP }, |
650 | { .con_id = "pcie", .dev_id = "tegra-pcie", .dt_id = TEGRA30_CLK_PCIE }, | 650 | { .con_id = "pcie", .dev_id = "tegra-pcie", .dt_id = TEGRA30_CLK_PCIE }, |
651 | { .con_id = "afi", .dev_id = "tegra-pcie", .dt_id = TEGRA30_CLK_AFI }, | 651 | { .con_id = "afi", .dev_id = "tegra-pcie", .dt_id = TEGRA30_CLK_AFI }, |
652 | { .con_id = "pciex", .dev_id = "tegra-pcie", .dt_id = TEGRA30_CLK_PCIEX }, | ||
653 | { .con_id = "fuse", .dt_id = TEGRA30_CLK_FUSE }, | 652 | { .con_id = "fuse", .dt_id = TEGRA30_CLK_FUSE }, |
654 | { .con_id = "fuse_burn", .dev_id = "fuse-tegra", .dt_id = TEGRA30_CLK_FUSE_BURN }, | 653 | { .con_id = "fuse_burn", .dev_id = "fuse-tegra", .dt_id = TEGRA30_CLK_FUSE_BURN }, |
655 | { .con_id = "apbif", .dev_id = "tegra30-ahub", .dt_id = TEGRA30_CLK_APBIF }, | 654 | { .con_id = "apbif", .dev_id = "tegra30-ahub", .dt_id = TEGRA30_CLK_APBIF }, |
@@ -1150,11 +1149,6 @@ static void __init tegra30_periph_clk_init(void) | |||
1150 | periph_clk_enb_refcnt); | 1149 | periph_clk_enb_refcnt); |
1151 | clks[TEGRA30_CLK_AFI] = clk; | 1150 | clks[TEGRA30_CLK_AFI] = clk; |
1152 | 1151 | ||
1153 | /* pciex */ | ||
1154 | clk = tegra_clk_register_periph_gate("pciex", "pll_e", 0, clk_base, 0, | ||
1155 | 74, periph_clk_enb_refcnt); | ||
1156 | clks[TEGRA30_CLK_PCIEX] = clk; | ||
1157 | |||
1158 | /* emc */ | 1152 | /* emc */ |
1159 | clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm, | 1153 | clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm, |
1160 | ARRAY_SIZE(mux_pllmcp_clkm), | 1154 | ARRAY_SIZE(mux_pllmcp_clkm), |
@@ -1395,7 +1389,6 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { | |||
1395 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_BSEA, "nvavp", "bsea"), | 1389 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_BSEA, "nvavp", "bsea"), |
1396 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CML1, "tegra_sata_cml", NULL), | 1390 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CML1, "tegra_sata_cml", NULL), |
1397 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CML0, "tegra_pcie", "cml"), | 1391 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CML0, "tegra_pcie", "cml"), |
1398 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_PCIEX, "tegra_pcie", "pciex"), | ||
1399 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_VCP, "nvavp", "vcp"), | 1392 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_VCP, "nvavp", "vcp"), |
1400 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CLK_MAX, NULL, NULL), /* MUST be the last entry */ | 1393 | TEGRA_CLK_DUPLICATE(TEGRA30_CLK_CLK_MAX, NULL, NULL), /* MUST be the last entry */ |
1401 | }; | 1394 | }; |
@@ -1427,7 +1420,8 @@ static void __init tegra30_clock_init(struct device_node *np) | |||
1427 | BUG(); | 1420 | BUG(); |
1428 | } | 1421 | } |
1429 | 1422 | ||
1430 | clks = tegra_clk_init(TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_PERIPH_BANKS); | 1423 | clks = tegra_clk_init(clk_base, TEGRA30_CLK_CLK_MAX, |
1424 | TEGRA30_CLK_PERIPH_BANKS); | ||
1431 | if (!clks) | 1425 | if (!clks) |
1432 | return; | 1426 | return; |
1433 | 1427 | ||
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c index a12a5f5107ec..c0a7d7723510 100644 --- a/drivers/clk/tegra/clk.c +++ b/drivers/clk/tegra/clk.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/clk-provider.h> | 18 | #include <linux/clk-provider.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/clk/tegra.h> | 20 | #include <linux/clk/tegra.h> |
21 | #include <linux/reset-controller.h> | ||
22 | #include <linux/tegra-soc.h> | ||
21 | 23 | ||
22 | #include "clk.h" | 24 | #include "clk.h" |
23 | 25 | ||
@@ -121,6 +123,35 @@ static struct tegra_clk_periph_regs periph_regs[] = { | |||
121 | }, | 123 | }, |
122 | }; | 124 | }; |
123 | 125 | ||
126 | static void __iomem *clk_base; | ||
127 | |||
128 | static int tegra_clk_rst_assert(struct reset_controller_dev *rcdev, | ||
129 | unsigned long id) | ||
130 | { | ||
131 | /* | ||
132 | * If peripheral is on the APB bus then we must read the APB bus to | ||
133 | * flush the write operation in apb bus. This will avoid peripheral | ||
134 | * access after disabling clock. Since the reset driver has no | ||
135 | * knowledge of which reset IDs represent which devices, simply do | ||
136 | * this all the time. | ||
137 | */ | ||
138 | tegra_read_chipid(); | ||
139 | |||
140 | writel_relaxed(BIT(id % 32), | ||
141 | clk_base + periph_regs[id / 32].rst_set_reg); | ||
142 | |||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | static int tegra_clk_rst_deassert(struct reset_controller_dev *rcdev, | ||
147 | unsigned long id) | ||
148 | { | ||
149 | writel_relaxed(BIT(id % 32), | ||
150 | clk_base + periph_regs[id / 32].rst_clr_reg); | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | |||
124 | struct tegra_clk_periph_regs *get_reg_bank(int clkid) | 155 | struct tegra_clk_periph_regs *get_reg_bank(int clkid) |
125 | { | 156 | { |
126 | int reg_bank = clkid / 32; | 157 | int reg_bank = clkid / 32; |
@@ -133,8 +164,10 @@ struct tegra_clk_periph_regs *get_reg_bank(int clkid) | |||
133 | } | 164 | } |
134 | } | 165 | } |
135 | 166 | ||
136 | struct clk ** __init tegra_clk_init(int num, int banks) | 167 | struct clk ** __init tegra_clk_init(void __iomem *regs, int num, int banks) |
137 | { | 168 | { |
169 | clk_base = regs; | ||
170 | |||
138 | if (WARN_ON(banks > ARRAY_SIZE(periph_regs))) | 171 | if (WARN_ON(banks > ARRAY_SIZE(periph_regs))) |
139 | return NULL; | 172 | return NULL; |
140 | 173 | ||
@@ -203,6 +236,17 @@ void __init tegra_init_from_table(struct tegra_clk_init_table *tbl, | |||
203 | } | 236 | } |
204 | } | 237 | } |
205 | 238 | ||
239 | static struct reset_control_ops rst_ops = { | ||
240 | .assert = tegra_clk_rst_assert, | ||
241 | .deassert = tegra_clk_rst_deassert, | ||
242 | }; | ||
243 | |||
244 | static struct reset_controller_dev rst_ctlr = { | ||
245 | .ops = &rst_ops, | ||
246 | .owner = THIS_MODULE, | ||
247 | .of_reset_n_cells = 1, | ||
248 | }; | ||
249 | |||
206 | void __init tegra_add_of_provider(struct device_node *np) | 250 | void __init tegra_add_of_provider(struct device_node *np) |
207 | { | 251 | { |
208 | int i; | 252 | int i; |
@@ -220,6 +264,10 @@ void __init tegra_add_of_provider(struct device_node *np) | |||
220 | clk_data.clks = clks; | 264 | clk_data.clks = clks; |
221 | clk_data.clk_num = clk_num; | 265 | clk_data.clk_num = clk_num; |
222 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 266 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
267 | |||
268 | rst_ctlr.of_node = np; | ||
269 | rst_ctlr.nr_resets = clk_num * 32; | ||
270 | reset_controller_register(&rst_ctlr); | ||
223 | } | 271 | } |
224 | 272 | ||
225 | void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num) | 273 | void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num) |
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h index 40fb011233c0..16ec8d6bb87f 100644 --- a/drivers/clk/tegra/clk.h +++ b/drivers/clk/tegra/clk.h | |||
@@ -393,7 +393,6 @@ struct tegra_clk_periph_gate { | |||
393 | #define TEGRA_PERIPH_NO_DIV BIT(4) | 393 | #define TEGRA_PERIPH_NO_DIV BIT(4) |
394 | #define TEGRA_PERIPH_NO_GATE BIT(5) | 394 | #define TEGRA_PERIPH_NO_GATE BIT(5) |
395 | 395 | ||
396 | void tegra_periph_reset(struct tegra_clk_periph_gate *gate, bool assert); | ||
397 | extern const struct clk_ops tegra_clk_periph_gate_ops; | 396 | extern const struct clk_ops tegra_clk_periph_gate_ops; |
398 | struct clk *tegra_clk_register_periph_gate(const char *name, | 397 | struct clk *tegra_clk_register_periph_gate(const char *name, |
399 | const char *parent_name, u8 gate_flags, void __iomem *clk_base, | 398 | const char *parent_name, u8 gate_flags, void __iomem *clk_base, |
@@ -597,7 +596,7 @@ void tegra_init_dup_clks(struct tegra_clk_duplicate *dup_list, | |||
597 | struct clk *clks[], int clk_max); | 596 | struct clk *clks[], int clk_max); |
598 | 597 | ||
599 | struct tegra_clk_periph_regs *get_reg_bank(int clkid); | 598 | struct tegra_clk_periph_regs *get_reg_bank(int clkid); |
600 | struct clk **tegra_clk_init(int num, int periph_banks); | 599 | struct clk **tegra_clk_init(void __iomem *clk_base, int num, int periph_banks); |
601 | 600 | ||
602 | struct clk **tegra_lookup_dt_id(int clk_id, struct tegra_clk *tegra_clk); | 601 | struct clk **tegra_lookup_dt_id(int clk_id, struct tegra_clk *tegra_clk); |
603 | 602 | ||
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 73654e33f13b..d11bb3620f27 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * DMA driver for Nvidia's Tegra20 APB DMA controller. | 2 | * DMA driver for Nvidia's Tegra20 APB DMA controller. |
3 | * | 3 | * |
4 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -29,11 +29,12 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/of.h> | 30 | #include <linux/of.h> |
31 | #include <linux/of_device.h> | 31 | #include <linux/of_device.h> |
32 | #include <linux/of_dma.h> | ||
32 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
33 | #include <linux/pm.h> | 34 | #include <linux/pm.h> |
34 | #include <linux/pm_runtime.h> | 35 | #include <linux/pm_runtime.h> |
36 | #include <linux/reset.h> | ||
35 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
36 | #include <linux/clk/tegra.h> | ||
37 | 38 | ||
38 | #include "dmaengine.h" | 39 | #include "dmaengine.h" |
39 | 40 | ||
@@ -199,6 +200,7 @@ struct tegra_dma_channel { | |||
199 | void *callback_param; | 200 | void *callback_param; |
200 | 201 | ||
201 | /* Channel-slave specific configuration */ | 202 | /* Channel-slave specific configuration */ |
203 | unsigned int slave_id; | ||
202 | struct dma_slave_config dma_sconfig; | 204 | struct dma_slave_config dma_sconfig; |
203 | struct tegra_dma_channel_regs channel_reg; | 205 | struct tegra_dma_channel_regs channel_reg; |
204 | }; | 206 | }; |
@@ -208,6 +210,7 @@ struct tegra_dma { | |||
208 | struct dma_device dma_dev; | 210 | struct dma_device dma_dev; |
209 | struct device *dev; | 211 | struct device *dev; |
210 | struct clk *dma_clk; | 212 | struct clk *dma_clk; |
213 | struct reset_control *rst; | ||
211 | spinlock_t global_lock; | 214 | spinlock_t global_lock; |
212 | void __iomem *base_addr; | 215 | void __iomem *base_addr; |
213 | const struct tegra_dma_chip_data *chip_data; | 216 | const struct tegra_dma_chip_data *chip_data; |
@@ -339,6 +342,8 @@ static int tegra_dma_slave_config(struct dma_chan *dc, | |||
339 | } | 342 | } |
340 | 343 | ||
341 | memcpy(&tdc->dma_sconfig, sconfig, sizeof(*sconfig)); | 344 | memcpy(&tdc->dma_sconfig, sconfig, sizeof(*sconfig)); |
345 | if (!tdc->slave_id) | ||
346 | tdc->slave_id = sconfig->slave_id; | ||
342 | tdc->config_init = true; | 347 | tdc->config_init = true; |
343 | return 0; | 348 | return 0; |
344 | } | 349 | } |
@@ -941,7 +946,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg( | |||
941 | ahb_seq |= TEGRA_APBDMA_AHBSEQ_BUS_WIDTH_32; | 946 | ahb_seq |= TEGRA_APBDMA_AHBSEQ_BUS_WIDTH_32; |
942 | 947 | ||
943 | csr |= TEGRA_APBDMA_CSR_ONCE | TEGRA_APBDMA_CSR_FLOW; | 948 | csr |= TEGRA_APBDMA_CSR_ONCE | TEGRA_APBDMA_CSR_FLOW; |
944 | csr |= tdc->dma_sconfig.slave_id << TEGRA_APBDMA_CSR_REQ_SEL_SHIFT; | 949 | csr |= tdc->slave_id << TEGRA_APBDMA_CSR_REQ_SEL_SHIFT; |
945 | if (flags & DMA_PREP_INTERRUPT) | 950 | if (flags & DMA_PREP_INTERRUPT) |
946 | csr |= TEGRA_APBDMA_CSR_IE_EOC; | 951 | csr |= TEGRA_APBDMA_CSR_IE_EOC; |
947 | 952 | ||
@@ -1085,7 +1090,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_dma_cyclic( | |||
1085 | csr |= TEGRA_APBDMA_CSR_FLOW; | 1090 | csr |= TEGRA_APBDMA_CSR_FLOW; |
1086 | if (flags & DMA_PREP_INTERRUPT) | 1091 | if (flags & DMA_PREP_INTERRUPT) |
1087 | csr |= TEGRA_APBDMA_CSR_IE_EOC; | 1092 | csr |= TEGRA_APBDMA_CSR_IE_EOC; |
1088 | csr |= tdc->dma_sconfig.slave_id << TEGRA_APBDMA_CSR_REQ_SEL_SHIFT; | 1093 | csr |= tdc->slave_id << TEGRA_APBDMA_CSR_REQ_SEL_SHIFT; |
1089 | 1094 | ||
1090 | apb_seq |= TEGRA_APBDMA_APBSEQ_WRAP_WORD_1; | 1095 | apb_seq |= TEGRA_APBDMA_APBSEQ_WRAP_WORD_1; |
1091 | 1096 | ||
@@ -1205,6 +1210,25 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc) | |||
1205 | kfree(sg_req); | 1210 | kfree(sg_req); |
1206 | } | 1211 | } |
1207 | clk_disable_unprepare(tdma->dma_clk); | 1212 | clk_disable_unprepare(tdma->dma_clk); |
1213 | |||
1214 | tdc->slave_id = 0; | ||
1215 | } | ||
1216 | |||
1217 | static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec, | ||
1218 | struct of_dma *ofdma) | ||
1219 | { | ||
1220 | struct tegra_dma *tdma = ofdma->of_dma_data; | ||
1221 | struct dma_chan *chan; | ||
1222 | struct tegra_dma_channel *tdc; | ||
1223 | |||
1224 | chan = dma_get_any_slave_channel(&tdma->dma_dev); | ||
1225 | if (!chan) | ||
1226 | return NULL; | ||
1227 | |||
1228 | tdc = to_tegra_dma_chan(chan); | ||
1229 | tdc->slave_id = dma_spec->args[0]; | ||
1230 | |||
1231 | return chan; | ||
1208 | } | 1232 | } |
1209 | 1233 | ||
1210 | /* Tegra20 specific DMA controller information */ | 1234 | /* Tegra20 specific DMA controller information */ |
@@ -1282,6 +1306,12 @@ static int tegra_dma_probe(struct platform_device *pdev) | |||
1282 | return PTR_ERR(tdma->dma_clk); | 1306 | return PTR_ERR(tdma->dma_clk); |
1283 | } | 1307 | } |
1284 | 1308 | ||
1309 | tdma->rst = devm_reset_control_get(&pdev->dev, "dma"); | ||
1310 | if (IS_ERR(tdma->rst)) { | ||
1311 | dev_err(&pdev->dev, "Error: Missing reset\n"); | ||
1312 | return PTR_ERR(tdma->rst); | ||
1313 | } | ||
1314 | |||
1285 | spin_lock_init(&tdma->global_lock); | 1315 | spin_lock_init(&tdma->global_lock); |
1286 | 1316 | ||
1287 | pm_runtime_enable(&pdev->dev); | 1317 | pm_runtime_enable(&pdev->dev); |
@@ -1302,9 +1332,9 @@ static int tegra_dma_probe(struct platform_device *pdev) | |||
1302 | } | 1332 | } |
1303 | 1333 | ||
1304 | /* Reset DMA controller */ | 1334 | /* Reset DMA controller */ |
1305 | tegra_periph_reset_assert(tdma->dma_clk); | 1335 | reset_control_assert(tdma->rst); |
1306 | udelay(2); | 1336 | udelay(2); |
1307 | tegra_periph_reset_deassert(tdma->dma_clk); | 1337 | reset_control_deassert(tdma->rst); |
1308 | 1338 | ||
1309 | /* Enable global DMA registers */ | 1339 | /* Enable global DMA registers */ |
1310 | tdma_write(tdma, TEGRA_APBDMA_GENERAL, TEGRA_APBDMA_GENERAL_ENABLE); | 1340 | tdma_write(tdma, TEGRA_APBDMA_GENERAL, TEGRA_APBDMA_GENERAL_ENABLE); |
@@ -1376,10 +1406,20 @@ static int tegra_dma_probe(struct platform_device *pdev) | |||
1376 | goto err_irq; | 1406 | goto err_irq; |
1377 | } | 1407 | } |
1378 | 1408 | ||
1409 | ret = of_dma_controller_register(pdev->dev.of_node, | ||
1410 | tegra_dma_of_xlate, tdma); | ||
1411 | if (ret < 0) { | ||
1412 | dev_err(&pdev->dev, | ||
1413 | "Tegra20 APB DMA OF registration failed %d\n", ret); | ||
1414 | goto err_unregister_dma_dev; | ||
1415 | } | ||
1416 | |||
1379 | dev_info(&pdev->dev, "Tegra20 APB DMA driver register %d channels\n", | 1417 | dev_info(&pdev->dev, "Tegra20 APB DMA driver register %d channels\n", |
1380 | cdata->nr_channels); | 1418 | cdata->nr_channels); |
1381 | return 0; | 1419 | return 0; |
1382 | 1420 | ||
1421 | err_unregister_dma_dev: | ||
1422 | dma_async_device_unregister(&tdma->dma_dev); | ||
1383 | err_irq: | 1423 | err_irq: |
1384 | while (--i >= 0) { | 1424 | while (--i >= 0) { |
1385 | struct tegra_dma_channel *tdc = &tdma->channels[i]; | 1425 | struct tegra_dma_channel *tdc = &tdma->channels[i]; |
diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 8961ba6a34b8..8db9b3bce001 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig | |||
@@ -2,6 +2,7 @@ config DRM_TEGRA | |||
2 | bool "NVIDIA Tegra DRM" | 2 | bool "NVIDIA Tegra DRM" |
3 | depends on ARCH_TEGRA || ARCH_MULTIPLATFORM | 3 | depends on ARCH_TEGRA || ARCH_MULTIPLATFORM |
4 | depends on DRM | 4 | depends on DRM |
5 | depends on RESET_CONTROLLER | ||
5 | select TEGRA_HOST1X | 6 | select TEGRA_HOST1X |
6 | select DRM_KMS_HELPER | 7 | select DRM_KMS_HELPER |
7 | select DRM_KMS_FB_HELPER | 8 | select DRM_KMS_FB_HELPER |
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index ae1cb31ead7e..cd7f1e499616 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c | |||
@@ -8,8 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <linux/clk/tegra.h> | ||
12 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
12 | #include <linux/reset.h> | ||
13 | 13 | ||
14 | #include "dc.h" | 14 | #include "dc.h" |
15 | #include "drm.h" | 15 | #include "drm.h" |
@@ -712,7 +712,7 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc) | |||
712 | unsigned long value; | 712 | unsigned long value; |
713 | 713 | ||
714 | /* hardware initialization */ | 714 | /* hardware initialization */ |
715 | tegra_periph_reset_deassert(dc->clk); | 715 | reset_control_deassert(dc->rst); |
716 | usleep_range(10000, 20000); | 716 | usleep_range(10000, 20000); |
717 | 717 | ||
718 | if (dc->pipe) | 718 | if (dc->pipe) |
@@ -1187,6 +1187,12 @@ static int tegra_dc_probe(struct platform_device *pdev) | |||
1187 | return PTR_ERR(dc->clk); | 1187 | return PTR_ERR(dc->clk); |
1188 | } | 1188 | } |
1189 | 1189 | ||
1190 | dc->rst = devm_reset_control_get(&pdev->dev, "dc"); | ||
1191 | if (IS_ERR(dc->rst)) { | ||
1192 | dev_err(&pdev->dev, "failed to get reset\n"); | ||
1193 | return PTR_ERR(dc->rst); | ||
1194 | } | ||
1195 | |||
1190 | err = clk_prepare_enable(dc->clk); | 1196 | err = clk_prepare_enable(dc->clk); |
1191 | if (err < 0) | 1197 | if (err < 0) |
1192 | return err; | 1198 | return err; |
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h index 7da0b923131f..266aae08a3bd 100644 --- a/drivers/gpu/drm/tegra/drm.h +++ b/drivers/gpu/drm/tegra/drm.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <drm/drm_fb_helper.h> | 19 | #include <drm/drm_fb_helper.h> |
20 | #include <drm/drm_fixed.h> | 20 | #include <drm/drm_fixed.h> |
21 | 21 | ||
22 | struct reset_control; | ||
23 | |||
22 | struct tegra_fb { | 24 | struct tegra_fb { |
23 | struct drm_framebuffer base; | 25 | struct drm_framebuffer base; |
24 | struct tegra_bo **planes; | 26 | struct tegra_bo **planes; |
@@ -93,6 +95,7 @@ struct tegra_dc { | |||
93 | int pipe; | 95 | int pipe; |
94 | 96 | ||
95 | struct clk *clk; | 97 | struct clk *clk; |
98 | struct reset_control *rst; | ||
96 | void __iomem *regs; | 99 | void __iomem *regs; |
97 | int irq; | 100 | int irq; |
98 | 101 | ||
diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c index 4cec8f526af7..0cbb24b1ae04 100644 --- a/drivers/gpu/drm/tegra/gr3d.c +++ b/drivers/gpu/drm/tegra/gr3d.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/host1x.h> | 11 | #include <linux/host1x.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/reset.h> | ||
14 | #include <linux/tegra-powergate.h> | 15 | #include <linux/tegra-powergate.h> |
15 | 16 | ||
16 | #include "drm.h" | 17 | #include "drm.h" |
@@ -22,6 +23,8 @@ struct gr3d { | |||
22 | struct host1x_channel *channel; | 23 | struct host1x_channel *channel; |
23 | struct clk *clk_secondary; | 24 | struct clk *clk_secondary; |
24 | struct clk *clk; | 25 | struct clk *clk; |
26 | struct reset_control *rst_secondary; | ||
27 | struct reset_control *rst; | ||
25 | 28 | ||
26 | DECLARE_BITMAP(addr_regs, GR3D_NUM_REGS); | 29 | DECLARE_BITMAP(addr_regs, GR3D_NUM_REGS); |
27 | }; | 30 | }; |
@@ -255,15 +258,29 @@ static int gr3d_probe(struct platform_device *pdev) | |||
255 | return PTR_ERR(gr3d->clk); | 258 | return PTR_ERR(gr3d->clk); |
256 | } | 259 | } |
257 | 260 | ||
261 | gr3d->rst = devm_reset_control_get(&pdev->dev, "3d"); | ||
262 | if (IS_ERR(gr3d->rst)) { | ||
263 | dev_err(&pdev->dev, "cannot get reset\n"); | ||
264 | return PTR_ERR(gr3d->rst); | ||
265 | } | ||
266 | |||
258 | if (of_device_is_compatible(np, "nvidia,tegra30-gr3d")) { | 267 | if (of_device_is_compatible(np, "nvidia,tegra30-gr3d")) { |
259 | gr3d->clk_secondary = devm_clk_get(&pdev->dev, "3d2"); | 268 | gr3d->clk_secondary = devm_clk_get(&pdev->dev, "3d2"); |
260 | if (IS_ERR(gr3d->clk)) { | 269 | if (IS_ERR(gr3d->clk)) { |
261 | dev_err(&pdev->dev, "cannot get secondary clock\n"); | 270 | dev_err(&pdev->dev, "cannot get secondary clock\n"); |
262 | return PTR_ERR(gr3d->clk); | 271 | return PTR_ERR(gr3d->clk); |
263 | } | 272 | } |
273 | |||
274 | gr3d->rst_secondary = devm_reset_control_get(&pdev->dev, | ||
275 | "3d2"); | ||
276 | if (IS_ERR(gr3d->rst_secondary)) { | ||
277 | dev_err(&pdev->dev, "cannot get secondary reset\n"); | ||
278 | return PTR_ERR(gr3d->rst_secondary); | ||
279 | } | ||
264 | } | 280 | } |
265 | 281 | ||
266 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk); | 282 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk, |
283 | gr3d->rst); | ||
267 | if (err < 0) { | 284 | if (err < 0) { |
268 | dev_err(&pdev->dev, "failed to power up 3D unit\n"); | 285 | dev_err(&pdev->dev, "failed to power up 3D unit\n"); |
269 | return err; | 286 | return err; |
@@ -271,7 +288,8 @@ static int gr3d_probe(struct platform_device *pdev) | |||
271 | 288 | ||
272 | if (gr3d->clk_secondary) { | 289 | if (gr3d->clk_secondary) { |
273 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D1, | 290 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D1, |
274 | gr3d->clk_secondary); | 291 | gr3d->clk_secondary, |
292 | gr3d->rst_secondary); | ||
275 | if (err < 0) { | 293 | if (err < 0) { |
276 | dev_err(&pdev->dev, | 294 | dev_err(&pdev->dev, |
277 | "failed to power up secondary 3D unit\n"); | 295 | "failed to power up secondary 3D unit\n"); |
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 0cd9bc2056e8..7f6253ea5cb5 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c | |||
@@ -8,10 +8,10 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <linux/clk/tegra.h> | ||
12 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
13 | #include <linux/hdmi.h> | 12 | #include <linux/hdmi.h> |
14 | #include <linux/regulator/consumer.h> | 13 | #include <linux/regulator/consumer.h> |
14 | #include <linux/reset.h> | ||
15 | 15 | ||
16 | #include "hdmi.h" | 16 | #include "hdmi.h" |
17 | #include "drm.h" | 17 | #include "drm.h" |
@@ -49,6 +49,7 @@ struct tegra_hdmi { | |||
49 | 49 | ||
50 | struct clk *clk_parent; | 50 | struct clk *clk_parent; |
51 | struct clk *clk; | 51 | struct clk *clk; |
52 | struct reset_control *rst; | ||
52 | 53 | ||
53 | const struct tegra_hdmi_config *config; | 54 | const struct tegra_hdmi_config *config; |
54 | 55 | ||
@@ -731,9 +732,9 @@ static int tegra_output_hdmi_enable(struct tegra_output *output) | |||
731 | return err; | 732 | return err; |
732 | } | 733 | } |
733 | 734 | ||
734 | tegra_periph_reset_assert(hdmi->clk); | 735 | reset_control_assert(hdmi->rst); |
735 | usleep_range(1000, 2000); | 736 | usleep_range(1000, 2000); |
736 | tegra_periph_reset_deassert(hdmi->clk); | 737 | reset_control_deassert(hdmi->rst); |
737 | 738 | ||
738 | tegra_dc_writel(dc, VSYNC_H_POSITION(1), | 739 | tegra_dc_writel(dc, VSYNC_H_POSITION(1), |
739 | DC_DISP_DISP_TIMING_OPTIONS); | 740 | DC_DISP_DISP_TIMING_OPTIONS); |
@@ -912,7 +913,7 @@ static int tegra_output_hdmi_disable(struct tegra_output *output) | |||
912 | { | 913 | { |
913 | struct tegra_hdmi *hdmi = to_hdmi(output); | 914 | struct tegra_hdmi *hdmi = to_hdmi(output); |
914 | 915 | ||
915 | tegra_periph_reset_assert(hdmi->clk); | 916 | reset_control_assert(hdmi->rst); |
916 | clk_disable(hdmi->clk); | 917 | clk_disable(hdmi->clk); |
917 | regulator_disable(hdmi->pll); | 918 | regulator_disable(hdmi->pll); |
918 | 919 | ||
@@ -1338,6 +1339,12 @@ static int tegra_hdmi_probe(struct platform_device *pdev) | |||
1338 | return PTR_ERR(hdmi->clk); | 1339 | return PTR_ERR(hdmi->clk); |
1339 | } | 1340 | } |
1340 | 1341 | ||
1342 | hdmi->rst = devm_reset_control_get(&pdev->dev, "hdmi"); | ||
1343 | if (IS_ERR(hdmi->rst)) { | ||
1344 | dev_err(&pdev->dev, "failed to get reset\n"); | ||
1345 | return PTR_ERR(hdmi->rst); | ||
1346 | } | ||
1347 | |||
1341 | err = clk_prepare(hdmi->clk); | 1348 | err = clk_prepare(hdmi->clk); |
1342 | if (err < 0) | 1349 | if (err < 0) |
1343 | return err; | 1350 | return err; |
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index e661edee4d0c..9704537aee3c 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/of_device.h> | 28 | #include <linux/of_device.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/clk/tegra.h> | 30 | #include <linux/reset.h> |
31 | 31 | ||
32 | #include <asm/unaligned.h> | 32 | #include <asm/unaligned.h> |
33 | 33 | ||
@@ -160,6 +160,7 @@ struct tegra_i2c_dev { | |||
160 | struct i2c_adapter adapter; | 160 | struct i2c_adapter adapter; |
161 | struct clk *div_clk; | 161 | struct clk *div_clk; |
162 | struct clk *fast_clk; | 162 | struct clk *fast_clk; |
163 | struct reset_control *rst; | ||
163 | void __iomem *base; | 164 | void __iomem *base; |
164 | int cont_id; | 165 | int cont_id; |
165 | int irq; | 166 | int irq; |
@@ -415,9 +416,9 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev) | |||
415 | return err; | 416 | return err; |
416 | } | 417 | } |
417 | 418 | ||
418 | tegra_periph_reset_assert(i2c_dev->div_clk); | 419 | reset_control_assert(i2c_dev->rst); |
419 | udelay(2); | 420 | udelay(2); |
420 | tegra_periph_reset_deassert(i2c_dev->div_clk); | 421 | reset_control_deassert(i2c_dev->rst); |
421 | 422 | ||
422 | if (i2c_dev->is_dvc) | 423 | if (i2c_dev->is_dvc) |
423 | tegra_dvc_init(i2c_dev); | 424 | tegra_dvc_init(i2c_dev); |
@@ -743,6 +744,12 @@ static int tegra_i2c_probe(struct platform_device *pdev) | |||
743 | i2c_dev->cont_id = pdev->id; | 744 | i2c_dev->cont_id = pdev->id; |
744 | i2c_dev->dev = &pdev->dev; | 745 | i2c_dev->dev = &pdev->dev; |
745 | 746 | ||
747 | i2c_dev->rst = devm_reset_control_get(&pdev->dev, "i2c"); | ||
748 | if (IS_ERR(i2c_dev->rst)) { | ||
749 | dev_err(&pdev->dev, "missing controller reset"); | ||
750 | return PTR_ERR(i2c_dev->rst); | ||
751 | } | ||
752 | |||
746 | ret = of_property_read_u32(i2c_dev->dev->of_node, "clock-frequency", | 753 | ret = of_property_read_u32(i2c_dev->dev->of_node, "clock-frequency", |
747 | &i2c_dev->bus_clk_rate); | 754 | &i2c_dev->bus_clk_rate); |
748 | if (ret) | 755 | if (ret) |
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 8508879f6faf..9757a58bc897 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/input/matrix_keypad.h> | 33 | #include <linux/input/matrix_keypad.h> |
34 | #include <linux/clk/tegra.h> | 34 | #include <linux/reset.h> |
35 | #include <linux/err.h> | 35 | #include <linux/err.h> |
36 | 36 | ||
37 | #define KBC_MAX_KPENT 8 | 37 | #define KBC_MAX_KPENT 8 |
@@ -116,6 +116,7 @@ struct tegra_kbc { | |||
116 | u32 wakeup_key; | 116 | u32 wakeup_key; |
117 | struct timer_list timer; | 117 | struct timer_list timer; |
118 | struct clk *clk; | 118 | struct clk *clk; |
119 | struct reset_control *rst; | ||
119 | const struct tegra_kbc_hw_support *hw_support; | 120 | const struct tegra_kbc_hw_support *hw_support; |
120 | int max_keys; | 121 | int max_keys; |
121 | int num_rows_and_columns; | 122 | int num_rows_and_columns; |
@@ -373,9 +374,9 @@ static int tegra_kbc_start(struct tegra_kbc *kbc) | |||
373 | clk_prepare_enable(kbc->clk); | 374 | clk_prepare_enable(kbc->clk); |
374 | 375 | ||
375 | /* Reset the KBC controller to clear all previous status.*/ | 376 | /* Reset the KBC controller to clear all previous status.*/ |
376 | tegra_periph_reset_assert(kbc->clk); | 377 | reset_control_assert(kbc->rst); |
377 | udelay(100); | 378 | udelay(100); |
378 | tegra_periph_reset_deassert(kbc->clk); | 379 | reset_control_assert(kbc->rst); |
379 | udelay(100); | 380 | udelay(100); |
380 | 381 | ||
381 | tegra_kbc_config_pins(kbc); | 382 | tegra_kbc_config_pins(kbc); |
@@ -663,6 +664,12 @@ static int tegra_kbc_probe(struct platform_device *pdev) | |||
663 | return PTR_ERR(kbc->clk); | 664 | return PTR_ERR(kbc->clk); |
664 | } | 665 | } |
665 | 666 | ||
667 | kbc->rst = devm_reset_control_get(&pdev->dev, "kbc"); | ||
668 | if (IS_ERR(kbc->rst)) { | ||
669 | dev_err(&pdev->dev, "failed to get keyboard reset\n"); | ||
670 | return PTR_ERR(kbc->rst); | ||
671 | } | ||
672 | |||
666 | /* | 673 | /* |
667 | * The time delay between two consecutive reads of the FIFO is | 674 | * The time delay between two consecutive reads of the FIFO is |
668 | * the sum of the repeat time and the time taken for scanning | 675 | * the sum of the repeat time and the time taken for scanning |
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 0afbbbc55c81..0175041ab728 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c | |||
@@ -25,7 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/clk/tegra.h> | ||
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/export.h> | 29 | #include <linux/export.h> |
31 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
@@ -39,6 +38,7 @@ | |||
39 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
40 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
41 | #include <linux/platform_device.h> | 40 | #include <linux/platform_device.h> |
41 | #include <linux/reset.h> | ||
42 | #include <linux/sizes.h> | 42 | #include <linux/sizes.h> |
43 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
44 | #include <linux/tegra-cpuidle.h> | 44 | #include <linux/tegra-cpuidle.h> |
@@ -259,10 +259,13 @@ struct tegra_pcie { | |||
259 | 259 | ||
260 | struct clk *pex_clk; | 260 | struct clk *pex_clk; |
261 | struct clk *afi_clk; | 261 | struct clk *afi_clk; |
262 | struct clk *pcie_xclk; | ||
263 | struct clk *pll_e; | 262 | struct clk *pll_e; |
264 | struct clk *cml_clk; | 263 | struct clk *cml_clk; |
265 | 264 | ||
265 | struct reset_control *pex_rst; | ||
266 | struct reset_control *afi_rst; | ||
267 | struct reset_control *pcie_xrst; | ||
268 | |||
266 | struct tegra_msi msi; | 269 | struct tegra_msi msi; |
267 | 270 | ||
268 | struct list_head ports; | 271 | struct list_head ports; |
@@ -858,7 +861,7 @@ static int tegra_pcie_enable_controller(struct tegra_pcie *pcie) | |||
858 | pads_writel(pcie, value, PADS_CTL); | 861 | pads_writel(pcie, value, PADS_CTL); |
859 | 862 | ||
860 | /* take the PCIe interface module out of reset */ | 863 | /* take the PCIe interface module out of reset */ |
861 | tegra_periph_reset_deassert(pcie->pcie_xclk); | 864 | reset_control_deassert(pcie->pcie_xrst); |
862 | 865 | ||
863 | /* finally enable PCIe */ | 866 | /* finally enable PCIe */ |
864 | value = afi_readl(pcie, AFI_CONFIGURATION); | 867 | value = afi_readl(pcie, AFI_CONFIGURATION); |
@@ -891,9 +894,9 @@ static void tegra_pcie_power_off(struct tegra_pcie *pcie) | |||
891 | 894 | ||
892 | /* TODO: disable and unprepare clocks? */ | 895 | /* TODO: disable and unprepare clocks? */ |
893 | 896 | ||
894 | tegra_periph_reset_assert(pcie->pcie_xclk); | 897 | reset_control_assert(pcie->pcie_xrst); |
895 | tegra_periph_reset_assert(pcie->afi_clk); | 898 | reset_control_assert(pcie->afi_rst); |
896 | tegra_periph_reset_assert(pcie->pex_clk); | 899 | reset_control_assert(pcie->pex_rst); |
897 | 900 | ||
898 | tegra_powergate_power_off(TEGRA_POWERGATE_PCIE); | 901 | tegra_powergate_power_off(TEGRA_POWERGATE_PCIE); |
899 | 902 | ||
@@ -921,9 +924,9 @@ static int tegra_pcie_power_on(struct tegra_pcie *pcie) | |||
921 | const struct tegra_pcie_soc_data *soc = pcie->soc_data; | 924 | const struct tegra_pcie_soc_data *soc = pcie->soc_data; |
922 | int err; | 925 | int err; |
923 | 926 | ||
924 | tegra_periph_reset_assert(pcie->pcie_xclk); | 927 | reset_control_assert(pcie->pcie_xrst); |
925 | tegra_periph_reset_assert(pcie->afi_clk); | 928 | reset_control_assert(pcie->afi_rst); |
926 | tegra_periph_reset_assert(pcie->pex_clk); | 929 | reset_control_assert(pcie->pex_rst); |
927 | 930 | ||
928 | tegra_powergate_power_off(TEGRA_POWERGATE_PCIE); | 931 | tegra_powergate_power_off(TEGRA_POWERGATE_PCIE); |
929 | 932 | ||
@@ -952,13 +955,14 @@ static int tegra_pcie_power_on(struct tegra_pcie *pcie) | |||
952 | } | 955 | } |
953 | 956 | ||
954 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE, | 957 | err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE, |
955 | pcie->pex_clk); | 958 | pcie->pex_clk, |
959 | pcie->pex_rst); | ||
956 | if (err) { | 960 | if (err) { |
957 | dev_err(pcie->dev, "powerup sequence failed: %d\n", err); | 961 | dev_err(pcie->dev, "powerup sequence failed: %d\n", err); |
958 | return err; | 962 | return err; |
959 | } | 963 | } |
960 | 964 | ||
961 | tegra_periph_reset_deassert(pcie->afi_clk); | 965 | reset_control_deassert(pcie->afi_rst); |
962 | 966 | ||
963 | err = clk_prepare_enable(pcie->afi_clk); | 967 | err = clk_prepare_enable(pcie->afi_clk); |
964 | if (err < 0) { | 968 | if (err < 0) { |
@@ -996,10 +1000,6 @@ static int tegra_pcie_clocks_get(struct tegra_pcie *pcie) | |||
996 | if (IS_ERR(pcie->afi_clk)) | 1000 | if (IS_ERR(pcie->afi_clk)) |
997 | return PTR_ERR(pcie->afi_clk); | 1001 | return PTR_ERR(pcie->afi_clk); |
998 | 1002 | ||
999 | pcie->pcie_xclk = devm_clk_get(pcie->dev, "pcie_xclk"); | ||
1000 | if (IS_ERR(pcie->pcie_xclk)) | ||
1001 | return PTR_ERR(pcie->pcie_xclk); | ||
1002 | |||
1003 | pcie->pll_e = devm_clk_get(pcie->dev, "pll_e"); | 1003 | pcie->pll_e = devm_clk_get(pcie->dev, "pll_e"); |
1004 | if (IS_ERR(pcie->pll_e)) | 1004 | if (IS_ERR(pcie->pll_e)) |
1005 | return PTR_ERR(pcie->pll_e); | 1005 | return PTR_ERR(pcie->pll_e); |
@@ -1013,6 +1013,23 @@ static int tegra_pcie_clocks_get(struct tegra_pcie *pcie) | |||
1013 | return 0; | 1013 | return 0; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | static int tegra_pcie_resets_get(struct tegra_pcie *pcie) | ||
1017 | { | ||
1018 | pcie->pex_rst = devm_reset_control_get(pcie->dev, "pex"); | ||
1019 | if (IS_ERR(pcie->pex_rst)) | ||
1020 | return PTR_ERR(pcie->pex_rst); | ||
1021 | |||
1022 | pcie->afi_rst = devm_reset_control_get(pcie->dev, "afi"); | ||
1023 | if (IS_ERR(pcie->afi_rst)) | ||
1024 | return PTR_ERR(pcie->afi_rst); | ||
1025 | |||
1026 | pcie->pcie_xrst = devm_reset_control_get(pcie->dev, "pcie_x"); | ||
1027 | if (IS_ERR(pcie->pcie_xrst)) | ||
1028 | return PTR_ERR(pcie->pcie_xrst); | ||
1029 | |||
1030 | return 0; | ||
1031 | } | ||
1032 | |||
1016 | static int tegra_pcie_get_resources(struct tegra_pcie *pcie) | 1033 | static int tegra_pcie_get_resources(struct tegra_pcie *pcie) |
1017 | { | 1034 | { |
1018 | struct platform_device *pdev = to_platform_device(pcie->dev); | 1035 | struct platform_device *pdev = to_platform_device(pcie->dev); |
@@ -1025,6 +1042,12 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie) | |||
1025 | return err; | 1042 | return err; |
1026 | } | 1043 | } |
1027 | 1044 | ||
1045 | err = tegra_pcie_resets_get(pcie); | ||
1046 | if (err) { | ||
1047 | dev_err(&pdev->dev, "failed to get resets: %d\n", err); | ||
1048 | return err; | ||
1049 | } | ||
1050 | |||
1028 | err = tegra_pcie_power_on(pcie); | 1051 | err = tegra_pcie_power_on(pcie); |
1029 | if (err) { | 1052 | if (err) { |
1030 | dev_err(&pdev->dev, "failed to power up: %d\n", err); | 1053 | dev_err(&pdev->dev, "failed to power up: %d\n", err); |
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index eb1f1ef5fa2e..9fc66e83c1a7 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig | |||
@@ -448,6 +448,7 @@ config SPI_MXS | |||
448 | config SPI_TEGRA114 | 448 | config SPI_TEGRA114 |
449 | tristate "NVIDIA Tegra114 SPI Controller" | 449 | tristate "NVIDIA Tegra114 SPI Controller" |
450 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST | 450 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST |
451 | depends on RESET_CONTROLLER | ||
451 | help | 452 | help |
452 | SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller | 453 | SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller |
453 | is different than the older SoCs SPI controller and also register interface | 454 | is different than the older SoCs SPI controller and also register interface |
@@ -456,6 +457,7 @@ config SPI_TEGRA114 | |||
456 | config SPI_TEGRA20_SFLASH | 457 | config SPI_TEGRA20_SFLASH |
457 | tristate "Nvidia Tegra20 Serial flash Controller" | 458 | tristate "Nvidia Tegra20 Serial flash Controller" |
458 | depends on ARCH_TEGRA || COMPILE_TEST | 459 | depends on ARCH_TEGRA || COMPILE_TEST |
460 | depends on RESET_CONTROLLER | ||
459 | help | 461 | help |
460 | SPI driver for Nvidia Tegra20 Serial flash Controller interface. | 462 | SPI driver for Nvidia Tegra20 Serial flash Controller interface. |
461 | The main usecase of this controller is to use spi flash as boot | 463 | The main usecase of this controller is to use spi flash as boot |
@@ -464,6 +466,7 @@ config SPI_TEGRA20_SFLASH | |||
464 | config SPI_TEGRA20_SLINK | 466 | config SPI_TEGRA20_SLINK |
465 | tristate "Nvidia Tegra20/Tegra30 SLINK Controller" | 467 | tristate "Nvidia Tegra20/Tegra30 SLINK Controller" |
466 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST | 468 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST |
469 | depends on RESET_CONTROLLER | ||
467 | help | 470 | help |
468 | SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface. | 471 | SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface. |
469 | 472 | ||
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index aaecfb3ebf58..c8604981a058 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c | |||
@@ -17,7 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/clk/tegra.h> | ||
21 | #include <linux/completion.h> | 20 | #include <linux/completion.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/dmaengine.h> | 22 | #include <linux/dmaengine.h> |
@@ -34,6 +33,7 @@ | |||
34 | #include <linux/pm_runtime.h> | 33 | #include <linux/pm_runtime.h> |
35 | #include <linux/of.h> | 34 | #include <linux/of.h> |
36 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
36 | #include <linux/reset.h> | ||
37 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
38 | 38 | ||
39 | #define SPI_COMMAND1 0x000 | 39 | #define SPI_COMMAND1 0x000 |
@@ -174,10 +174,10 @@ struct tegra_spi_data { | |||
174 | spinlock_t lock; | 174 | spinlock_t lock; |
175 | 175 | ||
176 | struct clk *clk; | 176 | struct clk *clk; |
177 | struct reset_control *rst; | ||
177 | void __iomem *base; | 178 | void __iomem *base; |
178 | phys_addr_t phys; | 179 | phys_addr_t phys; |
179 | unsigned irq; | 180 | unsigned irq; |
180 | int dma_req_sel; | ||
181 | u32 spi_max_frequency; | 181 | u32 spi_max_frequency; |
182 | u32 cur_speed; | 182 | u32 cur_speed; |
183 | 183 | ||
@@ -600,15 +600,15 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi, | |||
600 | dma_addr_t dma_phys; | 600 | dma_addr_t dma_phys; |
601 | int ret; | 601 | int ret; |
602 | struct dma_slave_config dma_sconfig; | 602 | struct dma_slave_config dma_sconfig; |
603 | dma_cap_mask_t mask; | ||
604 | 603 | ||
605 | dma_cap_zero(mask); | 604 | dma_chan = dma_request_slave_channel_reason(tspi->dev, |
606 | dma_cap_set(DMA_SLAVE, mask); | 605 | dma_to_memory ? "rx" : "tx"); |
607 | dma_chan = dma_request_channel(mask, NULL, NULL); | 606 | if (IS_ERR(dma_chan)) { |
608 | if (!dma_chan) { | 607 | ret = PTR_ERR(dma_chan); |
609 | dev_err(tspi->dev, | 608 | if (ret != -EPROBE_DEFER) |
610 | "Dma channel is not available, will try later\n"); | 609 | dev_err(tspi->dev, |
611 | return -EPROBE_DEFER; | 610 | "Dma channel is not available: %d\n", ret); |
611 | return ret; | ||
612 | } | 612 | } |
613 | 613 | ||
614 | dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, | 614 | dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, |
@@ -619,7 +619,6 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi, | |||
619 | return -ENOMEM; | 619 | return -ENOMEM; |
620 | } | 620 | } |
621 | 621 | ||
622 | dma_sconfig.slave_id = tspi->dma_req_sel; | ||
623 | if (dma_to_memory) { | 622 | if (dma_to_memory) { |
624 | dma_sconfig.src_addr = tspi->phys + SPI_RX_FIFO; | 623 | dma_sconfig.src_addr = tspi->phys + SPI_RX_FIFO; |
625 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 624 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
@@ -918,9 +917,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_spi_data *tspi) | |||
918 | tspi->status_reg); | 917 | tspi->status_reg); |
919 | dev_err(tspi->dev, "CpuXfer 0x%08x:0x%08x\n", | 918 | dev_err(tspi->dev, "CpuXfer 0x%08x:0x%08x\n", |
920 | tspi->command1_reg, tspi->dma_control_reg); | 919 | tspi->command1_reg, tspi->dma_control_reg); |
921 | tegra_periph_reset_assert(tspi->clk); | 920 | reset_control_assert(tspi->rst); |
922 | udelay(2); | 921 | udelay(2); |
923 | tegra_periph_reset_deassert(tspi->clk); | 922 | reset_control_deassert(tspi->rst); |
924 | complete(&tspi->xfer_completion); | 923 | complete(&tspi->xfer_completion); |
925 | goto exit; | 924 | goto exit; |
926 | } | 925 | } |
@@ -990,9 +989,9 @@ static irqreturn_t handle_dma_based_xfer(struct tegra_spi_data *tspi) | |||
990 | tspi->status_reg); | 989 | tspi->status_reg); |
991 | dev_err(tspi->dev, "DmaXfer 0x%08x:0x%08x\n", | 990 | dev_err(tspi->dev, "DmaXfer 0x%08x:0x%08x\n", |
992 | tspi->command1_reg, tspi->dma_control_reg); | 991 | tspi->command1_reg, tspi->dma_control_reg); |
993 | tegra_periph_reset_assert(tspi->clk); | 992 | reset_control_assert(tspi->rst); |
994 | udelay(2); | 993 | udelay(2); |
995 | tegra_periph_reset_deassert(tspi->clk); | 994 | reset_control_deassert(tspi->rst); |
996 | complete(&tspi->xfer_completion); | 995 | complete(&tspi->xfer_completion); |
997 | spin_unlock_irqrestore(&tspi->lock, flags); | 996 | spin_unlock_irqrestore(&tspi->lock, flags); |
998 | return IRQ_HANDLED; | 997 | return IRQ_HANDLED; |
@@ -1054,11 +1053,6 @@ static void tegra_spi_parse_dt(struct platform_device *pdev, | |||
1054 | struct tegra_spi_data *tspi) | 1053 | struct tegra_spi_data *tspi) |
1055 | { | 1054 | { |
1056 | struct device_node *np = pdev->dev.of_node; | 1055 | struct device_node *np = pdev->dev.of_node; |
1057 | u32 of_dma[2]; | ||
1058 | |||
1059 | if (of_property_read_u32_array(np, "nvidia,dma-request-selector", | ||
1060 | of_dma, 2) >= 0) | ||
1061 | tspi->dma_req_sel = of_dma[1]; | ||
1062 | 1056 | ||
1063 | if (of_property_read_u32(np, "spi-max-frequency", | 1057 | if (of_property_read_u32(np, "spi-max-frequency", |
1064 | &tspi->spi_max_frequency)) | 1058 | &tspi->spi_max_frequency)) |
@@ -1127,25 +1121,25 @@ static int tegra_spi_probe(struct platform_device *pdev) | |||
1127 | goto exit_free_irq; | 1121 | goto exit_free_irq; |
1128 | } | 1122 | } |
1129 | 1123 | ||
1124 | tspi->rst = devm_reset_control_get(&pdev->dev, "spi"); | ||
1125 | if (IS_ERR(tspi->rst)) { | ||
1126 | dev_err(&pdev->dev, "can not get reset\n"); | ||
1127 | ret = PTR_ERR(tspi->rst); | ||
1128 | goto exit_free_irq; | ||
1129 | } | ||
1130 | |||
1130 | tspi->max_buf_size = SPI_FIFO_DEPTH << 2; | 1131 | tspi->max_buf_size = SPI_FIFO_DEPTH << 2; |
1131 | tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; | 1132 | tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; |
1132 | 1133 | ||
1133 | if (tspi->dma_req_sel) { | 1134 | ret = tegra_spi_init_dma_param(tspi, true); |
1134 | ret = tegra_spi_init_dma_param(tspi, true); | 1135 | if (ret < 0) |
1135 | if (ret < 0) { | 1136 | goto exit_free_irq; |
1136 | dev_err(&pdev->dev, "RxDma Init failed, err %d\n", ret); | 1137 | ret = tegra_spi_init_dma_param(tspi, false); |
1137 | goto exit_free_irq; | 1138 | if (ret < 0) |
1138 | } | 1139 | goto exit_rx_dma_free; |
1139 | 1140 | tspi->max_buf_size = tspi->dma_buf_size; | |
1140 | ret = tegra_spi_init_dma_param(tspi, false); | 1141 | init_completion(&tspi->tx_dma_complete); |
1141 | if (ret < 0) { | 1142 | init_completion(&tspi->rx_dma_complete); |
1142 | dev_err(&pdev->dev, "TxDma Init failed, err %d\n", ret); | ||
1143 | goto exit_rx_dma_free; | ||
1144 | } | ||
1145 | tspi->max_buf_size = tspi->dma_buf_size; | ||
1146 | init_completion(&tspi->tx_dma_complete); | ||
1147 | init_completion(&tspi->rx_dma_complete); | ||
1148 | } | ||
1149 | 1143 | ||
1150 | init_completion(&tspi->xfer_completion); | 1144 | init_completion(&tspi->xfer_completion); |
1151 | 1145 | ||
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 4dc8e8129459..e6f382b33818 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c | |||
@@ -32,8 +32,8 @@ | |||
32 | #include <linux/pm_runtime.h> | 32 | #include <linux/pm_runtime.h> |
33 | #include <linux/of.h> | 33 | #include <linux/of.h> |
34 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | #include <linux/reset.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/clk/tegra.h> | ||
37 | 37 | ||
38 | #define SPI_COMMAND 0x000 | 38 | #define SPI_COMMAND 0x000 |
39 | #define SPI_GO BIT(30) | 39 | #define SPI_GO BIT(30) |
@@ -118,6 +118,7 @@ struct tegra_sflash_data { | |||
118 | spinlock_t lock; | 118 | spinlock_t lock; |
119 | 119 | ||
120 | struct clk *clk; | 120 | struct clk *clk; |
121 | struct reset_control *rst; | ||
121 | void __iomem *base; | 122 | void __iomem *base; |
122 | unsigned irq; | 123 | unsigned irq; |
123 | u32 spi_max_frequency; | 124 | u32 spi_max_frequency; |
@@ -389,9 +390,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_sflash_data *tsd) | |||
389 | dev_err(tsd->dev, | 390 | dev_err(tsd->dev, |
390 | "CpuXfer 0x%08x:0x%08x\n", tsd->command_reg, | 391 | "CpuXfer 0x%08x:0x%08x\n", tsd->command_reg, |
391 | tsd->dma_control_reg); | 392 | tsd->dma_control_reg); |
392 | tegra_periph_reset_assert(tsd->clk); | 393 | reset_control_assert(tsd->rst); |
393 | udelay(2); | 394 | udelay(2); |
394 | tegra_periph_reset_deassert(tsd->clk); | 395 | reset_control_deassert(tsd->rst); |
395 | complete(&tsd->xfer_completion); | 396 | complete(&tsd->xfer_completion); |
396 | goto exit; | 397 | goto exit; |
397 | } | 398 | } |
@@ -505,6 +506,13 @@ static int tegra_sflash_probe(struct platform_device *pdev) | |||
505 | goto exit_free_irq; | 506 | goto exit_free_irq; |
506 | } | 507 | } |
507 | 508 | ||
509 | tsd->rst = devm_reset_control_get(&pdev->dev, "spi"); | ||
510 | if (IS_ERR(tsd->rst)) { | ||
511 | dev_err(&pdev->dev, "can not get reset\n"); | ||
512 | ret = PTR_ERR(tsd->rst); | ||
513 | goto exit_free_irq; | ||
514 | } | ||
515 | |||
508 | init_completion(&tsd->xfer_completion); | 516 | init_completion(&tsd->xfer_completion); |
509 | pm_runtime_enable(&pdev->dev); | 517 | pm_runtime_enable(&pdev->dev); |
510 | if (!pm_runtime_enabled(&pdev->dev)) { | 518 | if (!pm_runtime_enabled(&pdev->dev)) { |
@@ -520,9 +528,9 @@ static int tegra_sflash_probe(struct platform_device *pdev) | |||
520 | } | 528 | } |
521 | 529 | ||
522 | /* Reset controller */ | 530 | /* Reset controller */ |
523 | tegra_periph_reset_assert(tsd->clk); | 531 | reset_control_assert(tsd->rst); |
524 | udelay(2); | 532 | udelay(2); |
525 | tegra_periph_reset_deassert(tsd->clk); | 533 | reset_control_deassert(tsd->rst); |
526 | 534 | ||
527 | tsd->def_command_reg = SPI_M_S | SPI_CS_SW; | 535 | tsd->def_command_reg = SPI_M_S | SPI_CS_SW; |
528 | tegra_sflash_writel(tsd, tsd->def_command_reg, SPI_COMMAND); | 536 | tegra_sflash_writel(tsd, tsd->def_command_reg, SPI_COMMAND); |
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index e66715ba37ed..a728bb82090f 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <linux/pm_runtime.h> | 33 | #include <linux/pm_runtime.h> |
34 | #include <linux/of.h> | 34 | #include <linux/of.h> |
35 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
36 | #include <linux/reset.h> | ||
36 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
37 | #include <linux/clk/tegra.h> | ||
38 | 38 | ||
39 | #define SLINK_COMMAND 0x000 | 39 | #define SLINK_COMMAND 0x000 |
40 | #define SLINK_BIT_LENGTH(x) (((x) & 0x1f) << 0) | 40 | #define SLINK_BIT_LENGTH(x) (((x) & 0x1f) << 0) |
@@ -167,10 +167,10 @@ struct tegra_slink_data { | |||
167 | spinlock_t lock; | 167 | spinlock_t lock; |
168 | 168 | ||
169 | struct clk *clk; | 169 | struct clk *clk; |
170 | struct reset_control *rst; | ||
170 | void __iomem *base; | 171 | void __iomem *base; |
171 | phys_addr_t phys; | 172 | phys_addr_t phys; |
172 | unsigned irq; | 173 | unsigned irq; |
173 | int dma_req_sel; | ||
174 | u32 spi_max_frequency; | 174 | u32 spi_max_frequency; |
175 | u32 cur_speed; | 175 | u32 cur_speed; |
176 | 176 | ||
@@ -629,15 +629,15 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi, | |||
629 | dma_addr_t dma_phys; | 629 | dma_addr_t dma_phys; |
630 | int ret; | 630 | int ret; |
631 | struct dma_slave_config dma_sconfig; | 631 | struct dma_slave_config dma_sconfig; |
632 | dma_cap_mask_t mask; | ||
633 | 632 | ||
634 | dma_cap_zero(mask); | 633 | dma_chan = dma_request_slave_channel_reason(tspi->dev, |
635 | dma_cap_set(DMA_SLAVE, mask); | 634 | dma_to_memory ? "rx" : "tx"); |
636 | dma_chan = dma_request_channel(mask, NULL, NULL); | 635 | if (IS_ERR(dma_chan)) { |
637 | if (!dma_chan) { | 636 | ret = PTR_ERR(dma_chan); |
638 | dev_err(tspi->dev, | 637 | if (ret != -EPROBE_DEFER) |
639 | "Dma channel is not available, will try later\n"); | 638 | dev_err(tspi->dev, |
640 | return -EPROBE_DEFER; | 639 | "Dma channel is not available: %d\n", ret); |
640 | return ret; | ||
641 | } | 641 | } |
642 | 642 | ||
643 | dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, | 643 | dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, |
@@ -648,7 +648,6 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi, | |||
648 | return -ENOMEM; | 648 | return -ENOMEM; |
649 | } | 649 | } |
650 | 650 | ||
651 | dma_sconfig.slave_id = tspi->dma_req_sel; | ||
652 | if (dma_to_memory) { | 651 | if (dma_to_memory) { |
653 | dma_sconfig.src_addr = tspi->phys + SLINK_RX_FIFO; | 652 | dma_sconfig.src_addr = tspi->phys + SLINK_RX_FIFO; |
654 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 653 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
@@ -884,9 +883,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_slink_data *tspi) | |||
884 | dev_err(tspi->dev, | 883 | dev_err(tspi->dev, |
885 | "CpuXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, | 884 | "CpuXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, |
886 | tspi->command2_reg, tspi->dma_control_reg); | 885 | tspi->command2_reg, tspi->dma_control_reg); |
887 | tegra_periph_reset_assert(tspi->clk); | 886 | reset_control_assert(tspi->rst); |
888 | udelay(2); | 887 | udelay(2); |
889 | tegra_periph_reset_deassert(tspi->clk); | 888 | reset_control_deassert(tspi->rst); |
890 | complete(&tspi->xfer_completion); | 889 | complete(&tspi->xfer_completion); |
891 | goto exit; | 890 | goto exit; |
892 | } | 891 | } |
@@ -957,9 +956,9 @@ static irqreturn_t handle_dma_based_xfer(struct tegra_slink_data *tspi) | |||
957 | dev_err(tspi->dev, | 956 | dev_err(tspi->dev, |
958 | "DmaXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, | 957 | "DmaXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, |
959 | tspi->command2_reg, tspi->dma_control_reg); | 958 | tspi->command2_reg, tspi->dma_control_reg); |
960 | tegra_periph_reset_assert(tspi->clk); | 959 | reset_control_assert(tspi->rst); |
961 | udelay(2); | 960 | udelay(2); |
962 | tegra_periph_reset_deassert(tspi->clk); | 961 | reset_control_assert(tspi->rst); |
963 | complete(&tspi->xfer_completion); | 962 | complete(&tspi->xfer_completion); |
964 | spin_unlock_irqrestore(&tspi->lock, flags); | 963 | spin_unlock_irqrestore(&tspi->lock, flags); |
965 | return IRQ_HANDLED; | 964 | return IRQ_HANDLED; |
@@ -1020,11 +1019,6 @@ static irqreturn_t tegra_slink_isr(int irq, void *context_data) | |||
1020 | static void tegra_slink_parse_dt(struct tegra_slink_data *tspi) | 1019 | static void tegra_slink_parse_dt(struct tegra_slink_data *tspi) |
1021 | { | 1020 | { |
1022 | struct device_node *np = tspi->dev->of_node; | 1021 | struct device_node *np = tspi->dev->of_node; |
1023 | u32 of_dma[2]; | ||
1024 | |||
1025 | if (of_property_read_u32_array(np, "nvidia,dma-request-selector", | ||
1026 | of_dma, 2) >= 0) | ||
1027 | tspi->dma_req_sel = of_dma[1]; | ||
1028 | 1022 | ||
1029 | if (of_property_read_u32(np, "spi-max-frequency", | 1023 | if (of_property_read_u32(np, "spi-max-frequency", |
1030 | &tspi->spi_max_frequency)) | 1024 | &tspi->spi_max_frequency)) |
@@ -1118,25 +1112,25 @@ static int tegra_slink_probe(struct platform_device *pdev) | |||
1118 | goto exit_free_irq; | 1112 | goto exit_free_irq; |
1119 | } | 1113 | } |
1120 | 1114 | ||
1115 | tspi->rst = devm_reset_control_get(&pdev->dev, "spi"); | ||
1116 | if (IS_ERR(tspi->rst)) { | ||
1117 | dev_err(&pdev->dev, "can not get reset\n"); | ||
1118 | ret = PTR_ERR(tspi->rst); | ||
1119 | goto exit_free_irq; | ||
1120 | } | ||
1121 | |||
1121 | tspi->max_buf_size = SLINK_FIFO_DEPTH << 2; | 1122 | tspi->max_buf_size = SLINK_FIFO_DEPTH << 2; |
1122 | tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; | 1123 | tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; |
1123 | 1124 | ||
1124 | if (tspi->dma_req_sel) { | 1125 | ret = tegra_slink_init_dma_param(tspi, true); |
1125 | ret = tegra_slink_init_dma_param(tspi, true); | 1126 | if (ret < 0) |
1126 | if (ret < 0) { | 1127 | goto exit_free_irq; |
1127 | dev_err(&pdev->dev, "RxDma Init failed, err %d\n", ret); | 1128 | ret = tegra_slink_init_dma_param(tspi, false); |
1128 | goto exit_free_irq; | 1129 | if (ret < 0) |
1129 | } | 1130 | goto exit_rx_dma_free; |
1130 | 1131 | tspi->max_buf_size = tspi->dma_buf_size; | |
1131 | ret = tegra_slink_init_dma_param(tspi, false); | 1132 | init_completion(&tspi->tx_dma_complete); |
1132 | if (ret < 0) { | 1133 | init_completion(&tspi->rx_dma_complete); |
1133 | dev_err(&pdev->dev, "TxDma Init failed, err %d\n", ret); | ||
1134 | goto exit_rx_dma_free; | ||
1135 | } | ||
1136 | tspi->max_buf_size = tspi->dma_buf_size; | ||
1137 | init_completion(&tspi->tx_dma_complete); | ||
1138 | init_completion(&tspi->rx_dma_complete); | ||
1139 | } | ||
1140 | 1134 | ||
1141 | init_completion(&tspi->xfer_completion); | 1135 | init_completion(&tspi->xfer_completion); |
1142 | 1136 | ||
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 49ea76b3435d..986870593b0c 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/clk/tegra.h> | ||
40 | 39 | ||
41 | #include "nvec.h" | 40 | #include "nvec.h" |
42 | 41 | ||
@@ -734,9 +733,9 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec) | |||
734 | 733 | ||
735 | clk_prepare_enable(nvec->i2c_clk); | 734 | clk_prepare_enable(nvec->i2c_clk); |
736 | 735 | ||
737 | tegra_periph_reset_assert(nvec->i2c_clk); | 736 | reset_control_assert(nvec->rst); |
738 | udelay(2); | 737 | udelay(2); |
739 | tegra_periph_reset_deassert(nvec->i2c_clk); | 738 | reset_control_deassert(nvec->rst); |
740 | 739 | ||
741 | val = I2C_CNFG_NEW_MASTER_SFM | I2C_CNFG_PACKET_MODE_EN | | 740 | val = I2C_CNFG_NEW_MASTER_SFM | I2C_CNFG_PACKET_MODE_EN | |
742 | (0x2 << I2C_CNFG_DEBOUNCE_CNT_SHIFT); | 741 | (0x2 << I2C_CNFG_DEBOUNCE_CNT_SHIFT); |
@@ -837,6 +836,12 @@ static int tegra_nvec_probe(struct platform_device *pdev) | |||
837 | return -ENODEV; | 836 | return -ENODEV; |
838 | } | 837 | } |
839 | 838 | ||
839 | nvec->rst = devm_reset_control_get(&pdev->dev, "i2c"); | ||
840 | if (IS_ERR(nvec->rst)) { | ||
841 | dev_err(nvec->dev, "failed to get controller reset\n"); | ||
842 | return PTR_ERR(nvec->rst); | ||
843 | } | ||
844 | |||
840 | nvec->base = base; | 845 | nvec->base = base; |
841 | nvec->irq = res->start; | 846 | nvec->irq = res->start; |
842 | nvec->i2c_clk = i2c_clk; | 847 | nvec->i2c_clk = i2c_clk; |
diff --git a/drivers/staging/nvec/nvec.h b/drivers/staging/nvec/nvec.h index e880518935fb..e271375053fa 100644 --- a/drivers/staging/nvec/nvec.h +++ b/drivers/staging/nvec/nvec.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/mutex.h> | 24 | #include <linux/mutex.h> |
25 | #include <linux/notifier.h> | 25 | #include <linux/notifier.h> |
26 | #include <linux/reset.h> | ||
26 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
27 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
28 | 29 | ||
@@ -109,7 +110,8 @@ struct nvec_msg { | |||
109 | * @irq: The IRQ of the I2C device | 110 | * @irq: The IRQ of the I2C device |
110 | * @i2c_addr: The address of the I2C slave | 111 | * @i2c_addr: The address of the I2C slave |
111 | * @base: The base of the memory mapped region of the I2C device | 112 | * @base: The base of the memory mapped region of the I2C device |
112 | * @clk: The clock of the I2C device | 113 | * @i2c_clk: The clock of the I2C device |
114 | * @rst: The reset of the I2C device | ||
113 | * @notifier_list: Notifiers to be called on received messages, see | 115 | * @notifier_list: Notifiers to be called on received messages, see |
114 | * nvec_register_notifier() | 116 | * nvec_register_notifier() |
115 | * @rx_data: Received messages that have to be processed | 117 | * @rx_data: Received messages that have to be processed |
@@ -139,6 +141,7 @@ struct nvec_chip { | |||
139 | int i2c_addr; | 141 | int i2c_addr; |
140 | void __iomem *base; | 142 | void __iomem *base; |
141 | struct clk *i2c_clk; | 143 | struct clk *i2c_clk; |
144 | struct reset_control *rst; | ||
142 | struct atomic_notifier_head notifier_list; | 145 | struct atomic_notifier_head notifier_list; |
143 | struct list_head rx_data, tx_data; | 146 | struct list_head rx_data, tx_data; |
144 | struct notifier_block nvec_status_notifier; | 147 | struct notifier_block nvec_status_notifier; |
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index dfe79ccc4fb3..d5c2a287b7e7 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | #include <linux/pagemap.h> | 35 | #include <linux/pagemap.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/reset.h> | ||
37 | #include <linux/serial.h> | 38 | #include <linux/serial.h> |
38 | #include <linux/serial_8250.h> | 39 | #include <linux/serial_8250.h> |
39 | #include <linux/serial_core.h> | 40 | #include <linux/serial_core.h> |
@@ -44,8 +45,6 @@ | |||
44 | #include <linux/tty.h> | 45 | #include <linux/tty.h> |
45 | #include <linux/tty_flip.h> | 46 | #include <linux/tty_flip.h> |
46 | 47 | ||
47 | #include <linux/clk/tegra.h> | ||
48 | |||
49 | #define TEGRA_UART_TYPE "TEGRA_UART" | 48 | #define TEGRA_UART_TYPE "TEGRA_UART" |
50 | #define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE) | 49 | #define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE) |
51 | #define BYTES_TO_ALIGN(x) ((unsigned long)(x) & 0x3) | 50 | #define BYTES_TO_ALIGN(x) ((unsigned long)(x) & 0x3) |
@@ -103,6 +102,7 @@ struct tegra_uart_port { | |||
103 | const struct tegra_uart_chip_data *cdata; | 102 | const struct tegra_uart_chip_data *cdata; |
104 | 103 | ||
105 | struct clk *uart_clk; | 104 | struct clk *uart_clk; |
105 | struct reset_control *rst; | ||
106 | unsigned int current_baud; | 106 | unsigned int current_baud; |
107 | 107 | ||
108 | /* Register shadow */ | 108 | /* Register shadow */ |
@@ -120,7 +120,6 @@ struct tegra_uart_port { | |||
120 | bool rx_timeout; | 120 | bool rx_timeout; |
121 | int rx_in_progress; | 121 | int rx_in_progress; |
122 | int symb_bit; | 122 | int symb_bit; |
123 | int dma_req_sel; | ||
124 | 123 | ||
125 | struct dma_chan *rx_dma_chan; | 124 | struct dma_chan *rx_dma_chan; |
126 | struct dma_chan *tx_dma_chan; | 125 | struct dma_chan *tx_dma_chan; |
@@ -832,9 +831,9 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup) | |||
832 | clk_prepare_enable(tup->uart_clk); | 831 | clk_prepare_enable(tup->uart_clk); |
833 | 832 | ||
834 | /* Reset the UART controller to clear all previous status.*/ | 833 | /* Reset the UART controller to clear all previous status.*/ |
835 | tegra_periph_reset_assert(tup->uart_clk); | 834 | reset_control_assert(tup->rst); |
836 | udelay(10); | 835 | udelay(10); |
837 | tegra_periph_reset_deassert(tup->uart_clk); | 836 | reset_control_deassert(tup->rst); |
838 | 837 | ||
839 | tup->rx_in_progress = 0; | 838 | tup->rx_in_progress = 0; |
840 | tup->tx_in_progress = 0; | 839 | tup->tx_in_progress = 0; |
@@ -910,15 +909,14 @@ static int tegra_uart_dma_channel_allocate(struct tegra_uart_port *tup, | |||
910 | dma_addr_t dma_phys; | 909 | dma_addr_t dma_phys; |
911 | int ret; | 910 | int ret; |
912 | struct dma_slave_config dma_sconfig; | 911 | struct dma_slave_config dma_sconfig; |
913 | dma_cap_mask_t mask; | ||
914 | 912 | ||
915 | dma_cap_zero(mask); | 913 | dma_chan = dma_request_slave_channel_reason(tup->uport.dev, |
916 | dma_cap_set(DMA_SLAVE, mask); | 914 | dma_to_memory ? "rx" : "tx"); |
917 | dma_chan = dma_request_channel(mask, NULL, NULL); | 915 | if (IS_ERR(dma_chan)) { |
918 | if (!dma_chan) { | 916 | ret = PTR_ERR(dma_chan); |
919 | dev_err(tup->uport.dev, | 917 | dev_err(tup->uport.dev, |
920 | "Dma channel is not available, will try later\n"); | 918 | "DMA channel alloc failed: %d\n", ret); |
921 | return -EPROBE_DEFER; | 919 | return ret; |
922 | } | 920 | } |
923 | 921 | ||
924 | if (dma_to_memory) { | 922 | if (dma_to_memory) { |
@@ -938,7 +936,6 @@ static int tegra_uart_dma_channel_allocate(struct tegra_uart_port *tup, | |||
938 | dma_buf = tup->uport.state->xmit.buf; | 936 | dma_buf = tup->uport.state->xmit.buf; |
939 | } | 937 | } |
940 | 938 | ||
941 | dma_sconfig.slave_id = tup->dma_req_sel; | ||
942 | if (dma_to_memory) { | 939 | if (dma_to_memory) { |
943 | dma_sconfig.src_addr = tup->uport.mapbase; | 940 | dma_sconfig.src_addr = tup->uport.mapbase; |
944 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; | 941 | dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; |
@@ -1222,17 +1219,8 @@ static int tegra_uart_parse_dt(struct platform_device *pdev, | |||
1222 | struct tegra_uart_port *tup) | 1219 | struct tegra_uart_port *tup) |
1223 | { | 1220 | { |
1224 | struct device_node *np = pdev->dev.of_node; | 1221 | struct device_node *np = pdev->dev.of_node; |
1225 | u32 of_dma[2]; | ||
1226 | int port; | 1222 | int port; |
1227 | 1223 | ||
1228 | if (of_property_read_u32_array(np, "nvidia,dma-request-selector", | ||
1229 | of_dma, 2) >= 0) { | ||
1230 | tup->dma_req_sel = of_dma[1]; | ||
1231 | } else { | ||
1232 | dev_err(&pdev->dev, "missing dma requestor in device tree\n"); | ||
1233 | return -EINVAL; | ||
1234 | } | ||
1235 | |||
1236 | port = of_alias_get_id(np, "serial"); | 1224 | port = of_alias_get_id(np, "serial"); |
1237 | if (port < 0) { | 1225 | if (port < 0) { |
1238 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", port); | 1226 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", port); |
@@ -1320,6 +1308,12 @@ static int tegra_uart_probe(struct platform_device *pdev) | |||
1320 | return PTR_ERR(tup->uart_clk); | 1308 | return PTR_ERR(tup->uart_clk); |
1321 | } | 1309 | } |
1322 | 1310 | ||
1311 | tup->rst = devm_reset_control_get(&pdev->dev, "serial"); | ||
1312 | if (IS_ERR(tup->rst)) { | ||
1313 | dev_err(&pdev->dev, "Couldn't get the reset\n"); | ||
1314 | return PTR_ERR(tup->rst); | ||
1315 | } | ||
1316 | |||
1323 | u->iotype = UPIO_MEM32; | 1317 | u->iotype = UPIO_MEM32; |
1324 | u->irq = platform_get_irq(pdev, 0); | 1318 | u->irq = platform_get_irq(pdev, 0); |
1325 | u->regshift = 2; | 1319 | u->regshift = 2; |
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index b9fd0396011e..6f7e23dd1417 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -17,7 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/clk/tegra.h> | ||
21 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
22 | #include <linux/err.h> | 21 | #include <linux/err.h> |
23 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
@@ -29,6 +28,7 @@ | |||
29 | #include <linux/of_gpio.h> | 28 | #include <linux/of_gpio.h> |
30 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
31 | #include <linux/pm_runtime.h> | 30 | #include <linux/pm_runtime.h> |
31 | #include <linux/reset.h> | ||
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/usb/ehci_def.h> | 33 | #include <linux/usb/ehci_def.h> |
34 | #include <linux/usb/tegra_usb_phy.h> | 34 | #include <linux/usb/tegra_usb_phy.h> |
@@ -62,6 +62,7 @@ static int (*orig_hub_control)(struct usb_hcd *hcd, | |||
62 | struct tegra_ehci_hcd { | 62 | struct tegra_ehci_hcd { |
63 | struct tegra_usb_phy *phy; | 63 | struct tegra_usb_phy *phy; |
64 | struct clk *clk; | 64 | struct clk *clk; |
65 | struct reset_control *rst; | ||
65 | int port_resuming; | 66 | int port_resuming; |
66 | bool needs_double_reset; | 67 | bool needs_double_reset; |
67 | enum tegra_usb_phy_port_speed port_speed; | 68 | enum tegra_usb_phy_port_speed port_speed; |
@@ -385,13 +386,20 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
385 | goto cleanup_hcd_create; | 386 | goto cleanup_hcd_create; |
386 | } | 387 | } |
387 | 388 | ||
389 | tegra->rst = devm_reset_control_get(&pdev->dev, "usb"); | ||
390 | if (IS_ERR(tegra->rst)) { | ||
391 | dev_err(&pdev->dev, "Can't get ehci reset\n"); | ||
392 | err = PTR_ERR(tegra->rst); | ||
393 | goto cleanup_hcd_create; | ||
394 | } | ||
395 | |||
388 | err = clk_prepare_enable(tegra->clk); | 396 | err = clk_prepare_enable(tegra->clk); |
389 | if (err) | 397 | if (err) |
390 | goto cleanup_hcd_create; | 398 | goto cleanup_hcd_create; |
391 | 399 | ||
392 | tegra_periph_reset_assert(tegra->clk); | 400 | reset_control_assert(tegra->rst); |
393 | udelay(1); | 401 | udelay(1); |
394 | tegra_periph_reset_deassert(tegra->clk); | 402 | reset_control_deassert(tegra->rst); |
395 | 403 | ||
396 | u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); | 404 | u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); |
397 | if (IS_ERR(u_phy)) { | 405 | if (IS_ERR(u_phy)) { |
diff --git a/include/dt-bindings/clock/tegra20-car.h b/include/dt-bindings/clock/tegra20-car.h index a1ae9a8fdd6c..9406207cfac8 100644 --- a/include/dt-bindings/clock/tegra20-car.h +++ b/include/dt-bindings/clock/tegra20-car.h | |||
@@ -92,7 +92,7 @@ | |||
92 | #define TEGRA20_CLK_OWR 71 | 92 | #define TEGRA20_CLK_OWR 71 |
93 | #define TEGRA20_CLK_AFI 72 | 93 | #define TEGRA20_CLK_AFI 72 |
94 | #define TEGRA20_CLK_CSITE 73 | 94 | #define TEGRA20_CLK_CSITE 73 |
95 | #define TEGRA20_CLK_PCIE_XCLK 74 | 95 | /* 74 */ |
96 | #define TEGRA20_CLK_AVPUCQ 75 | 96 | #define TEGRA20_CLK_AVPUCQ 75 |
97 | #define TEGRA20_CLK_LA 76 | 97 | #define TEGRA20_CLK_LA 76 |
98 | /* 77 */ | 98 | /* 77 */ |
diff --git a/include/dt-bindings/clock/tegra30-car.h b/include/dt-bindings/clock/tegra30-car.h index 22445820a929..889e49ba0aa3 100644 --- a/include/dt-bindings/clock/tegra30-car.h +++ b/include/dt-bindings/clock/tegra30-car.h | |||
@@ -92,7 +92,7 @@ | |||
92 | #define TEGRA30_CLK_OWR 71 | 92 | #define TEGRA30_CLK_OWR 71 |
93 | #define TEGRA30_CLK_AFI 72 | 93 | #define TEGRA30_CLK_AFI 72 |
94 | #define TEGRA30_CLK_CSITE 73 | 94 | #define TEGRA30_CLK_CSITE 73 |
95 | #define TEGRA30_CLK_PCIEX 74 | 95 | /* 74 */ |
96 | #define TEGRA30_CLK_AVPUCQ 75 | 96 | #define TEGRA30_CLK_AVPUCQ 75 |
97 | #define TEGRA30_CLK_LA 76 | 97 | #define TEGRA30_CLK_LA 76 |
98 | /* 77 */ | 98 | /* 77 */ |
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h index 23a0ceee831f..3ca9fca827a2 100644 --- a/include/linux/clk/tegra.h +++ b/include/linux/clk/tegra.h | |||
@@ -120,13 +120,6 @@ static inline void tegra_cpu_clock_resume(void) | |||
120 | } | 120 | } |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #ifdef CONFIG_ARCH_TEGRA | ||
124 | void tegra_periph_reset_deassert(struct clk *c); | ||
125 | void tegra_periph_reset_assert(struct clk *c); | ||
126 | #else | ||
127 | static inline void tegra_periph_reset_deassert(struct clk *c) {} | ||
128 | static inline void tegra_periph_reset_assert(struct clk *c) {} | ||
129 | #endif | ||
130 | void tegra_clocks_apply_init_table(void); | 123 | void tegra_clocks_apply_init_table(void); |
131 | 124 | ||
132 | #endif /* __LINUX_CLK_TEGRA_H_ */ | 125 | #endif /* __LINUX_CLK_TEGRA_H_ */ |
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h index fd4498329c7c..afe442d2629a 100644 --- a/include/linux/tegra-powergate.h +++ b/include/linux/tegra-powergate.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _MACH_TEGRA_POWERGATE_H_ | 19 | #define _MACH_TEGRA_POWERGATE_H_ |
20 | 20 | ||
21 | struct clk; | 21 | struct clk; |
22 | struct reset_control; | ||
22 | 23 | ||
23 | #define TEGRA_POWERGATE_CPU 0 | 24 | #define TEGRA_POWERGATE_CPU 0 |
24 | #define TEGRA_POWERGATE_3D 1 | 25 | #define TEGRA_POWERGATE_3D 1 |
@@ -52,7 +53,8 @@ int tegra_powergate_power_off(int id); | |||
52 | int tegra_powergate_remove_clamping(int id); | 53 | int tegra_powergate_remove_clamping(int id); |
53 | 54 | ||
54 | /* Must be called with clk disabled, and returns with clk enabled */ | 55 | /* Must be called with clk disabled, and returns with clk enabled */ |
55 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); | 56 | int tegra_powergate_sequence_power_up(int id, struct clk *clk, |
57 | struct reset_control *rst); | ||
56 | #else | 58 | #else |
57 | static inline int tegra_powergate_is_powered(int id) | 59 | static inline int tegra_powergate_is_powered(int id) |
58 | { | 60 | { |
@@ -74,7 +76,8 @@ static inline int tegra_powergate_remove_clamping(int id) | |||
74 | return -ENOSYS; | 76 | return -ENOSYS; |
75 | } | 77 | } |
76 | 78 | ||
77 | static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk) | 79 | static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk, |
80 | struct reset_control *rst); | ||
78 | { | 81 | { |
79 | return -ENOSYS; | 82 | return -ENOSYS; |
80 | } | 83 | } |
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index 8fc653ca3ab4..896292bb853f 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig | |||
@@ -1,6 +1,8 @@ | |||
1 | config SND_SOC_TEGRA | 1 | config SND_SOC_TEGRA |
2 | tristate "SoC Audio for the Tegra System-on-Chip" | 2 | tristate "SoC Audio for the Tegra System-on-Chip" |
3 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST | 3 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST |
4 | depends on COMMON_CLK | ||
5 | depends on RESET_CONTROLLER | ||
4 | select REGMAP_MMIO | 6 | select REGMAP_MMIO |
5 | select SND_SOC_GENERIC_DMAENGINE_PCM | 7 | select SND_SOC_GENERIC_DMAENGINE_PCM |
6 | help | 8 | help |
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index ae27bcd586d2..d8b98d70ff41 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c | |||
@@ -313,7 +313,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
313 | { | 313 | { |
314 | struct tegra20_ac97 *ac97; | 314 | struct tegra20_ac97 *ac97; |
315 | struct resource *mem; | 315 | struct resource *mem; |
316 | u32 of_dma[2]; | ||
317 | void __iomem *regs; | 316 | void __iomem *regs; |
318 | int ret = 0; | 317 | int ret = 0; |
319 | 318 | ||
@@ -348,14 +347,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
348 | goto err_clk_put; | 347 | goto err_clk_put; |
349 | } | 348 | } |
350 | 349 | ||
351 | if (of_property_read_u32_array(pdev->dev.of_node, | ||
352 | "nvidia,dma-request-selector", | ||
353 | of_dma, 2) < 0) { | ||
354 | dev_err(&pdev->dev, "No DMA resource\n"); | ||
355 | ret = -ENODEV; | ||
356 | goto err_clk_put; | ||
357 | } | ||
358 | |||
359 | ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, | 350 | ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, |
360 | "nvidia,codec-reset-gpio", 0); | 351 | "nvidia,codec-reset-gpio", 0); |
361 | if (gpio_is_valid(ac97->reset_gpio)) { | 352 | if (gpio_is_valid(ac97->reset_gpio)) { |
@@ -380,12 +371,10 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
380 | ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1; | 371 | ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1; |
381 | ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 372 | ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
382 | ac97->capture_dma_data.maxburst = 4; | 373 | ac97->capture_dma_data.maxburst = 4; |
383 | ac97->capture_dma_data.slave_id = of_dma[1]; | ||
384 | 374 | ||
385 | ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; | 375 | ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; |
386 | ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 376 | ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
387 | ac97->playback_dma_data.maxburst = 4; | 377 | ac97->playback_dma_data.maxburst = 4; |
388 | ac97->playback_dma_data.slave_id = of_dma[1]; | ||
389 | 378 | ||
390 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); | 379 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); |
391 | if (ret) | 380 | if (ret) |
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index 364bf6a907e1..1dc869c475e7 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c | |||
@@ -339,9 +339,7 @@ static const struct regmap_config tegra20_i2s_regmap_config = { | |||
339 | static int tegra20_i2s_platform_probe(struct platform_device *pdev) | 339 | static int tegra20_i2s_platform_probe(struct platform_device *pdev) |
340 | { | 340 | { |
341 | struct tegra20_i2s *i2s; | 341 | struct tegra20_i2s *i2s; |
342 | struct resource *mem, *memregion, *dmareq; | 342 | struct resource *mem, *memregion; |
343 | u32 of_dma[2]; | ||
344 | u32 dma_ch; | ||
345 | void __iomem *regs; | 343 | void __iomem *regs; |
346 | int ret; | 344 | int ret; |
347 | 345 | ||
@@ -370,20 +368,6 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev) | |||
370 | goto err_clk_put; | 368 | goto err_clk_put; |
371 | } | 369 | } |
372 | 370 | ||
373 | dmareq = platform_get_resource(pdev, IORESOURCE_DMA, 0); | ||
374 | if (!dmareq) { | ||
375 | if (of_property_read_u32_array(pdev->dev.of_node, | ||
376 | "nvidia,dma-request-selector", | ||
377 | of_dma, 2) < 0) { | ||
378 | dev_err(&pdev->dev, "No DMA resource\n"); | ||
379 | ret = -ENODEV; | ||
380 | goto err_clk_put; | ||
381 | } | ||
382 | dma_ch = of_dma[1]; | ||
383 | } else { | ||
384 | dma_ch = dmareq->start; | ||
385 | } | ||
386 | |||
387 | memregion = devm_request_mem_region(&pdev->dev, mem->start, | 371 | memregion = devm_request_mem_region(&pdev->dev, mem->start, |
388 | resource_size(mem), DRV_NAME); | 372 | resource_size(mem), DRV_NAME); |
389 | if (!memregion) { | 373 | if (!memregion) { |
@@ -410,12 +394,10 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev) | |||
410 | i2s->capture_dma_data.addr = mem->start + TEGRA20_I2S_FIFO2; | 394 | i2s->capture_dma_data.addr = mem->start + TEGRA20_I2S_FIFO2; |
411 | i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 395 | i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
412 | i2s->capture_dma_data.maxburst = 4; | 396 | i2s->capture_dma_data.maxburst = 4; |
413 | i2s->capture_dma_data.slave_id = dma_ch; | ||
414 | 397 | ||
415 | i2s->playback_dma_data.addr = mem->start + TEGRA20_I2S_FIFO1; | 398 | i2s->playback_dma_data.addr = mem->start + TEGRA20_I2S_FIFO1; |
416 | i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 399 | i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
417 | i2s->playback_dma_data.maxburst = 4; | 400 | i2s->playback_dma_data.maxburst = 4; |
418 | i2s->playback_dma_data.slave_id = dma_ch; | ||
419 | 401 | ||
420 | pm_runtime_enable(&pdev->dev); | 402 | pm_runtime_enable(&pdev->dev); |
421 | if (!pm_runtime_enabled(&pdev->dev)) { | 403 | if (!pm_runtime_enabled(&pdev->dev)) { |
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index 31154338c1eb..d6f4c9940e0c 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/pm_runtime.h> | 25 | #include <linux/pm_runtime.h> |
26 | #include <linux/regmap.h> | 26 | #include <linux/regmap.h> |
27 | #include <linux/reset.h> | ||
27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
28 | #include <linux/clk/tegra.h> | ||
29 | #include <sound/soc.h> | 29 | #include <sound/soc.h> |
30 | #include "tegra30_ahub.h" | 30 | #include "tegra30_ahub.h" |
31 | 31 | ||
@@ -95,8 +95,8 @@ static int tegra30_ahub_runtime_resume(struct device *dev) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, | 97 | int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, |
98 | dma_addr_t *fiforeg, | 98 | char *dmachan, int dmachan_len, |
99 | unsigned int *reqsel) | 99 | dma_addr_t *fiforeg) |
100 | { | 100 | { |
101 | int channel; | 101 | int channel; |
102 | u32 reg, val; | 102 | u32 reg, val; |
@@ -110,9 +110,11 @@ int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, | |||
110 | __set_bit(channel, ahub->rx_usage); | 110 | __set_bit(channel, ahub->rx_usage); |
111 | 111 | ||
112 | *rxcif = TEGRA30_AHUB_RXCIF_APBIF_RX0 + channel; | 112 | *rxcif = TEGRA30_AHUB_RXCIF_APBIF_RX0 + channel; |
113 | snprintf(dmachan, dmachan_len, "rx%d", channel); | ||
113 | *fiforeg = ahub->apbif_addr + TEGRA30_AHUB_CHANNEL_RXFIFO + | 114 | *fiforeg = ahub->apbif_addr + TEGRA30_AHUB_CHANNEL_RXFIFO + |
114 | (channel * TEGRA30_AHUB_CHANNEL_RXFIFO_STRIDE); | 115 | (channel * TEGRA30_AHUB_CHANNEL_RXFIFO_STRIDE); |
115 | *reqsel = ahub->dma_sel + channel; | 116 | |
117 | pm_runtime_get_sync(ahub->dev); | ||
116 | 118 | ||
117 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 119 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
118 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 120 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
@@ -140,6 +142,8 @@ int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, | |||
140 | (channel * TEGRA30_AHUB_CIF_RX_CTRL_STRIDE); | 142 | (channel * TEGRA30_AHUB_CIF_RX_CTRL_STRIDE); |
141 | ahub->soc_data->set_audio_cif(ahub->regmap_apbif, reg, &cif_conf); | 143 | ahub->soc_data->set_audio_cif(ahub->regmap_apbif, reg, &cif_conf); |
142 | 144 | ||
145 | pm_runtime_put(ahub->dev); | ||
146 | |||
143 | return 0; | 147 | return 0; |
144 | } | 148 | } |
145 | EXPORT_SYMBOL_GPL(tegra30_ahub_allocate_rx_fifo); | 149 | EXPORT_SYMBOL_GPL(tegra30_ahub_allocate_rx_fifo); |
@@ -149,12 +153,16 @@ int tegra30_ahub_enable_rx_fifo(enum tegra30_ahub_rxcif rxcif) | |||
149 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; | 153 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; |
150 | int reg, val; | 154 | int reg, val; |
151 | 155 | ||
156 | pm_runtime_get_sync(ahub->dev); | ||
157 | |||
152 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 158 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
153 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 159 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
154 | val = tegra30_apbif_read(reg); | 160 | val = tegra30_apbif_read(reg); |
155 | val |= TEGRA30_AHUB_CHANNEL_CTRL_RX_EN; | 161 | val |= TEGRA30_AHUB_CHANNEL_CTRL_RX_EN; |
156 | tegra30_apbif_write(reg, val); | 162 | tegra30_apbif_write(reg, val); |
157 | 163 | ||
164 | pm_runtime_put(ahub->dev); | ||
165 | |||
158 | return 0; | 166 | return 0; |
159 | } | 167 | } |
160 | EXPORT_SYMBOL_GPL(tegra30_ahub_enable_rx_fifo); | 168 | EXPORT_SYMBOL_GPL(tegra30_ahub_enable_rx_fifo); |
@@ -164,12 +172,16 @@ int tegra30_ahub_disable_rx_fifo(enum tegra30_ahub_rxcif rxcif) | |||
164 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; | 172 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; |
165 | int reg, val; | 173 | int reg, val; |
166 | 174 | ||
175 | pm_runtime_get_sync(ahub->dev); | ||
176 | |||
167 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 177 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
168 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 178 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
169 | val = tegra30_apbif_read(reg); | 179 | val = tegra30_apbif_read(reg); |
170 | val &= ~TEGRA30_AHUB_CHANNEL_CTRL_RX_EN; | 180 | val &= ~TEGRA30_AHUB_CHANNEL_CTRL_RX_EN; |
171 | tegra30_apbif_write(reg, val); | 181 | tegra30_apbif_write(reg, val); |
172 | 182 | ||
183 | pm_runtime_put(ahub->dev); | ||
184 | |||
173 | return 0; | 185 | return 0; |
174 | } | 186 | } |
175 | EXPORT_SYMBOL_GPL(tegra30_ahub_disable_rx_fifo); | 187 | EXPORT_SYMBOL_GPL(tegra30_ahub_disable_rx_fifo); |
@@ -185,8 +197,8 @@ int tegra30_ahub_free_rx_fifo(enum tegra30_ahub_rxcif rxcif) | |||
185 | EXPORT_SYMBOL_GPL(tegra30_ahub_free_rx_fifo); | 197 | EXPORT_SYMBOL_GPL(tegra30_ahub_free_rx_fifo); |
186 | 198 | ||
187 | int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, | 199 | int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, |
188 | dma_addr_t *fiforeg, | 200 | char *dmachan, int dmachan_len, |
189 | unsigned int *reqsel) | 201 | dma_addr_t *fiforeg) |
190 | { | 202 | { |
191 | int channel; | 203 | int channel; |
192 | u32 reg, val; | 204 | u32 reg, val; |
@@ -200,9 +212,11 @@ int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, | |||
200 | __set_bit(channel, ahub->tx_usage); | 212 | __set_bit(channel, ahub->tx_usage); |
201 | 213 | ||
202 | *txcif = TEGRA30_AHUB_TXCIF_APBIF_TX0 + channel; | 214 | *txcif = TEGRA30_AHUB_TXCIF_APBIF_TX0 + channel; |
215 | snprintf(dmachan, dmachan_len, "tx%d", channel); | ||
203 | *fiforeg = ahub->apbif_addr + TEGRA30_AHUB_CHANNEL_TXFIFO + | 216 | *fiforeg = ahub->apbif_addr + TEGRA30_AHUB_CHANNEL_TXFIFO + |
204 | (channel * TEGRA30_AHUB_CHANNEL_TXFIFO_STRIDE); | 217 | (channel * TEGRA30_AHUB_CHANNEL_TXFIFO_STRIDE); |
205 | *reqsel = ahub->dma_sel + channel; | 218 | |
219 | pm_runtime_get_sync(ahub->dev); | ||
206 | 220 | ||
207 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 221 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
208 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 222 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
@@ -230,6 +244,8 @@ int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, | |||
230 | (channel * TEGRA30_AHUB_CIF_TX_CTRL_STRIDE); | 244 | (channel * TEGRA30_AHUB_CIF_TX_CTRL_STRIDE); |
231 | ahub->soc_data->set_audio_cif(ahub->regmap_apbif, reg, &cif_conf); | 245 | ahub->soc_data->set_audio_cif(ahub->regmap_apbif, reg, &cif_conf); |
232 | 246 | ||
247 | pm_runtime_put(ahub->dev); | ||
248 | |||
233 | return 0; | 249 | return 0; |
234 | } | 250 | } |
235 | EXPORT_SYMBOL_GPL(tegra30_ahub_allocate_tx_fifo); | 251 | EXPORT_SYMBOL_GPL(tegra30_ahub_allocate_tx_fifo); |
@@ -239,12 +255,16 @@ int tegra30_ahub_enable_tx_fifo(enum tegra30_ahub_txcif txcif) | |||
239 | int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0; | 255 | int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0; |
240 | int reg, val; | 256 | int reg, val; |
241 | 257 | ||
258 | pm_runtime_get_sync(ahub->dev); | ||
259 | |||
242 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 260 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
243 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 261 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
244 | val = tegra30_apbif_read(reg); | 262 | val = tegra30_apbif_read(reg); |
245 | val |= TEGRA30_AHUB_CHANNEL_CTRL_TX_EN; | 263 | val |= TEGRA30_AHUB_CHANNEL_CTRL_TX_EN; |
246 | tegra30_apbif_write(reg, val); | 264 | tegra30_apbif_write(reg, val); |
247 | 265 | ||
266 | pm_runtime_put(ahub->dev); | ||
267 | |||
248 | return 0; | 268 | return 0; |
249 | } | 269 | } |
250 | EXPORT_SYMBOL_GPL(tegra30_ahub_enable_tx_fifo); | 270 | EXPORT_SYMBOL_GPL(tegra30_ahub_enable_tx_fifo); |
@@ -254,12 +274,16 @@ int tegra30_ahub_disable_tx_fifo(enum tegra30_ahub_txcif txcif) | |||
254 | int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0; | 274 | int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0; |
255 | int reg, val; | 275 | int reg, val; |
256 | 276 | ||
277 | pm_runtime_get_sync(ahub->dev); | ||
278 | |||
257 | reg = TEGRA30_AHUB_CHANNEL_CTRL + | 279 | reg = TEGRA30_AHUB_CHANNEL_CTRL + |
258 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); | 280 | (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); |
259 | val = tegra30_apbif_read(reg); | 281 | val = tegra30_apbif_read(reg); |
260 | val &= ~TEGRA30_AHUB_CHANNEL_CTRL_TX_EN; | 282 | val &= ~TEGRA30_AHUB_CHANNEL_CTRL_TX_EN; |
261 | tegra30_apbif_write(reg, val); | 283 | tegra30_apbif_write(reg, val); |
262 | 284 | ||
285 | pm_runtime_put(ahub->dev); | ||
286 | |||
263 | return 0; | 287 | return 0; |
264 | } | 288 | } |
265 | EXPORT_SYMBOL_GPL(tegra30_ahub_disable_tx_fifo); | 289 | EXPORT_SYMBOL_GPL(tegra30_ahub_disable_tx_fifo); |
@@ -280,10 +304,14 @@ int tegra30_ahub_set_rx_cif_source(enum tegra30_ahub_rxcif rxcif, | |||
280 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; | 304 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; |
281 | int reg; | 305 | int reg; |
282 | 306 | ||
307 | pm_runtime_get_sync(ahub->dev); | ||
308 | |||
283 | reg = TEGRA30_AHUB_AUDIO_RX + | 309 | reg = TEGRA30_AHUB_AUDIO_RX + |
284 | (channel * TEGRA30_AHUB_AUDIO_RX_STRIDE); | 310 | (channel * TEGRA30_AHUB_AUDIO_RX_STRIDE); |
285 | tegra30_audio_write(reg, 1 << txcif); | 311 | tegra30_audio_write(reg, 1 << txcif); |
286 | 312 | ||
313 | pm_runtime_put(ahub->dev); | ||
314 | |||
287 | return 0; | 315 | return 0; |
288 | } | 316 | } |
289 | EXPORT_SYMBOL_GPL(tegra30_ahub_set_rx_cif_source); | 317 | EXPORT_SYMBOL_GPL(tegra30_ahub_set_rx_cif_source); |
@@ -293,35 +321,51 @@ int tegra30_ahub_unset_rx_cif_source(enum tegra30_ahub_rxcif rxcif) | |||
293 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; | 321 | int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; |
294 | int reg; | 322 | int reg; |
295 | 323 | ||
324 | pm_runtime_get_sync(ahub->dev); | ||
325 | |||
296 | reg = TEGRA30_AHUB_AUDIO_RX + | 326 | reg = TEGRA30_AHUB_AUDIO_RX + |
297 | (channel * TEGRA30_AHUB_AUDIO_RX_STRIDE); | 327 | (channel * TEGRA30_AHUB_AUDIO_RX_STRIDE); |
298 | tegra30_audio_write(reg, 0); | 328 | tegra30_audio_write(reg, 0); |
299 | 329 | ||
330 | pm_runtime_put(ahub->dev); | ||
331 | |||
300 | return 0; | 332 | return 0; |
301 | } | 333 | } |
302 | EXPORT_SYMBOL_GPL(tegra30_ahub_unset_rx_cif_source); | 334 | EXPORT_SYMBOL_GPL(tegra30_ahub_unset_rx_cif_source); |
303 | 335 | ||
304 | #define CLK_LIST_MASK_TEGRA30 BIT(0) | 336 | #define MOD_LIST_MASK_TEGRA30 BIT(0) |
305 | #define CLK_LIST_MASK_TEGRA114 BIT(1) | 337 | #define MOD_LIST_MASK_TEGRA114 BIT(1) |
338 | #define MOD_LIST_MASK_TEGRA124 BIT(2) | ||
306 | 339 | ||
307 | #define CLK_LIST_MASK_TEGRA30_OR_LATER \ | 340 | #define MOD_LIST_MASK_TEGRA30_OR_LATER \ |
308 | (CLK_LIST_MASK_TEGRA30 | CLK_LIST_MASK_TEGRA114) | 341 | (MOD_LIST_MASK_TEGRA30 | MOD_LIST_MASK_TEGRA114 | \ |
342 | MOD_LIST_MASK_TEGRA124) | ||
343 | #define MOD_LIST_MASK_TEGRA114_OR_LATER \ | ||
344 | (MOD_LIST_MASK_TEGRA114 | MOD_LIST_MASK_TEGRA124) | ||
309 | 345 | ||
310 | static const struct { | 346 | static const struct { |
311 | const char *clk_name; | 347 | const char *rst_name; |
312 | u32 clk_list_mask; | 348 | u32 mod_list_mask; |
313 | } configlink_clocks[] = { | 349 | } configlink_mods[] = { |
314 | { "i2s0", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 350 | { "i2s0", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
315 | { "i2s1", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 351 | { "i2s1", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
316 | { "i2s2", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 352 | { "i2s2", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
317 | { "i2s3", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 353 | { "i2s3", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
318 | { "i2s4", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 354 | { "i2s4", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
319 | { "dam0", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 355 | { "dam0", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
320 | { "dam1", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 356 | { "dam1", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
321 | { "dam2", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 357 | { "dam2", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
322 | { "spdif_in", CLK_LIST_MASK_TEGRA30_OR_LATER }, | 358 | { "spdif", MOD_LIST_MASK_TEGRA30_OR_LATER }, |
323 | { "amx", CLK_LIST_MASK_TEGRA114 }, | 359 | { "amx", MOD_LIST_MASK_TEGRA114_OR_LATER }, |
324 | { "adx", CLK_LIST_MASK_TEGRA114 }, | 360 | { "adx", MOD_LIST_MASK_TEGRA114_OR_LATER }, |
361 | { "amx1", MOD_LIST_MASK_TEGRA124 }, | ||
362 | { "adx1", MOD_LIST_MASK_TEGRA124 }, | ||
363 | { "afc0", MOD_LIST_MASK_TEGRA124 }, | ||
364 | { "afc1", MOD_LIST_MASK_TEGRA124 }, | ||
365 | { "afc2", MOD_LIST_MASK_TEGRA124 }, | ||
366 | { "afc3", MOD_LIST_MASK_TEGRA124 }, | ||
367 | { "afc4", MOD_LIST_MASK_TEGRA124 }, | ||
368 | { "afc5", MOD_LIST_MASK_TEGRA124 }, | ||
325 | }; | 369 | }; |
326 | 370 | ||
327 | #define LAST_REG(name) \ | 371 | #define LAST_REG(name) \ |
@@ -450,17 +494,17 @@ static const struct regmap_config tegra30_ahub_ahub_regmap_config = { | |||
450 | }; | 494 | }; |
451 | 495 | ||
452 | static struct tegra30_ahub_soc_data soc_data_tegra30 = { | 496 | static struct tegra30_ahub_soc_data soc_data_tegra30 = { |
453 | .clk_list_mask = CLK_LIST_MASK_TEGRA30, | 497 | .mod_list_mask = MOD_LIST_MASK_TEGRA30, |
454 | .set_audio_cif = tegra30_ahub_set_cif, | 498 | .set_audio_cif = tegra30_ahub_set_cif, |
455 | }; | 499 | }; |
456 | 500 | ||
457 | static struct tegra30_ahub_soc_data soc_data_tegra114 = { | 501 | static struct tegra30_ahub_soc_data soc_data_tegra114 = { |
458 | .clk_list_mask = CLK_LIST_MASK_TEGRA114, | 502 | .mod_list_mask = MOD_LIST_MASK_TEGRA114, |
459 | .set_audio_cif = tegra30_ahub_set_cif, | 503 | .set_audio_cif = tegra30_ahub_set_cif, |
460 | }; | 504 | }; |
461 | 505 | ||
462 | static struct tegra30_ahub_soc_data soc_data_tegra124 = { | 506 | static struct tegra30_ahub_soc_data soc_data_tegra124 = { |
463 | .clk_list_mask = CLK_LIST_MASK_TEGRA114, | 507 | .mod_list_mask = MOD_LIST_MASK_TEGRA124, |
464 | .set_audio_cif = tegra124_ahub_set_cif, | 508 | .set_audio_cif = tegra124_ahub_set_cif, |
465 | }; | 509 | }; |
466 | 510 | ||
@@ -475,10 +519,9 @@ static int tegra30_ahub_probe(struct platform_device *pdev) | |||
475 | { | 519 | { |
476 | const struct of_device_id *match; | 520 | const struct of_device_id *match; |
477 | const struct tegra30_ahub_soc_data *soc_data; | 521 | const struct tegra30_ahub_soc_data *soc_data; |
478 | struct clk *clk; | 522 | struct reset_control *rst; |
479 | int i; | 523 | int i; |
480 | struct resource *res0, *res1, *region; | 524 | struct resource *res0, *res1, *region; |
481 | u32 of_dma[2]; | ||
482 | void __iomem *regs_apbif, *regs_ahub; | 525 | void __iomem *regs_apbif, *regs_ahub; |
483 | int ret = 0; | 526 | int ret = 0; |
484 | 527 | ||
@@ -495,19 +538,24 @@ static int tegra30_ahub_probe(struct platform_device *pdev) | |||
495 | * operate correctly, all devices on this bus must be out of reset. | 538 | * operate correctly, all devices on this bus must be out of reset. |
496 | * Ensure that here. | 539 | * Ensure that here. |
497 | */ | 540 | */ |
498 | for (i = 0; i < ARRAY_SIZE(configlink_clocks); i++) { | 541 | for (i = 0; i < ARRAY_SIZE(configlink_mods); i++) { |
499 | if (!(configlink_clocks[i].clk_list_mask & | 542 | if (!(configlink_mods[i].mod_list_mask & |
500 | soc_data->clk_list_mask)) | 543 | soc_data->mod_list_mask)) |
501 | continue; | 544 | continue; |
502 | clk = clk_get(&pdev->dev, configlink_clocks[i].clk_name); | 545 | |
503 | if (IS_ERR(clk)) { | 546 | rst = reset_control_get(&pdev->dev, |
504 | dev_err(&pdev->dev, "Can't get clock %s\n", | 547 | configlink_mods[i].rst_name); |
505 | configlink_clocks[i].clk_name); | 548 | if (IS_ERR(rst)) { |
506 | ret = PTR_ERR(clk); | 549 | dev_err(&pdev->dev, "Can't get reset %s\n", |
550 | configlink_mods[i].rst_name); | ||
551 | ret = PTR_ERR(rst); | ||
507 | goto err; | 552 | goto err; |
508 | } | 553 | } |
509 | tegra_periph_reset_deassert(clk); | 554 | |
510 | clk_put(clk); | 555 | ret = reset_control_deassert(rst); |
556 | reset_control_put(rst); | ||
557 | if (ret) | ||
558 | goto err; | ||
511 | } | 559 | } |
512 | 560 | ||
513 | ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), | 561 | ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), |
@@ -536,16 +584,6 @@ static int tegra30_ahub_probe(struct platform_device *pdev) | |||
536 | goto err_clk_put_d_audio; | 584 | goto err_clk_put_d_audio; |
537 | } | 585 | } |
538 | 586 | ||
539 | if (of_property_read_u32_array(pdev->dev.of_node, | ||
540 | "nvidia,dma-request-selector", | ||
541 | of_dma, 2) < 0) { | ||
542 | dev_err(&pdev->dev, | ||
543 | "Missing property nvidia,dma-request-selector\n"); | ||
544 | ret = -ENODEV; | ||
545 | goto err_clk_put_d_audio; | ||
546 | } | ||
547 | ahub->dma_sel = of_dma[1]; | ||
548 | |||
549 | res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 587 | res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
550 | if (!res0) { | 588 | if (!res0) { |
551 | dev_err(&pdev->dev, "No apbif memory resource\n"); | 589 | dev_err(&pdev->dev, "No apbif memory resource\n"); |
diff --git a/sound/soc/tegra/tegra30_ahub.h b/sound/soc/tegra/tegra30_ahub.h index d67321d90faa..fd7ba75ed814 100644 --- a/sound/soc/tegra/tegra30_ahub.h +++ b/sound/soc/tegra/tegra30_ahub.h | |||
@@ -465,15 +465,15 @@ enum tegra30_ahub_rxcif { | |||
465 | }; | 465 | }; |
466 | 466 | ||
467 | extern int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, | 467 | extern int tegra30_ahub_allocate_rx_fifo(enum tegra30_ahub_rxcif *rxcif, |
468 | dma_addr_t *fiforeg, | 468 | char *dmachan, int dmachan_len, |
469 | unsigned int *reqsel); | 469 | dma_addr_t *fiforeg); |
470 | extern int tegra30_ahub_enable_rx_fifo(enum tegra30_ahub_rxcif rxcif); | 470 | extern int tegra30_ahub_enable_rx_fifo(enum tegra30_ahub_rxcif rxcif); |
471 | extern int tegra30_ahub_disable_rx_fifo(enum tegra30_ahub_rxcif rxcif); | 471 | extern int tegra30_ahub_disable_rx_fifo(enum tegra30_ahub_rxcif rxcif); |
472 | extern int tegra30_ahub_free_rx_fifo(enum tegra30_ahub_rxcif rxcif); | 472 | extern int tegra30_ahub_free_rx_fifo(enum tegra30_ahub_rxcif rxcif); |
473 | 473 | ||
474 | extern int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, | 474 | extern int tegra30_ahub_allocate_tx_fifo(enum tegra30_ahub_txcif *txcif, |
475 | dma_addr_t *fiforeg, | 475 | char *dmachan, int dmachan_len, |
476 | unsigned int *reqsel); | 476 | dma_addr_t *fiforeg); |
477 | extern int tegra30_ahub_enable_tx_fifo(enum tegra30_ahub_txcif txcif); | 477 | extern int tegra30_ahub_enable_tx_fifo(enum tegra30_ahub_txcif txcif); |
478 | extern int tegra30_ahub_disable_tx_fifo(enum tegra30_ahub_txcif txcif); | 478 | extern int tegra30_ahub_disable_tx_fifo(enum tegra30_ahub_txcif txcif); |
479 | extern int tegra30_ahub_free_tx_fifo(enum tegra30_ahub_txcif txcif); | 479 | extern int tegra30_ahub_free_tx_fifo(enum tegra30_ahub_txcif txcif); |
@@ -502,7 +502,7 @@ void tegra124_ahub_set_cif(struct regmap *regmap, unsigned int reg, | |||
502 | struct tegra30_ahub_cif_conf *conf); | 502 | struct tegra30_ahub_cif_conf *conf); |
503 | 503 | ||
504 | struct tegra30_ahub_soc_data { | 504 | struct tegra30_ahub_soc_data { |
505 | u32 clk_list_mask; | 505 | u32 mod_list_mask; |
506 | void (*set_audio_cif)(struct regmap *regmap, | 506 | void (*set_audio_cif)(struct regmap *regmap, |
507 | unsigned int reg, | 507 | unsigned int reg, |
508 | struct tegra30_ahub_cif_conf *conf); | 508 | struct tegra30_ahub_cif_conf *conf); |
@@ -524,7 +524,6 @@ struct tegra30_ahub { | |||
524 | struct device *dev; | 524 | struct device *dev; |
525 | struct clk *clk_d_audio; | 525 | struct clk *clk_d_audio; |
526 | struct clk *clk_apbif; | 526 | struct clk *clk_apbif; |
527 | int dma_sel; | ||
528 | resource_size_t apbif_addr; | 527 | resource_size_t apbif_addr; |
529 | struct regmap *regmap_apbif; | 528 | struct regmap *regmap_apbif; |
530 | struct regmap *regmap_ahub; | 529 | struct regmap *regmap_ahub; |
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 231a785b3921..362e8f728ddf 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -73,47 +73,6 @@ static int tegra30_i2s_runtime_resume(struct device *dev) | |||
73 | return 0; | 73 | return 0; |
74 | } | 74 | } |
75 | 75 | ||
76 | static int tegra30_i2s_startup(struct snd_pcm_substream *substream, | ||
77 | struct snd_soc_dai *dai) | ||
78 | { | ||
79 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); | ||
80 | int ret; | ||
81 | |||
82 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
83 | ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif, | ||
84 | &i2s->playback_dma_data.addr, | ||
85 | &i2s->playback_dma_data.slave_id); | ||
86 | i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | ||
87 | i2s->playback_dma_data.maxburst = 4; | ||
88 | tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif, | ||
89 | i2s->playback_fifo_cif); | ||
90 | } else { | ||
91 | ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif, | ||
92 | &i2s->capture_dma_data.addr, | ||
93 | &i2s->capture_dma_data.slave_id); | ||
94 | i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | ||
95 | i2s->capture_dma_data.maxburst = 4; | ||
96 | tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif, | ||
97 | i2s->capture_i2s_cif); | ||
98 | } | ||
99 | |||
100 | return ret; | ||
101 | } | ||
102 | |||
103 | static void tegra30_i2s_shutdown(struct snd_pcm_substream *substream, | ||
104 | struct snd_soc_dai *dai) | ||
105 | { | ||
106 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); | ||
107 | |||
108 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
109 | tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); | ||
110 | tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); | ||
111 | } else { | ||
112 | tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); | ||
113 | tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); | ||
114 | } | ||
115 | } | ||
116 | |||
117 | static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, | 76 | static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, |
118 | unsigned int fmt) | 77 | unsigned int fmt) |
119 | { | 78 | { |
@@ -317,8 +276,6 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai) | |||
317 | } | 276 | } |
318 | 277 | ||
319 | static struct snd_soc_dai_ops tegra30_i2s_dai_ops = { | 278 | static struct snd_soc_dai_ops tegra30_i2s_dai_ops = { |
320 | .startup = tegra30_i2s_startup, | ||
321 | .shutdown = tegra30_i2s_shutdown, | ||
322 | .set_fmt = tegra30_i2s_set_fmt, | 279 | .set_fmt = tegra30_i2s_set_fmt, |
323 | .hw_params = tegra30_i2s_hw_params, | 280 | .hw_params = tegra30_i2s_hw_params, |
324 | .trigger = tegra30_i2s_trigger, | 281 | .trigger = tegra30_i2s_trigger, |
@@ -499,15 +456,51 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev) | |||
499 | goto err_pm_disable; | 456 | goto err_pm_disable; |
500 | } | 457 | } |
501 | 458 | ||
459 | i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | ||
460 | i2s->playback_dma_data.maxburst = 4; | ||
461 | ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif, | ||
462 | i2s->playback_dma_chan, | ||
463 | sizeof(i2s->playback_dma_chan), | ||
464 | &i2s->playback_dma_data.addr); | ||
465 | if (ret) { | ||
466 | dev_err(&pdev->dev, "Could not alloc TX FIFO: %d\n", ret); | ||
467 | goto err_suspend; | ||
468 | } | ||
469 | ret = tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif, | ||
470 | i2s->playback_fifo_cif); | ||
471 | if (ret) { | ||
472 | dev_err(&pdev->dev, "Could not route TX FIFO: %d\n", ret); | ||
473 | goto err_free_tx_fifo; | ||
474 | } | ||
475 | |||
476 | i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | ||
477 | i2s->capture_dma_data.maxburst = 4; | ||
478 | ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif, | ||
479 | i2s->capture_dma_chan, | ||
480 | sizeof(i2s->capture_dma_chan), | ||
481 | &i2s->capture_dma_data.addr); | ||
482 | if (ret) { | ||
483 | dev_err(&pdev->dev, "Could not alloc RX FIFO: %d\n", ret); | ||
484 | goto err_unroute_tx_fifo; | ||
485 | } | ||
486 | ret = tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif, | ||
487 | i2s->capture_i2s_cif); | ||
488 | if (ret) { | ||
489 | dev_err(&pdev->dev, "Could not route TX FIFO: %d\n", ret); | ||
490 | goto err_free_rx_fifo; | ||
491 | } | ||
492 | |||
502 | ret = snd_soc_register_component(&pdev->dev, &tegra30_i2s_component, | 493 | ret = snd_soc_register_component(&pdev->dev, &tegra30_i2s_component, |
503 | &i2s->dai, 1); | 494 | &i2s->dai, 1); |
504 | if (ret) { | 495 | if (ret) { |
505 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 496 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
506 | ret = -ENOMEM; | 497 | ret = -ENOMEM; |
507 | goto err_suspend; | 498 | goto err_unroute_rx_fifo; |
508 | } | 499 | } |
509 | 500 | ||
510 | ret = tegra_pcm_platform_register(&pdev->dev); | 501 | ret = tegra_pcm_platform_register_with_chan_names(&pdev->dev, |
502 | &i2s->dma_config, i2s->playback_dma_chan, | ||
503 | i2s->capture_dma_chan); | ||
511 | if (ret) { | 504 | if (ret) { |
512 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 505 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
513 | goto err_unregister_component; | 506 | goto err_unregister_component; |
@@ -517,6 +510,14 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev) | |||
517 | 510 | ||
518 | err_unregister_component: | 511 | err_unregister_component: |
519 | snd_soc_unregister_component(&pdev->dev); | 512 | snd_soc_unregister_component(&pdev->dev); |
513 | err_unroute_rx_fifo: | ||
514 | tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); | ||
515 | err_free_rx_fifo: | ||
516 | tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); | ||
517 | err_unroute_tx_fifo: | ||
518 | tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); | ||
519 | err_free_tx_fifo: | ||
520 | tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); | ||
520 | err_suspend: | 521 | err_suspend: |
521 | if (!pm_runtime_status_suspended(&pdev->dev)) | 522 | if (!pm_runtime_status_suspended(&pdev->dev)) |
522 | tegra30_i2s_runtime_suspend(&pdev->dev); | 523 | tegra30_i2s_runtime_suspend(&pdev->dev); |
@@ -539,6 +540,12 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev) | |||
539 | tegra_pcm_platform_unregister(&pdev->dev); | 540 | tegra_pcm_platform_unregister(&pdev->dev); |
540 | snd_soc_unregister_component(&pdev->dev); | 541 | snd_soc_unregister_component(&pdev->dev); |
541 | 542 | ||
543 | tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); | ||
544 | tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); | ||
545 | |||
546 | tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); | ||
547 | tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); | ||
548 | |||
542 | clk_put(i2s->clk_i2s); | 549 | clk_put(i2s->clk_i2s); |
543 | 550 | ||
544 | return 0; | 551 | return 0; |
diff --git a/sound/soc/tegra/tegra30_i2s.h b/sound/soc/tegra/tegra30_i2s.h index 4d0b0a30dbfb..774fc6ad2026 100644 --- a/sound/soc/tegra/tegra30_i2s.h +++ b/sound/soc/tegra/tegra30_i2s.h | |||
@@ -238,11 +238,14 @@ struct tegra30_i2s { | |||
238 | struct clk *clk_i2s; | 238 | struct clk *clk_i2s; |
239 | enum tegra30_ahub_txcif capture_i2s_cif; | 239 | enum tegra30_ahub_txcif capture_i2s_cif; |
240 | enum tegra30_ahub_rxcif capture_fifo_cif; | 240 | enum tegra30_ahub_rxcif capture_fifo_cif; |
241 | char capture_dma_chan[8]; | ||
241 | struct snd_dmaengine_dai_dma_data capture_dma_data; | 242 | struct snd_dmaengine_dai_dma_data capture_dma_data; |
242 | enum tegra30_ahub_rxcif playback_i2s_cif; | 243 | enum tegra30_ahub_rxcif playback_i2s_cif; |
243 | enum tegra30_ahub_txcif playback_fifo_cif; | 244 | enum tegra30_ahub_txcif playback_fifo_cif; |
245 | char playback_dma_chan[8]; | ||
244 | struct snd_dmaengine_dai_dma_data playback_dma_data; | 246 | struct snd_dmaengine_dai_dma_data playback_dma_data; |
245 | struct regmap *regmap; | 247 | struct regmap *regmap; |
248 | struct snd_dmaengine_pcm_config dma_config; | ||
246 | }; | 249 | }; |
247 | 250 | ||
248 | #endif | 251 | #endif |
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 7b2d23ba69b3..7ce5c334a660 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c | |||
@@ -61,12 +61,23 @@ static const struct snd_dmaengine_pcm_config tegra_dmaengine_pcm_config = { | |||
61 | 61 | ||
62 | int tegra_pcm_platform_register(struct device *dev) | 62 | int tegra_pcm_platform_register(struct device *dev) |
63 | { | 63 | { |
64 | return snd_dmaengine_pcm_register(dev, &tegra_dmaengine_pcm_config, | 64 | return snd_dmaengine_pcm_register(dev, &tegra_dmaengine_pcm_config, 0); |
65 | SND_DMAENGINE_PCM_FLAG_NO_DT | | ||
66 | SND_DMAENGINE_PCM_FLAG_COMPAT); | ||
67 | } | 65 | } |
68 | EXPORT_SYMBOL_GPL(tegra_pcm_platform_register); | 66 | EXPORT_SYMBOL_GPL(tegra_pcm_platform_register); |
69 | 67 | ||
68 | int tegra_pcm_platform_register_with_chan_names(struct device *dev, | ||
69 | struct snd_dmaengine_pcm_config *config, | ||
70 | char *txdmachan, char *rxdmachan) | ||
71 | { | ||
72 | *config = tegra_dmaengine_pcm_config; | ||
73 | config->dma_dev = dev->parent; | ||
74 | config->chan_names[0] = txdmachan; | ||
75 | config->chan_names[1] = rxdmachan; | ||
76 | |||
77 | return snd_dmaengine_pcm_register(dev, config, 0); | ||
78 | } | ||
79 | EXPORT_SYMBOL_GPL(tegra_pcm_platform_register_with_chan_names); | ||
80 | |||
70 | void tegra_pcm_platform_unregister(struct device *dev) | 81 | void tegra_pcm_platform_unregister(struct device *dev) |
71 | { | 82 | { |
72 | return snd_dmaengine_pcm_unregister(dev); | 83 | return snd_dmaengine_pcm_unregister(dev); |
diff --git a/sound/soc/tegra/tegra_pcm.h b/sound/soc/tegra/tegra_pcm.h index 68ad901714a9..7883dec748a3 100644 --- a/sound/soc/tegra/tegra_pcm.h +++ b/sound/soc/tegra/tegra_pcm.h | |||
@@ -31,7 +31,12 @@ | |||
31 | #ifndef __TEGRA_PCM_H__ | 31 | #ifndef __TEGRA_PCM_H__ |
32 | #define __TEGRA_PCM_H__ | 32 | #define __TEGRA_PCM_H__ |
33 | 33 | ||
34 | struct snd_dmaengine_pcm_config; | ||
35 | |||
34 | int tegra_pcm_platform_register(struct device *dev); | 36 | int tegra_pcm_platform_register(struct device *dev); |
37 | int tegra_pcm_platform_register_with_chan_names(struct device *dev, | ||
38 | struct snd_dmaengine_pcm_config *config, | ||
39 | char *txdmachan, char *rxdmachan); | ||
35 | void tegra_pcm_platform_unregister(struct device *dev); | 40 | void tegra_pcm_platform_unregister(struct device *dev); |
36 | 41 | ||
37 | #endif | 42 | #endif |