linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs
Date: Thu, 16 Jan 2014 10:03:24 +0100	[thread overview]
Message-ID: <20140116090324.GA25911@pengutronix.de> (raw)
In-Reply-To: <52D5E9D4.2050405@gtsys.com.hk>

Hello Chris,

On Wed, Jan 15, 2014 at 09:52:20AM +0800, Chris Ruehl wrote:
> I have a customized board running OTG/host and USB2/host (USB1 not connected)
> Both ports are connected to a ISP1504 ULPI
Similar for me here, my board has usb2 only with an ISP1504.
> a) I need a rs-gpio to reset in addition to the cs-gpio the ISP1504 (done)
I see there are several new chipidea patches in next-20140116 compared
to next-20140110 what I am using. Is there explicit support for a
cs-gpios property? If so, it's not obvious.

> b) Implement UPLI viewport (IORESOURCE_MEM) and logic to set the
> external power supply.
> The code (b) was rejected and needs rework.
The patch I'm currently using is appended below. It doesn't work yet,
but I think that's because CS isn't set yet. In my machine's dts I'm
using:

&usbphy2 {
        reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
};

&usbh2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usbh2>;
        status = "okay";
};

Does this look ok?

I'm out of time currently for this project, but I will search the
mailing list for your patches. If you Cc: on new attempts for b) I will
try to test it.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

 arch/arm/boot/dts/imx27-pingrp.h | 14 +++++++++
 arch/arm/boot/dts/imx27.dtsi     | 67 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/arch/arm/boot/dts/imx27-pingrp.h b/arch/arm/boot/dts/imx27-pingrp.h
index 57ca02f89dff..c4d698fddbc9 100644
--- a/arch/arm/boot/dts/imx27-pingrp.h
+++ b/arch/arm/boot/dts/imx27-pingrp.h
@@ -148,4 +148,18 @@
 	MX27_PAD_UART3_CTS__UART3_CTS 0x0 \
 	MX27_PAD_UART3_RTS__UART3_RTS 0x0
 
+#define MX27_USBH2_PINGRP1 \
+	MX27_PAD_USBH2_CLK__USBH2_CLK 0x0 \
+	MX27_PAD_USBH2_DIR__USBH2_DIR 0x0 \
+	MX27_PAD_USBH2_DATA7__USBH2_DATA7 0x0 \
+	MX27_PAD_USBH2_NXT__USBH2_NXT 0x0 \
+	MX27_PAD_USBH2_STP__USBH2_STP 0x0 \
+	MX27_PAD_CSPI2_SS2__USBH2_DATA4 0x0 \
+	MX27_PAD_CSPI2_SS1__USBH2_DATA3 0x0 \
+	MX27_PAD_CSPI2_SS0__USBH2_DATA6 0x0 \
+	MX27_PAD_CSPI2_SCLK__USBH2_DATA0 0x0 \
+	MX27_PAD_CSPI2_MISO__USBH2_DATA2 0x0 \
+	MX27_PAD_CSPI2_MOSI__USBH2_DATA1 0x0 \
+	MX27_PAD_CSPI1_SS2__USBH2_DATA5 0x0
+
 #endif /* __DTS_IMX27_PINGRP_H */
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 7e98966b1834..391769fb291e 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -33,6 +33,9 @@
 		spi0 = &cspi1;
 		spi1 = &cspi2;
 		spi2 = &cspi3;
+		usb0 = &usbotg;
+		usb1 = &usbh1;
+		usb2 = &usbh2;
 	};
 
 	aitc: aitc-interrupt-controller at e0000000 {
@@ -70,6 +73,33 @@
 		};
 	};
 
+	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";
+		};
+
+		usbphy1: usbphy at 1 {
+			compatible = "usb-nop-xceiv";
+			reg = <1>;
+			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>;
@@ -439,6 +469,43 @@
 				iram = <&iram>;
 			};
 
+			usbotg: usb at 10024000 {
+				compatible = "fsl,imx27-usb";
+				reg = <0x10024000 0x200>;
+				interrupts = <56>;
+				clocks = <&clks 15>;
+				fsl,usbmisc = <&usbmisc 0>;
+				fsl,usbphy = <&usbphy0>;
+				status = "disabled";
+			};
+
+			usbh1: usb at 10024200 {
+				compatible = "fsl,imx27-usb";
+				reg = <0x10024200 0x200>;
+				interrupts = <54>;
+				clocks = <&clks 15>;
+				fsl,usbmisc = <&usbmisc 1>;
+				fsl,usbphy = <&usbphy1>;
+				status = "disabled";
+			};
+
+			usbh2: usb at 10024400 {
+				compatible = "fsl,imx27-usb";
+				reg = <0x10024400 0x200>;
+				interrupts = <55>;
+				clocks = <&clks 15>;
+				fsl,usbmisc = <&usbmisc 2>;
+				fsl,usbphy = <&usbphy2>;
+				status = "disabled";
+			};
+
+			usbmisc: usbmisc at 10024600 {
+				#index-cells = <1>;
+				compatible = "fsl,imx27-usbmisc";
+				reg = <0x10024600 0x200>;
+				clocks = <&clks 62>;
+			};
+
 			sahara2: sahara at 10025000 {
 				compatible = "fsl,imx27-sahara";
 				reg = <0x10025000 0x1000>;
-- 
1.8.5.2

  reply	other threads:[~2014-01-16  9:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10  7:18 [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs Alexander Shiyan
2013-11-10  7:18 ` [PATCH 2/2] usb: chipidea: usbmisc: Add support for i.MX51 CPU Alexander Shiyan
2013-11-14 11:42   ` Peter Chen
2013-11-14 18:07   ` Matt Sealey
2013-11-16 13:35     ` Peter Chen
2013-11-16 13:46       ` Alexander Shiyan
2013-11-17  4:52         ` Peter Chen
2013-11-11  2:30 ` [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs Chris Ruehl
2013-11-11  4:45   ` Alexander Shiyan
2013-11-11  5:33     ` Chris Ruehl
2013-11-11  5:47       ` Alexander Shiyan
2013-11-11  6:10         ` Chris Ruehl
2013-11-11  7:09           ` Alexander Shiyan
2014-01-11 12:55             ` Uwe Kleine-König
2014-01-11 14:01               ` Alexander Shiyan
2014-01-13 21:31                 ` Uwe Kleine-König
2014-01-14  3:30                   ` Alexander Shiyan
2014-01-14  3:53                     ` Chris Ruehl
2014-01-14 13:49                       ` Uwe Kleine-König
2014-01-15  1:52                         ` Chris Ruehl
2014-01-16  9:03                           ` Uwe Kleine-König [this message]
2014-01-14 13:47                     ` Uwe Kleine-König
2014-01-14 13:54                       ` Uwe Kleine-König
2014-01-11 12:59           ` Uwe Kleine-König
2013-11-14 11:41     ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140116090324.GA25911@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).