Skip to content

Commit

Permalink
Merge tag 'tegra-for-3.11-deps-for-usb' into next
Browse files Browse the repository at this point in the history
ARM: tegra: DT-related fixes needed by the USB tree

The Tegra USB bindings were in bad shape. The patches in this branch
fix the binding definitions, and make all the necessary additions to
the DT files. Stale nodes/properties will be removed early in 3.12
once the USB driver has been updated for the new binding.

These changes are needed in both the USB tree, to allow the driver to
be updated to handle them, and the Tegra tree, so that various tree-
wide DT changes (e.g. conversion of IRQ/GPIO/clock constants to defines)
can be applied on top of them.

* tag 'tegra-for-3.11-deps-for-usb':
  ARM: tegra: update device trees for USB binding rework
  ARM: tegra: modify ULPI reset GPIO properties
  ARM: tegra: finalize USB EHCI and PHY bindings

Signed-of-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed May 29, 2013
2 parents dae8ead + 4c94c8b commit 10b2a93
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 54 deletions.
27 changes: 5 additions & 22 deletions Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications
and additions :

Required properties :
- compatible : Should be "nvidia,tegra20-ehci" for USB controllers
used in host mode.
- phy_type : Should be one of "ulpi" or "utmi".
- nvidia,vbus-gpio : If present, specifies a gpio that needs to be
activated for the bus to be powered.
- nvidia,phy : phandle of the PHY instance, the controller is connected to.

Required properties for phy_type == ulpi:
- nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
- compatible : Should be "nvidia,tegra20-ehci".
- nvidia,phy : phandle of the PHY that the controller is connected to.
- clocks : Contains a single entry which defines the USB controller's clock.

Optional properties:
- dr_mode : dual role mode. Indicates the working mode for
nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral",
or "otg". Default to "host" if not defined for backward compatibility.
host means this is a host controller
peripheral means it is device controller
otg means it can operate as either ("on the go")
- nvidia,has-legacy-mode : boolean indicates whether this controller can
operate in legacy mode (as APX 2500 / 2600). In legacy mode some
registers are accessed through the APB_MISC base address instead of
the USB controller. Since this is a legacy issue it probably does not
warrant a compatible string of its own.
- nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
USB ports, which need reset twice due to hardware issues.
- nvidia,needs-double-reset : boolean is to be set for some of the Tegra20
USB ports, which need reset twice due to hardware issues.
41 changes: 38 additions & 3 deletions Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY:

Required properties :
- compatible : Should be "nvidia,tegra20-usb-phy".
- reg : Address and length of the register set for the USB PHY interface.
- phy_type : Should be one of "ulpi" or "utmi".
- reg : Defines the following set of registers, in the order listed:
- The PHY's own register set.
Always present.
- The register set of the PHY containing the UTMI pad control registers.
Present if-and-only-if phy_type == utmi.
- phy_type : Should be one of "utmi", "ulpi" or "hsic".
- clocks : Defines the clocks listed in the clock-names property.
- clock-names : The following clock names must be present:
- reg: The clock needed to access the PHY's own registers. This is the
associated EHCI controller's clock. Always present.
- pll_u: PLL_U. Always present.
- timer: The timeout clock (clk_m). Present if phy_type == utmi.
- utmi-pads: The clock needed to access the UTMI pad control registers.
Present if phy_type == utmi.
- ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2).
Present if phy_type == ulpi, and ULPI link mode is in use.

Required properties for phy_type == ulpi:
- nvidia,phy-reset-gpio : The GPIO used to reset the PHY.

Required PHY timing params for utmi phy:
- nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before
start of sync launches RxActive
- nvidia,elastic-limit : Variable FIFO Depth of elastic input store
- nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait
before declare IDLE.
- nvidia,term-range-adj : Range adjusment on terminations
- nvidia,xcvr-setup : HS driver output control
- nvidia,xcvr-lsfslew : LS falling slew rate control.
- nvidia,xcvr-lsrslew : LS rising slew rate control.

Optional properties:
- nvidia,has-legacy-mode : boolean indicates whether this controller can
operate in legacy mode (as APX 2500 / 2600). In legacy mode some
registers are accessed through the APB_MISC base address instead of
the USB controller.
the USB controller.
- nvidia,is-wired : boolean. Indicates whether we can do certain kind of power
optimizations for the devices that are always connected. e.g. modem.
- dr_mode : dual role mode. Indicates the working mode for the PHY. Can be
"host", "peripheral", or "otg". Defaults to "host" if not defined.
host means this is a host controller
peripheral means it is device controller
otg means it can operate as either ("on the go")

Required properties for dr_mode == otg:
- vbus-supply: regulator for VBUS
6 changes: 5 additions & 1 deletion arch/arm/boot/dts/tegra20-colibri-512.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,11 @@

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb-phy@c5004000 {
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

sdhci@c8000600 {
Expand Down
15 changes: 12 additions & 3 deletions arch/arm/boot/dts/tegra20-harmony.dts
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,26 @@
status = "okay";
};

usb-phy@c5000000 {
status = "okay";
};

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5004400 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000200 {
Expand Down
9 changes: 8 additions & 1 deletion arch/arm/boot/dts/tegra20-iris-512.dts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,20 @@

usb@c5000000 {
status = "okay";
dr_mode = "otg";
};

usb-phy@c5000000 {
status = "okay";
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5008000 {
status = "okay";
};

serial@70006000 {
status = "okay";
};
Expand Down
15 changes: 12 additions & 3 deletions arch/arm/boot/dts/tegra20-paz00.dts
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,26 @@
status = "okay";
};

usb-phy@c5000000 {
status = "okay";
};

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
nvidia,phy-reset-gpio = <&gpio 168 1>; /* gpio PV0, active low */
};

usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 168 1>; /* gpio PV0, active low */
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5004400 {
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000000 {
Expand Down
26 changes: 23 additions & 3 deletions arch/arm/boot/dts/tegra20-seaboard.dts
Original file line number Diff line number Diff line change
Expand Up @@ -569,17 +569,28 @@
dr_mode = "otg";
};

usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus_reg>;
dr_mode = "otg";
};

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5004400 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000000 {
Expand Down Expand Up @@ -807,6 +818,15 @@
gpio = <&pmic 1 0>;
enable-active-high;
};

vbus_reg: regulator@3 {
compatible = "regulator-fixed";
reg = <3>;
regulator-name = "vdd_vbus_wup1";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio 24 0>; /* PD0 */
};
};

sound {
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/tegra20-tamonten.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@
status = "okay";
};

usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000600 {
cd-gpios = <&gpio 58 1>; /* gpio PH2 */
wp-gpios = <&gpio 59 0>; /* gpio PH3 */
Expand Down
25 changes: 22 additions & 3 deletions arch/arm/boot/dts/tegra20-trimslice.dts
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,27 @@
nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */
};

usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus_reg>;
};

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
nvidia,phy-reset-gpio = <&gpio 168 1>; /* gpio PV0, active low */
};

usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 168 1>; /* gpio PV0, active low */
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5004400 {
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000000 {
Expand Down Expand Up @@ -390,6 +400,15 @@
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

vbus_reg: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "usb1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio 170 0>; /* PV2 */
};
};

sound {
Expand Down
15 changes: 12 additions & 3 deletions arch/arm/boot/dts/tegra20-ventana.dts
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,26 @@
status = "okay";
};

usb-phy@c5000000 {
status = "okay";
};

usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1, active low */
};

usb@c5008000 {
status = "okay";
};

usb-phy@c5004400 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
usb-phy@c5008000 {
status = "okay";
};

sdhci@c8000000 {
Expand Down
28 changes: 28 additions & 0 deletions arch/arm/boot/dts/tegra20-whistler.dts
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,21 @@
nvidia,vbus-gpio = <&tca6416 0 0>; /* GPIO_PMU0 */
};

usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus1_reg>;
};

usb@c5008000 {
status = "okay";
nvidia,vbus-gpio = <&tca6416 1 0>; /* GPIO_PMU1 */
};

usb-phy@c5008000 {
status = "okay";
vbus-supply = <&vbus3_reg>;
};

sdhci@c8000400 {
status = "okay";
cd-gpios = <&gpio 69 1>; /* gpio PI5 */
Expand Down Expand Up @@ -568,6 +578,24 @@
regulator-max-microvolt = <5000000>;
regulator-always-on;
};

vbus1_reg: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "vbus1";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tca6416 0 0>; /* GPIO_PMU0 */
};

vbus3_reg: regulator@3 {
compatible = "regulator-fixed";
reg = <3>;
regulator-name = "vbus3";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tca6416 1 0>; /* GPIO_PMU1 */
};
};

sound {
Expand Down
Loading

0 comments on commit 10b2a93

Please sign in to comment.