[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-321-g7959a7b
Brought to you by:
sszy
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2013-07-21 14:48:03
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 7959a7b97f03a71d631e6152e0ef0b7f7e3211e1 (commit)
via 0c699fcb53df1d29598cdcd656f83a3b7d80670b (commit)
via d373607f7b965ea3a02c492ec51fbd462e9c928d (commit)
via 60ba1e7c5d6caeb6bbed5c778f582a51807e28a4 (commit)
from 242d6696e59a44c170b1255669099141cf185a36 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7959a7b97f03a71d631e6152e0ef0b7f7e3211e1
Author: Gwenhael Goavec-Merou <gwe...@ar...>
Date: Sun Jul 21 16:47:04 2013 +0200
[LINUX][3.11] imx51: chipidea: first draft to add imx51 chipidea support (tested only with host2)
commit 0c699fcb53df1d29598cdcd656f83a3b7d80670b
Author: Gwenhael Goavec-Merou <gwe...@ar...>
Date: Sun Jul 21 16:43:34 2013 +0200
[LINUX][3.11] imx51: Add USB pinctrl
commit d373607f7b965ea3a02c492ec51fbd462e9c928d
Author: Gwenhael Goavec-Merou <gwe...@ar...>
Date: Sun Jul 21 16:42:43 2013 +0200
[LINUX][3.11] apf51: Add USB support
commit 60ba1e7c5d6caeb6bbed5c778f582a51807e28a4
Author: Gwenhael Goavec-Merou <gwe...@ar...>
Date: Sun Jul 21 16:40:48 2013 +0200
[LINUX][3.11][3.11-rc1] Add apf51 support
-----------------------------------------------------------------------
Summary of changes:
...nux-3.10.config => apf51-linux-3.11-rc1.config} | 6 +
...1-linux-3.10.config => apf51-linux-3.11.config} | 6 +
.../3.11/0400-Add-apf51-basic-dt-support.patch | 39 ++++--
...6-armadeus-imx51-chipidea-add_usb_pinctrl.patch | 52 +++++++
...-imx51_dts-add_usbphy_for_host1_and_host2.patch | 38 +++++
...51-chipidea-usbmisc_imx-add_imx51_support.patch | 149 ++++++++++++++++++++
...adeus-chipidea-add_node_to_select_clk_phy.patch | 29 ++++
...0-armadeus-chipidea-add_phy_configuration.patch | 17 +++
8 files changed, 323 insertions(+), 13 deletions(-)
copy buildroot/target/device/armadeus/apf51/{apf51-linux-3.10.config => apf51-linux-3.11-rc1.config} (97%)
copy buildroot/target/device/armadeus/apf51/{apf51-linux-3.10.config => apf51-linux-3.11.config} (97%)
create mode 100644 patches/linux/3.11/0406-armadeus-imx51-chipidea-add_usb_pinctrl.patch
create mode 100644 patches/linux/3.11/0407-armadeus-imx51_dts-add_usbphy_for_host1_and_host2.patch
create mode 100644 patches/linux/3.11/0408-armadeus-imx51-chipidea-usbmisc_imx-add_imx51_support.patch
create mode 100644 patches/linux/3.11/0409-armadeus-chipidea-add_node_to_select_clk_phy.patch
create mode 100644 patches/linux/3.11/0410-armadeus-chipidea-add_phy_configuration.patch
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.11-rc1.config
similarity index 97%
copy from buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config
copy to buildroot/target/device/armadeus/apf51/apf51-linux-3.11-rc1.config
index 4cdf93a..748119c 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-3.11-rc1.config
@@ -200,6 +200,12 @@ CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
CONFIG_USB_STORAGE=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_PHY=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GPIO_VBUS=y
+CONFIG_USB_ULPI=y
CONFIG_USB_GADGET=m
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_DEBUG_FS=y
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.11.config
similarity index 97%
copy from buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config
copy to buildroot/target/device/armadeus/apf51/apf51-linux-3.11.config
index 4cdf93a..748119c 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-3.10.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-3.11.config
@@ -200,6 +200,12 @@ CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
CONFIG_USB_STORAGE=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_PHY=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GPIO_VBUS=y
+CONFIG_USB_ULPI=y
CONFIG_USB_GADGET=m
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_DEBUG_FS=y
diff --git a/patches/linux/3.11/0400-Add-apf51-basic-dt-support.patch b/patches/linux/3.11/0400-Add-apf51-basic-dt-support.patch
index b662659..8c4e093 100644
--- a/patches/linux/3.11/0400-Add-apf51-basic-dt-support.patch
+++ b/patches/linux/3.11/0400-Add-apf51-basic-dt-support.patch
@@ -3,21 +3,34 @@ Add apf51 basic support
Signed-off-by: Laurent Cans <lau...@gm...>
Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
---
-Index: linux-3.9.1/arch/arm/boot/dts/imx51-apf51.dts
+Index: linux-3.11-rc1/arch/arm/boot/dts/imx51-apf51.dts
===================================================================
---- linux-3.9.1.orig/arch/arm/boot/dts/imx51-apf51.dts
-+++ linux-3.9.1/arch/arm/boot/dts/imx51-apf51.dts
-@@ -36,6 +36,13 @@
- };
+--- linux-3.11-rc1.orig/arch/arm/boot/dts/imx51-apf51.dts
++++ linux-3.11-rc1/arch/arm/boot/dts/imx51-apf51.dts
+@@ -57,3 +57,26 @@
+ pinctrl-0 = <&pinctrl_uart3_2>;
+ status = "okay";
};
-
-+&nfc {
-+ nand-bus-width = <8>;
-+ nand-ecc-mode = "hw";
-+ nand-on-flash-bbt;
++
++&usbh1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usbh1_1>;
++ phy_type = "ulpi";
++ dr_mode = "host";
++ ext-clk-en;
++ status = "okay";
++};
++
++&usbh2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usbh2_1>;
++ phy_type = "ulpi";
++ dr_mode = "host";
++ ext-clk-en;
+ status = "okay";
+};
+
- &fec {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_fec_2>;
++&usbotg {
++ pinctrl-names = "default";
++ status = "okay";
++};
diff --git a/patches/linux/3.11/0406-armadeus-imx51-chipidea-add_usb_pinctrl.patch b/patches/linux/3.11/0406-armadeus-imx51-chipidea-add_usb_pinctrl.patch
new file mode 100644
index 0000000..47f7dd4
--- /dev/null
+++ b/patches/linux/3.11/0406-armadeus-imx51-chipidea-add_usb_pinctrl.patch
@@ -0,0 +1,52 @@
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.10-rc2/arch/arm/boot/dts/imx51.dtsi
+===================================================================
+--- linux-3.10-rc2.orig/arch/arm/boot/dts/imx51.dtsi
++++ linux-3.10-rc2/arch/arm/boot/dts/imx51.dtsi
+@@ -546,6 +546,44 @@
+ >;
+ };
+ };
++
++ usbh1 {
++ pinctrl_usbh1_1: usbh1grp-1 {
++ fsl,pins = <
++ MX51_PAD_USBH1_CLK__USBH1_CLK 0x1e5
++ MX51_PAD_USBH1_DIR__USBH1_DIR 0x1e5
++ MX51_PAD_USBH1_STP__USBH1_STP 0x1e5
++ MX51_PAD_USBH1_NXT__USBH1_NXT 0x1e5
++ MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x1e5
++ MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x1e5
++ MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x1e5
++ MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x1e5
++ MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x1e5
++ MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x1e5
++ MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x1e5
++ MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x1e5
++ >;
++ };
++ };
++
++ usbh2 {
++ pinctrl_usbh2_1: usbh2grp-1 {
++ fsl,pins = <
++ MX51_PAD_EIM_D16__USBH2_DATA0 0x1000
++ MX51_PAD_EIM_D17__USBH2_DATA1 0x1000
++ MX51_PAD_EIM_D18__USBH2_DATA2 0x1000
++ MX51_PAD_EIM_D19__USBH2_DATA3 0x1000
++ MX51_PAD_EIM_D20__USBH2_DATA4 0x1000
++ MX51_PAD_EIM_D21__USBH2_DATA5 0x1000
++ MX51_PAD_EIM_D22__USBH2_DATA6 0x1000
++ MX51_PAD_EIM_D23__USBH2_DATA7 0x1000
++ MX51_PAD_EIM_A24__USBH2_CLK 0x1000
++ MX51_PAD_EIM_A25__USBH2_DIR 0x1000
++ MX51_PAD_EIM_A26__USBH2_STP 0x1000
++ MX51_PAD_EIM_A27__USBH2_NXT 0x1000
++ >;
++ };
++ };
+ };
+
+ pwm1: pwm@73fb4000 {
diff --git a/patches/linux/3.11/0407-armadeus-imx51_dts-add_usbphy_for_host1_and_host2.patch b/patches/linux/3.11/0407-armadeus-imx51_dts-add_usbphy_for_host1_and_host2.patch
new file mode 100644
index 0000000..24422f2
--- /dev/null
+++ b/patches/linux/3.11/0407-armadeus-imx51_dts-add_usbphy_for_host1_and_host2.patch
@@ -0,0 +1,38 @@
+usbphy is mandatory to avoid null pointer when a device is (un)plugged.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.11-rc1/arch/arm/boot/dts/imx51.dtsi
+===================================================================
+--- linux-3.11-rc1.orig/arch/arm/boot/dts/imx51.dtsi
++++ linux-3.11-rc1/arch/arm/boot/dts/imx51.dtsi
+@@ -182,6 +182,13 @@
+ status = "okay";
+ };
+
++ usbphy1: usbphy@1 {
++ compatible = "usb-nop-xceiv";
++ clocks = <&clks 125>;
++ clock-names = "main_clk";
++ status = "okay";
++ };
++
+ usbotg: usb@73f80000 {
+ compatible = "fsl,imx51-usb", "fsl,imx27-usb";
+ reg = <0x73f80000 0x0200>;
+@@ -198,6 +205,7 @@
+ interrupts = <14>;
+ clocks = <&clks 108>;
+ fsl,usbmisc = <&usbmisc 1>;
++ fsl,usbphy = <&usbphy1>;
+ status = "disabled";
+ };
+
+@@ -207,6 +215,7 @@
+ interrupts = <16>;
+ clocks = <&clks 108>;
+ fsl,usbmisc = <&usbmisc 2>;
++ fsl,usbphy = <&usbphy1>;
+ status = "disabled";
+ };
+
diff --git a/patches/linux/3.11/0408-armadeus-imx51-chipidea-usbmisc_imx-add_imx51_support.patch b/patches/linux/3.11/0408-armadeus-imx51-chipidea-usbmisc_imx-add_imx51_support.patch
new file mode 100644
index 0000000..ddcfb5f
--- /dev/null
+++ b/patches/linux/3.11/0408-armadeus-imx51-chipidea-usbmisc_imx-add_imx51_support.patch
@@ -0,0 +1,149 @@
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.11-rc1/drivers/usb/chipidea/usbmisc_imx.c
+===================================================================
+--- linux-3.11-rc1.orig/drivers/usb/chipidea/usbmisc_imx.c
++++ linux-3.11-rc1/drivers/usb/chipidea/usbmisc_imx.c
+@@ -23,6 +23,23 @@
+ #define MX25_USB_PHY_CTRL_OFFSET 0x08
+ #define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23)
+
++#define MX51_USB_OTG_PHY_CTRL_OFFSET 0x00
++#define MX51_USB_OTG_PHY_CTRL_0_OFFSET 0x08
++#define MX51_USB_OTG_PHY_CTRL_1_OFFSET 0x0c
++#define MX51_USB_CTRL_1_OFFSET 0x10
++#define MX51_USB_UH2_CTRL_OFFSET 0x14
++#define MX51_USB_UH3_CTRL_OFFSET 0x18
++#define MX51_USB_CTRL_OTG_EXT_CLK_EN (1 << 25)
++#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
++#define MX51_USB_CTRL_UH2_EXT_CLK_EN (1 << 26)
++#define MX51_USB_CTRL_UH3_EXT_CLK_EN (1 << 26)
++#define MX51_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3
++#define MX51_USB_PLL_DIV_19_2_MHZ 0x01
++#define MX51_BM_OVER_CUR_DIS_H2 BIT(4)
++#define MX51_BM_OVER_CUR_DIS_H1 BIT(8)
++#define MX51_BM_OVER_CUR_DIS_OTG BIT(24)
++#define MX51_BM_OVER_CUR_DIS_UHx BIT(30)
++
+ #define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08
+ #define MX53_USB_UH2_CTRL_OFFSET 0x14
+ #define MX53_USB_UH3_CTRL_OFFSET 0x18
+@@ -87,6 +104,94 @@ static int usbmisc_imx25_post(struct dev
+ return 0;
+ }
+
++static int usbmisc_imx51_init(struct device *dev)
++{
++ struct usbmisc_usb_device *usbdev;
++ void __iomem *reg = NULL;
++ unsigned long flags;
++ u32 val = 0;
++
++ usbdev = get_usbdev(dev);
++ if (IS_ERR(usbdev))
++ return PTR_ERR(usbdev);
++
++ if (usbdev->index == 0) {
++ spin_lock_irqsave(&usbmisc->lock, flags);
++ reg = usbmisc->base + MX51_USB_OTG_PHY_CTRL_1_OFFSET;
++ val = readl(reg) & ~MX51_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
++ val |= MX51_USB_PLL_DIV_19_2_MHZ;
++ writel(val, reg);
++ spin_unlock_irqrestore(&usbmisc->lock, flags);
++ }
++
++ if (usbdev->disable_oc) {
++ spin_lock_irqsave(&usbmisc->lock, flags);
++ switch (usbdev->index) {
++ case 0:
++ reg = usbmisc->base + MX51_USB_OTG_PHY_CTRL_OFFSET;
++ val = readl(reg) | MX51_BM_OVER_CUR_DIS_OTG;
++ break;
++ case 1:
++ reg = usbmisc->base + MX51_USB_OTG_PHY_CTRL_0_OFFSET;
++ val = readl(reg) | MX51_BM_OVER_CUR_DIS_H1;
++ break;
++ case 2:
++ reg = usbmisc->base + MX51_USB_UH2_CTRL_OFFSET;
++ val = readl(reg) | MX51_BM_OVER_CUR_DIS_H2;
++ break;
++ }
++ writel(val, reg);
++ spin_unlock_irqrestore(&usbmisc->lock, flags);
++ }
++
++ if (usbdev->index == 1) {
++ reg = ioremap(0x73f80000+0x200+0x140, SZ_4K);
++ val = readl(reg) & (~(0xff<<16));
++ writel(val, reg);
++ iounmap(reg);
++ }
++
++ return 0;
++}
++static int usbmisc_imx51_post(struct device *dev)
++{
++ struct usbmisc_usb_device *usbdev;
++ void __iomem *reg = NULL;
++ unsigned long flags;
++ u32 val = 0;
++
++ usbdev = get_usbdev(dev);
++ if (IS_ERR(usbdev))
++ return PTR_ERR(usbdev);
++
++ if (usbdev->ext_clk_en) {
++ spin_lock_irqsave(&usbmisc->lock, flags);
++ switch (usbdev->index) {
++ case 0:
++ reg = usbmisc->base + MX51_USB_CTRL_1_OFFSET;
++ val = readl(reg) | MX51_USB_CTRL_OTG_EXT_CLK_EN;
++ break;
++ case 1:
++ reg = usbmisc->base + MX51_USB_CTRL_1_OFFSET;
++ val = readl(reg) | MX51_USB_CTRL_UH1_EXT_CLK_EN;
++ break;
++ case 2:
++ reg = usbmisc->base + MX51_USB_CTRL_1_OFFSET;
++ val = readl(reg) | MX51_USB_CTRL_UH2_EXT_CLK_EN;
++ break;
++ case 3:
++ reg = usbmisc->base + MX51_USB_CTRL_1_OFFSET;
++ val = readl(reg) | MX51_USB_CTRL_UH3_EXT_CLK_EN;
++ break;
++ }
++ if (reg && val)
++ writel(val, reg);
++ spin_unlock_irqrestore(&usbmisc->lock, flags);
++ }
++
++ return 0;
++}
++
+ static int usbmisc_imx53_init(struct device *dev)
+ {
+ struct usbmisc_usb_device *usbdev;
+@@ -152,6 +257,11 @@ static const struct usbmisc_ops imx25_us
+ .post = usbmisc_imx25_post,
+ };
+
++static const struct usbmisc_ops imx51_usbmisc_ops = {
++ .init = usbmisc_imx51_init,
++ .post = usbmisc_imx51_post,
++};
++
+ static const struct usbmisc_ops imx53_usbmisc_ops = {
+ .init = usbmisc_imx53_init,
+ };
+@@ -166,6 +276,10 @@ static const struct of_device_id usbmisc
+ .data = &imx25_usbmisc_ops,
+ },
+ {
++ .compatible = "fsl,imx51-usbmisc",
++ .data = &imx51_usbmisc_ops,
++ },
++ {
+ .compatible = "fsl,imx53-usbmisc",
+ .data = &imx53_usbmisc_ops,
+ },
diff --git a/patches/linux/3.11/0409-armadeus-chipidea-add_node_to_select_clk_phy.patch b/patches/linux/3.11/0409-armadeus-chipidea-add_node_to_select_clk_phy.patch
new file mode 100644
index 0000000..4b72520
--- /dev/null
+++ b/patches/linux/3.11/0409-armadeus-chipidea-add_node_to_select_clk_phy.patch
@@ -0,0 +1,29 @@
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.11-rc1/drivers/usb/chipidea/ci_hdrc_imx.c
+===================================================================
+--- linux-3.11-rc1.orig/drivers/usb/chipidea/ci_hdrc_imx.c
++++ linux-3.11-rc1/drivers/usb/chipidea/ci_hdrc_imx.c
+@@ -80,6 +80,9 @@ int usbmisc_get_init_data(struct device
+ if (of_find_property(np, "external-vbus-divider", NULL))
+ usbdev->evdo = 1;
+
++ if (!of_find_property(np, "ext-clk-en", NULL))
++ usbdev->ext_clk_en = 1;
++
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(usbmisc_get_init_data);
+Index: linux-3.11-rc1/drivers/usb/chipidea/ci_hdrc_imx.h
+===================================================================
+--- linux-3.11-rc1.orig/drivers/usb/chipidea/ci_hdrc_imx.h
++++ linux-3.11-rc1/drivers/usb/chipidea/ci_hdrc_imx.h
+@@ -23,6 +23,7 @@ struct usbmisc_usb_device {
+
+ unsigned int disable_oc:1; /* over current detect disabled */
+ unsigned int evdo:1; /* set external vbus divider option */
++ unsigned int ext_clk_en:1; /* select the clock from external PHY*/
+ };
+
+ int usbmisc_set_ops(const struct usbmisc_ops *ops);
diff --git a/patches/linux/3.11/0410-armadeus-chipidea-add_phy_configuration.patch b/patches/linux/3.11/0410-armadeus-chipidea-add_phy_configuration.patch
new file mode 100644
index 0000000..cbe2ea3
--- /dev/null
+++ b/patches/linux/3.11/0410-armadeus-chipidea-add_phy_configuration.patch
@@ -0,0 +1,17 @@
+hw_phymode_configure is needed to enable phy
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.11-rc1/drivers/usb/chipidea/core.c
+===================================================================
+--- linux-3.11-rc1.orig/drivers/usb/chipidea/core.c
++++ linux-3.11-rc1/drivers/usb/chipidea/core.c
+@@ -510,6 +510,8 @@ static int ci_hdrc_probe(struct platform
+ if (ci->is_otg)
+ hw_write(ci, OP_OTGSC, OTGSC_IDIE, OTGSC_IDIE);
+
++ hw_phymode_configure(ci);
++
+ ret = dbg_create_files(ci);
+ if (!ret)
+ return 0;
hooks/post-receive
--
armadeus
|