Commit 10b2a938 authored by Felipe Balbi's avatar Felipe Balbi

Merge tag 'tegra-for-3.11-deps-for-usb' into next

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: default avatarFelipe Balbi <balbi@ti.com>
parents dae8eadf 4c94c8b5
...@@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications ...@@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications
and additions : and additions :
Required properties : Required properties :
- compatible : Should be "nvidia,tegra20-ehci" for USB controllers - compatible : Should be "nvidia,tegra20-ehci".
used in host mode. - nvidia,phy : phandle of the PHY that the controller is connected to.
- phy_type : Should be one of "ulpi" or "utmi". - clocks : Contains a single entry which defines the USB controller's clock.
- 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.
Optional properties: Optional properties:
- dr_mode : dual role mode. Indicates the working mode for - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20
nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", USB ports, which need reset twice due to hardware issues.
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.
...@@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY: ...@@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY:
Required properties : Required properties :
- compatible : Should be "nvidia,tegra20-usb-phy". - compatible : Should be "nvidia,tegra20-usb-phy".
- reg : Address and length of the register set for the USB PHY interface. - reg : Defines the following set of registers, in the order listed:
- phy_type : Should be one of "ulpi" or "utmi". - 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: Required properties for phy_type == ulpi:
- nvidia,phy-reset-gpio : The GPIO used to reset the PHY. - 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: Optional properties:
- nvidia,has-legacy-mode : boolean indicates whether this controller can - nvidia,has-legacy-mode : boolean indicates whether this controller can
operate in legacy mode (as APX 2500 / 2600). In legacy mode some operate in legacy mode (as APX 2500 / 2600). In legacy mode some
registers are accessed through the APB_MISC base address instead of registers are accessed through the APB_MISC base address instead of
the USB controller. the USB controller.
\ No newline at end of file - 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
...@@ -449,7 +449,11 @@ ac97: ac97 { ...@@ -449,7 +449,11 @@ ac97: ac97 {
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { sdhci@c8000600 {
......
...@@ -428,17 +428,26 @@ usb@c5000000 { ...@@ -428,17 +428,26 @@ usb@c5000000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5000000 {
status = "okay";
};
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5004400 { usb-phy@c5008000 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ status = "okay";
}; };
sdhci@c8000200 { sdhci@c8000200 {
......
...@@ -38,13 +38,20 @@ uartd { ...@@ -38,13 +38,20 @@ uartd {
usb@c5000000 { usb@c5000000 {
status = "okay"; status = "okay";
dr_mode = "otg"; };
usb-phy@c5000000 {
status = "okay";
}; };
usb@c5008000 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5008000 {
status = "okay";
};
serial@70006000 { serial@70006000 {
status = "okay"; status = "okay";
}; };
......
...@@ -427,17 +427,26 @@ usb@c5000000 { ...@@ -427,17 +427,26 @@ usb@c5000000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5000000 {
status = "okay";
};
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5004400 { usb-phy@c5008000 {
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ status = "okay";
}; };
sdhci@c8000000 { sdhci@c8000000 {
......
...@@ -569,17 +569,28 @@ usb@c5000000 { ...@@ -569,17 +569,28 @@ usb@c5000000 {
dr_mode = "otg"; dr_mode = "otg";
}; };
usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus_reg>;
dr_mode = "otg";
};
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5004400 { usb-phy@c5008000 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ status = "okay";
}; };
sdhci@c8000000 { sdhci@c8000000 {
...@@ -807,6 +818,15 @@ regulator@2 { ...@@ -807,6 +818,15 @@ regulator@2 {
gpio = <&pmic 1 0>; gpio = <&pmic 1 0>;
enable-active-high; 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 { sound {
......
...@@ -470,6 +470,10 @@ usb@c5008000 { ...@@ -470,6 +470,10 @@ usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5008000 {
status = "okay";
};
sdhci@c8000600 { sdhci@c8000600 {
cd-gpios = <&gpio 58 1>; /* gpio PH2 */ cd-gpios = <&gpio 58 1>; /* gpio PH2 */
wp-gpios = <&gpio 59 0>; /* gpio PH3 */ wp-gpios = <&gpio 59 0>; /* gpio PH3 */
......
...@@ -314,17 +314,27 @@ usb@c5000000 { ...@@ -314,17 +314,27 @@ usb@c5000000 {
nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */ nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */
}; };
usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus_reg>;
};
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5004400 { usb-phy@c5008000 {
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ status = "okay";
}; };
sdhci@c8000000 { sdhci@c8000000 {
...@@ -390,6 +400,15 @@ hdmi_pll_reg: regulator@1 { ...@@ -390,6 +400,15 @@ hdmi_pll_reg: regulator@1 {
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; 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 { sound {
......
...@@ -505,17 +505,26 @@ usb@c5000000 { ...@@ -505,17 +505,26 @@ usb@c5000000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5000000 {
status = "okay";
};
usb@c5004000 { usb@c5004000 {
status = "okay"; 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 { usb@c5008000 {
status = "okay"; status = "okay";
}; };
usb-phy@c5004400 { usb-phy@c5008000 {
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ status = "okay";
}; };
sdhci@c8000000 { sdhci@c8000000 {
......
...@@ -511,11 +511,21 @@ usb@c5000000 { ...@@ -511,11 +511,21 @@ usb@c5000000 {
nvidia,vbus-gpio = <&tca6416 0 0>; /* GPIO_PMU0 */ nvidia,vbus-gpio = <&tca6416 0 0>; /* GPIO_PMU0 */
}; };
usb-phy@c5000000 {
status = "okay";
vbus-supply = <&vbus1_reg>;
};
usb@c5008000 { usb@c5008000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&tca6416 1 0>; /* GPIO_PMU1 */ nvidia,vbus-gpio = <&tca6416 1 0>; /* GPIO_PMU1 */
}; };
usb-phy@c5008000 {
status = "okay";
vbus-supply = <&vbus3_reg>;
};
sdhci@c8000400 { sdhci@c8000400 {
status = "okay"; status = "okay";
cd-gpios = <&gpio 69 1>; /* gpio PI5 */ cd-gpios = <&gpio 69 1>; /* gpio PI5 */
...@@ -568,6 +578,24 @@ usb0_vbus_reg: regulator { ...@@ -568,6 +578,24 @@ usb0_vbus_reg: regulator {
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
regulator-always-on; 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 { sound {
......
...@@ -455,13 +455,24 @@ usb@c5000000 { ...@@ -455,13 +455,24 @@ usb@c5000000 {
status = "disabled"; status = "disabled";
}; };
phy1: usb-phy@c5000400 { phy1: usb-phy@c5000000 {
compatible = "nvidia,tegra20-usb-phy"; compatible = "nvidia,tegra20-usb-phy";
reg = <0xc5000400 0x3c00>; reg = <0xc5000000 0x4000 0xc5000000 0x4000>;
phy_type = "utmi"; phy_type = "utmi";
clocks = <&tegra_car 22>,
<&tegra_car 127>,
<&tegra_car 106>,
<&tegra_car 22>;
clock-names = "reg", "pll_u", "timer", "utmi-pads";
nvidia,has-legacy-mode; nvidia,has-legacy-mode;
clocks = <&tegra_car 22>, <&tegra_car 127>; hssync_start_delay = <9>;
clock-names = "phy", "pll_u"; idle_wait_delay = <17>;
elastic_limit = <16>;
term_range_adj = <6>;
xcvr_setup = <9>;
xcvr_lsfslew = <1>;
xcvr_lsrslew = <1>;
status = "disabled";
}; };
usb@c5004000 { usb@c5004000 {
...@@ -474,12 +485,15 @@ usb@c5004000 { ...@@ -474,12 +485,15 @@ usb@c5004000 {
status = "disabled"; status = "disabled";
}; };
phy2: usb-phy@c5004400 { phy2: usb-phy@c5004000 {
compatible = "nvidia,tegra20-usb-phy"; compatible = "nvidia,tegra20-usb-phy";
reg = <0xc5004400 0x3c00>; reg = <0xc5004000 0x4000>;
phy_type = "ulpi"; phy_type = "ulpi";
clocks = <&tegra_car 93>, <&tegra_car 127>; clocks = <&tegra_car 58>,
clock-names = "phy", "pll_u"; <&tegra_car 127>,
<&tegra_car 93>;
clock-names = "reg", "pll_u", "ulpi-link";
status = "disabled";
}; };
usb@c5008000 { usb@c5008000 {
...@@ -492,12 +506,23 @@ usb@c5008000 { ...@@ -492,12 +506,23 @@ usb@c5008000 {
status = "disabled"; status = "disabled";
}; };
phy3: usb-phy@c5008400 { phy3: usb-phy@c5008000 {
compatible = "nvidia,tegra20-usb-phy"; compatible = "nvidia,tegra20-usb-phy";
reg = <0xc5008400 0x3c00>; reg = <0xc5008000 0x4000 0xc5000000 0x4000>;
phy_type = "utmi"; phy_type = "utmi";
clocks = <&tegra_car 22>, <&tegra_car 127>; clocks = <&tegra_car 59>,
clock-names = "phy", "pll_u"; <&tegra_car 127>,
<&tegra_car 106>,
<&tegra_car 22>;
clock-names = "reg", "pll_u", "timer", "utmi-pads";
hssync_start_delay = <9>;
idle_wait_delay = <17>;
elastic_limit = <16>;
term_range_adj = <6>;
xcvr_setup = <9>;
xcvr_lsfslew = <2>;
xcvr_lsrslew = <2>;
status = "disabled";
}; };
sdhci@c8000000 { sdhci@c8000000 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment