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

dts: imx6: fix sd card gpio polarity specified in device tree

cd-gpios polarity should be changed to GPIO_ACTIVE_LOW and wp-gpios
should be changed to GPIO_ACTIVE_HIGH.
Otherwise, the SD may not work properly due to wrong polarity inversion
specified in DT after switch to common parsing function mmc_of_parse().

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Dong Aisheng and committed by
Ulf Hansson
89c1a8cf 94d76946

+55 -49
+4 -4
arch/arm/boot/dts/imx6dl-riotboard.dts
··· 305 305 &usdhc2 { 306 306 pinctrl-names = "default"; 307 307 pinctrl-0 = <&pinctrl_usdhc2>; 308 - cd-gpios = <&gpio1 4 0>; 309 - wp-gpios = <&gpio1 2 0>; 308 + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; 309 + wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; 310 310 vmmc-supply = <&reg_3p3v>; 311 311 status = "okay"; 312 312 }; ··· 314 314 &usdhc3 { 315 315 pinctrl-names = "default"; 316 316 pinctrl-0 = <&pinctrl_usdhc3>; 317 - cd-gpios = <&gpio7 0 0>; 318 - wp-gpios = <&gpio7 1 0>; 317 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 318 + wp-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; 319 319 vmmc-supply = <&reg_3p3v>; 320 320 status = "okay"; 321 321 };
+3 -2
arch/arm/boot/dts/imx6q-arm2.dts
··· 11 11 */ 12 12 13 13 /dts-v1/; 14 + #include <dt-bindings/gpio/gpio.h> 14 15 #include "imx6q.dtsi" 15 16 16 17 / { ··· 197 196 }; 198 197 199 198 &usdhc3 { 200 - cd-gpios = <&gpio6 11 0>; 201 - wp-gpios = <&gpio6 14 0>; 199 + cd-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; 200 + wp-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; 202 201 vmmc-supply = <&reg_3p3v>; 203 202 pinctrl-names = "default"; 204 203 pinctrl-0 = <&pinctrl_usdhc3
+2 -1
arch/arm/boot/dts/imx6q-gk802.dts
··· 7 7 */ 8 8 9 9 /dts-v1/; 10 + #include <dt-bindings/gpio/gpio.h> 10 11 #include "imx6q.dtsi" 11 12 12 13 / { ··· 162 161 pinctrl-names = "default"; 163 162 pinctrl-0 = <&pinctrl_usdhc3>; 164 163 bus-width = <4>; 165 - cd-gpios = <&gpio6 11 0>; 164 + cd-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; 166 165 vmmc-supply = <&reg_3p3v>; 167 166 status = "okay"; 168 167 };
+2 -2
arch/arm/boot/dts/imx6q-tbs2910.dts
··· 251 251 pinctrl-names = "default"; 252 252 pinctrl-0 = <&pinctrl_usdhc2>; 253 253 bus-width = <4>; 254 - cd-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; 254 + cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; 255 255 vmmc-supply = <&reg_3p3v>; 256 256 status = "okay"; 257 257 }; ··· 260 260 pinctrl-names = "default"; 261 261 pinctrl-0 = <&pinctrl_usdhc3>; 262 262 bus-width = <4>; 263 - cd-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; 263 + cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; 264 264 wp-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 265 265 vmmc-supply = <&reg_3p3v>; 266 266 status = "okay";
+2 -2
arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
··· 173 173 pinctrl-names = "default"; 174 174 pinctrl-0 = <&pinctrl_usdhc1>; 175 175 vmmc-supply = <&reg_3p3v>; 176 - cd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; 176 + cd-gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; 177 177 status = "okay"; 178 178 }; 179 179 ··· 181 181 pinctrl-names = "default"; 182 182 pinctrl-0 = <&pinctrl_usdhc2>; 183 183 vmmc-supply = <&reg_3p3v>; 184 - cd-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; 184 + cd-gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; 185 185 status = "okay"; 186 186 }; 187 187
+2 -2
arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
··· 392 392 &usdhc1 { 393 393 pinctrl-names = "default"; 394 394 pinctrl-0 = <&pinctrl_usdhc1>; 395 - cd-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; 395 + cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; 396 396 no-1-8-v; 397 397 status = "okay"; 398 398 }; ··· 400 400 &usdhc2 { 401 401 pinctrl-names = "default"; 402 402 pinctrl-0 = <&pinctrl_usdhc2>; 403 - cd-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; 403 + cd-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; 404 404 wp-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; 405 405 no-1-8-v; 406 406 status = "okay";
+1 -1
arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
··· 258 258 pinctrl-names = "default"; 259 259 pinctrl-0 = <&pinctrl_cubox_i_usdhc2_aux &pinctrl_cubox_i_usdhc2>; 260 260 vmmc-supply = <&reg_3p3v>; 261 - cd-gpios = <&gpio1 4 0>; 261 + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; 262 262 status = "okay"; 263 263 };
+3 -1
arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi
··· 1 + #include <dt-bindings/gpio/gpio.h> 2 + 1 3 / { 2 4 regulators { 3 5 compatible = "simple-bus"; ··· 183 181 &usdhc2 { /* module slot */ 184 182 pinctrl-names = "default"; 185 183 pinctrl-0 = <&pinctrl_usdhc2>; 186 - cd-gpios = <&gpio2 2 0>; 184 + cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; 187 185 status = "okay"; 188 186 }; 189 187
+1 -1
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
··· 318 318 &usdhc3 { 319 319 pinctrl-names = "default"; 320 320 pinctrl-0 = <&pinctrl_usdhc3>; 321 - cd-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; 321 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 322 322 vmmc-supply = <&reg_3p3v>; 323 323 status = "okay"; 324 324 };
+1 -1
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
··· 324 324 &usdhc3 { 325 325 pinctrl-names = "default"; 326 326 pinctrl-0 = <&pinctrl_usdhc3>; 327 - cd-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; 327 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 328 328 vmmc-supply = <&reg_3p3v>; 329 329 status = "okay"; 330 330 };
+1 -1
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
··· 417 417 &usdhc3 { 418 418 pinctrl-names = "default"; 419 419 pinctrl-0 = <&pinctrl_usdhc3>; 420 - cd-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; 420 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 421 421 vmmc-supply = <&reg_3p3v>; 422 422 status = "okay"; 423 423 };
+1 -1
arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
··· 299 299 &pinctrl_hummingboard_usdhc2 300 300 >; 301 301 vmmc-supply = <&reg_3p3v>; 302 - cd-gpios = <&gpio1 4 0>; 302 + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; 303 303 status = "okay"; 304 304 };
+2 -2
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
··· 453 453 &usdhc3 { 454 454 pinctrl-names = "default"; 455 455 pinctrl-0 = <&pinctrl_usdhc3>; 456 - cd-gpios = <&gpio7 0 0>; 456 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 457 457 vmmc-supply = <&reg_3p3v>; 458 458 status = "okay"; 459 459 }; ··· 461 461 &usdhc4 { 462 462 pinctrl-names = "default"; 463 463 pinctrl-0 = <&pinctrl_usdhc4>; 464 - cd-gpios = <&gpio2 6 0>; 464 + cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; 465 465 vmmc-supply = <&reg_3p3v>; 466 466 status = "okay"; 467 467 };
+4 -4
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
··· 409 409 &usdhc2 { 410 410 pinctrl-names = "default"; 411 411 pinctrl-0 = <&pinctrl_usdhc2>; 412 - cd-gpios = <&gpio1 4 0>; 413 - wp-gpios = <&gpio1 2 0>; 412 + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; 413 + wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; 414 414 status = "disabled"; 415 415 }; 416 416 ··· 418 418 pinctrl-names = "default"; 419 419 pinctrl-0 = <&pinctrl_usdhc3 420 420 &pinctrl_usdhc3_cdwp>; 421 - cd-gpios = <&gpio1 27 0>; 422 - wp-gpios = <&gpio1 29 0>; 421 + cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; 422 + wp-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; 423 423 status = "disabled"; 424 424 };
+2 -2
arch/arm/boot/dts/imx6qdl-rex.dtsi
··· 342 342 pinctrl-0 = <&pinctrl_usdhc2>; 343 343 bus-width = <4>; 344 344 cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; 345 - wp-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; 345 + wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 346 346 status = "okay"; 347 347 }; 348 348 ··· 351 351 pinctrl-0 = <&pinctrl_usdhc3>; 352 352 bus-width = <4>; 353 353 cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; 354 - wp-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; 354 + wp-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 355 355 status = "okay"; 356 356 };
+2 -2
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
··· 467 467 pinctrl-0 = <&pinctrl_usdhc3>; 468 468 pinctrl-1 = <&pinctrl_usdhc3_100mhz>; 469 469 pinctrl-2 = <&pinctrl_usdhc3_200mhz>; 470 - cd-gpios = <&gpio6 15 0>; 471 - wp-gpios = <&gpio1 13 0>; 470 + cd-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>; 471 + wp-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 472 472 status = "okay"; 473 473 }; 474 474
+3 -3
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
··· 448 448 &usdhc3 { 449 449 pinctrl-names = "default"; 450 450 pinctrl-0 = <&pinctrl_usdhc3>; 451 - cd-gpios = <&gpio7 0 0>; 452 - wp-gpios = <&gpio7 1 0>; 451 + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 452 + wp-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; 453 453 vmmc-supply = <&reg_3p3v>; 454 454 status = "okay"; 455 455 }; ··· 457 457 &usdhc4 { 458 458 pinctrl-names = "default"; 459 459 pinctrl-0 = <&pinctrl_usdhc4>; 460 - cd-gpios = <&gpio2 6 0>; 460 + cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; 461 461 vmmc-supply = <&reg_3p3v>; 462 462 status = "okay"; 463 463 };
+4 -4
arch/arm/boot/dts/imx6qdl-sabresd.dtsi
··· 562 562 pinctrl-names = "default"; 563 563 pinctrl-0 = <&pinctrl_usdhc2>; 564 564 bus-width = <8>; 565 - cd-gpios = <&gpio2 2 0>; 566 - wp-gpios = <&gpio2 3 0>; 565 + cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; 566 + wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 567 567 status = "okay"; 568 568 }; 569 569 ··· 571 571 pinctrl-names = "default"; 572 572 pinctrl-0 = <&pinctrl_usdhc3>; 573 573 bus-width = <8>; 574 - cd-gpios = <&gpio2 0 0>; 575 - wp-gpios = <&gpio2 1 0>; 574 + cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; 575 + wp-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 576 576 status = "okay"; 577 577 }; 578 578
+2 -2
arch/arm/boot/dts/imx6qdl-tx6.dtsi
··· 680 680 pinctrl-0 = <&pinctrl_usdhc1>; 681 681 bus-width = <4>; 682 682 no-1-8-v; 683 - cd-gpios = <&gpio7 2 0>; 683 + cd-gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; 684 684 fsl,wp-controller; 685 685 status = "okay"; 686 686 }; ··· 690 690 pinctrl-0 = <&pinctrl_usdhc2>; 691 691 bus-width = <4>; 692 692 no-1-8-v; 693 - cd-gpios = <&gpio7 3 0>; 693 + cd-gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; 694 694 fsl,wp-controller; 695 695 status = "okay"; 696 696 };
+4 -2
arch/arm/boot/dts/imx6qdl-wandboard.dtsi
··· 9 9 * 10 10 */ 11 11 12 + #include <dt-bindings/gpio/gpio.h> 13 + 12 14 / { 13 15 regulators { 14 16 compatible = "simple-bus"; ··· 252 250 &usdhc1 { 253 251 pinctrl-names = "default"; 254 252 pinctrl-0 = <&pinctrl_usdhc1>; 255 - cd-gpios = <&gpio1 2 0>; 253 + cd-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; 256 254 status = "okay"; 257 255 }; 258 256 259 257 &usdhc3 { 260 258 pinctrl-names = "default"; 261 259 pinctrl-0 = <&pinctrl_usdhc3>; 262 - cd-gpios = <&gpio3 9 0>; 260 + cd-gpios = <&gpio3 9 GPIO_ACTIVE_LOW>; 263 261 status = "okay"; 264 262 };
+5 -5
arch/arm/boot/dts/imx6sl-evk.dts
··· 617 617 pinctrl-1 = <&pinctrl_usdhc1_100mhz>; 618 618 pinctrl-2 = <&pinctrl_usdhc1_200mhz>; 619 619 bus-width = <8>; 620 - cd-gpios = <&gpio4 7 0>; 621 - wp-gpios = <&gpio4 6 0>; 620 + cd-gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; 621 + wp-gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; 622 622 status = "okay"; 623 623 }; 624 624 ··· 627 627 pinctrl-0 = <&pinctrl_usdhc2>; 628 628 pinctrl-1 = <&pinctrl_usdhc2_100mhz>; 629 629 pinctrl-2 = <&pinctrl_usdhc2_200mhz>; 630 - cd-gpios = <&gpio5 0 0>; 631 - wp-gpios = <&gpio4 29 0>; 630 + cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; 631 + wp-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; 632 632 status = "okay"; 633 633 }; 634 634 ··· 637 637 pinctrl-0 = <&pinctrl_usdhc3>; 638 638 pinctrl-1 = <&pinctrl_usdhc3_100mhz>; 639 639 pinctrl-2 = <&pinctrl_usdhc3_200mhz>; 640 - cd-gpios = <&gpio3 22 0>; 640 + cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; 641 641 status = "okay"; 642 642 };
+2 -2
arch/arm/boot/dts/imx6sx-sabreauto.dts
··· 49 49 pinctrl-1 = <&pinctrl_usdhc3_100mhz>; 50 50 pinctrl-2 = <&pinctrl_usdhc3_200mhz>; 51 51 bus-width = <8>; 52 - cd-gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>; 52 + cd-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>; 53 53 wp-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; 54 54 keep-power-in-suspend; 55 55 enable-sdio-wakeup; ··· 61 61 pinctrl-names = "default"; 62 62 pinctrl-0 = <&pinctrl_usdhc4>; 63 63 bus-width = <8>; 64 - cd-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>; 64 + cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>; 65 65 no-1-8-v; 66 66 keep-power-in-suspend; 67 67 enable-sdio-wakup;
+2 -2
arch/arm/boot/dts/imx6sx-sdb.dtsi
··· 293 293 pinctrl-1 = <&pinctrl_usdhc3_100mhz>; 294 294 pinctrl-2 = <&pinctrl_usdhc3_200mhz>; 295 295 bus-width = <8>; 296 - cd-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; 296 + cd-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; 297 297 wp-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>; 298 298 keep-power-in-suspend; 299 299 enable-sdio-wakeup; ··· 304 304 &usdhc4 { 305 305 pinctrl-names = "default"; 306 306 pinctrl-0 = <&pinctrl_usdhc4>; 307 - cd-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>; 307 + cd-gpios = <&gpio6 21 GPIO_ACTIVE_LOW>; 308 308 wp-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>; 309 309 status = "okay"; 310 310 };