* [PATCH 1/3] ARM: dts: imx27: Use the correct usb clock gate
@ 2014-04-16 17:10 Fabio Estevam
2014-04-16 17:10 ` [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files Fabio Estevam
2014-04-16 17:10 ` [PATCH 3/3] ARM: dts: imx27-pdk: Add USB OTG support Fabio Estevam
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2014-04-16 17:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
USB Host1, Host2 and OTG are gated via 'usb_ipg_gate' clock, so fix it in order
to avoid the following kernel oops:
usbcore: registered new interface driver usb-storage
10024000.usb supply vbus not found, using dummy regulator
Unhandled fault: external abort on non-linefetch (0x808) at 0xf4424184
Internal error: : 808 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc1-26325-g971f9fd-dirty #64
task: c7829aa0 ti: c7836000 task.ti: c7836000
PC is at ci_hdrc_probe+0x3a4/0x634
LR is at ci_hdrc_probe+0x100/0x634
pc : [<c036cc78>] lr : [<c036c9d4>] psr: 60000013
sp : c7837d48 ip : 00000001 fp : 00000000
r10: 00000000 r9 : 00000000 r8 : c791b6c0
r7 : c7945000 r6 : f4424000 r5 : c7945010 r4 : c794e010
r3 : f4424184 r2 : 00000000 r1 : 8c000004 r0 : 0c000004
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: a0004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc78361c0)
Stack: (0xc7837d48 to 0xc7838000)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/boot/dts/imx27.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 00cf66c..948354e 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -465,7 +465,7 @@
compatible = "fsl,imx27-usb";
reg = <0x10024000 0x200>;
interrupts = <56>;
- clocks = <&clks 15>;
+ clocks = <&clks 75>;
fsl,usbmisc = <&usbmisc 0>;
fsl,usbphy = <&usbphy0>;
status = "disabled";
@@ -475,7 +475,7 @@
compatible = "fsl,imx27-usb";
reg = <0x10024200 0x200>;
interrupts = <54>;
- clocks = <&clks 15>;
+ clocks = <&clks 75>;
fsl,usbmisc = <&usbmisc 1>;
status = "disabled";
};
@@ -484,7 +484,7 @@
compatible = "fsl,imx27-usb";
reg = <0x10024400 0x200>;
interrupts = <55>;
- clocks = <&clks 15>;
+ clocks = <&clks 75>;
fsl,usbmisc = <&usbmisc 2>;
fsl,usbphy = <&usbphy2>;
status = "disabled";
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files
2014-04-16 17:10 [PATCH 1/3] ARM: dts: imx27: Use the correct usb clock gate Fabio Estevam
@ 2014-04-16 17:10 ` Fabio Estevam
2014-04-16 17:30 ` Alexander Shiyan
2014-04-16 17:10 ` [PATCH 3/3] ARM: dts: imx27-pdk: Add USB OTG support Fabio Estevam
1 sibling, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2014-04-16 17:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
It is not a good approach to have the USB PHY nodes inside imx27.dtsi since
the USB PHYs on mx27 are not internal to the SoC.
Place the USB PHY nodes in the board dts files instead.
Also, each board may have a different clock source for the USB PHY, so do not
hardcode it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies on top of "[PATCH] ARM: dts: imx27-phytec-phycore-som: Move PMIC IRQ GPIO into a separate pin group"
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 5 +---
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 36 ++++++++++++++++++++++---
arch/arm/boot/dts/imx27.dtsi | 22 ---------------
3 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
index 8b4181b..7c23649 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
@@ -268,14 +268,11 @@
dr_mode = "host";
phy_type = "ulpi";
vbus-supply = <®_5v0>;
+ fsl,usbphy = <&usbphy2>;
disable-over-current;
status = "okay";
};
-&usbphy2 {
- vcc-supply = <®_5v0>;
-};
-
&weim {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_weim>;
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
index 33c5dc2..c48b9f8 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
@@ -20,6 +20,15 @@
reg = <0xa0000000 0x08000000>;
};
+ clocks {
+ clk_26M: codec_clock {
+ compatible = "fixed-clock";
+ reg = <0>;
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ };
+ };
+
regulators {
compatible = "simple-bus";
#address-cells = <1>;
@@ -41,6 +50,28 @@
regulator-max-microvolt = <5000000>;
};
};
+
+ usbphy {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usbphy0: usbphy at 0 {
+ compatible = "usb-nop-xceiv";
+ reg = <0>;
+ vcc-supply = <&sw3_reg>;
+ clocks = <&clk_26M>;
+ clock-names = "main_clk";
+ };
+
+ usbphy2: usbphy at 2 {
+ compatible = "usb-nop-xceiv";
+ reg = <0>;
+ vcc-supply = <®_5v0>;
+ clocks = <&clk_26M>;
+ clock-names = "main_clk";
+ };
+ };
};
&audmux {
@@ -307,14 +338,11 @@
pinctrl-0 = <&pinctrl_usbotg>;
dr_mode = "otg";
phy_type = "ulpi";
+ fsl,usbphy = <&usbphy0>;
vbus-supply = <&sw3_reg>;
status = "okay";
};
-&usbphy0 {
- vcc-supply = <&sw3_reg>;
-};
-
&weim {
status = "okay";
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 948354e..b2c103e 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -72,26 +72,6 @@
};
};
- usbphy {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usbphy0: usbphy at 0 {
- compatible = "usb-nop-xceiv";
- reg = <0>;
- clocks = <&clks 75>;
- clock-names = "main_clk";
- };
-
- usbphy2: usbphy at 2 {
- compatible = "usb-nop-xceiv";
- reg = <2>;
- clocks = <&clks 75>;
- clock-names = "main_clk";
- };
- };
-
soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -467,7 +447,6 @@
interrupts = <56>;
clocks = <&clks 75>;
fsl,usbmisc = <&usbmisc 0>;
- fsl,usbphy = <&usbphy0>;
status = "disabled";
};
@@ -486,7 +465,6 @@
interrupts = <55>;
clocks = <&clks 75>;
fsl,usbmisc = <&usbmisc 2>;
- fsl,usbphy = <&usbphy2>;
status = "disabled";
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ARM: dts: imx27-pdk: Add USB OTG support
2014-04-16 17:10 [PATCH 1/3] ARM: dts: imx27: Use the correct usb clock gate Fabio Estevam
2014-04-16 17:10 ` [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files Fabio Estevam
@ 2014-04-16 17:10 ` Fabio Estevam
1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2014-04-16 17:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
It applies on top of "[PATCH v3] ARM: dts: imx27-pdk: Add PMIC support"
arch/arm/boot/dts/imx27-pdk.dts | 48 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm/boot/dts/imx27-pdk.dts b/arch/arm/boot/dts/imx27-pdk.dts
index 37d7bde..6bb274b 100644
--- a/arch/arm/boot/dts/imx27-pdk.dts
+++ b/arch/arm/boot/dts/imx27-pdk.dts
@@ -19,6 +19,28 @@
memory {
reg = <0xa0000000 0x08000000>;
};
+
+ clocks {
+ clk_26M: codec_clock {
+ compatible = "fixed-clock";
+ reg = <0>;
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ };
+ };
+
+ usbphy {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usbphy0: usbphy at 0 {
+ compatible = "usb-nop-xceiv";
+ reg = <0>;
+ clocks = <&clk_26M>;
+ clock-names = "main_clk";
+ };
+ };
};
&cspi2 {
@@ -80,6 +102,15 @@
status = "okay";
};
+&usbotg {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotg>;
+ dr_mode = "otg";
+ fsl,usbphy = <&usbphy0>;
+ phy_type = "ulpi";
+ status = "okay";
+};
+
&iomuxc {
imx27-pdk {
pinctrl_cspi2: cspi2grp {
@@ -128,5 +159,22 @@
MX27_PAD_UART1_RTS__UART1_RTS 0x0
>;
};
+
+ pinctrl_usbotg: usbotggrp {
+ fsl,pins = <
+ MX27_PAD_USBOTG_NXT__USBOTG_NXT 0x0
+ MX27_PAD_USBOTG_STP__USBOTG_STP 0x0
+ MX27_PAD_USBOTG_DIR__USBOTG_DIR 0x0
+ MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0
+ MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x0
+ MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x0
+ MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x0
+ MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x0
+ MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x0
+ MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x0
+ MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x0
+ MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x0
+ >;
+ };
};
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files
2014-04-16 17:10 ` [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files Fabio Estevam
@ 2014-04-16 17:30 ` Alexander Shiyan
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Shiyan @ 2014-04-16 17:30 UTC (permalink / raw)
To: linux-arm-kernel
Wed, 16 Apr 2014 14:10:16 -0300 ?? Fabio Estevam <festevam@gmail.com>:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> It is not a good approach to have the USB PHY nodes inside imx27.dtsi since
> the USB PHYs on mx27 are not internal to the SoC.
>
> Place the USB PHY nodes in the board dts files instead.
>
> Also, each board may have a different clock source for the USB PHY, so do not
> hardcode it.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Applies on top of "[PATCH] ARM: dts: imx27-phytec-phycore-som: Move PMIC IRQ GPIO into a separate pin group"
...
> diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
> index 33c5dc2..c48b9f8 100644
> --- a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
> +++ b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
> @@ -20,6 +20,15 @@
> reg = <0xa0000000 0x08000000>;
> };
>
> + clocks {
> + clk_26M: codec_clock {
codec? 26M? Why?
> + compatible = "fixed-clock";
> + reg = <0>;
> + #clock-cells = <0>;
> + clock-frequency = <26000000>;
> + };
> + };
> +
> regulators {
> compatible = "simple-bus";
> #address-cells = <1>;
> @@ -41,6 +50,28 @@
> regulator-max-microvolt = <5000000>;
> };
> };
> +
> + usbphy {
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + usbphy0: usbphy at 0 {
> + compatible = "usb-nop-xceiv";
> + reg = <0>;
> + vcc-supply = <&sw3_reg>;
> + clocks = <&clk_26M>;
Just <&clks 0> is enough in this case.
> + clock-names = "main_clk";
> + };
> +
> + usbphy2: usbphy at 2 {
> + compatible = "usb-nop-xceiv";
> + reg = <0>;
> + vcc-supply = <®_5v0>;
> + clocks = <&clk_26M>;
> + clock-names = "main_clk";
> + };
> + };
SOM has no second ULPI.
So this should be moved to RDK.
---
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-16 17:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 17:10 [PATCH 1/3] ARM: dts: imx27: Use the correct usb clock gate Fabio Estevam
2014-04-16 17:10 ` [PATCH 2/3] ARM: dts: imx27: Place the usb phy nodes in the board dts files Fabio Estevam
2014-04-16 17:30 ` Alexander Shiyan
2014-04-16 17:10 ` [PATCH 3/3] ARM: dts: imx27-pdk: Add USB OTG support Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.