Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: i.MX27 clk: dts: Use clock defines in DTS files

Use clock definitions in i.MX27 DTS files.
Additional changes included in this patch (imx27.dtsi):
- Fix IPG clock for UART6.
- Use EMI_AHB_GATE clock for WEIM.
- Added GPIO_IPG_GATE clock for GPIO nodes. Currently this clock is
not used by the driver, but it can be added in the future.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>

authored by

Alexander Shiyan and committed by
Shawn Guo
ea336fa8 811e7685

+77 -44
+1 -1
arch/arm/boot/dts/imx27-pdk.dts
··· 28 28 usbphy0: usbphy@0 { 29 29 compatible = "usb-nop-xceiv"; 30 30 reg = <0>; 31 - clocks = <&clks 0>; 31 + clocks = <&clks IMX27_CLK_DUMMY>; 32 32 clock-names = "main_clk"; 33 33 }; 34 34 };
+1 -1
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
··· 61 61 compatible = "usb-nop-xceiv"; 62 62 reg = <2>; 63 63 vcc-supply = <&reg_5v0>; 64 - clocks = <&clks 0>; 64 + clocks = <&clks IMX27_CLK_DUMMY>; 65 65 clock-names = "main_clk"; 66 66 }; 67 67 };
+1 -1
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
··· 51 51 compatible = "usb-nop-xceiv"; 52 52 reg = <0>; 53 53 vcc-supply = <&sw3_reg>; 54 - clocks = <&clks 0>; 54 + clocks = <&clks IMX27_CLK_DUMMY>; 55 55 clock-names = "main_clk"; 56 56 }; 57 57 };
+74 -41
arch/arm/boot/dts/imx27.dtsi
··· 11 11 12 12 #include "skeleton.dtsi" 13 13 #include "imx27-pinfunc.h" 14 + 15 + #include <dt-bindings/clock/imx27-clock.h> 16 + #include <dt-bindings/gpio/gpio.h> 14 17 #include <dt-bindings/input/input.h> 15 18 #include <dt-bindings/interrupt-controller/irq.h> 16 - #include <dt-bindings/gpio/gpio.h> 17 19 18 20 / { 19 21 aliases { ··· 70 68 399000 1450000 71 69 >; 72 70 clock-latency = <62500>; 73 - clocks = <&clks 18>; 71 + clocks = <&clks IMX27_CLK_CPU_DIV>; 74 72 voltage-tolerance = <5>; 75 73 }; 76 74 }; ··· 93 91 compatible = "fsl,imx27-dma"; 94 92 reg = <0x10001000 0x1000>; 95 93 interrupts = <32>; 96 - clocks = <&clks 50>, <&clks 70>; 94 + clocks = <&clks IMX27_CLK_DMA_IPG_GATE>, 95 + <&clks IMX27_CLK_DMA_AHB_GATE>; 97 96 clock-names = "ipg", "ahb"; 98 97 #dma-cells = <1>; 99 98 #dma-channels = <16>; ··· 104 101 compatible = "fsl,imx27-wdt", "fsl,imx21-wdt"; 105 102 reg = <0x10002000 0x1000>; 106 103 interrupts = <27>; 107 - clocks = <&clks 74>; 104 + clocks = <&clks IMX27_CLK_WDOG_IPG_GATE>; 108 105 }; 109 106 110 107 gpt1: timer@10003000 { 111 108 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 112 109 reg = <0x10003000 0x1000>; 113 110 interrupts = <26>; 114 - clocks = <&clks 46>, <&clks 61>; 111 + clocks = <&clks IMX27_CLK_GPT1_IPG_GATE>, 112 + <&clks IMX27_CLK_PER1_GATE>; 115 113 clock-names = "ipg", "per"; 116 114 }; 117 115 ··· 120 116 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 121 117 reg = <0x10004000 0x1000>; 122 118 interrupts = <25>; 123 - clocks = <&clks 45>, <&clks 61>; 119 + clocks = <&clks IMX27_CLK_GPT2_IPG_GATE>, 120 + <&clks IMX27_CLK_PER1_GATE>; 124 121 clock-names = "ipg", "per"; 125 122 }; 126 123 ··· 129 124 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 130 125 reg = <0x10005000 0x1000>; 131 126 interrupts = <24>; 132 - clocks = <&clks 44>, <&clks 61>; 127 + clocks = <&clks IMX27_CLK_GPT3_IPG_GATE>, 128 + <&clks IMX27_CLK_PER1_GATE>; 133 129 clock-names = "ipg", "per"; 134 130 }; 135 131 ··· 139 133 compatible = "fsl,imx27-pwm"; 140 134 reg = <0x10006000 0x1000>; 141 135 interrupts = <23>; 142 - clocks = <&clks 34>, <&clks 61>; 136 + clocks = <&clks IMX27_CLK_PWM_IPG_GATE>, 137 + <&clks IMX27_CLK_PER1_GATE>; 143 138 clock-names = "ipg", "per"; 144 139 }; 145 140 ··· 148 141 compatible = "fsl,imx27-kpp", "fsl,imx21-kpp"; 149 142 reg = <0x10008000 0x1000>; 150 143 interrupts = <21>; 151 - clocks = <&clks 37>; 144 + clocks = <&clks IMX27_CLK_KPP_IPG_GATE>; 152 145 status = "disabled"; 153 146 }; 154 147 155 148 owire: owire@10009000 { 156 149 compatible = "fsl,imx27-owire", "fsl,imx21-owire"; 157 150 reg = <0x10009000 0x1000>; 158 - clocks = <&clks 35>; 151 + clocks = <&clks IMX27_CLK_OWIRE_IPG_GATE>; 159 152 status = "disabled"; 160 153 }; 161 154 ··· 163 156 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 164 157 reg = <0x1000a000 0x1000>; 165 158 interrupts = <20>; 166 - clocks = <&clks 81>, <&clks 61>; 159 + clocks = <&clks IMX27_CLK_UART1_IPG_GATE>, 160 + <&clks IMX27_CLK_PER1_GATE>; 167 161 clock-names = "ipg", "per"; 168 162 status = "disabled"; 169 163 }; ··· 173 165 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 174 166 reg = <0x1000b000 0x1000>; 175 167 interrupts = <19>; 176 - clocks = <&clks 80>, <&clks 61>; 168 + clocks = <&clks IMX27_CLK_UART2_IPG_GATE>, 169 + <&clks IMX27_CLK_PER1_GATE>; 177 170 clock-names = "ipg", "per"; 178 171 status = "disabled"; 179 172 }; ··· 183 174 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 184 175 reg = <0x1000c000 0x1000>; 185 176 interrupts = <18>; 186 - clocks = <&clks 79>, <&clks 61>; 177 + clocks = <&clks IMX27_CLK_UART3_IPG_GATE>, 178 + <&clks IMX27_CLK_PER1_GATE>; 187 179 clock-names = "ipg", "per"; 188 180 status = "disabled"; 189 181 }; ··· 193 183 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 194 184 reg = <0x1000d000 0x1000>; 195 185 interrupts = <17>; 196 - clocks = <&clks 78>, <&clks 61>; 186 + clocks = <&clks IMX27_CLK_UART4_IPG_GATE>, 187 + <&clks IMX27_CLK_PER1_GATE>; 197 188 clock-names = "ipg", "per"; 198 189 status = "disabled"; 199 190 }; ··· 205 194 compatible = "fsl,imx27-cspi"; 206 195 reg = <0x1000e000 0x1000>; 207 196 interrupts = <16>; 208 - clocks = <&clks 53>, <&clks 60>; 197 + clocks = <&clks IMX27_CLK_CSPI1_IPG_GATE>, 198 + <&clks IMX27_CLK_PER2_GATE>; 209 199 clock-names = "ipg", "per"; 210 200 status = "disabled"; 211 201 }; ··· 217 205 compatible = "fsl,imx27-cspi"; 218 206 reg = <0x1000f000 0x1000>; 219 207 interrupts = <15>; 220 - clocks = <&clks 52>, <&clks 60>; 208 + clocks = <&clks IMX27_CLK_CSPI2_IPG_GATE>, 209 + <&clks IMX27_CLK_PER2_GATE>; 221 210 clock-names = "ipg", "per"; 222 211 status = "disabled"; 223 212 }; ··· 228 215 compatible = "fsl,imx27-ssi", "fsl,imx21-ssi"; 229 216 reg = <0x10010000 0x1000>; 230 217 interrupts = <14>; 231 - clocks = <&clks 26>; 218 + clocks = <&clks IMX27_CLK_SSI1_IPG_GATE>; 232 219 dmas = <&dma 12>, <&dma 13>, <&dma 14>, <&dma 15>; 233 220 dma-names = "rx0", "tx0", "rx1", "tx1"; 234 221 fsl,fifo-depth = <8>; ··· 240 227 compatible = "fsl,imx27-ssi", "fsl,imx21-ssi"; 241 228 reg = <0x10011000 0x1000>; 242 229 interrupts = <13>; 243 - clocks = <&clks 25>; 230 + clocks = <&clks IMX27_CLK_SSI2_IPG_GATE>; 244 231 dmas = <&dma 8>, <&dma 9>, <&dma 10>, <&dma 11>; 245 232 dma-names = "rx0", "tx0", "rx1", "tx1"; 246 233 fsl,fifo-depth = <8>; ··· 253 240 compatible = "fsl,imx27-i2c", "fsl,imx21-i2c"; 254 241 reg = <0x10012000 0x1000>; 255 242 interrupts = <12>; 256 - clocks = <&clks 40>; 243 + clocks = <&clks IMX27_CLK_I2C1_IPG_GATE>; 257 244 status = "disabled"; 258 245 }; 259 246 ··· 261 248 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc"; 262 249 reg = <0x10013000 0x1000>; 263 250 interrupts = <11>; 264 - clocks = <&clks 30>, <&clks 60>; 251 + clocks = <&clks IMX27_CLK_SDHC1_IPG_GATE>, 252 + <&clks IMX27_CLK_PER2_GATE>; 265 253 clock-names = "ipg", "per"; 266 254 dmas = <&dma 7>; 267 255 dma-names = "rx-tx"; ··· 273 259 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc"; 274 260 reg = <0x10014000 0x1000>; 275 261 interrupts = <10>; 276 - clocks = <&clks 29>, <&clks 60>; 262 + clocks = <&clks IMX27_CLK_SDHC2_IPG_GATE>, 263 + <&clks IMX27_CLK_PER2_GATE>; 277 264 clock-names = "ipg", "per"; 278 265 dmas = <&dma 6>; 279 266 dma-names = "rx-tx"; ··· 291 276 gpio1: gpio@10015000 { 292 277 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 293 278 reg = <0x10015000 0x100>; 279 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 294 280 interrupts = <8>; 295 281 gpio-controller; 296 282 #gpio-cells = <2>; ··· 302 286 gpio2: gpio@10015100 { 303 287 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 304 288 reg = <0x10015100 0x100>; 289 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 305 290 interrupts = <8>; 306 291 gpio-controller; 307 292 #gpio-cells = <2>; ··· 313 296 gpio3: gpio@10015200 { 314 297 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 315 298 reg = <0x10015200 0x100>; 299 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 316 300 interrupts = <8>; 317 301 gpio-controller; 318 302 #gpio-cells = <2>; ··· 324 306 gpio4: gpio@10015300 { 325 307 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 326 308 reg = <0x10015300 0x100>; 309 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 327 310 interrupts = <8>; 328 311 gpio-controller; 329 312 #gpio-cells = <2>; ··· 335 316 gpio5: gpio@10015400 { 336 317 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 337 318 reg = <0x10015400 0x100>; 319 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 338 320 interrupts = <8>; 339 321 gpio-controller; 340 322 #gpio-cells = <2>; ··· 346 326 gpio6: gpio@10015500 { 347 327 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 348 328 reg = <0x10015500 0x100>; 329 + clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>; 349 330 interrupts = <8>; 350 331 gpio-controller; 351 332 #gpio-cells = <2>; ··· 358 337 audmux: audmux@10016000 { 359 338 compatible = "fsl,imx27-audmux", "fsl,imx21-audmux"; 360 339 reg = <0x10016000 0x1000>; 361 - clocks = <&clks 0>; 340 + clocks = <&clks IMX27_CLK_DUMMY>; 362 341 clock-names = "audmux"; 363 342 status = "disabled"; 364 343 }; ··· 369 348 compatible = "fsl,imx27-cspi"; 370 349 reg = <0x10017000 0x1000>; 371 350 interrupts = <6>; 372 - clocks = <&clks 51>, <&clks 60>; 351 + clocks = <&clks IMX27_CLK_CSPI3_IPG_GATE>, 352 + <&clks IMX27_CLK_PER2_GATE>; 373 353 clock-names = "ipg", "per"; 374 354 status = "disabled"; 375 355 }; ··· 379 357 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 380 358 reg = <0x10019000 0x1000>; 381 359 interrupts = <4>; 382 - clocks = <&clks 43>, <&clks 61>; 360 + clocks = <&clks IMX27_CLK_GPT4_IPG_GATE>, 361 + <&clks IMX27_CLK_PER1_GATE>; 383 362 clock-names = "ipg", "per"; 384 363 }; 385 364 ··· 388 365 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 389 366 reg = <0x1001a000 0x1000>; 390 367 interrupts = <3>; 391 - clocks = <&clks 42>, <&clks 61>; 368 + clocks = <&clks IMX27_CLK_GPT5_IPG_GATE>, 369 + <&clks IMX27_CLK_PER1_GATE>; 392 370 clock-names = "ipg", "per"; 393 371 }; 394 372 ··· 397 373 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 398 374 reg = <0x1001b000 0x1000>; 399 375 interrupts = <49>; 400 - clocks = <&clks 77>, <&clks 61>; 376 + clocks = <&clks IMX27_CLK_UART5_IPG_GATE>, 377 + <&clks IMX27_CLK_PER1_GATE>; 401 378 clock-names = "ipg", "per"; 402 379 status = "disabled"; 403 380 }; ··· 407 382 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 408 383 reg = <0x1001c000 0x1000>; 409 384 interrupts = <48>; 410 - clocks = <&clks 78>, <&clks 61>; 385 + clocks = <&clks IMX27_CLK_UART6_IPG_GATE>, 386 + <&clks IMX27_CLK_PER1_GATE>; 411 387 clock-names = "ipg", "per"; 412 388 status = "disabled"; 413 389 }; ··· 419 393 compatible = "fsl,imx27-i2c", "fsl,imx21-i2c"; 420 394 reg = <0x1001d000 0x1000>; 421 395 interrupts = <1>; 422 - clocks = <&clks 39>; 396 + clocks = <&clks IMX27_CLK_I2C2_IPG_GATE>; 423 397 status = "disabled"; 424 398 }; 425 399 ··· 427 401 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc"; 428 402 reg = <0x1001e000 0x1000>; 429 403 interrupts = <9>; 430 - clocks = <&clks 28>, <&clks 60>; 404 + clocks = <&clks IMX27_CLK_SDHC3_IPG_GATE>, 405 + <&clks IMX27_CLK_PER2_GATE>; 431 406 clock-names = "ipg", "per"; 432 407 dmas = <&dma 36>; 433 408 dma-names = "rx-tx"; ··· 439 412 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 440 413 reg = <0x1001f000 0x1000>; 441 414 interrupts = <2>; 442 - clocks = <&clks 41>, <&clks 61>; 415 + clocks = <&clks IMX27_CLK_GPT6_IPG_GATE>, 416 + <&clks IMX27_CLK_PER1_GATE>; 443 417 clock-names = "ipg", "per"; 444 418 }; 445 419 }; ··· 456 428 compatible = "fsl,imx27-fb", "fsl,imx21-fb"; 457 429 interrupts = <61>; 458 430 reg = <0x10021000 0x1000>; 459 - clocks = <&clks 36>, <&clks 65>, <&clks 59>; 431 + clocks = <&clks IMX27_CLK_LCDC_IPG_GATE>, 432 + <&clks IMX27_CLK_LCDC_AHB_GATE>, 433 + <&clks IMX27_CLK_PER3_GATE>; 460 434 clock-names = "ipg", "ahb", "per"; 461 435 status = "disabled"; 462 436 }; ··· 467 437 compatible = "fsl,imx27-vpu"; 468 438 reg = <0x10023000 0x0200>; 469 439 interrupts = <53>; 470 - clocks = <&clks 57>, <&clks 66>; 440 + clocks = <&clks IMX27_CLK_VPU_BAUD_GATE>, 441 + <&clks IMX27_CLK_VPU_AHB_GATE>; 471 442 clock-names = "per", "ahb"; 472 443 iram = <&iram>; 473 444 }; ··· 477 446 compatible = "fsl,imx27-usb"; 478 447 reg = <0x10024000 0x200>; 479 448 interrupts = <56>; 480 - clocks = <&clks 75>; 449 + clocks = <&clks IMX27_CLK_USB_IPG_GATE>; 481 450 fsl,usbmisc = <&usbmisc 0>; 482 451 status = "disabled"; 483 452 }; ··· 486 455 compatible = "fsl,imx27-usb"; 487 456 reg = <0x10024200 0x200>; 488 457 interrupts = <54>; 489 - clocks = <&clks 75>; 458 + clocks = <&clks IMX27_CLK_USB_IPG_GATE>; 490 459 fsl,usbmisc = <&usbmisc 1>; 491 460 status = "disabled"; 492 461 }; ··· 495 464 compatible = "fsl,imx27-usb"; 496 465 reg = <0x10024400 0x200>; 497 466 interrupts = <55>; 498 - clocks = <&clks 75>; 467 + clocks = <&clks IMX27_CLK_USB_IPG_GATE>; 499 468 fsl,usbmisc = <&usbmisc 2>; 500 469 status = "disabled"; 501 470 }; ··· 504 473 #index-cells = <1>; 505 474 compatible = "fsl,imx27-usbmisc"; 506 475 reg = <0x10024600 0x200>; 507 - clocks = <&clks 62>; 476 + clocks = <&clks IMX27_CLK_USB_AHB_GATE>; 508 477 }; 509 478 510 479 sahara2: sahara@10025000 { 511 480 compatible = "fsl,imx27-sahara"; 512 481 reg = <0x10025000 0x1000>; 513 482 interrupts = <59>; 514 - clocks = <&clks 32>, <&clks 64>; 483 + clocks = <&clks IMX27_CLK_SAHARA_IPG_GATE>, 484 + <&clks IMX27_CLK_SAHARA_AHB_GATE>; 515 485 clock-names = "ipg", "ahb"; 516 486 }; 517 487 ··· 526 494 compatible = "fsl,imx27-iim"; 527 495 reg = <0x10028000 0x1000>; 528 496 interrupts = <62>; 529 - clocks = <&clks 38>; 497 + clocks = <&clks IMX27_CLK_IIM_IPG_GATE>; 530 498 }; 531 499 532 500 fec: ethernet@1002b000 { 533 501 compatible = "fsl,imx27-fec"; 534 502 reg = <0x1002b000 0x4000>; 535 503 interrupts = <50>; 536 - clocks = <&clks 48>, <&clks 67>; 504 + clocks = <&clks IMX27_CLK_FEC_IPG_GATE>, 505 + <&clks IMX27_CLK_FEC_AHB_GATE>; 537 506 clock-names = "ipg", "ahb"; 538 507 status = "disabled"; 539 508 }; ··· 546 513 compatible = "fsl,imx27-nand"; 547 514 reg = <0xd8000000 0x1000>; 548 515 interrupts = <29>; 549 - clocks = <&clks 54>; 516 + clocks = <&clks IMX27_CLK_NFC_BAUD_GATE>; 550 517 status = "disabled"; 551 518 }; 552 519 ··· 555 522 #size-cells = <1>; 556 523 compatible = "fsl,imx27-weim"; 557 524 reg = <0xd8002000 0x1000>; 558 - clocks = <&clks 0>; 525 + clocks = <&clks IMX27_CLK_EMI_AHB_GATE>; 559 526 ranges = < 560 527 0 0 0xc0000000 0x08000000 561 528 1 0 0xc8000000 0x08000000