All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] imx28/imx6q: add usb support
@ 2012-07-11 11:33 Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

This is platform part to add imx28/imx6q driver support.
The dirver part has been mostly merged to usb-next.

The last pinctrl patch also needs imx6q pinctrl driver fix that Aisheng
is working on. Of course it can pass build, and only effect usb gadget
function.

Richard Zhao (7):
  ARM: imx6q: correct device name of usbphy and usb controller clock
    export
  ARM: imx6q: add usbphy clocks
  ARM: imx6q: disable usb charger detector
  ARM: dts: imx6q-sabrelite: add usb devices
  ARM: mxs: clk_register_clkdev mx28 usb clocks
  ARM: dts: imx28-evk: add usb devices
  ARM: dts: imx6q-sabrelite: add usbotg pinctrl support

 arch/arm/boot/dts/imx28-evk.dts       |   36 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx28.dtsi          |   12 ++++++++--
 arch/arm/boot/dts/imx6q-sabrelite.dts |   30 +++++++++++++++++++++++
 arch/arm/boot/dts/imx6q.dtsi          |   42 +++++++++++++++++++++++++++++++--
 arch/arm/mach-imx/clk-imx6q.c         |   11 ++++++++-
 arch/arm/mach-imx/mach-imx6q.c        |   41 ++++++++++++++++++++++++++++++++
 drivers/clk/mxs/clk-imx28.c           |    4 ++++
 7 files changed, 171 insertions(+), 5 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-12  1:03   ` Shawn Guo
  2012-07-11 11:33 ` [PATCH v6 2/7] ARM: imx6q: add usbphy clocks Richard Zhao
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/mach-imx/clk-imx6q.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index cabbbb7..3f5b9d6 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -398,6 +398,10 @@ int __init mx6q_clocks_init(void)
 	clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand");
 	clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand");
 	clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand");
+	clk_register_clkdev(clk[usboh3], NULL, "2184000.usb");
+	clk_register_clkdev(clk[usboh3], NULL, "2184200.usb");
+	clk_register_clkdev(clk[usboh3], NULL, "2184400.usb");
+	clk_register_clkdev(clk[usboh3], NULL, "2184600.usb");
 	clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
 	clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
 	clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 2/7] ARM: imx6q: add usbphy clocks
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 3/7] ARM: imx6q: disable usb charger detector Richard Zhao
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/mach-imx/clk-imx6q.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 3f5b9d6..ea89520 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -152,7 +152,7 @@ enum mx6q_clks {
 	ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
 	usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg,
 	pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg,
-	ssi2_ipg, ssi3_ipg, rom,
+	ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2,
 	clk_max
 };
 
@@ -198,6 +198,9 @@ int __init mx6q_clocks_init(void)
 	clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB,	"pll7_usb_host","osc", base + 0x20, 0x2000,   0x3);
 	clk[pll8_enet]     = imx_clk_pllv3(IMX_PLLV3_ENET,	"pll8_enet",	"osc", base + 0xe0, 0x182000, 0x3);
 
+	clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6);
+	clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6);
+
 	/*                                name              parent_name        reg       idx */
 	clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus",     base + 0x100, 0);
 	clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus",     base + 0x100, 1);
@@ -402,6 +405,8 @@ int __init mx6q_clocks_init(void)
 	clk_register_clkdev(clk[usboh3], NULL, "2184200.usb");
 	clk_register_clkdev(clk[usboh3], NULL, "2184400.usb");
 	clk_register_clkdev(clk[usboh3], NULL, "2184600.usb");
+	clk_register_clkdev(clk[usbphy1], NULL, "20c9000.usbphy");
+	clk_register_clkdev(clk[usbphy2], NULL, "20ca000.usbphy");
 	clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
 	clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
 	clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 2/7] ARM: imx6q: add usbphy clocks Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-11 13:28   ` Otavio Salvador
  2012-07-12  2:06   ` Shawn Guo
  2012-07-11 11:33 ` [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

The external charger detector needs to be disabled,
or the signal at DP will be poor

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/mach-imx/mach-imx6q.c |   41 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 1c18d3c..63fe5d6 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -25,6 +25,7 @@
 #include <linux/pinctrl/machine.h>
 #include <linux/phy.h>
 #include <linux/micrel_phy.h>
+#include <linux/mfd/anatop.h>
 #include <asm/cpuidle.h>
 #include <asm/smp_twd.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -117,6 +118,45 @@ static void __init imx6q_sabrelite_init(void)
 	imx6q_sabrelite_cko1_setup();
 }
 
+static void __init imx6q_usb_init(void)
+{
+	struct device_node *np;
+	struct platform_device *pdev = NULL;
+	struct anatop *adata = NULL;
+
+	np = of_find_node_by_path("/soc/aips-bus at 02000000/anatop at 020c8000");
+	if (np)
+		pdev = of_find_device_by_node(np);
+	if (pdev)
+		adata = platform_get_drvdata(pdev);
+	if (!adata) {
+		if (np)
+			of_node_put(np);
+		return;
+	}
+
+#define HW_ANADIG_USB1_CHRG_DETECT		0x000001b0
+#define HW_ANADIG_USB2_CHRG_DETECT		0x00000210
+
+#define BM_ANADIG_USB_CHRG_DETECT_EN_B		0x00100000
+#define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B	0x00080000
+
+	/*
+	 * The external charger detector needs to be disabled,
+	 * or the signal at DP will be poor
+	 */
+	anatop_write_reg(adata, HW_ANADIG_USB1_CHRG_DETECT,
+			BM_ANADIG_USB_CHRG_DETECT_EN_B
+			| BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B,
+			~0);
+	anatop_write_reg(adata, HW_ANADIG_USB2_CHRG_DETECT,
+			BM_ANADIG_USB_CHRG_DETECT_EN_B |
+			BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B,
+			~0);
+
+	of_node_put(np);
+}
+
 static void __init imx6q_init_machine(void)
 {
 	/*
@@ -131,6 +171,7 @@ static void __init imx6q_init_machine(void)
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	imx6q_pm_init();
+	imx6q_usb_init();
 }
 
 static struct cpuidle_driver imx6q_cpuidle_driver = {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
                   ` (2 preceding siblings ...)
  2012-07-11 11:33 ` [PATCH v6 3/7] ARM: imx6q: disable usb charger detector Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-12  1:40   ` Shawn Guo
  2012-07-11 11:33 ` [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

- add usbphy devices
- add usb host controller and otg devices
- add on-board hub reset gpio pinctrl
- add usb h1 vbus regulator

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/boot/dts/imx6q-sabrelite.dts |   28 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx6q.dtsi          |   36 +++++++++++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
index e0ec929..5bba0d1 100644
--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
+++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
@@ -41,10 +41,29 @@
 					status = "okay";
 				};
 			};
+			iomuxc at 020e0000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_gpio_hog>;
 
+				gpios {
+					pinctrl_gpio_hog: gpiohog {
+						fsl,pins = <1044 0x80000000	/* MX6Q_PAD_GPIO_17__GPIO_7_12 */
+							   144  0x80000000>;	/* MX6Q_PAD_EIM_D22__GPIO_3_22 */
+					};
+				};
+			};
 		};
 
 		aips-bus at 02100000 { /* AIPS2 */
+			usb at 02184000 { /* USB OTG */
+				vbus-supply = <&reg_usb_otg_vbus>;
+				status = "okay";
+			};
+
+			usb at 02184200 { /* USB1 */
+				status = "okay";
+			};
+
 			ethernet at 02188000 {
 				phy-mode = "rgmii";
 				phy-reset-gpios = <&gpio3 23 0>;
@@ -111,6 +130,15 @@
 			regulator-max-microvolt = <3300000>;
 			regulator-always-on;
 		};
+
+		reg_usb_otg_vbus: usb_otg_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb_otg_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio3 22 0>;
+			enable-active-high;
+		};
 	};
 
 	sound {
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 16a3884..5e4f100 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -461,12 +461,14 @@
 				};
 			};
 
-			usbphy at 020c9000 { /* USBPHY1 */
+			usbphy1: usbphy at 020c9000 {
+				compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
 				reg = <0x020c9000 0x1000>;
 				interrupts = <0 44 0x04>;
 			};
 
-			usbphy at 020ca000 { /* USBPHY2 */
+			usbphy2: usbphy at 020ca000 {
+				compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
 				reg = <0x020ca000 0x1000>;
 				interrupts = <0 45 0x04>;
 			};
@@ -614,6 +616,36 @@
 				reg = <0x0217c000 0x4000>;
 			};
 
+			usb at 02184000 { /* USB OTG */
+				compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
+				reg = <0x02184000 0x200>;
+				interrupts = <0 43 0x04>;
+				fsl,usbphy = <&usbphy1>;
+				status = "disabled";
+			};
+
+			usb at 02184200 { /* USB1 */
+				compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
+				reg = <0x02184200 0x200>;
+				interrupts = <0 40 0x04>;
+				fsl,usbphy = <&usbphy2>;
+				status = "disabled";
+			};
+
+			usb at 02184400 { /* USB2 */
+				compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
+				reg = <0x02184400 0x200>;
+				interrupts = <0 41 0x04>;
+				status = "disabled";
+			};
+
+			usb at 02184600 { /* USB3 */
+				compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
+				reg = <0x02184600 0x200>;
+				interrupts = <0 42 0x04>;
+				status = "disabled";
+			};
+
 			ethernet at 02188000 {
 				compatible = "fsl,imx6q-fec";
 				reg = <0x02188000 0x4000>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
                   ` (3 preceding siblings ...)
  2012-07-11 11:33 ` [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-12  1:46   ` Shawn Guo
  2012-07-11 11:33 ` [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices Richard Zhao
  2012-07-11 11:33 ` [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support Richard Zhao
  6 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Tested-by: Subodh Nijsure <snijsure@grid-net.com>
---
 drivers/clk/mxs/clk-imx28.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c
index 7fad6c8..a3bb644 100644
--- a/drivers/clk/mxs/clk-imx28.c
+++ b/drivers/clk/mxs/clk-imx28.c
@@ -328,6 +328,10 @@ int __init mx28_clocks_init(void)
 	clk_register_clkdevs(clks[fec], fec_lookups, ARRAY_SIZE(fec_lookups));
 	clk_register_clkdevs(clks[can0], can0_lookups, ARRAY_SIZE(can0_lookups));
 	clk_register_clkdevs(clks[can1], can1_lookups, ARRAY_SIZE(can1_lookups));
+	clk_register_clkdev(clks[usb0_pwr], NULL, "8007c000.usbphy");
+	clk_register_clkdev(clks[usb1_pwr], NULL, "8007e000.usbphy");
+	clk_register_clkdev(clks[usb0], NULL, "80080000.usb");
+	clk_register_clkdev(clks[usb1], NULL, "80090000.usb");
 
 	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
 		clk_prepare_enable(clks[clks_init_on[i]]);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
                   ` (4 preceding siblings ...)
  2012-07-11 11:33 ` [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-12  1:45   ` Shawn Guo
  2012-07-11 11:33 ` [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support Richard Zhao
  6 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

- add usb phy devices
- add usb controller devices
- add usb vbus regulators

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Tested-by: Subodh Nijsure <snijsure@grid-net.com>
---
 arch/arm/boot/dts/imx28-evk.dts |   36 ++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx28.dtsi    |   12 ++++++++++--
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
index 0d8739d..c27771d 100644
--- a/arch/arm/boot/dts/imx28-evk.dts
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -137,10 +137,28 @@
 				pinctrl-0 = <&auart3_pins_a>;
 				status = "okay";
 			};
+
+			usbphy0: usbphy at 8007c000 {
+				status = "okay";
+			};
+
+			usbphy1: usbphy at 8007e000 {
+				status = "okay";
+			};
 		};
 	};
 
 	ahb at 80080000 {
+		usb0: usb at 80080000 {
+			vbus-supply = <&reg_usb0_vbus>;
+			status = "okay";
+		};
+
+		usb1: usb at 80090000 {
+			vbus-supply = <&reg_usb1_vbus>;
+			status = "okay";
+		};
+
 		mac0: ethernet at 800f0000 {
 			phy-mode = "rmii";
 			pinctrl-names = "default";
@@ -185,6 +203,24 @@
 			regulator-max-microvolt = <3300000>;
 			gpio = <&gpio2 15 0>;
 		};
+
+		reg_usb0_vbus: usb0_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb0_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio3 9 0>;
+			enable-active-high;
+		};
+
+		reg_usb1_vbus: usb1_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio3 8 0>;
+			enable-active-high;
+		};
 	};
 
 	sound {
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index adb5ffc..cc25a0f 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -654,11 +654,13 @@
 			};
 
 			usbphy0: usbphy at 8007c000 {
+				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
 				reg = <0x8007c000 0x2000>;
 				status = "disabled";
 			};
 
 			usbphy1: usbphy at 8007e000 {
+				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
 				reg = <0x8007e000 0x2000>;
 				status = "disabled";
 			};
@@ -672,13 +674,19 @@
 		reg = <0x80080000 0x80000>;
 		ranges;
 
-		usbctrl0: usbctrl at 80080000 {
+		usb0: usb at 80080000 {
+			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
 			reg = <0x80080000 0x10000>;
+			interrupts = <93>;
+			fsl,usbphy = <&usbphy0>;
 			status = "disabled";
 		};
 
-		usbctrl1: usbctrl at 80090000 {
+		usb1: usb at 80090000 {
+			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
 			reg = <0x80090000 0x10000>;
+			interrupts = <92>;
+			fsl,usbphy = <&usbphy1>;
 			status = "disabled";
 		};
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support
  2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
                   ` (5 preceding siblings ...)
  2012-07-11 11:33 ` [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices Richard Zhao
@ 2012-07-11 11:33 ` Richard Zhao
  2012-07-12  1:30   ` Shawn Guo
  6 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/boot/dts/imx6q-sabrelite.dts |    2 ++
 arch/arm/boot/dts/imx6q.dtsi          |    6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
index 5bba0d1..de3cd2e 100644
--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
+++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
@@ -57,6 +57,8 @@
 		aips-bus at 02100000 { /* AIPS2 */
 			usb at 02184000 { /* USB OTG */
 				vbus-supply = <&reg_usb_otg_vbus>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_usbotg_1>;
 				status = "okay";
 			};
 
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 5e4f100..64a24a0 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -552,6 +552,12 @@
 					};
 				};
 
+				usbotg {
+					pinctrl_usbotg_1: usbotggrp-1 {
+						fsl,pins = <1591 0x17059>;	/* MX6Q_PAD_GPIO_1__USBOTG_ID */
+					};
+				};
+
 				usdhc3 {
 					pinctrl_usdhc3_1: usdhc3grp-1 {
 						fsl,pins = <1273 0x17059	/* MX6Q_PAD_SD3_CMD__USDHC3_CMD */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-11 11:33 ` [PATCH v6 3/7] ARM: imx6q: disable usb charger detector Richard Zhao
@ 2012-07-11 13:28   ` Otavio Salvador
  2012-07-11 14:02     ` Richard Zhao
  2012-07-12  2:06   ` Shawn Guo
  1 sibling, 1 reply; 19+ messages in thread
From: Otavio Salvador @ 2012-07-11 13:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 8:33 AM, Richard Zhao
<richard.zhao@freescale.com> wrote:
> The external charger detector needs to be disabled,
> or the signal at DP will be poor

Something as this needs to be applied, no?

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index eff4db5..93695e0 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -832,6 +832,9 @@ config SOC_IMX6Q
        select HAVE_SMP
        select PINCTRL
        select PINCTRL_IMX6Q
+       select MFD_ANATOP
+       select REGULATOR
+       select REGULATOR_ANATOP
        select USE_OF

        help

I sent this patch some time ago but I don't recall to get an ack/nack
for it. I can resend it.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-11 13:28   ` Otavio Salvador
@ 2012-07-11 14:02     ` Richard Zhao
  2012-07-11 15:54       ` Otavio Salvador
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Zhao @ 2012-07-11 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 10:28:07AM -0300, Otavio Salvador wrote:
> On Wed, Jul 11, 2012 at 8:33 AM, Richard Zhao
> <richard.zhao@freescale.com> wrote:
> > The external charger detector needs to be disabled,
> > or the signal at DP will be poor
> 
> Something as this needs to be applied, no?
> 
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index eff4db5..93695e0 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -832,6 +832,9 @@ config SOC_IMX6Q
>         select HAVE_SMP
>         select PINCTRL
>         select PINCTRL_IMX6Q
> +       select MFD_ANATOP
This is needed.
> +       select REGULATOR
> +       select REGULATOR_ANATOP
but why these two?

Thanks
Richard
>         select USE_OF
> 
>         help
> 
> I sent this patch some time ago but I don't recall to get an ack/nack
> for it. I can resend it.
> 
> -- 
> Otavio Salvador                             O.S. Systems
> E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-11 14:02     ` Richard Zhao
@ 2012-07-11 15:54       ` Otavio Salvador
  0 siblings, 0 replies; 19+ messages in thread
From: Otavio Salvador @ 2012-07-11 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 11:02 AM, Richard Zhao <linuxzsc@gmail.com> wrote:
> On Wed, Jul 11, 2012 at 10:28:07AM -0300, Otavio Salvador wrote:
>> On Wed, Jul 11, 2012 at 8:33 AM, Richard Zhao
>> <richard.zhao@freescale.com> wrote:
>> > The external charger detector needs to be disabled,
>> > or the signal at DP will be poor
>>
>> Something as this needs to be applied, no?
>>
>> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
>> index eff4db5..93695e0 100644
>> --- a/arch/arm/mach-imx/Kconfig
>> +++ b/arch/arm/mach-imx/Kconfig
>> @@ -832,6 +832,9 @@ config SOC_IMX6Q
>>         select HAVE_SMP
>>         select PINCTRL
>>         select PINCTRL_IMX6Q
>> +       select MFD_ANATOP
> This is needed.
>> +       select REGULATOR
>> +       select REGULATOR_ANATOP
> but why these two?

I did it some time ago and ended up adding it ... don't recall why but
MFD only does fix the build failure ... I sent a patch with that.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export
  2012-07-11 11:33 ` [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao
@ 2012-07-12  1:03   ` Shawn Guo
  2012-07-12  1:14     ` Richard Zhao
  0 siblings, 1 reply; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  1:03 UTC (permalink / raw)
  To: linux-arm-kernel

It seems that the patch subject does not match the content.

Regards,
Shawn

On Wed, Jul 11, 2012 at 07:33:39PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> ---
>  arch/arm/mach-imx/clk-imx6q.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> index cabbbb7..3f5b9d6 100644
> --- a/arch/arm/mach-imx/clk-imx6q.c
> +++ b/arch/arm/mach-imx/clk-imx6q.c
> @@ -398,6 +398,10 @@ int __init mx6q_clocks_init(void)
>  	clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand");
>  	clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand");
>  	clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand");
> +	clk_register_clkdev(clk[usboh3], NULL, "2184000.usb");
> +	clk_register_clkdev(clk[usboh3], NULL, "2184200.usb");
> +	clk_register_clkdev(clk[usboh3], NULL, "2184400.usb");
> +	clk_register_clkdev(clk[usboh3], NULL, "2184600.usb");
>  	clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
>  	clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
>  	clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export
  2012-07-12  1:03   ` Shawn Guo
@ 2012-07-12  1:14     ` Richard Zhao
  0 siblings, 0 replies; 19+ messages in thread
From: Richard Zhao @ 2012-07-12  1:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 12, 2012 at 09:03:34AM +0800, Shawn Guo wrote:
> It seems that the patch subject does not match the content.
The name correct is fixed by your patch:
commit 1d818efd2949b5874eaf2531585e1f0735a7db91
Author: Shawn Guo <shawn.guo@linaro.org>
Date:   Tue Jun 5 15:16:42 2012 +0800

    ARM: imx6q: remove unneeded clkdev lookups
    
    There are a number of clkdev lookups left over from commit b0286f2
    (ARM: imx6q: prepare and enable init on clks directly instead of
    clk_get first), remove them since they are not needed now.
    
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

I'll correct the title.

Thanks
Richard
> 
> Regards,
> Shawn
> 
> On Wed, Jul 11, 2012 at 07:33:39PM +0800, Richard Zhao wrote:
> > Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> > ---
> >  arch/arm/mach-imx/clk-imx6q.c |    4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> > index cabbbb7..3f5b9d6 100644
> > --- a/arch/arm/mach-imx/clk-imx6q.c
> > +++ b/arch/arm/mach-imx/clk-imx6q.c
> > @@ -398,6 +398,10 @@ int __init mx6q_clocks_init(void)
> >  	clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand");
> >  	clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand");
> >  	clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand");
> > +	clk_register_clkdev(clk[usboh3], NULL, "2184000.usb");
> > +	clk_register_clkdev(clk[usboh3], NULL, "2184200.usb");
> > +	clk_register_clkdev(clk[usboh3], NULL, "2184400.usb");
> > +	clk_register_clkdev(clk[usboh3], NULL, "2184600.usb");
> >  	clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
> >  	clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
> >  	clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
> > -- 
> > 1.7.9.5
> > 
> > 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support
  2012-07-11 11:33 ` [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support Richard Zhao
@ 2012-07-12  1:30   ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  1:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 07:33:45PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> ---
>  arch/arm/boot/dts/imx6q-sabrelite.dts |    2 ++
>  arch/arm/boot/dts/imx6q.dtsi          |    6 ++++++
>  2 files changed, 8 insertions(+)
> 
I haven't see usb driver that Greg applied calls pinctrl API to set up
the pin.  So I'm not going to apply this one.

Regards,
Shawn

> diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
> index 5bba0d1..de3cd2e 100644
> --- a/arch/arm/boot/dts/imx6q-sabrelite.dts
> +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
> @@ -57,6 +57,8 @@
>  		aips-bus at 02100000 { /* AIPS2 */
>  			usb at 02184000 { /* USB OTG */
>  				vbus-supply = <&reg_usb_otg_vbus>;
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_usbotg_1>;
>  				status = "okay";
>  			};
>  
> diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
> index 5e4f100..64a24a0 100644
> --- a/arch/arm/boot/dts/imx6q.dtsi
> +++ b/arch/arm/boot/dts/imx6q.dtsi
> @@ -552,6 +552,12 @@
>  					};
>  				};
>  
> +				usbotg {
> +					pinctrl_usbotg_1: usbotggrp-1 {
> +						fsl,pins = <1591 0x17059>;	/* MX6Q_PAD_GPIO_1__USBOTG_ID */
> +					};
> +				};
> +
>  				usdhc3 {
>  					pinctrl_usdhc3_1: usdhc3grp-1 {
>  						fsl,pins = <1273 0x17059	/* MX6Q_PAD_SD3_CMD__USDHC3_CMD */
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices
  2012-07-11 11:33 ` [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao
@ 2012-07-12  1:40   ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  1:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 07:33:42PM +0800, Richard Zhao wrote:
> - add usbphy devices
> - add usb host controller and otg devices
> - add on-board hub reset gpio pinctrl
> - add usb h1 vbus regulator
> 
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> ---
>  arch/arm/boot/dts/imx6q-sabrelite.dts |   28 +++++++++++++++++++++++++
>  arch/arm/boot/dts/imx6q.dtsi          |   36 +++++++++++++++++++++++++++++++--
>  2 files changed, 62 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
> index e0ec929..5bba0d1 100644
> --- a/arch/arm/boot/dts/imx6q-sabrelite.dts
> +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
> @@ -41,10 +41,29 @@
>  					status = "okay";
>  				};
>  			};
> +			iomuxc at 020e0000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_gpio_hog>;
>  
> +				gpios {
> +					pinctrl_gpio_hog: gpiohog {
> +						fsl,pins = <1044 0x80000000	/* MX6Q_PAD_GPIO_17__GPIO_7_12 */

I guess this one is used for on-board hub reset.  Since you are using
it nowhere, please drop it for now.

Regards,
Shawn

> +							   144  0x80000000>;	/* MX6Q_PAD_EIM_D22__GPIO_3_22 */
> +					};
> +				};
> +			};
>  		};

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices
  2012-07-11 11:33 ` [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices Richard Zhao
@ 2012-07-12  1:45   ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  1:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 07:33:44PM +0800, Richard Zhao wrote:
> @@ -185,6 +203,24 @@
>  			regulator-max-microvolt = <3300000>;
>  			gpio = <&gpio2 15 0>;
>  		};
> +
> +		reg_usb0_vbus: usb0_vbus {
> +			compatible = "regulator-fixed";
> +			regulator-name = "usb0_vbus";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			gpio = <&gpio3 9 0>;

Since we haven't got gpio API calling pinctrl to configure the pin
into gpio mode automatically, we need to set it it with pinctrl "hog"
node.  This is the same thing you have done with imx6q.

> +			enable-active-high;
> +		};
> +
> +		reg_usb1_vbus: usb1_vbus {
> +			compatible = "regulator-fixed";
> +			regulator-name = "usb1_vbus";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			gpio = <&gpio3 8 0>;

Ditto

> +			enable-active-high;
> +		};
>  	};

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks
  2012-07-11 11:33 ` [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao
@ 2012-07-12  1:46   ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  1:46 UTC (permalink / raw)
  To: linux-arm-kernel

The subject prefix needs to be "clk: mxs: ...", as we will have it
go via clk tree.

Regards,
Shawn

On Wed, Jul 11, 2012 at 07:33:43PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> Tested-by: Subodh Nijsure <snijsure@grid-net.com>
> ---
>  drivers/clk/mxs/clk-imx28.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c
> index 7fad6c8..a3bb644 100644
> --- a/drivers/clk/mxs/clk-imx28.c
> +++ b/drivers/clk/mxs/clk-imx28.c
> @@ -328,6 +328,10 @@ int __init mx28_clocks_init(void)
>  	clk_register_clkdevs(clks[fec], fec_lookups, ARRAY_SIZE(fec_lookups));
>  	clk_register_clkdevs(clks[can0], can0_lookups, ARRAY_SIZE(can0_lookups));
>  	clk_register_clkdevs(clks[can1], can1_lookups, ARRAY_SIZE(can1_lookups));
> +	clk_register_clkdev(clks[usb0_pwr], NULL, "8007c000.usbphy");
> +	clk_register_clkdev(clks[usb1_pwr], NULL, "8007e000.usbphy");
> +	clk_register_clkdev(clks[usb0], NULL, "80080000.usb");
> +	clk_register_clkdev(clks[usb1], NULL, "80090000.usb");
>  
>  	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
>  		clk_prepare_enable(clks[clks_init_on[i]]);
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-11 11:33 ` [PATCH v6 3/7] ARM: imx6q: disable usb charger detector Richard Zhao
  2012-07-11 13:28   ` Otavio Salvador
@ 2012-07-12  2:06   ` Shawn Guo
  2012-07-12  2:47     ` Otavio Salvador
  1 sibling, 1 reply; 19+ messages in thread
From: Shawn Guo @ 2012-07-12  2:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 07:33:41PM +0800, Richard Zhao wrote:
> The external charger detector needs to be disabled,
> or the signal at DP will be poor
> 
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> ---
>  arch/arm/mach-imx/mach-imx6q.c |   41 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 1c18d3c..63fe5d6 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -25,6 +25,7 @@
>  #include <linux/pinctrl/machine.h>
>  #include <linux/phy.h>
>  #include <linux/micrel_phy.h>
> +#include <linux/mfd/anatop.h>
>  #include <asm/cpuidle.h>
>  #include <asm/smp_twd.h>
>  #include <asm/hardware/cache-l2x0.h>
> @@ -117,6 +118,45 @@ static void __init imx6q_sabrelite_init(void)
>  	imx6q_sabrelite_cko1_setup();
>  }
>  
> +static void __init imx6q_usb_init(void)
> +{
> +	struct device_node *np;
> +	struct platform_device *pdev = NULL;
> +	struct anatop *adata = NULL;
> +
> +	np = of_find_node_by_path("/soc/aips-bus at 02000000/anatop at 020c8000");

I would suggest use of_find_compatible_node to save the open-coding of
such path.

Regards,
Shawn

> +	if (np)
> +		pdev = of_find_device_by_node(np);
> +	if (pdev)
> +		adata = platform_get_drvdata(pdev);
> +	if (!adata) {
> +		if (np)
> +			of_node_put(np);
> +		return;
> +	}
> +
> +#define HW_ANADIG_USB1_CHRG_DETECT		0x000001b0
> +#define HW_ANADIG_USB2_CHRG_DETECT		0x00000210
> +
> +#define BM_ANADIG_USB_CHRG_DETECT_EN_B		0x00100000
> +#define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B	0x00080000
> +
> +	/*
> +	 * The external charger detector needs to be disabled,
> +	 * or the signal at DP will be poor
> +	 */
> +	anatop_write_reg(adata, HW_ANADIG_USB1_CHRG_DETECT,
> +			BM_ANADIG_USB_CHRG_DETECT_EN_B
> +			| BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B,
> +			~0);
> +	anatop_write_reg(adata, HW_ANADIG_USB2_CHRG_DETECT,
> +			BM_ANADIG_USB_CHRG_DETECT_EN_B |
> +			BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B,
> +			~0);
> +
> +	of_node_put(np);
> +}
> +
>  static void __init imx6q_init_machine(void)
>  {
>  	/*
> @@ -131,6 +171,7 @@ static void __init imx6q_init_machine(void)
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>  
>  	imx6q_pm_init();
> +	imx6q_usb_init();
>  }
>  
>  static struct cpuidle_driver imx6q_cpuidle_driver = {
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v6 3/7] ARM: imx6q: disable usb charger detector
  2012-07-12  2:06   ` Shawn Guo
@ 2012-07-12  2:47     ` Otavio Salvador
  0 siblings, 0 replies; 19+ messages in thread
From: Otavio Salvador @ 2012-07-12  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 11, 2012 at 11:06 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
...
>> +     np = of_find_node_by_path("/soc/aips-bus at 02000000/anatop at 020c8000");
>
> I would suggest use of_find_compatible_node to save the open-coding of
> such path.
...

Nice catch!

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-07-12  2:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 11:33 [PATCH v6 0/7] imx28/imx6q: add usb support Richard Zhao
2012-07-11 11:33 ` [PATCH v6 1/7] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao
2012-07-12  1:03   ` Shawn Guo
2012-07-12  1:14     ` Richard Zhao
2012-07-11 11:33 ` [PATCH v6 2/7] ARM: imx6q: add usbphy clocks Richard Zhao
2012-07-11 11:33 ` [PATCH v6 3/7] ARM: imx6q: disable usb charger detector Richard Zhao
2012-07-11 13:28   ` Otavio Salvador
2012-07-11 14:02     ` Richard Zhao
2012-07-11 15:54       ` Otavio Salvador
2012-07-12  2:06   ` Shawn Guo
2012-07-12  2:47     ` Otavio Salvador
2012-07-11 11:33 ` [PATCH v6 4/7] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao
2012-07-12  1:40   ` Shawn Guo
2012-07-11 11:33 ` [PATCH v6 5/7] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao
2012-07-12  1:46   ` Shawn Guo
2012-07-11 11:33 ` [PATCH v6 6/7] ARM: dts: imx28-evk: add usb devices Richard Zhao
2012-07-12  1:45   ` Shawn Guo
2012-07-11 11:33 ` [PATCH v6 7/7] ARM: dts: imx6q-sabrelite: add usbotg pinctrl support Richard Zhao
2012-07-12  1:30   ` Shawn Guo

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.