[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-52-ge42ef7b
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2014-01-19 16:54:45
|
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 e42ef7b5b3aa671e6ab14ebff2f3cd017a1dca20 (commit)
from ddb695ab54d17434c9059bb7848af164c6077b2c (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 e42ef7b5b3aa671e6ab14ebff2f3cd017a1dca20
Author: Eric Jarrige <eri...@ar...>
Date: Sun Jan 19 17:54:22 2014 +0100
[LINUX] 3.13: APF27: first draft adding USB to device tree
-----------------------------------------------------------------------
Summary of changes:
.../linux/3.13/0444-armadeus-imx27-add-usb.patch | 254 ++++++++++++++++++++
...5-armadeus-add-apf27-apf27dev-dts-for-USB.patch | 87 +++++++
2 files changed, 341 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/3.13/0444-armadeus-imx27-add-usb.patch
create mode 100644 patches/linux/3.13/0445-armadeus-add-apf27-apf27dev-dts-for-USB.patch
diff --git a/patches/linux/3.13/0444-armadeus-imx27-add-usb.patch b/patches/linux/3.13/0444-armadeus-imx27-add-usb.patch
new file mode 100644
index 0000000..8178231
--- /dev/null
+++ b/patches/linux/3.13/0444-armadeus-imx27-add-usb.patch
@@ -0,0 +1,254 @@
+Add i.MX27 and i.MX31 to the usbmisc driver. (based on Alexexander Shiyan patches)
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+--- linux-3.13-rc8.ref/arch/arm/boot/dts/imx27.dtsi
++++ linux-3.13-rc8/arch/arm/boot/dts/imx27.dtsi
+@@ -31,6 +31,9 @@
+ spi0 = &cspi1;
+ spi1 = &cspi2;
+ spi2 = &cspi3;
++ usb0 = &usbotg;
++ usb1 = &usbh1;
++ usb2 = &usbh2;
+ };
+
+ aitc: aitc-interrupt-controller@e0000000 {
+@@ -68,6 +71,7 @@
+ };
+ };
+
++
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+@@ -411,6 +415,67 @@
+ iram = <&iram>;
+ };
+
++ usbphy0: usbphy@0 {
++ compatible = "usb-nop-xceiv";
++ clocks = <&clks 75>;
++ clock-names = "main_clk";
++ };
++
++ usbphy1: usbphy@1 {
++ compatible = "usb-nop-xceiv";
++ clocks = <&clks 75>;
++ clock-names = "main_clk";
++ };
++
++ usbphy2: usbphy@2 {
++ compatible = "usb-nop-xceiv";
++ clocks = <&clks 75>;
++ clock-names = "main_clk";
++ };
++
++
++ usbotg: usb@10024000 {
++ compatible = "fsl,imx27-usb";
++ reg = <0x10024000 0x200>;
++ interrupts = <56>;
++ clocks = <&clks 75>, <&clks 62>;
++ clock-names = "ipg", "ahb";
++ fsl,usbmisc = <&usbmisc 0>;
++ fsl,usbphy = <&usbphy0>;
++ dr_mode = "host";
++ phy_type = "ulpi";
++ status = "disabled";
++ };
++
++ usbh1: usb@10024200 {
++ compatible = "fsl,imx27-usb";
++ reg = <0x10024200 0x200>;
++ interrupts = <54>;
++ clocks = <&clks 75>, <&clks 62>;
++ clock-names = "ipg", "ahb";
++ fsl,usbmisc = <&usbmisc 1>;
++ fsl,usbphy = <&usbphy1>;
++ status = "disabled";
++ };
++
++ usbh2: usb@10024400 {
++ compatible = "fsl,imx27-usb";
++ reg = <0x10024400 0x200>;
++ interrupts = <55>;
++ clocks = <&clks 75>, <&clks 62>;
++ clock-names = "ipg", "ahb";
++ fsl,usbmisc = <&usbmisc 2>;
++ fsl,usbphy = <&usbphy2>;
++ status = "disabled";
++ };
++
++ usbmisc: usbmisc@10024600 {
++ #index-cells = <1>;
++ compatible = "fsl,imx27-usbmisc";
++ reg = <0x10024600 0x4>;
++ clocks = <&clks 62>;
++ };
++
+ sahara2: sahara@10025000 {
+ compatible = "fsl,imx27-sahara";
+ reg = <0x10025000 0x1000>;
+
+--- linux-3.13-rc8.ref/arch/arm/boot/dts/imx27-pinfunc.h
++++ linux-3.13-rc8/arch/arm/boot/dts/imx27-pinfunc.h
+@@ -195,19 +195,19 @@
+ #define MX27_PAD_I2C2_SDA__GPIO3_5 0x45 0x036
+ #define MX27_PAD_I2C2_SCL__I2C2_SCL 0x46 0x004
+ #define MX27_PAD_I2C2_SCL__GPIO3_6 0x46 0x036
+-#define MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x47 0x004
++#define MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x47 0x000
+ #define MX27_PAD_USBOTG_DATA5__GPIO3_7 0x47 0x036
+-#define MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x48 0x004
++#define MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x48 0x000
+ #define MX27_PAD_USBOTG_DATA6__GPIO3_8 0x48 0x036
+-#define MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x49 0x004
++#define MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x49 0x000
+ #define MX27_PAD_USBOTG_DATA0__GPIO3_9 0x49 0x036
+-#define MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x4a 0x004
++#define MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x4a 0x000
+ #define MX27_PAD_USBOTG_DATA2__GPIO3_10 0x4a 0x036
+-#define MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x4b 0x004
++#define MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x4b 0x000
+ #define MX27_PAD_USBOTG_DATA1__GPIO3_11 0x4b 0x036
+-#define MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x4c 0x004
++#define MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x4c 0x000
+ #define MX27_PAD_USBOTG_DATA4__GPIO3_12 0x4c 0x036
+-#define MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x4d 0x004
++#define MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x4d 0x000
+ #define MX27_PAD_USBOTG_DATA3__GPIO3_13 0x4d 0x036
+ #define MX27_PAD_TOUT__TOUT 0x4e 0x004
+ #define MX27_PAD_TOUT__GPIO3_14 0x4e 0x036
+@@ -359,7 +359,7 @@
+ #define MX27_PAD_USBOTG_NXT__USBOTG_NXT 0x80 0x000
+ #define MX27_PAD_USBOTG_NXT__KP_COL6A 0x80 0x005
+ #define MX27_PAD_USBOTG_NXT__GPIO5_0 0x80 0x036
+-#define MX27_PAD_USBOTG_STP__USBOTG_STP 0x81 0x004
++#define MX27_PAD_USBOTG_STP__USBOTG_STP 0x81 0x000
+ #define MX27_PAD_USBOTG_STP__KP_ROW6A 0x81 0x005
+ #define MX27_PAD_USBOTG_STP__GPIO5_1 0x81 0x036
+ #define MX27_PAD_USBOTG_DIR__USBOTG_DIR 0x82 0x000
+@@ -418,7 +418,7 @@
+ #define MX27_PAD_SD1_CLK__GPIO5_23 0x97 0x036
+ #define MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x98 0x000
+ #define MX27_PAD_USBOTG_CLK__GPIO5_24 0x98 0x036
+-#define MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x99 0x004
++#define MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x99 0x000
+ #define MX27_PAD_USBOTG_DATA7__GPIO5_25 0x99 0x036
+ #define MX27_PAD_UNUSED9__UNUSED9 0x9a 0x004
+ #define MX27_PAD_UNUSED9__GPIO5_26 0x9a 0x036
+--- linux-3.13-rc8.ref/arch/arm/mach-imx/iomux-mx27.h
++++ linux-3.13-rc8/arch/arm/mach-imx/iomux-mx27.h
+@@ -33,13 +33,13 @@
+ #define PB25_PF_USBH1_RCV (GPIO_PORTB | GPIO_PF | 25)
+ #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_PF | GPIO_IN | 5)
+ #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_PF | GPIO_IN | 6)
+-#define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 7)
+-#define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 8)
+-#define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9)
+-#define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 10)
+-#define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11)
+-#define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 12)
+-#define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 13)
++#define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_PF | 7)
++#define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_PF | 8)
++#define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_PF | 9)
++#define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_PF | 10)
++#define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_PF | 11)
++#define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_PF | 12)
++#define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_PF | 13)
+ #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 16)
+ #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 17)
+ #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 18)
+@@ -61,11 +61,11 @@
+ #define PD14_PF_ATA_DATA12 (GPIO_PORTD | GPIO_PF | 14)
+ #define PD15_PF_ATA_DATA13 (GPIO_PORTD | GPIO_PF | 15)
+ #define PD16_PF_ATA_DATA14 (GPIO_PORTD | GPIO_PF | 16)
+-#define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_PF | GPIO_OUT | 0)
+-#define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_PF | GPIO_OUT | 1)
+-#define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_PF | GPIO_OUT | 2)
+-#define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 24)
+-#define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_PF | GPIO_OUT | 25)
++#define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_PF | 0)
++#define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_PF | 1)
++#define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_PF | 2)
++#define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_PF | 24)
++#define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_PF | 25)
+ #define PF1_PF_NFCLE (GPIO_PORTF | GPIO_PF | 1)
+ #define PF3_PF_NFCE (GPIO_PORTF | GPIO_PF | 3)
+ #define PF7_PF_PC_POE (GPIO_PORTF | GPIO_PF | 7)
+diff -purN linux-3.13-rc8.ref/drivers/usb/chipidea/usbmisc_imx.c linux-3.13-rc8/drivers/usb/chipidea/usbmisc_imx.c
+--- linux-3.13-rc8.ref/drivers/usb/chipidea/usbmisc_imx.c 2014-01-17 16:34:15.000000000 +0100
++++ linux-3.13-rc8/drivers/usb/chipidea/usbmisc_imx.c 2014-01-19 13:54:14.000000000 +0100
+@@ -20,6 +20,9 @@
+
+ #define MX25_USB_PHY_CTRL_OFFSET 0x08
+ #define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23)
++#define MX27_H1_PM_BIT BIT(8)
++#define MX27_H2_PM_BIT BIT(16)
++#define MX27_OTG_PM_BIT BIT(24)
+
+ #define MX51_USB_OTG_PHY_CTRL_OFFSET 0x00
+ #define MX51_USB_OTG_PHY_CTRL_0_OFFSET 0x08
+@@ -170,6 +173,36 @@ static int usbmisc_imx51_post(struct imx
+ return 0;
+ }
+
++static int usbmisc_imx27_init(struct imx_usbmisc_data *data)
++{
++ unsigned long flags;
++ u32 val;
++
++ switch (data->index) {
++ case 0:
++ val = MX27_OTG_PM_BIT;
++ break;
++ case 1:
++ val = MX27_H1_PM_BIT;
++ break;
++ case 2:
++ val = MX27_H2_PM_BIT;
++ break;
++ default:
++ return -EINVAL;
++ };
++
++ spin_lock_irqsave(&usbmisc->lock, flags);
++ if (data->disable_oc)
++ val = readl(usbmisc->base) | val;
++ else
++ val = readl(usbmisc->base) & ~val;
++ writel(val, usbmisc->base);
++ spin_unlock_irqrestore(&usbmisc->lock, flags);
++
++ return 0;
++}
++
+ static int usbmisc_imx53_init(struct imx_usbmisc_data *data)
+ {
+ void __iomem *reg = NULL;
+@@ -235,6 +268,10 @@ static const struct usbmisc_ops imx51_us
+ .post = usbmisc_imx51_post,
+ };
+
++static const struct usbmisc_ops imx27_usbmisc_ops = {
++ .init = usbmisc_imx27_init,
++};
++
+ static const struct usbmisc_ops imx53_usbmisc_ops = {
+ .init = usbmisc_imx53_init,
+ };
+@@ -273,7 +310,10 @@ static const struct of_device_id usbmisc
+ .data = &imx51_usbmisc_ops,
+ },
+ {
+- .compatible = "fsl,imx53-usbmisc",
++ .compatible = "fsl,imx27-usbmisc",
++ .data = &imx27_usbmisc_ops,
++ },
++ { .compatible = "fsl,imx53-usbmisc",
+ .data = &imx53_usbmisc_ops,
+ },
+ {
+--
diff --git a/patches/linux/3.13/0445-armadeus-add-apf27-apf27dev-dts-for-USB.patch b/patches/linux/3.13/0445-armadeus-add-apf27-apf27dev-dts-for-USB.patch
new file mode 100644
index 0000000..ee3c42e
--- /dev/null
+++ b/patches/linux/3.13/0445-armadeus-add-apf27-apf27dev-dts-for-USB.patch
@@ -0,0 +1,87 @@
+Add APF27 APF27dev USB to DTS
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+--- linux-3.13-rc8.ref/arch/arm/boot/dts/imx27-apf27dev.dts
++++ linux-3.13-rc8/arch/arm/boot/dts/imx27-apf27dev.dts
+@@ -130,6 +130,23 @@
+ >;
+ };
+ };
++
++ usbh2 {
++ pinctrl_usbh2: usbh2 {
++ fsl,pins = <
++ MX27_PAD_USBH1_SUSP__USBH1_SUSP 0
++ MX27_PAD_USB_PWR__USB_PWR 0
++ MX27_PAD_USB_OC_B__USB_OC_B 1
++ MX27_PAD_USBH1_RCV__USBH1_RCV 0
++ MX27_PAD_USBH1_FS__USBH1_FS 0
++ MX27_PAD_USBH1_OE_B__USBH1_OE_B 0
++ MX27_PAD_USBH1_TXDM__USBH1_TXDM 0
++ MX27_PAD_USBH1_TXDP__USBH1_TXDP 0
++ MX27_PAD_USBH1_RXDM__USBH1_RXDM 0
++ MX27_PAD_USBH1_RXDP__USBH1_RXDP 0
++ >;
++ };
++ };
+ };
+
+ &sdhci2 {
+@@ -139,3 +156,15 @@
+ pinctrl-0 = <&pinctrl_sdhc2_1>;
+ status = "okay";
+ };
++
++&usbphy2 {
++ status = "okay";
++};
++
++&usbh2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usbh2>;
++ phy_type = "serial";
++ dr_mode = "host";
++ status = "okay";
++};
+
+--- linux-3.13-rc8.ref/arch/arm/boot/dts/imx27-apf27.dts
++++ linux-3.13-rc8/arch/arm/boot/dts/imx27-apf27.dts
+@@ -87,3 +87,36 @@
+ reg = <0x800000 0xf800000>;
+ };
+ };
++
++&usbphy0 {
++ status = "okay";
++};
++
++&usbotg {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usbotg>;
++ phy_type = "ulpi";
++ dr_mode = "host";
++ status = "okay";
++};
++
++&iomuxc {
++ usbotg {
++ pinctrl_usbotg: usbotg {
++ fsl,pins = <
++ MX27_PAD_USBOTG_NXT__USBOTG_NXT 0
++ MX27_PAD_USBOTG_STP__USBOTG_STP 0
++ MX27_PAD_USBOTG_DIR__USBOTG_DIR 0
++ MX27_PAD_USBOTG_CLK__USBOTG_CLK 0
++ MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0
++ MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0
++ MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0
++ MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0
++ MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0
++ MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0
++ MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0
++ MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0
++ >;
++ };
++ };
++};
+--
hooks/post-receive
--
armadeus
|