Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d9e33b59
Commit
d9e33b59
authored
May 14, 2012
by
Stephen Warren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-3.5/usb-ulpi' into for-3.5/dt2-new
parents
8c6a3852
563da21b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
85 additions
and
42 deletions
+85
-42
Documentation/devicetree/bindings/usb/tegra-usb.txt
Documentation/devicetree/bindings/usb/tegra-usb.txt
+3
-0
arch/arm/boot/dts/tegra-harmony.dts
arch/arm/boot/dts/tegra-harmony.dts
+14
-10
arch/arm/boot/dts/tegra-paz00.dts
arch/arm/boot/dts/tegra-paz00.dts
+9
-9
arch/arm/boot/dts/tegra-seaboard.dts
arch/arm/boot/dts/tegra-seaboard.dts
+4
-0
arch/arm/boot/dts/tegra-trimslice.dts
arch/arm/boot/dts/tegra-trimslice.dts
+13
-9
arch/arm/boot/dts/tegra-ventana.dts
arch/arm/boot/dts/tegra-ventana.dts
+4
-0
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-paz00.c
+2
-1
arch/arm/mach-tegra/board-trimslice.c
arch/arm/mach-tegra/board-trimslice.c
+2
-0
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/common.c
+6
-4
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.c
+2
-3
arch/arm/mach-tegra/devices.h
arch/arm/mach-tegra/devices.h
+4
-0
arch/arm/mach-tegra/include/mach/usb_phy.h
arch/arm/mach-tegra/include/mach/usb_phy.h
+2
-2
arch/arm/mach-tegra/tegra2_clocks.c
arch/arm/mach-tegra/tegra2_clocks.c
+4
-0
arch/arm/mach-tegra/usb_phy.c
arch/arm/mach-tegra/usb_phy.c
+13
-2
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci-tegra.c
+3
-2
No files found.
Documentation/devicetree/bindings/usb/tegra-usb.txt
View file @
d9e33b59
...
...
@@ -12,6 +12,9 @@ Required properties :
- nvidia,vbus-gpio : If present, specifies a gpio that needs to be
activated for the bus to be powered.
Required properties for phy_type == ulpi:
- nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
Optional properties:
- dr_mode : dual role mode. Indicates the working mode for
nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral",
...
...
arch/arm/boot/dts/tegra-harmony.dts
View file @
d9e33b59
...
...
@@ -167,28 +167,28 @@ uca {
};
conf_ata
{
nvidia
,
pins
=
"ata"
,
"atb"
,
"atc"
,
"atd"
,
"ate"
,
"cdev1"
,
"
dap1"
,
"dtb"
,
"gma"
,
"gmb
"
,
"gm
c"
,
"gmd"
,
"gme"
,
"gpu7"
,
"gpv
"
,
"
i2cp"
,
"pta"
,
"rm"
,
"slxa"
,
"slxk
"
,
"s
pia"
,
"spib
"
;
"cdev1"
,
"
cdev2"
,
"dap1"
,
"dtb"
,
"gma
"
,
"gm
b"
,
"gmc"
,
"gmd"
,
"gme"
,
"gpu7
"
,
"
gpv"
,
"i2cp"
,
"pta"
,
"rm"
,
"slxa
"
,
"s
lxk"
,
"spia"
,
"spib"
,
"uac
"
;
nvidia
,
pull
=
<
0
>;
nvidia
,
tristate
=
<
0
>;
};
conf_cdev2
{
nvidia
,
pins
=
"cdev2"
,
"csus"
,
"spid"
,
"spif"
;
nvidia
,
pull
=
<
1
>;
nvidia
,
tristate
=
<
1
>;
};
conf_ck32
{
nvidia
,
pins
=
"ck32"
,
"ddrc"
,
"pmca"
,
"pmcb"
,
"pmcc"
,
"pmcd"
,
"pmce"
,
"xm2c"
,
"xm2d"
;
nvidia
,
pull
=
<
0
>;
};
conf_csus
{
nvidia
,
pins
=
"csus"
,
"spid"
,
"spif"
;
nvidia
,
pull
=
<
1
>;
nvidia
,
tristate
=
<
1
>;
};
conf_crtp
{
nvidia
,
pins
=
"crtp"
,
"dap2"
,
"dap3"
,
"dap4"
,
"dtc"
,
"dte"
,
"dtf"
,
"gpu"
,
"sdio1"
,
"slxc"
,
"slxd"
,
"spdi"
,
"spdo"
,
"spig"
,
"u
ac"
,
"u
da"
;
"uda"
;
nvidia
,
pull
=
<
0
>;
nvidia
,
tristate
=
<
1
>;
};
...
...
@@ -336,4 +336,8 @@ sdhci@c8000600 {
power
-
gpios
=
<&
gpio
70
0
>;
/*
gpio
PI6
*/
support
-
8
bit
;
};
usb
@
c5004000
{
nvidia
,
phy
-
reset
-
gpio
=
<&
gpio
169
0
>;
/*
gpio
PV1
*/
};
};
arch/arm/boot/dts/tegra-paz00.dts
View file @
d9e33b59
...
...
@@ -159,18 +159,14 @@ uca {
};
conf_ata
{
nvidia
,
pins
=
"ata"
,
"atb"
,
"atc"
,
"atd"
,
"ate"
,
"cdev1"
,
"dap1"
,
"dap2"
,
"dtf"
,
"gma"
,
"gmb"
,
"gmc"
,
"gmd"
,
"gme"
,
"gpu"
,
"gpu7"
,
"gpv"
,
"i2cp"
,
"pta"
,
"rm"
,
"sdio1"
,
"slxk"
,
"spdo"
,
"uac"
,
"uda"
;
"cdev1"
,
"cdev2"
,
"dap1"
,
"dap2"
,
"dtf"
,
"gma"
,
"gmb"
,
"gmc"
,
"gmd"
,
"gme"
,
"gpu"
,
"gpu7"
,
"gpv"
,
"i2cp"
,
"pta"
,
"rm"
,
"sdio1"
,
"slxk"
,
"spdo"
,
"uac"
,
"uda"
;
nvidia
,
pull
=
<
0
>;
nvidia
,
tristate
=
<
0
>;
};
conf_cdev2
{
nvidia
,
pins
=
"cdev2"
;
nvidia
,
pull
=
<
1
>;
nvidia
,
tristate
=
<
0
>;
};
conf_ck32
{
nvidia
,
pins
=
"ck32"
,
"ddrc"
,
"pmca"
,
"pmcb"
,
"pmcc"
,
"pmcd"
,
"pmce"
,
"xm2c"
,
"xm2d"
;
...
...
@@ -351,4 +347,8 @@ wifi {
linux
,
default
-
trigger
=
"rfkill0"
;
};
};
usb
@
c5004000
{
nvidia
,
phy
-
reset
-
gpio
=
<&
gpio
168
0
>;
/*
gpio
PV0
*/
};
};
arch/arm/boot/dts/tegra-seaboard.dts
View file @
d9e33b59
...
...
@@ -415,4 +415,8 @@ emc-table@380000 {
0x00000000
0x00000000
0x00000000
0x00000000
>;
};
};
usb
@
c5004000
{
nvidia
,
phy
-
reset
-
gpio
=
<&
gpio
169
0
>;
/*
gpio
PV1
*/
};
};
arch/arm/boot/dts/tegra-trimslice.dts
View file @
d9e33b59
...
...
@@ -182,23 +182,23 @@ conf_ata {
nvidia
,
tristate
=
<
1
>;
};
conf_atb
{
nvidia
,
pins
=
"atb"
,
"cdev1"
,
"
dap1"
,
"gma
"
,
"gm
c"
,
"gmd"
,
"gpu"
,
"gpu7"
,
"gpv
"
,
"sdio1"
,
"slxa"
,
"slxk"
,
"uac"
;
nvidia
,
pins
=
"atb"
,
"cdev1"
,
"
cdev2"
,
"dap1
"
,
"gm
a"
,
"gmc"
,
"gmd"
,
"gpu"
,
"gpu7
"
,
"
gpv"
,
"
sdio1"
,
"slxa"
,
"slxk"
,
"uac"
;
nvidia
,
pull
=
<
0
>;
nvidia
,
tristate
=
<
0
>;
};
conf_cdev2
{
nvidia
,
pins
=
"cdev2"
,
"csus"
,
"spia"
,
"spib"
,
"spid"
,
"spif"
;
nvidia
,
pull
=
<
1
>;
nvidia
,
tristate
=
<
1
>;
};
conf_ck32
{
nvidia
,
pins
=
"ck32"
,
"ddrc"
,
"pmca"
,
"pmcb"
,
"pmcc"
,
"pmcd"
,
"pmce"
,
"xm2c"
,
"xm2d"
;
nvidia
,
pull
=
<
0
>;
};
conf_csus
{
nvidia
,
pins
=
"csus"
,
"spia"
,
"spib"
,
"spid"
,
"spif"
;
nvidia
,
pull
=
<
1
>;
nvidia
,
tristate
=
<
1
>;
};
conf_ddc
{
nvidia
,
pins
=
"ddc"
,
"dtf"
,
"rm"
,
"sdc"
,
"sdd"
;
nvidia
,
pull
=
<
2
>;
...
...
@@ -304,4 +304,8 @@ sdhci@c8000600 {
cd
-
gpios
=
<&
gpio
121
0
>;
wp
-
gpios
=
<&
gpio
122
0
>;
};
usb
@
c5004000
{
nvidia
,
phy
-
reset
-
gpio
=
<&
gpio
168
0
>;
/*
gpio
PV0
*/
};
};
arch/arm/boot/dts/tegra-ventana.dts
View file @
d9e33b59
...
...
@@ -335,4 +335,8 @@ sdhci@c8000400 {
sdhci
@
c8000600
{
support
-
8
bit
;
};
usb
@
c5004000
{
nvidia
,
phy
-
reset
-
gpio
=
<&
gpio
169
0
>;
/*
gpio
PV1
*/
};
};
arch/arm/mach-tegra/board-paz00.c
View file @
d9e33b59
...
...
@@ -159,6 +159,8 @@ static void paz00_i2c_init(void)
static
void
paz00_usb_init
(
void
)
{
tegra_ehci2_ulpi_phy_config
.
reset_gpio
=
TEGRA_ULPI_RST
;
platform_device_register
(
&
tegra_ehci2_device
);
platform_device_register
(
&
tegra_ehci3_device
);
}
...
...
@@ -176,7 +178,6 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
{
"uarta"
,
"pll_p"
,
216000000
,
true
},
{
"uartc"
,
"pll_p"
,
216000000
,
true
},
{
"pll_p_out4"
,
"pll_p"
,
24000000
,
true
},
{
"usbd"
,
"clk_m"
,
12000000
,
false
},
{
"usb2"
,
"clk_m"
,
12000000
,
false
},
{
"usb3"
,
"clk_m"
,
12000000
,
false
},
...
...
arch/arm/mach-tegra/board-trimslice.c
View file @
d9e33b59
...
...
@@ -117,6 +117,8 @@ static void trimslice_usb_init(void)
pdata
=
tegra_ehci1_device
.
dev
.
platform_data
;
pdata
->
vbus_gpio
=
TRIMSLICE_GPIO_USB1_MODE
;
tegra_ehci2_ulpi_phy_config
.
reset_gpio
=
TEGRA_GPIO_PV0
;
platform_device_register
(
&
tegra_ehci3_device
);
platform_device_register
(
&
tegra_ehci2_device
);
platform_device_register
(
&
tegra_ehci1_device
);
...
...
arch/arm/mach-tegra/common.c
View file @
d9e33b59
...
...
@@ -82,10 +82,12 @@ static __initdata struct tegra_clk_init_table tegra20_clk_init_table[] = {
{
"pll_p_out1"
,
"pll_p"
,
28800000
,
true
},
{
"pll_p_out2"
,
"pll_p"
,
48000000
,
true
},
{
"pll_p_out3"
,
"pll_p"
,
72000000
,
true
},
{
"pll_p_out4"
,
"pll_p"
,
108000000
,
true
},
{
"sclk"
,
"pll_p_out4"
,
108000000
,
true
},
{
"hclk"
,
"sclk"
,
108000000
,
true
},
{
"pclk"
,
"hclk"
,
54000000
,
true
},
{
"pll_p_out4"
,
"pll_p"
,
24000000
,
true
},
{
"pll_c"
,
"clk_m"
,
600000000
,
true
},
{
"pll_c_out1"
,
"pll_c"
,
120000000
,
true
},
{
"sclk"
,
"pll_c_out1"
,
120000000
,
true
},
{
"hclk"
,
"sclk"
,
120000000
,
true
},
{
"pclk"
,
"hclk"
,
60000000
,
true
},
{
"csite"
,
NULL
,
0
,
true
},
{
"emc"
,
NULL
,
0
,
true
},
{
"cpu"
,
NULL
,
0
,
true
},
...
...
arch/arm/mach-tegra/devices.c
View file @
d9e33b59
...
...
@@ -439,9 +439,8 @@ static struct resource tegra_usb3_resources[] = {
},
};
static
struct
tegra_ulpi_config
tegra_ehci2_ulpi_phy_config
=
{
/* All existing boards use GPIO PV0 for phy reset */
.
reset_gpio
=
TEGRA_GPIO_PV0
,
struct
tegra_ulpi_config
tegra_ehci2_ulpi_phy_config
=
{
.
reset_gpio
=
-
1
,
.
clk
=
"cdev2"
,
};
...
...
arch/arm/mach-tegra/devices.h
View file @
d9e33b59
...
...
@@ -22,6 +22,10 @@
#include <linux/platform_device.h>
#include <linux/platform_data/tegra_usb.h>
#include <mach/usb_phy.h>
extern
struct
tegra_ulpi_config
tegra_ehci2_ulpi_phy_config
;
extern
struct
tegra_ehci_platform_data
tegra_ehci1_pdata
;
extern
struct
tegra_ehci_platform_data
tegra_ehci2_pdata
;
extern
struct
tegra_ehci_platform_data
tegra_ehci3_pdata
;
...
...
arch/arm/mach-tegra/include/mach/usb_phy.h
View file @
d9e33b59
...
...
@@ -61,8 +61,8 @@ struct tegra_usb_phy {
struct
usb_phy
*
ulpi
;
};
struct
tegra_usb_phy
*
tegra_usb_phy_open
(
int
instance
,
void
__iomem
*
regs
,
void
*
config
,
enum
tegra_usb_phy_mode
phy_mode
);
struct
tegra_usb_phy
*
tegra_usb_phy_open
(
struct
device
*
dev
,
int
instance
,
void
__iomem
*
regs
,
void
*
config
,
enum
tegra_usb_phy_mode
phy_mode
);
int
tegra_usb_phy_power_on
(
struct
tegra_usb_phy
*
phy
);
...
...
arch/arm/mach-tegra/tegra2_clocks.c
View file @
d9e33b59
...
...
@@ -1486,6 +1486,10 @@ static struct clk tegra_clk_m = {
};
static
struct
clk_pll_freq_table
tegra_pll_c_freq_table
[]
=
{
{
12000000
,
600000000
,
600
,
12
,
1
,
8
},
{
13000000
,
600000000
,
600
,
13
,
1
,
8
},
{
19200000
,
600000000
,
500
,
16
,
1
,
6
},
{
26000000
,
600000000
,
600
,
26
,
1
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
},
};
...
...
arch/arm/mach-tegra/usb_phy.c
View file @
d9e33b59
...
...
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/of_gpio.h>
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
#include <asm/mach-types.h>
...
...
@@ -654,8 +655,8 @@ static void ulpi_phy_power_off(struct tegra_usb_phy *phy)
clk_disable
(
phy
->
clk
);
}
struct
tegra_usb_phy
*
tegra_usb_phy_open
(
int
instance
,
void
__iomem
*
regs
,
void
*
config
,
enum
tegra_usb_phy_mode
phy_mode
)
struct
tegra_usb_phy
*
tegra_usb_phy_open
(
struct
device
*
dev
,
int
instance
,
void
__iomem
*
regs
,
void
*
config
,
enum
tegra_usb_phy_mode
phy_mode
)
{
struct
tegra_usb_phy
*
phy
;
struct
tegra_ulpi_config
*
ulpi_config
;
...
...
@@ -711,6 +712,16 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs,
err
=
-
ENXIO
;
goto
err1
;
}
if
(
!
gpio_is_valid
(
ulpi_config
->
reset_gpio
))
ulpi_config
->
reset_gpio
=
of_get_named_gpio
(
dev
->
of_node
,
"nvidia,phy-reset-gpio"
,
0
);
if
(
!
gpio_is_valid
(
ulpi_config
->
reset_gpio
))
{
pr_err
(
"%s: invalid reset gpio: %d
\n
"
,
__func__
,
ulpi_config
->
reset_gpio
);
err
=
-
EINVAL
;
goto
err1
;
}
gpio_request
(
ulpi_config
->
reset_gpio
,
"ulpi_phy_reset_b"
);
gpio_direction_output
(
ulpi_config
->
reset_gpio
,
0
);
phy
->
ulpi
=
otg_ulpi_create
(
&
ulpi_viewport_access_ops
,
0
);
...
...
drivers/usb/host/ehci-tegra.c
View file @
d9e33b59
...
...
@@ -708,8 +708,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
}
}
tegra
->
phy
=
tegra_usb_phy_open
(
instance
,
hcd
->
regs
,
pdata
->
phy_config
,
TEGRA_USB_PHY_MODE_HOST
);
tegra
->
phy
=
tegra_usb_phy_open
(
&
pdev
->
dev
,
instance
,
hcd
->
regs
,
pdata
->
phy_config
,
TEGRA_USB_PHY_MODE_HOST
);
if
(
IS_ERR
(
tegra
->
phy
))
{
dev_err
(
&
pdev
->
dev
,
"Failed to open USB phy
\n
"
);
err
=
-
ENXIO
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment