aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-05 15:45:39 -0500
committerOlof Johansson <olof@lixom.net>2013-02-05 15:45:39 -0500
commitceca718f21270dcd7cdf7e124f15b35cb68eca13 (patch)
treeaeb6503eafe39032d624ebf30368d414196afbaa /arch
parentbda6f8e6cdcdb55db9b2961b6a7c9d0d97da4765 (diff)
parentab137d04db5a4b32250ce5ef1b288ce6cf06adf6 (diff)
Merge tag 'tegra-for-3.9-soc-usb' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc
From Stephen Warren: ARM: tegra: USB driver cleanup The Tegra USB driver has a number of issues: 1) The PHY driver isn't a true platform device, and doesn't implement the standard USB PHY API. 2) struct device instance numbers were used to make decisions in the driver, rather than being parameterized by DT or platform data. This pull request solves issue (2), and lays the groundwork for solving issue (1). The work on issue (1) involved introducing new DT nodes for the USB PHYs, which in turn interacted with the Tegra common clock framework changes, due to the move of clock lookups into device tree. Hence, these USB driver changes are taken through the Tegra tree with acks from USB maintainers. This pull request is based on the previous pull request, with tag tegra-for-3.9-soc-ccf. * tag 'tegra-for-3.9-soc-usb' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: usb: host: tegra: make use of PHY pointer of HCD ARM: tegra: Add reset GPIO information to PHY DT node usb: host: tegra: don't touch EMC clock usb: add APIs to access host registers from Tegra PHY USB: PHY: tegra: Get rid of instance number to differentiate PHY type USB: PHY: tegra: get rid of instance number to differentiate legacy controller ARM: tegra: add clocks properties to USB PHY nodes ARM: tegra: add DT nodes for Tegra USB PHY usb: phy: remove unused APIs from Tegra PHY. usb: host: tegra: Resetting PORT0 based on information received via DT. ARM: tegra: Add new DT property to USB node. usb: phy: use kzalloc to allocate struct tegra_usb_phy ARM: tegra: remove USB address related macros from iomap.h
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/tegra20-harmony.dts4
-rw-r--r--arch/arm/boot/dts/tegra20-paz00.dts4
-rw-r--r--arch/arm/boot/dts/tegra20-seaboard.dts4
-rw-r--r--arch/arm/boot/dts/tegra20-trimslice.dts4
-rw-r--r--arch/arm/boot/dts/tegra20-ventana.dts4
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi29
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c6
-rw-r--r--arch/arm/mach-tegra/iomap.h9
8 files changed, 52 insertions, 12 deletions
diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 43eb72af8948..2b4169702c8d 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -432,6 +432,10 @@
432 status = "okay"; 432 status = "okay";
433 }; 433 };
434 434
435 usb-phy@c5004400 {
436 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
437 };
438
435 sdhci@c8000200 { 439 sdhci@c8000200 {
436 status = "okay"; 440 status = "okay";
437 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 441 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index a965fe9c7aa1..11b30db63ff2 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -420,6 +420,10 @@
420 status = "okay"; 420 status = "okay";
421 }; 421 };
422 422
423 usb-phy@c5004400 {
424 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
425 };
426
423 sdhci@c8000000 { 427 sdhci@c8000000 {
424 status = "okay"; 428 status = "okay";
425 cd-gpios = <&gpio 173 0>; /* gpio PV5 */ 429 cd-gpios = <&gpio 173 0>; /* gpio PV5 */
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index 420459825b46..607bf0c6bf9c 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -561,6 +561,10 @@
561 status = "okay"; 561 status = "okay";
562 }; 562 };
563 563
564 usb-phy@c5004400 {
565 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
566 };
567
564 sdhci@c8000000 { 568 sdhci@c8000000 {
565 status = "okay"; 569 status = "okay";
566 power-gpios = <&gpio 86 0>; /* gpio PK6 */ 570 power-gpios = <&gpio 86 0>; /* gpio PK6 */
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index b70b4cb754c8..e47cf6a58b6f 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -310,6 +310,10 @@
310 status = "okay"; 310 status = "okay";
311 }; 311 };
312 312
313 usb-phy@c5004400 {
314 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
315 };
316
313 sdhci@c8000000 { 317 sdhci@c8000000 {
314 status = "okay"; 318 status = "okay";
315 bus-width = <4>; 319 bus-width = <4>;
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index adc47547eaae..f6c61d10fd27 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -497,6 +497,10 @@
497 status = "okay"; 497 status = "okay";
498 }; 498 };
499 499
500 usb-phy@c5004400 {
501 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
502 };
503
500 sdhci@c8000000 { 504 sdhci@c8000000 {
501 status = "okay"; 505 status = "okay";
502 power-gpios = <&gpio 86 0>; /* gpio PK6 */ 506 power-gpios = <&gpio 86 0>; /* gpio PK6 */
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index d665a67d4358..649391579871 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -400,6 +400,31 @@
400 #size-cells = <0>; 400 #size-cells = <0>;
401 }; 401 };
402 402
403 phy1: usb-phy@c5000400 {
404 compatible = "nvidia,tegra20-usb-phy";
405 reg = <0xc5000400 0x3c00>;
406 phy_type = "utmi";
407 nvidia,has-legacy-mode;
408 clocks = <&tegra_car 22>, <&tegra_car 127>;
409 clock-names = "phy", "pll_u";
410 };
411
412 phy2: usb-phy@c5004400 {
413 compatible = "nvidia,tegra20-usb-phy";
414 reg = <0xc5004400 0x3c00>;
415 phy_type = "ulpi";
416 clocks = <&tegra_car 94>, <&tegra_car 127>;
417 clock-names = "phy", "pll_u";
418 };
419
420 phy3: usb-phy@c5008400 {
421 compatible = "nvidia,tegra20-usb-phy";
422 reg = <0xc5008400 0x3C00>;
423 phy_type = "utmi";
424 clocks = <&tegra_car 22>, <&tegra_car 127>;
425 clock-names = "phy", "pll_u";
426 };
427
403 usb@c5000000 { 428 usb@c5000000 {
404 compatible = "nvidia,tegra20-ehci", "usb-ehci"; 429 compatible = "nvidia,tegra20-ehci", "usb-ehci";
405 reg = <0xc5000000 0x4000>; 430 reg = <0xc5000000 0x4000>;
@@ -407,6 +432,8 @@
407 phy_type = "utmi"; 432 phy_type = "utmi";
408 nvidia,has-legacy-mode; 433 nvidia,has-legacy-mode;
409 clocks = <&tegra_car 22>; 434 clocks = <&tegra_car 22>;
435 nvidia,needs-double-reset;
436 nvidia,phy = <&phy1>;
410 status = "disabled"; 437 status = "disabled";
411 }; 438 };
412 439
@@ -416,6 +443,7 @@
416 interrupts = <0 21 0x04>; 443 interrupts = <0 21 0x04>;
417 phy_type = "ulpi"; 444 phy_type = "ulpi";
418 clocks = <&tegra_car 58>; 445 clocks = <&tegra_car 58>;
446 nvidia,phy = <&phy2>;
419 status = "disabled"; 447 status = "disabled";
420 }; 448 };
421 449
@@ -425,6 +453,7 @@
425 interrupts = <0 97 0x04>; 453 interrupts = <0 97 0x04>;
426 phy_type = "utmi"; 454 phy_type = "utmi";
427 clocks = <&tegra_car 59>; 455 clocks = <&tegra_car 59>;
456 nvidia,phy = <&phy3>;
428 status = "disabled"; 457 status = "disabled";
429 }; 458 };
430 459
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index abdbe9e658f9..a0edf2510280 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -68,11 +68,11 @@ static struct tegra_ehci_platform_data tegra_ehci3_pdata = {
68}; 68};
69 69
70static struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { 70static struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
71 OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB_BASE, "tegra-ehci.0", 71 OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5000000, "tegra-ehci.0",
72 &tegra_ehci1_pdata), 72 &tegra_ehci1_pdata),
73 OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB2_BASE, "tegra-ehci.1", 73 OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5004000, "tegra-ehci.1",
74 &tegra_ehci2_pdata), 74 &tegra_ehci2_pdata),
75 OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2", 75 OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5008000, "tegra-ehci.2",
76 &tegra_ehci3_pdata), 76 &tegra_ehci3_pdata),
77 {} 77 {}
78}; 78};
diff --git a/arch/arm/mach-tegra/iomap.h b/arch/arm/mach-tegra/iomap.h
index db8be51cad80..399fbca27102 100644
--- a/arch/arm/mach-tegra/iomap.h
+++ b/arch/arm/mach-tegra/iomap.h
@@ -240,15 +240,6 @@
240#define TEGRA_CSITE_BASE 0x70040000 240#define TEGRA_CSITE_BASE 0x70040000
241#define TEGRA_CSITE_SIZE SZ_256K 241#define TEGRA_CSITE_SIZE SZ_256K
242 242
243#define TEGRA_USB_BASE 0xC5000000
244#define TEGRA_USB_SIZE SZ_16K
245
246#define TEGRA_USB2_BASE 0xC5004000
247#define TEGRA_USB2_SIZE SZ_16K
248
249#define TEGRA_USB3_BASE 0xC5008000
250#define TEGRA_USB3_SIZE SZ_16K
251
252#define TEGRA_SDMMC1_BASE 0xC8000000 243#define TEGRA_SDMMC1_BASE 0xC8000000
253#define TEGRA_SDMMC1_SIZE SZ_512 244#define TEGRA_SDMMC1_SIZE SZ_512
254 245